Shifting Graphs

Learning goals

  • Move a graph up by kk with y=f(x)+ky = f(x) + k
  • Shift right by hh with y=f(x−h)y = f(x - h)
  • Explain why subtracting inside moves the graph rightward
  • Combine both into y=f(x−h)+ky = f(x - h) + k
  • Track how a shift moves intercepts, domain and range

Sliding a graph without building a new table

A shift, or translation, moves every point the same distance in the same direction. The graph keeps its shape. A vertical shift changes heights; a horizontal shift changes left-to-right positions.

Recall that (a,b)(a,b) is on the graph of ff exactly when aa is in its domain and b=f(a)b=f(a). We will track these input-output pairs to explain each shift.

Vertical shifts: change the output

Adding a number to the outside of a function moves its graph straight up or down. It never changes the graph’s shape. Here is what that looks like on a graph you already know.

Vertical shift: y = x squared raised by 3 to y = x squared + 3The parabola y = x squared, dashed, and the same parabola raised three units, solid, with its vertex moved from the origin up to 0 comma 3.xy-2-11236(0, 3)up 3y = x² + 3y = x²
The dashed parabola is y = x squared. Adding 3 to every output lifts each point straight up by 3, giving the solid parabola y = x squared + 3. The vertex moves from the origin to (0, 3) and the shape is unchanged.

Worked example 1 Graph y=x2+3y = x^2 + 3 by sliding y=x2y = x^2 upward

The rule y=x2+3y = x^2 + 3 takes the familiar bowl y=x2y = x^2 and adds 33 to every output, so the whole graph rises by 33. There is no need to build a new table; shift the points you already know.

The vertex of y=x2y = x^2 sits at (0,0)(0, 0). Adding 33 lifts it to

(0, 0+3)=(0,3).(0,\, 0 + 3) = (0, 3).

Take two more anchor points and raise each by 33. On y=x2y = x^2 the points (1,1)(1, 1) and (2,4)(2, 4) appear; after the shift they become

(1, 1+3)=(1,4),(2, 4+3)=(2,7).(1,\, 1 + 3) = (1, 4), \qquad (2,\, 4 + 3) = (2, 7).

Plot the lifted vertex (0,3)(0, 3) and the lifted points, then draw the identical bowl through them. Because the lowest output is now 33, the graph never dips below the line y=3y = 3, and its y-intercept is (0,3)(0, 3).

For any function, adding kk outside gives y=f(x)+ky=f(x)+k. Each output increases by kk: up if k>0k>0, down if k<0k<0, and unchanged if k=0k=0.

Why y=f(x)+ky = f(x) + k slides the graph up by kk#

If f(−2)=4f(-2)=4 and g(x)=f(x)+5g(x)=f(x)+5, then g(−2)=4+5=9g(-2)=4+5=9. The point (−2,4)(-2,4) moves to (−2,9)(-2,9): the input stays −2-2 and the height increases by 55.

Now let g(x)=f(x)+kg(x)=f(x)+k and take any aa in the domain of ff. Then

g(a)=f(a)+k.g(a)=f(a)+k.

Thus (a,f(a))(a,f(a)) becomes (a,f(a)+k)(a,f(a)+k). Its first coordinate stays fixed and its second changes by kk. Every new point comes from the old point at the same input, so this describes the whole graph. If k>0k>0, each point rises by kk; if k<0k<0, each drops by ∣k∣\lvert k\rvert; if k=0k=0, none moves. Moving every point this way is a vertical translation, so the shape stays the same.

You can use the same reasoning to read points off a graph. If (a,b)(a, b) is on y=f(x)y = f(x), then (a,b+k)(a, b + k) is on y=f(x)+ky = f(x) + k: keep the input, add kk to the height.

Check your understanding

The point (5,2)(5, 2) lies on the graph of y=f(x)y = f(x). Which point must lie on the graph of y=f(x)−4y = f(x) - 4?

Answer choices

Horizontal shifts: the direction that looks backward

Now change the input instead of the output. Replace xx with x−hx - h to get

y=f(x−h).y = f(x - h).

For h>0h>0, this moves the graph right by hh. To see why, find where a familiar input reappears inside the new rule.

