This site is a work in progress. New lessons are added regularly. Contact us

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(xh)y = f(x - h)
  • Explain why subtracting inside moves the graph rightward
  • Combine both into y=f(xh)+ky = f(x - h) + k
  • Track how a shift moves intercepts, domain and range

Sliding a graph without replotting it

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 only two directions to move: up or down (a vertical shift) and left or right (a horizontal shift). 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

Start with the graph of y=f(x)y = f(x) and build a new rule by adding a constant kk to the output:

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.

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 is exactly kk higher than the old one, because its second coordinate is larger by kk. 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.

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.

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.

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.

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 xhx - h to get

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

Here is the trap. Almost everyone expects xhx - 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.

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

Let g(x)=f(xh)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 xhx - h. So g(x)g(x) produces that same height f(a)f(a) when the inside matches aa:

xh=ax=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(xh)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.

The clean way to say it: a horizontal shift asks the inside expression to hit its old values. To make xhx - h reach a value it used to reach at some input, you must push xx up by hh. The general curve below shows the same logic on a shape that is not a parabola, so you can see it has nothing to do with symmetry.

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.

On a parabola the same shift moves the vertex, and the backward direction is easy to check point by point.

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=(x3)2y = (x - 3)^2 to y=x2y = x^2

The rule y=(x3)2y = (x - 3)^2 has the form f(xh)f(x - h) with f(x)=x2f(x) = x^2 and h=3h = 3. By the derivation, it is y=x2y = x^2 shifted right by 33, even though the sign inside is a minus.

Check the direction with the vertex. The bowl y=x2y = x^2 bottoms out where its input is 00. For y=(x3)2y = (x - 3)^2, the lowest output happens where the inside is 00:

x3=0x=3,x - 3 = 0 \quad \Longrightarrow \quad x = 3,

so the new vertex is (3,0)(3, 0), three units right of the origin. Track one more point the same way. The point (1,1)(1, 1) is on y=x2y = x^2; to make the inside of (x3)2(x - 3)^2 equal 11, solve x3=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.

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(xh)+ky = f(x - h) + k

shifts the graph right by hh (from the xhx - 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=(xh)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 it on a different shape. Below is y=axh+ky = a\lvert x - h\rvert + k, with a corner instead of a smooth vertex. Raise hh and read the expression at the same time. The number you are adding shows up as a minus sign inside, and the corner moves the other way. Then raise kk and watch that one behave itself. If you want to see the two act independently, park hh somewhere and sweep kk through its whole range: the corner slides straight up a line, never sideways.

Move the corner of y=axh+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=(x2)2+1y = (x - 2)^2 + 1

Read the rule y=(x2)2+1y = (x - 2)^2 + 1 as a set of directions applied to y=x2y = x^2. The inside x2x - 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 x2=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.

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=(x3)24y = (x - 3)^2 - 4

The rule y=(x3)24y = (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, 04)=(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:

(x3)24=0(x3)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 x3=2x - 3 = 2 or x3=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=(x3)2y = (x - 3)^2 would only touch the axis at its vertex.

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

Suppose ff has domain 0x60 \le x \le 6 and range 1y5-1 \le y \le 5, and the point (4,1)(4, -1) lies on its graph. Describe the graph of y=f(x2)+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:

0x62x8.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:

1y52y8.-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.

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(xh)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=(x5)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.

Free Response Questions (FRQ)

Longer questions in parts, to be worked out on paper. Progressive hints, the answer on its own so you can check yourself and try again, then the full worked solution, plus a rubric to mark your own work against.

Free response Work it out on paper 5 questions 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)

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.

That is the heart of a shift, and it is why the sign inside a function looks backward. A shift never changes an object. It changes where the counting starts. In y=f(xh)y = f(x - h) the subtraction reaches the input before ff ever sees it. So xx must grow by hh to hand ff its old value. Every feature of the curve then turns up hh units later, meaning hh units to the right.

Vertex form is that idea at its shortest. Writing y=(xh)2+ky = (x - h)^2 + k does not describe some new bowl. It hands the familiar bowl a new zero, and (h,k)(h, k) is simply where its lowest point ended up.