Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.

Video: Transform Functions: Horizontal and Vertical Translations

Tim Burnham

Learn about function transformations. More specifically, learn how to identify and apply transformations that horizontally and vertically translate the graphs of the functions. For instance, consider f(x + a), or f(x) + a for different values of a.

16:34

Video Transcript

In this video, we’re gonna take a simple function 𝑓 of π‘₯ equals π‘₯ squared and carry out some transformations. We’re gonna translate the graph either left or right or up or down. And we’re also gonna take a look at the effect on the equation and the graph, side by side.

Now here’s the graph of the function 𝑓 of π‘₯ is equal to π‘₯ squared. Now let’s think about some of the points on that graph. 𝑓 of zero is zero. If we input an π‘₯-value of zero into that function, we get an output value, or 𝑦-coordinate, which is also zero. And if we input a value of one, we can see that the corresponding 𝑦-coordinate is also one. So with the function 𝑓 of π‘₯ equals π‘₯ squared, we’re taking an input value and we’re squaring it and getting an output value. Now it just so happens, the first two numbers we’ve tried, the input is the same as the output. But let’s try 𝑓 of two.

Well 𝑓 of two is two squared, and two squared is four. So that’s this point on the graph. Then 𝑓 of negative one is negative one squared, which is one. So that’s this point on the graph. And 𝑓 of negative two is negative two squared, which is four. So that’s this point on the graph. And 𝑓 of three and 𝑓 of negative three, both give output values of nine. So those two points from the graph as well.

Now we’ve plotted 𝑦 equals 𝑓 of π‘₯, but what if we wanted to plot 𝑦 equals 𝑓 of π‘₯ plus two. Now remember when plotting 𝑦 equals 𝑓 of π‘₯, we took all of the 𝑓 of π‘₯ values and used those as the 𝑦-coordinates. So 𝑦 equals 𝑓 of π‘₯ plus two, we’re taking all of the 𝑦-coordinates and just adding two to them. So when the 𝑦-coordinate was zero, it’s going to become two in 𝑓 of π‘₯ plus two. When the 𝑦-coordinate was one, we add two to that to make three. When it was four, we add two to that to make six, and so on for all the other points. So when we’re plotting 𝑦 equals 𝑓 of π‘₯ plus two, it’s gonna look exactly like 𝑦 equals 𝑓 of π‘₯, but all the 𝑦-coordinates have had two added to them.

So we’re gonna get a curve that looks like this. We’ve translated the function positive two units in the 𝑦-direction. And that same effect would’ve occurred whatever the original function looked like. For example if the graph 𝑦 equals 𝑓 of π‘₯ had looked like this, then for 𝑦 equals 𝑓 of π‘₯ plus two we just increase all of those 𝑦-coordinates by two. And this is what the transformed function looks like. And it’s important to notice that it’s this plus two here which’s been added to all the original 𝑦-coordinates, which has transformed or translated that function in this case.

Now let’s try adding negative two to our function or subtracting two. Now when the 𝑦-coordinate was zero, we subtract two to make it negative two. When it was one, we subtract two to make it negative one. When it was four, we subtract two to make it two, and so on for all the points on the curve. So the curve moves down two places. It translates negative two in the 𝑦-direction. So adding a constant to a function translates its graph by that number of units in the 𝑦-direction.

Now let’s take a quick look at what it does to the equation of the function. If the equation of our function was 𝑓 of π‘₯ equals π‘₯ squared, then adding two to 𝑓 of π‘₯ turns it into π‘₯ squared plus two. All of these 𝑦-coordinates are the same as these 𝑦-coordinates, but with this extra two added. And similarly, if we subtract two from our function, all of these 𝑦-coordinates are the same as these 𝑦-coordinates except they get two taken away. And if our function was something a little bit more complicated like 𝑓 of π‘₯ equals three π‘₯ squared minus two π‘₯ minus seven and I added something, say five, then although the function can be simplified to an expression like this, it’s still a matter of taking all the same 𝑦-coordinates we had before but adding five to them.

And likewise with subtracting, if I took away seven from each side, the expression for the function may simplify to this. But it’s still a matter of taking these same 𝑦-coordinates but just subtracting seven from them.

So adding something to a function translates the graph vertically upwards, and subtracting something from a function translates the graph vertically downwards. And in both cases those translations are parallel to the 𝑦-axis.

Now let’s think about shifting left and right. To do this, we’re adding or subtracting numbers from the π‘₯-coordinate, but we do need to be a bit careful because it plays out slightly differently to the up and down version. If 𝑓 of π‘₯ is equal to π‘₯ squared, then 𝑓 of π‘₯ plus two is equal to π‘₯ plus two all squared, which is π‘₯ plus two times π‘₯ plus two. And when I multiply those out and simplify, I get π‘₯ squared plus four π‘₯ plus four. So by adding two to the π‘₯-coordinate being input, I get a function which looks quite different to the original function.

