Part 23 of 30 · TransformationsSee the whole course
Horizontal shifts: why f(x − h) goes the other way
Changing the inside, f(x − h), slides the graph h units to the right. f(x + h) slides it left. It goes the opposite way from what the sign suggests, because the graph reaches its bottom where the inside equals zero, and x − 3 equals 0 at x = 3.
The inside is the input
A function takes an input and gives an output. In f(x − 3), the thing being fed into f is x − 3, not x. To get the output f(0), you need x − 3 = 0, so you need x = 3. The graph reaches the same height three steps later: it has slid 3 to the right.
See it in a table
Take f(x) = x² and use f(x − 3) = (x − 3)²:
x: 1, 2, 3, 4, 5
x − 3: −2, −1, 0, 1, 2
(x − 3)²: 4, 1, 0, 1, 4
The bottom of the bowl, where the output is 0, is now at x = 3. The old bottom was at x = 0, so the whole graph moved 3 to the right. Slide h in the figure below and check where the gold dot lands. It is always above the x that makes the inside zero.
- inside: x − 3 = 0 when x = 3
- the bottom moves from x = 0 to x = 3
- a point at x = 2 moves to x = 5
Three examples
y = (x + 2)²: the inside x + 2 is zero at x = −2, so the bottom is at (−2, 0): left 2.
y = |x − 2|: the corner is at (2, 0): right 2.
y = √(x + 4): it starts at (−4, 0), so its domain is x ≥ −4: left 4.
What changes, and what does not
- The domain can change. √x needs x ≥ 0, but √(x + 4) needs x ≥ −4. See domain and range.
- The range does not change. The heights are the same, only moved sideways.
- The shape does not change.
Both shifts together
y = (x − 3)² + 1 is x² slid 3 to the right and lifted 1: the vertex is at (3, 1). The inside moves x, the number at the end moves the height. Compare with vertical shifts.
Watch it explained in under a minute
The four mistakes to avoid
- Reading the sign the wrong way. (x − 3) moves right and (x + 3) moves left.
- Forgetting the domain moves too. For √(x + 4), x can no longer be below −4.
- Mixing up f(x + 2) with f(x) + 2. The first slides it, the second lifts it.
- Moving by the wrong amount when x has a multiplier. (2x − 6)² is 4(x − 3)², so it shifts 3, not 6. Factor out the number on x first.
Try it yourself
Tap a question to see the answer.
1. Where is the vertex of y = (x − 5)²?
The inside is zero at x = 5, so the vertex is (5, 0): the parabola slid 5 to the right.
2. Where is the corner of y = |x + 1| − 2?
The inside x + 1 is zero at x = −1, and the −2 lowers it. The corner is (−1, −2).
3. What is the starting point and domain of y = √(x − 2)? Does it pass through (6, 2)?
It starts at (2, 0), so the domain is x ≥ 2. At x = 6, √4 = 2, so yes, it passes through (6, 2).
Where this fits in
You can now slide a graph in both directions. Next, turning it over: reflections over the axes.