Part 22 of 30 · TransformationsSee the whole course

Vertical shifts: what f(x) + k does to a graph

Short answer

Adding a number outside the function, f(x) + k, moves every point up by k. A negative k moves it down. The shape, the width and the left-right position do not change. Only the heights do.

What “add at the end” does

A function turns an input x into an output f(x). If you add k to the output, every height rises by k, whatever x is. So each point (x, f(x)) moves to (x, f(x) + k). Straight up, never sideways.

See it in a table

Take f(x) = x² and add 2:

x: −2, −1, 0, 1, 2
x²: 4, 1, 0, 1, 4
x² + 2: 6, 3, 2, 3, 6

Every output went up by exactly 2. The bottom of the bowl, the vertex, moves from (0, 0) to (0, 2). Slide k in the figure below and watch the three orange points travel together.

y = x² + 2
  1. x = −2: 4 → 6
  2. x = 0: 0 → 2
  3. x = 2: 4 → 6
Every height goes up 2. The vertex moves from (0, 0) to (0, 2). The shape, the width and the left-right position stay put.

Three examples

y = x² + 2: vertex at (0, 2). The point (3, 9) moves to (3, 11).
y = x² − 3: vertex at (0, −3). Lowered by 3.
y = √x + 2: starts at (0, 2) instead of (0, 0).

What changes, and what does not

A line is a vertical shift too

Take f(x) = 2x and add 4. You get 2x + 4. That is the same line moved up 4, with b changing from 0 to 4. This is why b in y = mx + b is called where the line starts: b is a vertical shift.

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 does y = |x| + 3 start, and what is its range?

The corner moves from (0, 0) to (0, 3). The lowest output is 3, so the range is y ≥ 3.

2. Where is the vertex of y = x² − 5? Does it pass through (2, −1)?

The vertex is (0, −5). At x = 2: 4 − 5 = −1, so yes, it passes through (2, −1).

3. A graph passes through (3, 7). Where is that point after f(x) − 4?

The x stays 3 and the height drops by 4: the point is (3, 3).

Where this fits in

That was the move that acts on heights. Next, the one that acts on x and goes the other way: horizontal shifts.

Quick answers

Questions about this topic

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

It moves the whole graph up by k units. If k is negative, it moves down. The shape and the left-right position do not change.

Does a vertical shift change the domain or the range?

It changes the range, because every output moves by k. The domain stays the same, because the allowed inputs are unchanged.

How is a vertical shift different from a horizontal shift?

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

Is changing b in y = mx + b a vertical shift?

Yes. Changing b moves the whole line up or down without changing its slope, which is exactly a vertical shift.

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.