Horizontal shift: y = x squared moved right 3 to y = (x - 3) squaredThe parabola y = x squared, dashed, and the same parabola moved three units to the right, solid, with its vertex moved from the origin to 3 comma 0. The point 1 comma 1 moves to 4 comma 1.xy-2-1123451234(1, 1)(4, 1)right 3(3, 0)y = x²y = (x − 3)²
The dashed parabola is y = x squared. Subtracting 3 inside gives y = (x minus 3) squared, the solid parabola, which sits 3 to the right, not left. The point (1, 1) reappears at (4, 1) and the vertex moves from (0, 0) to (3, 0).

Worked example 2 Relate y=(x−3)2y = (x - 3)^2 to y=x2y = x^2

The rule y=(x−3)2y = (x - 3)^2 has the form f(x−h)f(x - h) with f(x)=x2f(x) = x^2 and h=3h = 3. Check the direction with the vertex. The bowl y=x2y = x^2 bottoms out where its input is 00. For y=(x−3)2y = (x - 3)^2, the lowest output happens where the inside is 00:

x−3=0⟹x=3,x - 3 = 0 \quad \Longrightarrow \quad x = 3,

so the new vertex is (3,0)(3, 0), three units right of the origin, even though the rule contains a minus sign. Track one more point the same way. The point (1,1)(1, 1) is on y=x2y = x^2; to make the inside of (x−3)2(x - 3)^2 equal 11, solve x−3=1x - 3 = 1, giving x=4x = 4. So the matching point on the new graph is (4,1)(4, 1), again shifted right by 33:

(1,1) ⟶ (4,1).(1, 1) \ \longrightarrow \ (4, 1).

Every point moves the same way, so the whole parabola moves three units to the right, as the picture shows.

To track the old point (1,1)(1,1), set the inside x−3x-3 equal to its old input 11. This gives x=4x=4, not −2-2. The minus sign may suggest moving left, but to match the old input, the point has to move three units right. The proof below does the same for any function.

Why y=f(x−h)y = f(x - h) slides the graph right by hh#

For f(x)=x2f(x)=x^2 and h=5h=5, the old point (−2,4)(-2,4) becomes (3,4)(3,4) because 3−5=−23-5=-2. The new point has the same height and an input 55 greater.

Let g(x)=f(x−h)g(x)=f(x-h) and let aa be any input in the domain of ff. To feed ff that same input, solve

x−h=a⟹x=a+h.x-h=a \quad\Longrightarrow\quad x=a+h.

Substitution checks the height:

g(a+h)=f((a+h)−h)=f(a).g(a+h)=f\big((a+h)-h\big)=f(a).

Thus (a,f(a))(a,f(a)) moves to (a+h,f(a))(a+h,f(a)). Conversely, every allowed input xx of gg has a=x−ha=x-h in the old domain, so every point on the new graph arises this way.

The height stays fixed while the input increases by hh. For h>0h>0 this is a move right by hh; for h<0h<0 it is a move left by ∣h∣\lvert h\rvert; for h=0h=0 nothing moves. In particular, f(x+3)=f(x−(−3))f(x+3)=f(x-(-3)) shifts left by 33. The sign looks reversed because we solve for the new input that makes the inside equal the old one.

Check your understanding

Why does y=f(x−3)y = f(x - 3) move the graph of y=f(x)y = f(x) to the right, instead of to the left where the minus sign might suggest?

Answer choices
Horizontal shift of a general curve: the peak at input a moves to input a + 3A general curve y = f(x), dashed, and its copy y = f(x - 3), solid, three units to the right. The peak keeps its height and moves right by 3, from input a to input a + 3, because the inside x - 3 equals a when x = a + 3.xy(a, f(a))(a + 3, f(a))aa + 3right 3y = f(x)y = f(x − 3)
Shifting y = f(x) to y = f(x minus 3) moves the whole curve right by 3. The peak that sat at input a reappears at input a + 3, because the inside x minus 3 equals a exactly when x = a + 3.

The proof works for any function ff and any input aa, not only for squaring. The curve above has a single rounded peak instead of a parabola’s smooth bowl, and the peak still moves from input aa to input a+3a + 3 under y=f(x−3)y = f(x - 3), for the same reason a parabola’s vertex does.

