math.wiki
Functions › Transformations of functions › Shifting a graph up, down, left and right
Open on the map
Algebra 2 · F.BF.B.3

Shifting a graph up, down, left and right

If you already know the graph of a function, can you get the graph of the same rule with a number added, outside or inside, without plotting it all again?

Where you are 7 in Transformations of functions

When you reach for it

You know the parent graphs: y = x^2 and y = x^3, \displaystyle y = \sqrt{x} and \displaystyle y = \frac{1}{x}. A great many functions are one of these with a number added somewhere: x^2 + 4, \displaystyle \sqrt{x - 3}, (x + 1)^3. Each of their graphs is the parent graph slid, with its shape unchanged, to a new place. A slide like this is called a translation.

Reach for this skill when a rule is a parent with a constant added to its output or to its input and you want the graph without plotting from scratch, or when a graph has a parent’s exact shape in a new position and you want its rule. You have met the idea in geometry as translating a figure and for parabolas in vertex form. Here it works for every function at once.

The procedure

Adding to the output: a vertical shift

Take a function f and a constant k, and define

g(x) = f(x) + k

For each input, g does exactly what f does and then adds k. So at every x the graph of g is k higher than the graph of f: a point (a, b) on the graph of f becomes the point (a, b + k) on the graph of g. A positive k moves the graph up, a negative k moves it down, and since the input is untouched, nothing moves sideways.

x
y
4
4
y = x^2
y = x^2 + 4
Figure 1Adding 4 to every output lifts every point 4 units. The input does not change, so nothing moves sideways.

Changing the input: a horizontal shift

Now take a constant h and define

g(x) = f(x - h)

This is f evaluated at the expression x - h: g first subtracts h from its input and only then hands the result to f. Suppose (a, b) is on the graph of f, so f(a) = b. Which input makes g give the same output b? g must hand f the number a, so its own input has to be a + h:

g(a + h) = f\big((a + h) - h\big) = f(a) = b

So (a + h, b) is on the graph of g. Every point slides h to the right when h is positive and to the left when h is negative. Nothing else appears either: if (c, d) is on the graph of g, then f(c - h) = d, so (c - h, d) was already a point of the graph of f.

This is why a horizontal shift looks reversed. The minus sign in f(x - h) does not mean “move left”. It means the input must be h larger than before to produce the same output, so every height arrives h later along the x-axis. A plus sign inside, as in f(x + 1), is f(x - (-1)), so h = -1 and the shift is 1 to the left.

x
y
3
\displaystyle y = \sqrt{x}
\displaystyle y = \sqrt{x - 3}
Figure 2Each height of \displaystyle y = \sqrt{x} is reached 3 units later by \displaystyle y = \sqrt{x - 3}, so the whole curve sits 3 to the right.

Both at once

The rule

g(x) = f(x - h) + k

moves every point (a, b) to (a + h, b + k): h across and k up. This is a translation by the vector \langle h, k \rangle. The two slides can be done in either order with the same result, because adding h to the first coordinate and adding k to the second do not interfere. (Order does start to matter once flips and stretches join in; that is Combining transformations and the general form.)

So the number outside, k, moves the graph the way its sign says. The number inside, read from the form x - h, moves the graph the opposite way to the sign printed beside x.

Naming a translation from a graph

To read a translation off a graph, follow one point the parent is known by, its anchor:

ParentAnchor
y = x^2the vertex (0, 0)
y = x^3the center (0, 0), where the curve flattens and changes the way it bends
\displaystyle y = \sqrt{x}the starting point (0, 0)
\displaystyle y = \frac{1}{x}the point (0, 0) where the two asymptotes cross

If the anchor has moved to (h, k), the translation is h across and k up, and the rule is y = f(x - h) + k. Then test one more point: the parent’s (1, 1) must land on (1 + h, 1 + k). If it does not, the shape has changed, and a translation alone cannot describe the graph.

Worked examples

Example 1

Up four, down six

Compare the graphs of g(x) = x^2 + 4 and p(x) = x^2 - 6 with the graph of f(x) = x^2.

Solution

g(x) = f(x) + 4, so each output of f grows by 4 while the input stays put:

x-2-1012
f(x) = x^241014
g(x) = x^2 + 485458

Every point rises 4, so the graph of g is the parabola moved up 4, with its vertex at (0, 4), as in the first figure. Its domain is still all real numbers, and its least output is 4 instead of 0.

p(x) = x^2 - 6 = f(x) + (-6), so k = -6: the parabola moves down 6 and its vertex is (0, -6). Check one point: p(2) = 4 - 6 = -2, which is f(2) = 4 moved down 6.

