Part 23 of 30 · TransformationsSee the whole course

Horizontal shifts: why f(x − h) goes the other way

Short answer

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.

y = (x − 3)²
  1. inside: x − 3 = 0 when x = 3
  2. the bottom moves from x = 0 to x = 3
  3. a point at x = 2 moves to x = 5
Every point moves 3 to the right, even though the sign inside is a minus. The bottom sits where the inside equals 0: x = 3.

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

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 same idea, narrated step by step. Square version for sharing: download the 1:1 video.

The four mistakes to avoid

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.

Quick answers

Questions about this topic

Why does f(x − 3) move the graph to the right?

The graph reaches the same height when the inside is the same as before. x − 3 equals 0 when x = 3, so every point arrives 3 units later, to the right.

What does f(x + h) do to a graph?

It slides the graph h units to the left. The inside x + h is zero when x = −h, so the bottom or start of the graph moves to x = −h.

Does a horizontal shift change the domain and range?

It can change the domain, because the allowed inputs move with the graph. For √(x + 4) the domain becomes x ≥ −4. The range stays the same.

How is a horizontal shift different from a vertical shift?

A horizontal shift changes the input, as in f(x − h), and moves the graph left or right. A vertical shift adds a number outside, as in f(x) + k, and moves it up or down.

Keep going

Learn it by playing

Pip: Math Adventure is a math game for iPhone where functions, lines, equations and calculus are puzzles you solve by playing. It is coming soon to the App Store.

Join the list and we will tell you the day Pip is out.