Check your understanding

How is the graph of y=f(x+4)y = f(x + 4) related to the graph of y=f(x)y = f(x)?

Answer choices

Combining a horizontal and a vertical shift

The two moves do not interfere, so you can apply both at once. Starting from y=f(x)y = f(x), the rule

y=f(x−h)+ky = f(x - h) + k

shifts the graph right by hh (from the x−hx - h inside) and up by kk (from the +k+ k outside). Track a single point to see both at work: a point (a,f(a))(a, f(a)) on the original graph reappears at

(a+h, f(a)+k),\big(a + h,\ f(a) + k\big),

its input increased by hh and its height increased by kk. Negative values of hh or kk just reverse the corresponding direction.

Now you can see where vertex form comes from. Applying the combined shift to y=x2y = x^2 gives y=(x−h)2+ky = (x - h)^2 + k, and since the vertex of y=x2y = x^2 is at the origin, it lands at (h,k)(h, k). So the numbers hh and kk in vertex form tell you how far the basic bowl was slid right and up.

Try the combined shift on a different shape: y=∣x−h∣+ky = \lvert x - h \rvert + k, a V-shaped graph with a corner instead of a smooth vertex. Start at h=0h = 0 and k=0k = 0, then increase hh to 33. Watch the corner move three units to the right, even though the rule now reads x−3x - 3. Next, hold hh where it is and change kk. The corner moves straight up or down and stays at the same left-to-right position, because kk never touches the inside of the function. Leave the coefficient aa at 11 for now; the next lesson explains what it does.

Move the corner of y=a∣x−h∣+ky = a\lvert x - h\rvert + k

y = |x|. Its corner sits at (0, 0), not shifted at all. Its two arms point upward, rising one unit for every unit across. A coordinate plane with the graph of |x| drawn on it, with its corner marked. Use the controls below the figure to stretch it, or to shift it across or up and down. -6 -4 -2 2 4 6 -6 -4 -2 2 4 6
Stretch a Inside h Outside k

y = |x|. Its corner sits at (0, 0), not shifted at all. Its two arms point upward, rising one unit for every unit across.

An absolute value graph on a coordinate plane, with its corner placed by the inside and outside shifts and its arms set by the coefficient. The inside shift moves the graph across, the outside shift moves it up and down.
Combined shift: y = x squared to y = (x - 2) squared + 1, vertex at 2 comma 1The parabola y = x squared, dashed, and the same parabola moved right two and up one, solid, so its vertex moves from the origin to 2 comma 1, the point named in vertex form.xy-2-112341234(2, 1)right 2up 1y = x²y = (x−2)²+1
Shifting y = x squared right 2 and up 1 gives y = (x minus 2) squared + 1, the solid parabola in vertex form. Its vertex is at (2, 1).

Worked example 3 Shift y=x2y = x^2 into vertex form y=(x−2)2+1y = (x - 2)^2 + 1

Read the rule y=(x−2)2+1y = (x - 2)^2 + 1 as a set of directions applied to y=x2y = x^2. The inside x−2x - 2 says shift right 22, and the +1+ 1 outside says shift up 11.

Move the vertex first. It starts at (0,0)(0, 0), then goes right 22 and up 11:

(0,0) ⟶ (0+2, 0+1)=(2,1).(0, 0) \ \longrightarrow \ (0 + 2,\ 0 + 1) = (2, 1).

To confirm with the rule, the lowest output happens where the squared part is 00, at x−2=0x - 2 = 0, so x=2x = 2; there the output is (0)+1=1(0) + 1 = 1, matching the vertex (2,1)(2, 1). Carry one more point along for the shape: the point (1,1)(1, 1) on y=x2y = x^2 moves right 22 and up 11 to (3,2)(3, 2). Plot the vertex (2,1)(2, 1) and a few shifted points, then draw the same bowl.

Check your understanding

The point (2,5)(2, 5) lies on the graph of y=f(x)y = f(x). Which point must lie on the graph of y=f(x−3)+2y = f(x - 3) + 2?

Answer choices