Example 2

Why the minus sign moves it right

Describe the graph of \displaystyle g(x) = \sqrt{x - 3} compared with the graph of \displaystyle f(x) = \sqrt{x}, and explain the direction.

Solution

g(x) = f(x - 3), so h = 3. Choose inputs that make x - 3 a perfect square, so the roots come out whole:

x34712
x - 30149
g(x)0123

The parent passes through (0, 0), (1, 1), (4, 2) and (9, 3). The graph of g passes through (3, 0), (4, 1), (7, 2) and (12, 3): the same heights, each reached 3 further right. The reason is in the middle row. To output 2, g must hand f the number 4, and because g subtracts 3 first, its own input has to be 7. The graph starts at (3, 0) because x - 3 must not be negative, so the domain is x \geq 3.

Example 3

A plus sign inside

Describe the graph of g(x) = (x + 1)^3 compared with the graph of f(x) = x^3. Where does the center (0, 0) go?

Solution

Write the inside in the form x - h: x + 1 = x - (-1), so g(x) = f(x - (-1)) and h = -1. The graph moves 1 to the left, and the center goes to (-1, 0).

Check with the formula rather than the sign rule alone. g(-1) = 0^3 = 0, so (-1, 0) is on the graph. The parent’s (1, 1) should go to (0, 1), and g(0) = 1^3 = 1. The parent’s (-1, -1) should go to (-2, -1), and g(-2) = (-1)^3 = -1. Every point has moved 1 left.

Example 4

Both moves on the reciprocal

Describe the graph of \displaystyle g(x) = \frac{1}{x + 1} - 6 compared with the graph of \displaystyle f(x) = \frac{1}{x}, including its asymptotes.

Solution

g(x) = f(x - (-1)) + (-6), so h = -1 and k = -6: every point moves 1 left and 6 down, from (a, b) to (a - 1, b - 6).

The asymptotes move with the graph. The parent has the vertical asymptote x = 0, because \displaystyle \frac{1}{x} cannot divide by zero; for g the forbidden input is where x + 1 = 0, so the vertical asymptote is x = -1. The parent has the horizontal asymptote y = 0, because \displaystyle \frac{1}{x} is never 0; \displaystyle \frac{1}{x + 1} is never 0 either, so g never takes the value -6, and the horizontal asymptote is y = -6.

Two points confirm the slide. The parent’s (1, 1) goes to (0, -5), and \displaystyle g(0) = \frac{1}{1} - 6 = -5. The parent’s (-1, -1) goes to (-2, -7), and \displaystyle g(-2) = \frac{1}{-1} - 6 = -7.

x
y
(0,\,-5)
(-2,\,-7)
x = -1
y = -6
Figure 3The graph of \displaystyle y = \frac{1}{x} moved 1 left and 6 down. Its asymptotes moved with it.
Example 5

Naming a translation from its graph

The figure shows the graph of \displaystyle y = \sqrt{x} after a translation. Name the translation and write the equation.

x
y
(-1,\,4)
(0,\,5)
(3,\,6)
Figure 4The graph of \displaystyle y = \sqrt{x} after a translation, for Example 5.
Solution

The anchor of \displaystyle y = \sqrt{x} is its starting point (0, 0). Here the starting point is (-1, 4), so the graph moved 1 left and 4 up: h = -1 and k = 4. The rule is

y = \sqrt{x - (-1)} + 4 = \sqrt{x + 1} + 4

Test a second point. The parent’s (1, 1) should land on (1 - 1, 1 + 4) = (0, 5), which is marked, and the formula agrees: \displaystyle \sqrt{0 + 1} + 4 = 5. The parent’s (4, 2) should land on (3, 6), and \displaystyle \sqrt{3 + 1} + 4 = 6. From its start the curve goes 1 across and 1 up, then 4 across and 2 up, exactly as the parent does, so nothing was stretched.

Example 6

Setting off later on the water slide

Dunya rides down a water slide. Her height above the splash pool t seconds after she sets off is H(t) meters:

t01234
H(t)1211830

Abelard sets off 3 seconds after Dunya and rides exactly as she did. Counting t from Dunya’s start, write Abelard’s height A(t) in terms of H, make his table, and find his height when t = 5.

Solution

At time t, Abelard has been riding for t - 3 seconds, so he is wherever Dunya was at time t - 3:

A(t) = H(t - 3)

His table starts at t = 3, when t - 3 = 0:

t34567
A(t)1211830