Let’s have a look at the graphs then of 𝑦 equals 𝑓 of π‘₯ and 𝑦 equals 𝑓 of π‘₯ plus two. My dotted curve is 𝑦 equals 𝑓 of π‘₯ and remember that’s 𝑦 equals π‘₯ squared. And our solid curve is 𝑦 equals 𝑓 of π‘₯ plus two. What we should remember is 𝑦 equals π‘₯ squared plus four π‘₯ plus four. Now you might’ve expected that this bit here would be adding two to all of the π‘₯-coordinates on our curve, but that’s not what’s happened. It’s actually subtracted two from all of the π‘₯-coordinates on our curve. This point here has moved to here. This point here has moved to here, and so on. It’s shifted the graph to the left two places, or translated it negative two in the π‘₯-direction.

Now let’s take a closer look and try and understand why that’s happened. So here’s just the graph of 𝑓 of π‘₯ and remember 𝑓 of π‘₯ is equal to π‘₯ squared. Now let’s define a new function called 𝑔 of π‘₯ which is equal to 𝑓 of π‘₯ plus two. Now to work out the 𝑦-coordinates for the 𝑔 of π‘₯ function, we can read them from the corresponding point on the 𝑓 of π‘₯ function. But the corresponding point is the one that’s got an π‘₯-coordinate which is two bigger. So for example, to work out the 𝑦-coordinate when the π‘₯-coordinate is zero, in other words the value of 𝑔 zero, all we have to do is evaluate 𝑓 of zero plus two, so 𝑓 of two. Now 𝑓 of two is this point here, four. So 𝑔 of zero is the same as 𝑓 of two. That four gets moved to here. And to work out the 𝑦-coordinate for the 𝑔 function that goes with an π‘₯-coordinate of one, we work out 𝑔 of one.

But remember 𝑔 of one is the same as 𝑓 of one plus two, so 𝑓 of three. So to work out the 𝑦-coordinate that goes with an π‘₯-coordinate of one on the 𝑔 function, we need to find the 𝑦-coordinate that goes with an π‘₯-coordinate of three on the 𝑓 function; and that is nine. So 𝑔 of one is nine. This point here has effectively moved two places to the left.

Let’s do one more 𝑔 of negative two. Well 𝑔 of negative two is equal to 𝑓 of negative two plus two, so that’s 𝑓 of zero. So the 𝑦-coordinate that goes with an π‘₯-coordinate of negative two on the 𝑔 function is the same as the 𝑦-coordinate that goes with an π‘₯-coordinate of zero on the 𝑓 function. And 𝑓 of zero is zero. So on the 𝑔 function, when π‘₯ is equal to negative two, the 𝑦-coordinate will be zero. This point is mapping to this point. So having done that to a few different points, it soon becomes clear that the 𝑓 of π‘₯ curve is being translated two units to the left to get the 𝑔 of π‘₯ curve. So adding two to the inputs of that function has translated the graph two places to the left.

And similarly, if we look at that function 𝑓 of π‘₯ minus two, when I expand that out and simplify, I get this function here π‘₯ squared minus four π‘₯ plus four. Now again, let’s look at the curves of 𝑓 of π‘₯ and 𝑓 of π‘₯ minus two. Again the dotty curve is 𝑦 equals 𝑓 of π‘₯ and that was π‘₯ squared, remember. And the solid curve is 𝑦 equals 𝑓 of π‘₯ minus two which was π‘₯ squared minus four π‘₯ plus four.

So subtracting two from the inputs to our function translates the graph positive two units in the π‘₯-direction. So adding a constant to the inputs translates the graph to the left, and subtracting a constant from the inputs translates the graph to the right.

Now let’s just summarise what we’ve learnt so far. If we see something like 𝑓 of π‘₯ plus π‘Ž, we’re adding π‘Ž to all the 𝑦-coordinates so this translates 𝑓 of π‘₯ by positive π‘Ž units in the 𝑦-direction. And that means if π‘Ž is positive, we’re translating upwards and if π‘Ž is negative, we’re translating downwards. And if we encounter something like 𝑓 of π‘₯ plus π‘Ž where we’re adding a constant to π‘₯ inside the brackets there in the function, this translates 𝑓 of π‘₯ by negative π‘Ž units in the π‘₯-direction. And now if π‘Ž is positive, we’re translating the graph to the left and if π‘Ž is negative, we’re translating the graph to the right.

Now we can also combine these two sorts of transformations. For example, if 𝑓 of π‘₯ equals π‘₯ squared, describe the effect of the transformation 𝑓 of π‘₯ minus five plus three on the graph of 𝑦 equals 𝑓 of π‘₯, and write and simplify the equation of the transformed function.

