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 absolute value graphs

The graph of y=|x-h|+k is the graph of y=|x| shifted h units to the right and k units up. See worked examples practicing this relationship.

Want to join the conversation?

  • duskpin sapling style avatar for user Stefania M
    I broke my replay button and I still don't understand this! Why move 3 to the right and write x-3 when x+3 seems to make sense?
    (24 votes)
    Default Khan Academy avatar avatar for user
    • mr pants pink style avatar for user Gisela Lobaton
      Because the part of "(x-3)", is the exact formula for it. even tho the number is actually "3", which is a positve, it has to be written as "x-3" because the "-" is mandatory, moving the number to the LEFT, this goes if the number is "x+3", therefore it will move to the RIGHT
      (2 votes)
  • piceratops seed style avatar for user analiuchi
    How the equation would be if we shift it only up 4?
    (9 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Ian Price
    Why would you subtract 3 if your are going to the right of the graph on the X-Axis instead of adding? So would that mean you would add if you were going the left of the X-Axis?
    (16 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user hesan azd
      I think you lack lifting y=x graph and need doing some practice or review.
      When you subtract 3 you're shifting down 3 points on the Y-Axis
      and
      When you add 4 you're shifting up 4 points on the Y-Axis

      OR

      When you subtract 3 you're shifting right 3 points on the X-Axis
      and
      When you add 4 you're shifting left 4 points on the X-Axis
      ---
      combining the both of point of views is NOT correct like you did:
      When you subtract 3 you're shifting down 3 points on the Y-Axis
      and
      When you add 4 you're shifting left 4 points on the X-Axis
      (3 votes)
  • duskpin sapling style avatar for user totoro.selsel
    Ummm... I think we use absolute value to find the distance from 0 to the number itself. Am I correct?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • mr pants teal style avatar for user AHHHHH, MONSTERS!
    wait.. so uhh can we like simplify
    y = |x - 3| + 4
    to
    y = |x - 3 + 4|
    and then simplify that to
    y= |x + 1|
    (3 votes)
    Default Khan Academy avatar avatar for user
  • piceratops ultimate style avatar for user Genius71752
    I am a bit confused (). What is Khan talking about when you switch signs? Why do you -3 to move it to the right? Is there is a way to explain this without using an example of plotting points?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • female robot grace style avatar for user loumast17
      When he mentions switching signs he means what is inside of the abslute value signs. Let's first lok at just |x|.

      |-1| = 1 and all other negative numbers are turned to positive. When you graph the absolute value function it makes a sudden sharp turn when you get to 0, which in other words is saying when you SWITCH SIGNS fro the negative numbers to non negative, the graph turns.

      Why it moves 3 to the right is because you can move graphs around. You can move it up, down, left, and right. You just have to change the equation.

      Specifically to move a graph to the right you need to determine the inside of the function. absolute value is pretty easy. inside the function is inside the absolute value bars. Once you find the inside of the function you just need to subtract a number from the variable to move right. so |x-1| goes to the right one. |x-2| goes tot he right two, and so on. if you add you go left, so |x+3| goes to the left 3.

      If you are asking why it moves like that when you add or subtract then that is a little more tricky to answer. My suggestion is to think backwards with an answer and what youw ould need to change.

      |x| has the angle at x=0. let's say we wanted it at 5 instead. We know we have to add or subtract something inside to make it happen. sothat means we will have x=5 and y = 0

      |5+a|=0 So what does a have to be here? obviously -5 so that tells us |x-5| has the 0 point now at x=5, or in other words the graph was moved 5 places to the right.

      Does that make sense?
      (7 votes)
  • blobby green style avatar for user johnsherburne03
    So is the white line always a V like that?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • duskpin sapling style avatar for user Vi
    I have no idea what this even means! From to the of the video, I don't understand anything stated in the video! How do you SWITCH signs in an absolute value? WHICH absolute value? And WHAT signs in an absolute value? An absolute value is just a number, what SIGNS are there to be switched?
    (0 votes)
    Default Khan Academy avatar avatar for user
    • leafers ultimate style avatar for user Christelle Winter
      By switching signs, I think he means that the original function transforms some negative values of x (-3, -2, -1, etc...) into positive values of y (3, 2, 1, etc..) then, after x = 0, we're on the other side of the graph and it transforms positive values of x into positive values of y.

      Yes, it's a bit difficult to visualize,
      If you take the original function and look at the points you'll have:

      x1 y1 To go from x1 to y1 you'll have to apply the absolute value each time
      -3 3
      -2 2
      -1 1
      0 0
      1 1
      2 2
      3 3

      If you shift the graph 3 units to the right, you'll have:

      x2 y2 To go from x2 to y2, you need to substract 3, then apply the absolute value each time
      0 3
      1 2
      2 1
      3 0
      4 1
      5 2
      6 3

      Hope that helped?
      Try similar tables with the shift up, see if you can make sense of this one too.
      (7 votes)
  • starky ultimate style avatar for user SH4RPSH00TER
    What happens when you shift to the left?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • starky ultimate style avatar for user Jenna Noel Ho'omaikainahealani
    at , does he have to put the minus four on the outside of the absolute value?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      Sal actually put a "+4" outside the absolute value, not "-4". In order to shift the graph up 4 units, the "+4" must be outside the absolute value. If he had used "-4" outside the absolute value, then the graph would shift down 4 units.

      Notice the placement of the "-3". It is inside that absolute value and it shifts the graph 3 units to the right.

      Hope this helps.
      (3 votes)

Video transcript

- [Instructor] This right over here is the graph of y is equal to absolute value of x which you might be familiar with. If you take x is equal to negative two, the absolute value of that is going to be two. Negative one, absolute value is one. Zero, absolute value is zero. One, absolute value is one. So on and so forth. What I wanna do in this video is think about how the equation will change if we were to shift this graph. So in particular, we're gonna first think about what would be the equation of this graph if we shift, if we shift three to the right and then think about how that will change if not only do we shift three to the right but we also shift four up, shift four up, and so once again pause this video like we always say and figure out what would the equation be if you shift three to the right and four up? Alright, now let's do this together. So let's just first shift three to the right and think about how that might change the equation. So let's just visualize what we're even talking about. So if we're gonna shift three to the right, it would look like, it would look like this. So that's what we first wanna figure out the equation for and so how would we think about it? Well, one way to think about it is, well, something interesting is happening right over here at x equals three. Before, that interesting thing was happening at x equals zero. Now, it's happening at x equals three. And the interesting thing that happens here is that you switch signs inside the absolute value. Instead of taking an absolute value of a negative, you're now taking the absolute value as you cross this point of a positive and that's why we see a switch in direction here of this line and so you see the same thing happening right over here. So at this point right over here, we know that our function, we know that our equation needs to evaluate out to zero and this is where it's going to switch signs and so we say, okay, well, this looks like an absolute value so it's going to have the form, y is equal to the absolute value of something and so you say, okay, if x is three, how do I make that equal to zero? Well, I can subtract three from it. If I say y is equal to the absolute value of x minus three, well, let's try it out. Let's see if it makes sense. So when x is equal to three, three minus three is zero, absolute value of that is zero. That works out. When x is equal to four, four minus three is one, absolute value of one is indeed, is indeed one. And if x is equal to two, well, two minus three is negative one but the absolute value of that is one. So once again, I'm showing you this by really trying out numbers, trying to give you a little bit of an intuition because that wasn't obvious to me when I first learned this that if I'm shifting to the right which it looks like I'm increasing an x value but what I would really do is replace my x with an x minus the amount that I'm shifting to the right but I encourage you to try numbers and think about what's happening here. At this vertex right over here, whatever was in the absolute value sign was equaling zero. It's when whatever was in the absolute value sign is switching from negative signs to positive signs. So once again, if you shift three to the right, that has to happen at x equals three. So whatever is inside the absolute value sign has to be equal to zero at x equals three and this, pause this video and really think about this if it isn't making sense and even as you get more and more familiar with this, I encourage you to try out the numbers. That will give you more, instead of just memorizing, hey, if I shift to the right, I replace x with x minus the amount that I shift. Always try out the numbers and try to get an intuition for that why that works. But now, let's start from here and shift four up and shifting four up is in some ways a lot more intuitive. So let me do that. Let me shift four up. Alright, so let me move. I'm gonna go up one, two, three and four. I think I got that right. So now I've shifted four up. And just as a reminder of what we've even done, the first part we shifted three to the right and now we are shifting four up. So now, now we are shifting four up. So before, y equaled zero here but now, y needs to be equal to four. So whatever this was evaluating, do we now have to add four to it? So when we just shifted three to the right, our equation was y is equal to the absolute value of x minus three but now whatever we were getting before, we now have to add four to it. We're going up in the vertical direction. So we just have to add four. Now, this makes a little bit more sense. If you're shifting in the vertical direction, if you shift up in the vertical direction, well, you just add a constant by the amount you're shifting. If you shift down in the vertical direction, well, you would subtract. If we said shift down four, you would subtract four right over here. The less intuitive thing is what we did with x 'cause when you shift to the right, you actually replace your x with x minus the amount that you shifted but once again, try out numbers until it really makes some intuitive sense for you but this is what we would finally get. The equation of this thing right over here is y is equal to the absolute value of x minus three plus four.