So A(5) = H(2) = 8: Abelard is 8 meters up. His graph is Dunya’s moved 3 to the right, the same heights each 3 seconds later, and the minus sign counts back to the moment Dunya was in the same place. The rule H(t) - 3 would mean something else: a rider always 3 meters lower than Dunya, finishing below the water’s surface.

Boundaries

  • The amount added must be a constant. f(x) + x adds a different amount at each input, so it bends the graph rather than sliding it.
  • The shift reads straight off the inside only when x appears there alone, with coefficient 1. \displaystyle \sqrt{2x - 6} is not \displaystyle \sqrt{x} moved 6 right: it is \displaystyle \sqrt{2(x - 3)}, a squeeze followed by a shift of 3, which belongs to Stretches and compressions and Combining transformations and the general form.
  • A translation never changes shape. A graph that is steeper, flatter or upside down compared with its parent cannot come from translations alone; see Reflecting a graph across the axes.
  • A vertical shift leaves the domain alone and moves the range by k; a horizontal shift moves the domain by h and leaves the range alone. Graphing by transforming a parent graph uses this in full, with domains read from graphs.

Where this goes next

Translations are the first of the moves a parent graph can make. Reflections flip it and stretches pull it, and Combining transformations and the general form puts every move into the single form a\,f(b(x - h)) + k, where h and k keep exactly the meaning they have here. With that, Graphing by transforming a parent graph draws a graph by moving its parent, and Finding the rule of a transformed graph or table runs the anchor method backwards from any graph or table. The same x - h returns when the absolute value graph is moved, in the circle with center (h, k) when conics are translated, in the midline of a wave and in the phase shift of trigonometry. It even appears away from graphs: adding one number to every value of a data set moves its center by that number.

Exercises

Reading the move from the equation

Describe how each graph is moved from its parent graph.

  1. y = x^2 - 5
  2. \displaystyle y = \sqrt{x + 4}
  3. y = (x - 2)^3
  4. \displaystyle y = \frac{1}{x} + 3, and give its horizontal asymptote.
  5. \displaystyle y = \sqrt{x - 5} - 2
  6. \displaystyle y = \frac{1}{x + 2} + 7, and give its asymptotes.

Writing the equation

  1. Move y = x^3 up 2.
  2. Move \displaystyle y = \sqrt{x} left 5.
  3. Move \displaystyle y = \frac{1}{x} right 4 and down 1, and give the asymptotes of the result.
  4. Move y = x^2 right 2 and up 7, and give the vertex.
  5. Let f(x) = x^3 and g(x) = f(x + 2) - 3. Write g(x) as a formula in x and give the center of its graph.

Points, tables and graphs

Exercises 12 and 13 use this table of a function f.

x-2024
f(x)51-30
  1. Make a table of values for g(x) = f(x + 2), and say which way the graph moves.
  2. Let p(x) = f(x - 1) + 3. Find p(3) and p(5).
  3. The point (2, 8) lies on y = x^3. Where does it land on the graph of y = (x - 1)^3 + 5? Check with the formula.

Exercise 15 uses this figure.

x
y
Figure 5The graph of \displaystyle y = \frac{1}{x} after a translation, for Exercise 15. The marked points sit at whole-number positions.
  1. The figure shows the graph of \displaystyle y = \frac{1}{x} after a translation, with its asymptotes dashed. Name the translation and write the equation.
  2. The graph of \displaystyle y = \sqrt{x} is moved so that its starting point is (-3, -2). Write the equation, and find where the parent’s point (9, 3) lands.
  3. The graph of y = x^3 is translated so that its point (1, 1) lands on (-1, 5). Write the equation of the new graph and give its center.

On the water slide

Narges rides a shorter slide. Her height above the water t seconds after she sets off is N(t) meters:

t0123
N(t)9850
  1. Habib sets off down the same slide 2 seconds before Narges and rides exactly as she does. Counting t from Narges’s start, write Habib’s height B(t) in terms of N, find B(-2), B(0) and B(1), and say which way the graph moves.
  2. Eluned, the lifeguard, measures heights from the floor of the splash pool, 1 meter below the water’s surface. Write Narges’s height above the pool floor, F(t), in terms of N, find F(2), and say which way the graph moves.

Explaining

  1. Without plotting anything, explain why the graph of \displaystyle y = \sqrt{x - 8} begins at x = 8 and not at x = -8.
  2. Show that moving the line y = x up 2 gives the same graph as moving it left 2. Is the same true for y = x^2? Justify your answer.
  3. Use the center (0, 0) of y = x^3 to decide which way the graph of y = (x + 3)^3 is moved, and explain why a plus sign inside the brackets moves a graph the opposite way to a plus sign outside.
  4. Starting from any function f, show with formulas that moving its graph up 5 and then left 2 gives the same graph as moving it left 2 and then up 5.
  5. Ottilie says y = (x - 3)^2 and y = x^2 - 3 have the same graph, since both subtract 3. Find a point on one graph that is not on the other, and say what each subtraction does.
