What is a function? Now, one definition of a function is that a function is a rule that Maps 1 unique number to another unique number. So In other words, If I start off with a number and I apply my function, I finish up with another unique number. So for example, let's suppose that my function added three to any number I could start off with a #2. I apply my function and I finish up with the number 5. Start off with the number 8 and I apply my function and I finish up with the number 11. And if I start off with a number X and I apply my function, I finish up with the number X +3 and we can show this mathematically by writing F of X equals X plus three, where X is our inputs, which we often called the arguments of the function and X +3 is our output. Now suppose I had an argument of two, I could write down F of two equals. 2 + 3, which gives us an output of five. Suppose I had an argument of eight. I could write down F of eight equals 8 + 3, which gives me an output of 11. And suppose I had an argument of minus six. I could write F of minus 6. Equals minus 6 + 3, which would give me minus three for my output. And if I had an argument of zed, I could write down F of said equals zed plus 3. And likewise, if I had an argument of X squared, I could write down F of X squared equals X squared +3. Now it is with me pointing out here that's a lower first sight. It might appear that we can choose any value for argument. That's not always the case, as we shall see later, but because we do have some choice on what number we can pick the argument to be, this is sometimes called the independent variable. And because output depends on our choice of arguments, the output is sometimes called the dependent variable. Now let's have a look at an example F of X equals 3 X squared. Minus 4. Now, as we said before, X is our input which we call the argument and that is the independent variable. And our output which is 3 X squared minus four is our dependent variable. Now we can choose different values for arguments, which is often a good place to start when we get function like this. So F of zero will give us 3 * 0 squared takeaway 4, which is 0 - 4, which is just minus 4. If we start off with an argument of one. We get F of one equals 3 * 1 squared takeaway 4, which is just three takeaway four which gives us minus one. If we have an argument of two F of two equals 3 * 2 squared takeaway, four switches 3 * 4, which is 12 takeaway. Four gives us 8. And as I said before, there's no reason why we can't include and negative arguments. So if I put F of minus one in. The three times minus one squared takeaway 4, which is 3 * 1 gives us three takeaway. Four gives us minus one. And F of minus 2. Would give us three times minus 2 squared takeaway 4 which is 3 * 4 gives us 12 and take away four will give us 8. So what are we going to do with these results? Well, one thing we can do is put them into a table to help us plot the graph of the function. So if we do a table of X&F of X. The values were chosen for RX column, which is. Our arguments are minus 1 - 2 zero one and two. So minus 2 - 1 zero 12. And the corresponding outputs are 8 - 1. Minus 4 - 1 and 8. And we can use this as I said to help us plot the graph of the function. So just to copy the table down again. So we've got handy. We have minus 2 - 1 zero 12. 8 - 1 - 4 - 1 and 8. So we plot our graph. Of F of X on the vertical axis, so output and arguments. On the horizontal axis. So we've got one too. Minus 1 - 2. And we've got. Minus 1 - 2 - 3 - 4. I'm going off. Up to 81234567 and eight. So our first point is minus 2 eight so we can put the appear. Our second point, minus 1 - 1 should appear down here. 0 - 4. Here one and minus one. Yeah, but up on two and eight which will appear over here and we can see we can draw a smooth curve through these points, which will be the graph of the function. OK, now why are we drawing a graph of a function? Because this is quite useful to us because we can now read off the output of a function for any given arguments straight off the graph without the need to do any calculations. So for example, if we look at two and arguments of two, we know that's going to give us 8 before I do work that out. But if we looked and we wanted to figure out. But the output would be when the argument was one point 5. If we follow our lineup and across you can see that that gives us a value between 2:00 and 3:00 for the output, and if we substitute in 1.5 back into our original expression for the function, you can see actually gives us an exact value of 2.75. Now earlier on when I discussed uniqueness, I said that a unique inputs had to give us a unique output and by that what we mean is that for any given argument we should get only one output. One of the benefits of having a graph of a function is that we can check this using our ruler. If we line our ruler up vertically and we move it left and right across the graph. We can make sure that the rule I only have across is the graph wants at any point. And as we can see, that's clearly the case in this example. And when that happens, the graph is a valid function. Now, if we had the example. F of X. Equals root X. A good place to start is always to substitute in some values for the arguments, so F of 0. This gives us the square root of 0, which is 0. Half of one's own arguments of one will give us plus or minus one for the square root. F of two. Will give us plus or minus 1.4 just to one decimal place there. Half of 3. Which gives us the square root of 3 gives us plus or minus 1.7. An F4. Will give us square root of 4 which is just plus or minus 2. Now. If we try to put in any negative arguments here you can see that we're going to run into trouble because we have to try and calculate the square root of a negative number and we'll come back to this problem in a second. But for now, let's plot the points that we've got so far. So if we take out F of X axis vertical again. And our arguments access X horizontal. We've got 1234. And there are vertical axis we have minus one. Minus 2. Plus one. Plus two points. We've got zero and zero. One on plus one. And also 1A minus one. We've got two and positive 1.4. So round about that and also to negative 1.4. We've got three and positive 1.7. And we've got three and negative 1.7. And finally we have four and +2. And four and negative 2. OK, and we've got enough points here that we can draw a smooth curve through these points. At something it looks like. This. OK. Now. As usual, we will apply our ruler test to make sure that the function is valid and you can see straight away that when we line up all the vertically and move it across for any given positive arguments, we're getting two outputs. So obviously we need to do something about this to make the function valid. One way to get around this problem is by defining route X to take only positive values or 0. This is sometimes called the positive square root. So in effect we lose the bottom negative half of this graph. And obviously we also have the issue of the negative arguments, and since we can't take the square root of a negative number, we also have to exclude these from the X axis. Now when we start talking about these kind of restrictions, it's important that we use the right kind of mathematical language. So the set of possible inputs is what we call the domain, and the set of possible outputs is what we call the range. So in this case, when we've got RF of X equals the square root of X. We need to restrict our domain to be X is more than or equal to 0, 'cause we only wanted the positive values and zero. But we also notice that now because we've got rid of the bottom half of the graph. The only part of the range which are included are also more than or equal to 0. So range is defined by F of X more than or equal to 0. So now we have a valid function. So what will do now is just look at a couple more examples to pull together everything that we've done so far and will start with this one. Let's look at the function F of X equals 2 X squared minus three X +5. No, as usual, a good place to start when you get a function is to substitute in some values for the arguments. So let's start with that. So now arguments of 0 would give us F of 0, which is 2 * 0 squared. Minus 3 * 0 + 5 which is just zero takeaway 0 + 5. So we get now pose A5 that if we had an argument of one. We get 2 * 1 squared takeaway 3 * 1 + 5. Which gives us 2 * 1 here, which is 2. Take away 3 * 1 which is take away three and plus five. So two takeaway three is minus 1 + 5 gives us 4. OK, we look at an argument of two. We get 2 * 2 squared. Take away 3 * 2. I'm plus five which gives us 2 * 4, which is 8 and take away 3 * 2 which is take away 6 and then forget our plus five at the end. So eight takeaway six is 2. +5 gives us 7. OK. If we look at an argument of three. Half of three gives us 2 * 3 squared. Take away 3 * 3. And +5. So this is 2 * 9 here 18. Take away 3 * 3 which is take away nine and +5. So 18 takeaway 9 is 9 + 5 gives us 14. And last but not least, we can also include a negative arguments, so we'll put negative arguments of minus one. So F of minus one gives us two times minus 1 squared. Take away three times minus one. And of course, our +5. So two times minus one squared just gives us 2. Takeaway minus sorry takeaway three times negative one which just gives us a plus 3. And then we've got a +5. 2 + 3 + 5 just gives us 10. And what we can do is as before, just put this into a table to make it nice and easy to make a graph of the function. So we put it into a table of X. And F of X. For arguments we had minus 10123. For Outputs, we had 10 five. 4, Seven and 14. OK, so let's see the graph of this function then. You start off with our. F of X on the vertical axis as before. An argument. X on the horizontal axis. And we've got over 2 - 1, The One. 2. And three, and on the vertical axis. Go to 15. OK, so our first point to plot is minus one and 10 which will give us something there zero and five. There's a point here. One and four. It gives the points here. Two and Seven. Should be around here and three and 14 which will be about here so we can see the kind of shape that this function is starting to take here. And we can draw in the graph. What we want is to say that every input gives us only one single output, so we can get our ruler again and just quickly check by going along and we can see that as we go along. Our rule across is the curve once and once only. Which means that this function is valid. However, an interesting point to note is this point here. The minimum point which actually occurs when X is North .75. So with X value of North .75 are outputs can take a minimum value of 3.875. So this means when we look at our domain and range, we need to make no restrictions on the domain because our function was valid. However. Our range has a minimum of 3.875, so we write this. As F of X equals. Two X squared minus three X +5. And the range F of X has always been more than or equal to 3.875. So for the next example. What would happen if we had a function F defined by? F of X equals one over X. Well, that's always the first stage is to substitute in some values for the arguments. So for F of one. The argument is one is 1 / 1 just gives US1. For Port F of two. We just get one half. F of three gives us 1/3. And F4 will give us 1/4. And as before, we can also look at some negative arguments. So if I look at F of minus one. Skip 1 divided by minus one, which is just minus one. F of minus 2. Is 1 divided by minus two, which just gives us minus 1/2? F of minus three. Same thing will give us minus 1/3. And F of minus 4. Will give us minus 1/4? Now if we look at F of 0. We have 1 / 0. Which is obviously a problem for us. Because of this problem, we have to restrict our domain so that it does not include the arguments X equals 0. So let's have a look at what the graph of this function actually looks like. So let's be 4F of X and are vertical axis for the Outputs. An argument sax on the horizontal axis. OK, so we've gone over here 1234. And minus 1 - 2 - 3 - 4 over here. As we go. All the web to one down to minus one. Has it as well? So we've got one and one. We've got 2 1/2. 3 1/3. 4 one quarter. We've got minus 1 - 1. Minus 2 - 1/2. Minus 3 - 1/3. A minus four and minus 1/4. OK, and obviously we've excluded 0 from our domain. As we said before. So if we join these points up. And a smooth curve. Get something that looks like this. Now, obviously we've excluded X equals 0 from our domain, but it's also worth noticing here. Thought there's nothing at the output of F of X equals 0, so that also ends up being excluded from the range. So we actually end up with F of X equals one over X. And we've got X not equal to 0 from the domain. And also. In the range F of X never equals 0 either. But what's actually happening at this point? X equals 0 when the arguments is zero. What is going on? Well, let's have a look and will start off by having a look what happens as we get closer and closer to 0. Now. If we start off with a value of 1/2 of one and remember F of X was just equal to one over X. Half of 1 just gives US1, so if I get closer to 0 again, let's look at half of 1/2. At 1 / 1/2. This one over 1/2 which just gives us 2. So about F of 110th. It just gives us 1 / 1 tenth, which gives us 10. Half of one over 1000 will just give us 1 / 1 over 1000. Which gives us 1000. What about one over 1,000,000, so F of one over a million? It's actually just in the same way as before, just going to give us a million. So we can see. The US we get closer and closer to zero from the right hand side as we saw on our graph before. We're getting closer and closer to positive Infinity to the graph goes off to positive Infinity that. What happens when we approach zero from the left hand side? Well, let's have a look. This is minus one, just gives us 1 divided by minus one, which is minus one. F of minus 1/2. It's going to be just one divided by minus 1/2. Just give his minus 2. Half of minus 110th. Is 1 divided by minus 110th? It just gives us minus 10 and we can kind of see a pattern here. OK so F of minus one over 1000. Will actually give us minus 1000. And F of minus one over 1,000,000. Actually gives us minus 1,000,000. So you can see that as we approach zero from the left or outputs approaches negative Infinity. And as we approach zero from the right hand side are output approaches positive Infinity, and these are very different things. OK, for the last example. I just like to look at the function F defined by. F of X equals one over X minus two all squared. So as always with the examples we've done, it's worthwhile started off by looking at some different values for the arguments. So we start off with an argument of minus two, so half of minus two gives us one over minus 2 - 2 squared. Which gives us one over minus 4 squared, which is one over 16. F of minus one. Will give us one over minus 1 - 2 all squared, which gives us one over minus 3 squared which is one over 9. Now, FO arguments of zero will give us one over 0 - 2 all squared, which is one over minus 2 squared, which works out as one quarter. And F of one will give us one over 1 - 2 squared. Which is just one over minus one squared, which gives us just one. OK. Half of two gives us one over. 2 - 2 or squared, which gives us one over 0 which presents us with exactly the same problem we had in the previous example when we had one over X and so we have to exclude X equals 2 from the domain. Half of three gives us one over 3 - 2 all squared. Which is one over 1 squared is just gives US1 again. After four gives us one over 4 - 2 or squared, which gives us one over 4. After 5. Gives us one over 5 - 2 or squared which gives us one over 3 squared which is 1 ninth and finally F of six gives us one over 6 - 2 all squared which is one over 4 squared which works out as one over 16. Now if we want to plot the graph of this function will probably need to put this into a table first. So as usual, do our table of X&F of X. OK, and we went from minus 2 - 1 zero all the way. Up to and arguments of sex. And the values we got for the Outputs. One over 16. One 9th, one quarter and 1:01. One quarter, 1 ninth and one over 16. So we plot that onto. The graph as before. So we have arguments going along the horizontal axis. And Outputs going along the vertical axis. We've gone from minus 1 - 2 over there 123456 along this way. And then going off, we've gone too. One up here, so put in a few of the marks 1/2. It's put in 1/4 that. Put in 3/4. OK, so we've got minus two and 116th, which is going to come in down here. Minus one and one 9th. For coming over here zero and one quarter. Over here. 1 on one. Right, the way up here? To an. Obviously this was the divide by zero, so we couldn't do anything with that. We've excluded, uh, from our domain. Three and one. Pay up. Four and one quarter. I'm here. Five and one, 9th and six and 116th. Because we've excluded X equals 2 from our domain. Put dotted line there, so that's an asymptotes. And we can draw our curve. Up through the points. On this side. And we can see differently to the other example where F of X is one over X this time. As we get approach to from both the left and from the right, both of the outputs are heading towards positive Infinity, so a little bit different, and also because we've excluded X equals 2 from the domain of function is now valid. But most also notice that our range is never zero, and it's also never negative. So to write this out properly. Our function F of X equals one over X minus two all squared. And we said. They are domain is restricted so it doesn't include two. And our range is always more than 0. OK, so let's just recap on what we've done in this unit. So firstly, the definition of a function. And that was that. A function is a rule that Maps are unique number X to another unique number F of X. Secondly, was the idea that an argument is exactly the same as an input. Thirdly, we looked at the idea of independent and dependent variables. And we said that the input axe was the independent variable and the output was the dependent variable. 4th, we looked at the domain and we said that the domain was the set of possible inputs. And finally we looked at the range and we said that the range was the set of possible outputs. So now you know how to define a function. And how to find the outputs of a function for a given argument?