If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

# Shifting functions examples

CCSS.Math:

## Video transcript

so we have these two graphs that looks pretty similar y equals f of X and y is equal to G of X and what they ask us to do is write a formula for the function G in terms of F so let's think about how to do it and like always pause the video and see if you can work through it on your own all right well what I like to do is I like to focus on this minimum point because I think that's a that's a very easy thing to look at because both of them have that minimum point right over there and so we could think about how do we shift F at least it especially this minimum point how do we shift it to get to overlapping with G well the first thing that might jump out at us is that we would want to shift to the left and we'd want to shift to the left for so let me do this in a let me do this in a new color so I would want to shift to the left by 4 so we have shifted to the left by 4 or you could say we shifted by negative 4 either way you can think about it and then we need to shift down so we need a shift we need to go from y equals 2 to y is equal to negative 5 so let me do that so let's shift down so we shift down by 7 or you could say we have a negative 7 shift so how do you express G of X if it's a version of f of X that shifted to the left by 4 and shifted down by 7 or you could say has a negative 4 horizontal shift and had a negative 7 vertical shift well one way to think about it is G of X G of X is going to be equal to f of F let me do it in a little darker color it's going to be equal to f of X minus your horizontal shift all right horizontal shift so X minus your horizontal shift plus your vertical shift so plus your vertical vertical shift well what is our horizontal shift here well we're shifting to the left so it was a negative shift so our horizontal shift is negative for now what's our vertical shift well we went down so our vertical shift is negative seven so it's negative seven so there you have it we get G of X let me do that same color we get G of X is equal to f of X minus negative 4 or X plus 4 and then we have plus negative 7 or you could just say minus 7 and we're done and when I look at things like this that the negative 7 is is somewhat is more intuitive to me is that I shifted it down it makes sense that have a negative 7 but at first when you work on these you say hey wait I shift it to the left why is it a plus why is it a plus 4 and the way I think about it is in order to get the same value out of the function instead of inputting so if you want to get the value of f of zero you now have to put x equals negative 4 in and then you get that same value you still get to zero so that's I don't know if that helps or hurts in in terms of your understanding but it often helps to try out some different values for X and seeing how it actually does shift the function and if you're just trying to get your head around this piece the horizontal shift I recommend you know not even using this example use an example that only has a horizontal shift and will become a little bit more intuitive and we do we have many videos that go into much more depth that explain that let's do another example of this so here we have we have y is equal to G of X in purple and y is equal to f of X in blue and they say given that f of X is equal to square root of square root of x plus 4 minus 2 right a G right expression for G of X in terms of X so first let me just write an expression for G of X in terms of f of X we can see once again it's just a shifted version of f of X and remember I'll just write it in general so G of X is going to be equal to f of X minus your horizontal shift plus your vertical shift vertical shift and so to go from F to G what is your horizontal shift well your horizontal shift is if you take this point right over here which is which should map to that point once we shift everything your horizontal shift is to to the left so or you could say it's a negative two horizontal shift so that should be negative two and then what is our vertical shift well our vertical shift is we move we go from y equals negative 2 to y equals 3 so we're shifting v up so this is a vertical shift of positive 5 so your vertical shift is 5 so if we just wanted to write G of X in terms of f of X like we just did in the previous example it's we could say G of X is going to be equal to f of X minus negative 2 which is X plus 2 and then we have plus 5 but that's not what they asked us to do they asked us to write they add whoops asked us to write an expression for G of X in terms of X and so here we're actually going to use the definition of f of X so let me make it clear we know that f of X f of X is going to be equal to square root of x plus 4 minus 2 so given that and given that what is f of X plus 2 well f of X plus 2 is going to be equal to everywhere where we see an X we're going to replace it with an X plus 2 square root of x plus 2 plus 4 minus 2 which is equal to the square root of x plus 6 minus 2 well that's fair enough that's just f of X plus 2 now what is f of X plus 2 plus 5 so f of X plus 2 plus 5 is going to be this thing right over here plus 5 so it's going to be equal to square root of x plus 6 minus 2 and now we're going to add 5 color so plus 5 so plus 5 and so what we end up with is going to be square root of x plus 6 minus 2 plus 5 is going to be plus 3 so that is equal to G of X just as a reminder what did we do here first I expressed G of X in terms of f of X but I say hey to get from f of X to G of X I shift two to the left two to the left it's a little counterintuitive that it's plus two makes it a shift of 2 to the left this was minus 2 would be a shift of 2 to the right but like I just said in the previous example it's good to try out some exes and to see why that makes sense and then we shifted 5 up so this was G of X in terms of f of X but then they told us what f of X actually is in terms of X so I said ok well what is f of X plus 2 f of X plus 2 we substituted X plus 2 for X and we got this and but G of X is f of X plus 2 plus 5 so we took what we figured out f of X plus 2 is and then we added 5 and that's what G of X is and then we are all done