Answers
  1. Down 5. The rule is x^2 + (-5), so every output is 5 less and the vertex goes to (0, -5).
  2. Left 4. x + 4 = x - (-4), so h = -4, and the starting point goes to (-4, 0).
  3. Right 2. Here h = 2, so the center goes to (2, 0).
  4. Up 3. Every output of \displaystyle \frac{1}{x} grows by 3, so the horizontal asymptote becomes y = 3.
  5. Right 5 and down 2. The starting point goes from (0, 0) to (5, -2).
  6. Left 2 and up 7. The asymptotes are x = -2, where x + 2 = 0, and y = 7, since \displaystyle \frac{1}{x + 2} is never 0.
  7. y = x^3 + 2, since the 2 is added to every output.
  8. \displaystyle y = \sqrt{x + 5}. Left 5 means h = -5, and x - (-5) = x + 5.
  9. \displaystyle y = \frac{1}{x - 4} - 1, with asymptotes x = 4 and y = -1.
  10. y = (x - 2)^2 + 7, with vertex (2, 7).
  11. g(x) = (x + 2)^3 - 3. Here h = -2 and k = -3, so the center is (-2, -3).
  12. g reaches each output of f at an input 2 smaller: g(-4) = f(-2) = 5, g(-2) = f(0) = 1, g(0) = f(2) = -3 and g(2) = f(4) = 0. The graph moves 2 left.
  13. p(3) = f(2) + 3 = -3 + 3 = 0 and p(5) = f(4) + 3 = 0 + 3 = 3.
  14. (3, 13). Here h = 1 and k = 5, so (2, 8) goes to (2 + 1, 8 + 5). Check: (3 - 1)^3 + 5 = 8 + 5 = 13.
  15. Right 2 and up 1: the asymptotes now cross at (2, 1) instead of (0, 0). The equation is \displaystyle y = \frac{1}{x - 2} + 1. Check with the marked points: at x = 3, \displaystyle \frac{1}{1} + 1 = 2, and at x = 1, \displaystyle \frac{1}{-1} + 1 = 0.
  16. \displaystyle y = \sqrt{x + 3} - 2. The start moved 3 left and 2 down, so (9, 3) lands on (6, 1); check: \displaystyle \sqrt{6 + 3} - 2 = 1.
  17. h = -1 - 1 = -2 and k = 5 - 1 = 4, so y = (x + 2)^3 + 4, with center (-2, 4). Check: (-1 + 2)^3 + 4 = 5.
  18. B(t) = N(t + 2), since at time t Habib has been riding for t + 2 seconds. B(-2) = N(0) = 9, B(0) = N(2) = 5 and B(1) = N(3) = 0. The graph moves 2 left: everything happens 2 seconds sooner.
  19. F(t) = N(t) + 1, so F(2) = 5 + 1 = 6 meters. The graph moves up 1, and the times do not change.
  20. The square root needs x - 8 \geq 0, which holds exactly when x \geq 8. At x = 8 the inside is 0, the parent’s starting input; at x = -8 the inside is -16, which has no real square root.
  21. Up 2 gives y = x + 2. Left 2 replaces x by x + 2, which also gives y = x + 2: the same rule, so the same graph. For y = x^2 it fails: up 2 gives x^2 + 2, which is 2 at x = 0, while left 2 gives (x + 2)^2, which is 4 at x = 0.
  22. (x + 3)^3 = 0 when x = -3, so the center is (-3, 0) and the graph moved 3 left. A number outside is added after f has worked, so it raises every output. A number inside is added before f works, so the input must be that much smaller to hand f the same number, and every height arrives that much sooner, further left.
  23. Up 5 gives f(x) + 5; moving that left 2 replaces x by x + 2, giving f(x + 2) + 5. Left 2 first gives f(x + 2), and adding 5 gives f(x + 2) + 5. The rules agree, so the graphs agree: either way (a, b) goes to (a - 2, b + 5).
  24. (0, 9) is on y = (x - 3)^2, but y = x^2 - 3 gives -3 at x = 0. Subtracting 3 from the input moves the parabola right 3, to vertex (3, 0); subtracting 3 from the output moves it down 3, to vertex (0, -3).
kg1128 · updated 2026-10-14 · CC-BY-SA-4.0