So if 𝑓 of π‘₯ is equal to π‘₯ squared, then 𝑓 of π‘₯ minus five plus three is equal to π‘₯ minus five all squared plus three. Now subtracting five from the inputs is going to shift the whole curve to the right by five places. In other words, it translates positive five units in the π‘₯-direction. And adding three to that result is gonna add three to all the 𝑦-coordinates which is translating positive three units in the 𝑦- direction. And it’s doing both of those two things. So that’s our answer for the first part of the question. Now let’s go on and multiply out and simplify the expression for our function. And that gives us our answer for the second part of the question.

Now typical part b to that sort of question might be to sketch 𝑦 equals 𝑓 of π‘₯ minus five plus three on the given diagram. So they’ve given us the graph of the 𝑦 equals 𝑓 of π‘₯ function and we’ve got to translate it five places to the right and three places upwards, as we worked out from the first part of the question. So let’s just go through some points on that graph and do the translations. Zero, zero goes five places to the right and three places up here to five, three. One, one goes five to the right and three up to six, four. And two, four goes five to the right and three up to seven, seven, and so on with some more points.

Then now we just have to join up all those translated points as accurately as we can, extending off up here somewhere and extending off up here somewhere, and label it. Now it doesn’t have to be a hundred percent accurate, but you do have to show the method and the key points have to be accurately translated, in this case five places to the right and three places up.

So now let’s just look at a couple of examples where they don’t give you the equation of the function; they just give you the graph. Given this graph of 𝑦 equals 𝑓 of π‘₯, sketch the graph of 𝑦 equals 𝑓 of π‘₯ minus three.

Well what do you think this is doing? We’re subtracting three from the input π‘₯-coordinates before they go into the function. So the result of this, it’s gonna be to translate that graph three places to the right. And my advice here would be to pick some points which are gonna be easy to translate, to start off with. So this point here has got integer coordinates, so just moving that three places to the right, is gonna move it to here. This point here, three places to the right is gonna move it to here. And this point here, three places to the right is gonna move it to here. Now this point here is gonna move three places to the right so one, two, three, that’s about here. And this point here is gonna move three places to the right so one, two, three, that’s about here. And let’s pick a couple more. This point up here is gonna move three places to the right, so that’s gonna move to here. And this point here is gonna move three places to the right so one, two, three, that’s gonna be about to here. And one more, this point here is gonna move three places so one, two, three, that’s about here. Now we just have to join them up as accurately as we can, and so it’s going through in here so that’s going up and then down here. So again it doesn’t need to be a hundred percent accurate, but we do need to show that we’ve picked some certain points and moved them exactly three places to the right.

And now this one: Given this graph of 𝑦 equals 𝑔 of π‘₯, sketch the graph of 𝑦 equals 𝑔 of π‘₯ plus three minus two.

First we need to think about the transformation. This bit in here, what do you think that’s doing? We’re adding three to all of the input π‘₯-coordinates in the function. So that’s gonna translate negative three units in the π‘₯-direction. And how about this bit. Well we’re subtracting two from the results, so we’re subtracting two from all of our 𝑦- coordinates. So that means we’re translating negative two units in the 𝑦-direction. And we’re doing both of those two things to our graph. So again we’re gonna take some key points on the graph, do the transformations and then join up the dots. This point here is going negative three in the π‘₯-direction and negative two in the 𝑦-direction, so that’s gonna end up here. This point here, negative three in the π‘₯, negative two in the 𝑦, will end up here. Do the same for some more points and then join them all up.

And just finally to check, make sure that your curve is still the same shape and it’s been shifted left and down by the appropriate amounts. Check these maximum and minimum points here. So this maximum point here is definitely going to the left three and down two and it’s mapped onto the maximum point. This minimum point here has gone left three, down two and that is still on a minimum point on my new version of the curve.

So one final summary then, 𝑓 of π‘₯ plus π‘Ž means we’re adding π‘Ž to the 𝑦-coordinate. And the 𝑦-coordinate is the output from our function, so we’re adding π‘Ž to the output. And this means if π‘Ž is positive, we’re translating the curve upwards and if π‘Ž is negative, we’re translating the curve downwards. And if we do 𝑓 of π‘₯ plus π‘Ž inside the parentheses or the brackets there, we’re adding π‘Ž to the π‘₯-coordinate input. But beware, if you add to the π‘₯-coordinate on the input, it’s gonna move the output to the left. If you subtract a value from the input, it’s gonna move the graph to the right. And perhaps some slightly better terminology, in the first case we’re translating positive π‘Ž units in the 𝑦-direction, and in the second case we’re translating negative π‘Ž units in the π‘₯-direction.