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, also called a translation, moves every point of a graph the same distance in the same direction, without turning it, stretching it, or flipping it. The shape stays identical; only its location changes. Because a graph is the set of points (x,f(x))(x, f(x)), a shift acts on those points. We can predict exactly where each point goes by looking at how the rule changes.

There are two kinds of shift: a vertical shift moves the graph up or down, and a horizontal shift moves it left or right. We handle each on its own first, then combine them. Throughout, keep one fact from the last lesson in front of you: a point (a,b)(a, b) lies on the graph of y=f(x)y = f(x) exactly when b=f(a)b = f(a). So the second coordinate is an output and the first is an input. Every rule below comes straight from tracking what happens to that pairing.

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). The parabola has not changed shape at all; it simply sits three units higher.

Look at what happened. Every output on y=x2y = x^2 picked up the same extra 33: the vertex (0,0)(0, 0) became (0,3)(0, 3), and (1,1)(1, 1) became (1,4)(1, 4). Adding the same number to every height is exactly what slides a shape straight up without bending it, and the same thing happens for any starting graph, not only a parabola. Written in general, adding a constant kk outside a function does this to every point of y=f(x)y = f(x):

y=f(x)+k.y = f(x) + k.

Every input still passes through ff, but whatever comes out is then increased by kk. Since the output is the height of the graph, raising every output by kk raises the whole graph by kk, up when k>0k > 0 and down when k<0k < 0.

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

Let g(x)=f(x)+kg(x) = f(x) + k. Pick any input aa. The original graph has the point (a,f(a))(a, f(a)), sitting at height f(a)f(a) directly above the input aa. The new graph has the point (a,g(a))(a, g(a)), and

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

so that point is (a,f(a)+k)(a, f(a) + k). The two points share the same first coordinate aa, so they lie on the same vertical line. The new point’s second coordinate minus the old one’s equals exactly kk, whatever the sign of kk turns out to be. That is a rise of kk when k>0k > 0, and a drop of ∣k∣\lvert k \rvert when k<0k < 0. Nothing about the input changed, so the point did not move left or right at all.

Since aa was an arbitrary input, this happens to every point at once: each one rises by kk when k>0k > 0, or drops by ∣k∣\lvert k \rvert when k<0k < 0. A rigid slide of every point by the same amount in the same direction is exactly a translation. So the graph of y=f(x)+ky = f(x) + k is the graph of y=f(x)y = f(x) moved vertically by kk, and its shape is untouched.

The same reasoning reads points off a graph directly. 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).

Here is the trap. Almost everyone expects x−hx - h, with its minus sign, to move the graph left, in the negative direction. It does the opposite: for h>0h > 0 the graph moves right by hh. Rather than memorize that, derive it, because the derivation shows exactly why the sign feels reversed.

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 parabola lands three units to the right, exactly as the picture shows.

Look at why that happened. To make (x−3)2(x - 3)^2 reproduce the height that 121^2 gave on the original graph, the inside x−3x - 3 had to equal 11, and that forced xx to be three more than before: x=4x = 4, not x=−2x = -2. Subtracting inside asks xx to grow to keep the inside value the same, and that is true for every point, not just this one.

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

Let g(x)=f(x−h)g(x) = f(x - h). Fix any input aa, so the original graph has the point (a,f(a))(a, f(a)) at height f(a)f(a). Ask the key question: at which input xx does the new function gg produce that same height f(a)f(a)?

The function ff returns the value f(a)f(a) when its input equals aa. But the input handed to ff inside gg is not xx; it is x−hx - h. So g(x)g(x) produces that same height f(a)f(a) when the inside matches aa:

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

Therefore g(a+h)=f((a+h)−h)=f(a)g(a + h) = f\big((a + h) - h\big) = f(a), which means the new graph has the point (a+h,f(a))(a + h, f(a)). Compare it with the old point (a,f(a))(a, f(a)): both sit at the same height f(a)f(a). The new point, though, is at input a+ha + h, exactly hh units to the right of aa when h>0h > 0.

Since aa was arbitrary, every point moves right by hh, so y=f(x−h)y = f(x - h) is y=f(x)y = f(x) shifted right by hh. The reason the minus sign feels backward is now visible: subtracting hh inside means the function needs a larger input xx to feed ff the same inside value. So each feature of the graph shows up hh units later, that is, farther to the right. Reading it the other way, y=f(x+h)y = f(x + h) is y=f(x−(−h))y = f(x - (-h)), a shift right by −h-h, which is a shift left by hh.

A horizontal shift always works this way: to make the inside expression reach a value it used to reach, you move xx in the direction that undoes the sign in front of hh.

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

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.

This is where vertex form finally makes complete sense. 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). The numbers hh and kk in vertex form are not mysterious; they are simply how far the basic bowl was slid right and up.

Nothing in the argument used the fact that ff was a squaring function, so 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 is what that control is for.

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. Its vertex is at (2, 1). This is vertex form, and (2, 1) is the point the vertex was moved to.

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. The graph is y=x2y = x^2 resting with its bottom at (2,1)(2, 1), which is precisely what vertex form announces.

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. The down-44 shift is what dropped the vertex below the axis and created two crossings; without it, 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. What are the x-intercepts of 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.

Go deeper (optional)

You can skip this and keep going. Read it if you want to know more.

Why the horizontal shift works on any shape, not just a parabola
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 in the main lesson never assumed ff was a squaring function; it works for any function ff and any input aa. This curve makes that concrete: it 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 exactly the same reason a parabola’s vertex does.

A bit of history (optional)

Every place on the Earth carries a number for how far east or west it lies. East or west of what, though? For centuries each seafaring nation answered that with a line of its own, drawn through a home observatory. The same harbor then carried one number on a French chart and a different number on a British one.

An international conference settled the question in 1884. It chose the line through Greenwich, an observatory on a hill above the river in London, and charts have mostly followed it since. Nothing on the ground moved that day: cliffs, ports and islands all stayed exactly where they were. What moved was the zero. On every chart that changed over, each longitude shifted by the same amount, and all of them shifted the same way.

A function shift is a cousin of that idea, though it works the opposite way around. Renumbering the charts left every place exactly where it was; only the number attached to each place changed. A graph shift does the reverse: the axes never move, and it is the curve itself that slides to a new spot on them. What both stories share is the deeper point that a single number, added in the right place, can move where something sits. That is worth remembering the next time x−hx - h tempts you to guess left instead of right.

Vertex form is that idea at its plainest. Writing y=(x−h)2+ky = (x - h)^2 + k does not describe some new bowl. It takes the familiar bowl y=x2y = x^2 and slides it, exactly as a shift always does, so its lowest point lands at (h,k)(h, k).