A combined shift also relocates the intercepts. A horizontal shift slides the x-intercepts sideways by hh, while a vertical shift raises or lowers the graph. A vertical shift can also change how many x-intercepts there are, since it may push the curve across or away from the horizontal axis. Vertex form makes them easy to find by solving directly.

Worked example 4 Find the vertex and x-intercepts of y=(x−3)2−4y = (x - 3)^2 - 4

The rule y=(x−3)2−4y = (x - 3)^2 - 4 shifts y=x2y = x^2 right 33 and down 44, so the vertex moves from (0,0)(0, 0) to

(0+3, 0−4)=(3,−4).(0 + 3,\ 0 - 4) = (3, -4).

Because the vertex sits below the horizontal axis and the bowl opens upward, the graph must cross that axis twice, so expect two x-intercepts. Find them by setting the output to 00:

(x−3)2−4=0⟹(x−3)2=4.(x - 3)^2 - 4 = 0 \quad \Longrightarrow \quad (x - 3)^2 = 4.

A number whose square is 44 is 22 or −2-2, so x−3=2x - 3 = 2 or x−3=−2x - 3 = -2, giving

x=5orx=1.x = 5 \quad \text{or} \quad x = 1.

The x-intercepts are (1,0)(1, 0) and (5,0)(5, 0), sitting symmetrically on either side of the vertex’s input x=3x = 3. Without the shift down 44, y=(x−3)2y = (x - 3)^2 would only touch the axis at its vertex.

Check your understanding

A graph of y=f(x)y = f(x) crosses the x-axis at x=−2x = -2 and x=5x = 5. Where do these two x-intercepts move on y=f(x−3)y = f(x - 3)?

Answer choices

Worked example 5 Shift a general function and track its domain and range

Suppose ff has domain 0≤x≤60 \le x \le 6 and range −1≤y≤5-1 \le y \le 5, and the point (4,−1)(4, -1) lies on its graph. Describe the graph of y=f(x−2)+3y = f(x - 2) + 3.

The rule shifts the graph right 22 and up 33, so apply that to the point first:

(4,−1) ⟶ (4+2, −1+3)=(6,2).(4, -1) \ \longrightarrow \ (4 + 2,\ -1 + 3) = (6, 2).

The domain is the horizontal spread of the graph, so a shift right by 22 slides both ends of the domain right by 22, adding 22 to each:

0≤x≤6⟶2≤x≤8.0 \le x \le 6 \quad \longrightarrow \quad 2 \le x \le 8.

The range is the vertical spread, so a shift up by 33 raises both ends of the range by 33:

−1≤y≤5⟶2≤y≤8.-1 \le y \le 5 \quad \longrightarrow \quad 2 \le y \le 8.

The horizontal shift touches only the inputs (the domain) and the vertical shift touches only the outputs (the range). The two moves can therefore be handled separately even when they happen together.

Check your understanding

A function hh has domain −4≤x≤2-4 \le x \le 2 and range 1≤y≤91 \le y \le 9. What are the domain and range of y=h(x−1)−3y = h(x - 1) - 3?

Answer choices

The four basic translations are worth keeping in one place. In each row, hh and kk stand for positive numbers.

RuleEffect on the graph of y=f(x)y = f(x)
y=f(x)+ky = f(x) + kup kk
y=f(x)−ky = f(x) - kdown kk
y=f(x−h)y = f(x - h)right hh
y=f(x+h)y = f(x + h)left hh

Check your understanding

What is the vertex of the parabola y=(x−5)2+2y = (x - 5)^2 + 2?

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (optional)

A harbor can have different longitude numbers on two old charts. Longitude measures east or west from a chosen zero line. Britain used Greenwich, while France used Paris. On charts using those different starting lines, the same harbor had different numbers even though nothing on the ground had moved.

In 1884, an international conference in Washington, D.C., chose the meridian through the Greenwich observatory’s telescope as the common zero. Many charts already used Greenwich. Agreeing on a starting line made it easier to compare positions, but changing a familiar system took time: France continued using the Paris meridian after the agreement.

A sailor comparing charts needed to know where each chart began counting before deciding whether two numbers described the same place.

NOAA explains the Greenwich meridian choice.The Royal Parks describes the continued use of the Paris meridian.

Your progress

See all your progress →