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 introduction

CCSS.Math:

## Video transcript

so I am here at desmos calm which is an online graphing calculator and the goal of this video is to explore how shifts in functions happen how do things shift to the right or left or how do they shift up and down and what we're going to start off doing is just graph a plain vanila function f of X is equal to x squared that looks as we would expect it to look but now let's think about how we could shift it up or down well one thought is well to shift it up we just have to make the value of f of X higher so we could add a value and that does look like it shifted it up by one whatever f of X was before we're now adding 1 to it so it shifts the graph up by 1 that's pretty intuitive if we subtract 1 or actually let's subtract 3 notice it shifted it down the vertex was right over here at 0 0 now it is at 0 negative 3 so it shifted it down and we can set up a slider here to make that a little bit clearer so if I just replace this with if I just replace this with the variable K then let me delete this little thing here that little subscript thing that happened then we can add a slider K here and this is just allowing us to set what K is equal to so here K is equal to 1 so this is x squared plus 1 and notice we have shifted up and if we increase the value of K notice how it shifts the graph up and as we decrease the value of K if K 0 we're back where our vertex is right at the origin and then as we decrease the value of K it shifts our graph down and that's pretty intuitive because we're adding or subtracting that amount to x squared so it changes we could say the y-value it shifts it up or down but how do we shift to the left or to the right so what's interesting here is to shift to the left or the right we can replace our X with an X minus something so let's see how that might work so I'm going to replace our X with an X minus let's replace it with an X minus 1 what do you think's going to happen do you think that's going to shift it 1 2 right or one to the left so let's just put the one in well that's interesting before our vertex was at 0-0 now our vertex is at 1 0 so by replacing our X with an X minus 1 we actually shifted one to the right now why does that make sense well one way to think about it before we put this X before we replaced our X with an X minus 1 the vertex was when we were squaring is 0 now in order to square 0 squaring 0 happens when X is equal to 1 when X is equal to 1 you do 1 minus 1 you get 0 and then that's when you are squaring 0 so it makes sense that you have a similar behavior of the graph at the vertex now when x equals 1 as before you had when x equals 0 and to see how this can be generalized let's put another variable here and let's add a slider for H and then we can see that when H is 0 and K is 0 our function is really then just x squared and then if H increases we are we're replacing our X with X minus a larger value that's shifting to the right and then as as H decreases as it becomes negative that's shifts to the left now right here H is equal to negative 5 you typically won't see X minus negative 5 you would see that written as X plus 5 so if you replace your X's with an X plus 5 that actually shifts everything 5 units to the left and of course we can shift both of them together like this so here we're shifting it up and then we are we could get back to our Neutral horizontal shift and then we can shift it to the right like that and everything we did just now is with the x squared function as our core function but you could do it with all sorts of functions you could do it with an absolute value function let's do it let's do absolutely that's always a fun one so instead of squaring all this business let's have an absolute value here so I'm gonna put an absolute whoops absolute value and there you have it you can start at let me make both of these variables equal to zero so that would just be the graph of f of X is equal to the absolute value of x but let's say you wanted to shift it so that this point right over here that's at the origin is at the point negative 5 negative 5 which is right over there so what you would do is you would replace your X with x plus 5 or you would make this H variable to negative 5 right over here because notice if you replace your H with a negative 5 in the inside the absolute value would have an X plus 5 and then if you want to shift it down you just reduce the value of K and if you want to shift it down by 5 you reduce it by 5 and you could get something like that so I encourage you go to desmos com try this out for yourself and really play around with these functions to give you to give yourself an intuition of how things and why things shift up or down when you add a constant and why things shift to the left of the right when you replace your X's with an X - in this case an X - H but it really could be X - some type of a constant