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

Stretching and Reflecting Graphs

Learning goals

  • Scale heights with y=af(x)y = a f(x), stretching when a>1a > 1
  • Flip across the xx-axis with y=f(x)y = -f(x)
  • Compress toward the yy-axis with y=f(bx)y = f(bx) when b>1b > 1
  • Mirror across the yy-axis with y=f(x)y = f(-x)
  • Read y=af(xh)+ky = a f(x - h) + k as vertex form for a parabola
  • Say which of domain and range each kind of scaling reshapes

Vertical stretches and compressions: scale the output

Start with the graph of y=f(x)y = f(x) and multiply every output by a positive constant aa:

y=af(x).y = a\,f(x).

Each input still passes through ff, but whatever comes out is then multiplied by aa. Because the output is the height of the graph, scaling every output by aa scales the height of every point by aa. When a>1a > 1 that makes the graph taller and steeper (a vertical stretch); when 0<a<10 < a < 1 it makes the graph shorter and flatter (a vertical compression).

Why y=af(x)y = a\,f(x) scales every height by aa#

Let g(x)=af(x)g(x) = a\,f(x) with a>0a > 0, and pick any input xx in the domain. The original graph has the point (x,f(x))(x, f(x)), sitting at height f(x)f(x) directly above the input. The new graph has the point (x,g(x))(x, g(x)), and since g(x)=af(x)g(x) = a\,f(x), that point is (x,af(x))(x,\, a\,f(x)). The two share the same first coordinate, so the new point lies on the same vertical line as the old one, at aa times its height.

Multiplying a height by a>1a > 1 pushes the point farther from the horizontal axis, and multiplying by an aa between 00 and 11 pulls it closer. Both follow because scaling a distance by aa enlarges it when a>1a > 1 and shrinks it when a<1a < 1. A point that already sits on the horizontal axis has height 00, and a×0=0a \times 0 = 0, so it does not move at all.

Since xx was arbitrary, every height is scaled by the same factor aa: the graph stretches vertically when a>1a > 1 and compresses vertically when 0<a<10 < a < 1. In particular, every point on the horizontal axis, including all x-intercepts, stays pinned exactly where it was.

Reading points off the graph is immediate. If (x0,y0)(x_0, y_0) lies on y=f(x)y = f(x), then (x0,ay0)(x_0,\, a y_0) lies on y=af(x)y = a\,f(x): keep the input, multiply the height by aa.

Vertical stretch: y = x squared scaled to y = 2x squaredThe parabola y = x squared, dashed, and the taller, narrower parabola y = 2 x squared, solid, sharing the vertex at the origin. The point 1 comma 1 rises to 1 comma 2.xy-2-11212(1, 1)(1, 2)y = 2x²y = x²
The dashed parabola is y = x squared. Multiplying every output by 2 gives the solid parabola y = 2x squared, which rises twice as high above each input, so it looks narrower and steeper. The point (1, 1) rises to (1, 2), while the vertex (0, 0) stays fixed because twice a height of 0 is still 0.

Worked example 1 Stretch and compress y=x2y = x^2

Both new rules keep f(x)=x2f(x) = x^2 and only rescale its outputs, so shift the points you already know instead of building a fresh table.

For y=2x2y = 2x^2, multiply every height by 22. The vertex (0,0)(0, 0) stays at (0,0)(0, 0) because 2×0=02 \times 0 = 0, while the anchor points (1,1)(1, 1) and (2,4)(2, 4) climb to

(1,2×1)=(1,2),(2,2×4)=(2,8).(1,\, 2 \times 1) = (1, 2), \qquad (2,\, 2 \times 4) = (2, 8).

The bowl passes through those higher points, so it looks narrower and steeper, though it still opens upward from the same vertex.

For y=12x2y = \tfrac{1}{2}x^2, multiply every height by 12\tfrac{1}{2} instead. The same anchor points sink to

(1,12),(2,2),\left(1,\, \tfrac{1}{2}\right), \qquad (2, 2),

so this bowl is wider and flatter. In both cases the vertex and the single x-intercept at the origin never budge. Scaling a height of 00 leaves it at 00, so only the nonzero heights move.

Check your understanding

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

Answer choices

Reflecting across the x-axis: negate the output

The case a=1a = -1 deserves its own name. The rule

y=f(x)y = -f(x)

negates every output, sending a point at height y0y_0 to height y0-y_0. A point above the horizontal axis drops to the mirror-image spot the same distance below it, and a point below rises to the matching spot above. That is exactly a reflection across the x-axis: the graph flips over that axis like a card turning face down. Points sitting on the axis have height 00, and 0=0-0 = 0, so they stay fixed and act as the hinge of the flip.

A negative scale factor with size other than 11 just does both jobs at once. Writing a=aa = -\lvert a \rvert, the rule y=af(x)y = a\,f(x) scales every height by a\lvert a \rvert and then negates it, so it stretches or compresses vertically and reflects across the x-axis together.

Reflection across the x-axis: y = x squared to y = negative x squaredThe upward parabola y = x squared, dashed, and its reflection across the horizontal axis, the downward parabola y = negative x squared, solid, meeting at the origin.xy-224-4(1, 1)(1, -1)y = x²y = −x²
The dashed parabola y = x squared opens upward with a lowest point at the origin. Negating every output gives the solid parabola y = negative x squared, the same bowl reflected across the x-axis so it opens downward with a highest point at the origin. The point (1, 1) flips to (1, negative 1).

Worked example 2 Reflect y=x2y = x^2 across the x-axis

The rule y=x2y = -x^2 is y=f(x)y = -f(x) with f(x)=x2f(x) = x^2, so it takes the familiar upward bowl and negates every output. Track a few points by flipping the sign of each height:

(1,1)(1,1),(2,4)(2,4).(1, 1) \longrightarrow (1, -1), \qquad (2, 4) \longrightarrow (2, -4).

The vertex (0,0)(0, 0) stays put, since 0=0-0 = 0. Plotting the flipped points gives the same parabola turned upside down, so it now opens downward. The origin that used to be its lowest point is now its highest. Nothing about the width changed, because reflecting only reverses the sign of each height without rescaling it. What was a minimum has become a maximum, purely from the minus sign.

Horizontal stretches and compressions: the direction that looks backward again

Now change the input instead of the output. Replace xx with bxbx for a positive constant bb:

y=f(bx).y = f(bx).

Here is the trap, and it mirrors the one from the shift lesson. You might expect multiplying the input by a large bb to stretch the graph wider. It does the opposite: for b>1b > 1 the graph is squeezed narrower, pulled in toward the vertical axis. Rather than memorize that, derive it, because the derivation shows precisely why the direction feels reversed.

Why y=f(bx)y = f(bx) scales every width by 1b\tfrac{1}{b}#

Let g(x)=f(bx)g(x) = f(bx) with b>0b > 0. 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 bxbx. So g(x)g(x) produces that same height when the inside matches aa:

bx=ax=ab.bx = a \quad \Longrightarrow \quad x = \frac{a}{b}.

Therefore g ⁣(ab)=f ⁣(bab)=f(a)g\!\left(\tfrac{a}{b}\right) = f\!\left(b \cdot \tfrac{a}{b}\right) = f(a), which means the new graph has the point (ab,f(a))\left(\tfrac{a}{b},\, f(a)\right). Compare it with the old point (a,f(a))(a, f(a)): both sit at the same height. The new point, though, is at input ab\tfrac{a}{b}, the old input scaled by the factor 1b\tfrac{1}{b}.

When b>1b > 1 the factor 1b\tfrac{1}{b} is less than 11, so ab\tfrac{a}{b} is closer to 00 than aa was. Every point is therefore pulled toward the vertical axis, a horizontal compression. When 0<b<10 < b < 1 the factor 1b\tfrac{1}{b} is greater than 11, so ab\tfrac{a}{b} is farther from 00: every point is pushed away, a horizontal stretch. A point on the vertical axis has a=0a = 0, and 0b=0\tfrac{0}{b} = 0, so it never moves.

The direction feels backward for exactly the reason it did with shifts. To make the inside bxbx reach a value it used to reach at input aa, and since bb multiplies xx, you need a smaller xx when b>1b > 1. So each feature of the graph shows up at a smaller input, nearer the axis.

Horizontal compression: y = f(x) squeezed to y = f(2x)A general hump curve y = f(x), dashed, with its peak above input 2, and the narrower curve y = f(2x), solid, whose peak sits above input 1, pulled in toward the vertical axis because every input is halved.xy1234(2, f(2))y = f(x)(1, f(2))y = f(2x)×½
Replacing x with 2x pulls the whole curve in toward the y-axis by a factor of one half. The dashed curve y = f(x) has its peak at input 2; on the solid curve y = f(2x) that peak reappears at input 1, because the inside 2x equals 2 exactly when x = 1. Every input is halved, so b = 2 compresses the graph rather than stretching it.

Worked example 3 Locate points and intercepts on y=f(2x)y = f(2x) and y=f(x2)y = f\left(\tfrac{x}{2}\right)

Suppose (8,5)(8, 5) lies on y=f(x)y = f(x), and suppose ff has x-intercepts at x=2x = 2 and x=6x = 6. Handle the two scalings by asking, in each case, what input makes the inside equal an old input.

For y=f(2x)y = f(2x), a point reappears where 2x2x equals the old input. To get the height 55 back, set the inside equal to 88:

2x=8x=4,2x = 8 \quad \Longrightarrow \quad x = 4,

so (8,5)(8, 5) moves to (4,5)(4, 5), half the input. The x-intercepts move the same way: 2x=22x = 2 gives x=1x = 1 and 2x=62x = 6 gives x=3x = 3, so the zeros at 22 and 66 are pulled in to 11 and 33. With b=2>1b = 2 > 1 the whole graph is compressed toward the vertical axis by a factor of 12\tfrac{1}{2}.

For y=f ⁣(x2)y = f\!\left(\tfrac{x}{2}\right), the inside is x2\tfrac{x}{2}, so b=12b = \tfrac{1}{2}. Now x2=8\tfrac{x}{2} = 8 gives x=16x = 16, so (8,5)(8, 5) moves out to (16,5)(16, 5). The zeros stretch out too, to x=4x = 4 and x=12x = 12. Because 0<b<10 < b < 1, the graph is stretched away from the vertical axis by a factor of 1b=2\tfrac{1}{b} = 2.

Check your understanding

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

Answer choices

Reflecting across the y-axis: negate the input

The case b=1b = -1 is the horizontal partner of the x-axis reflection. The rule

y=f(x)y = f(-x)

feeds ff the opposite input. Following the derivation above, a point (a,f(a))(a, f(a)) reappears where the inside x-x equals aa, that is, at x=ax = -a, so it moves to (a,f(a))(-a, f(a)). Every point keeps its height but lands at the opposite horizontal position, which is a reflection across the y-axis: the graph flips left to right. A point already on the vertical axis has a=0a = 0, and 0=0-0 = 0, so it stays fixed and serves as the hinge.

Reflection across the y-axis: y = f(x) to y = f(negative x)A hump curve y = f(x), dashed, peaking above input 2, and its mirror image across the vertical axis, y = f(negative x), solid, peaking above input negative 2.xy-4-224(2, 4)(-2, 4)y = f(x)y = f(−x)
The dashed curve y = f(x) leans to the right, with its peak above input 2. Replacing x with negative x gives the solid curve y = f(negative x), the same shape flipped left to right across the y-axis, with its peak above input negative 2. Each point keeps its height and swaps to the opposite side of the vertical axis.

Worked example 4 Reflect a graph across the y-axis

Suppose ff passes through (3,5)(3, 5) and (1,2)(-1, 2), and its only x-intercept is at x=4x = 4. Describe the graph of y=f(x)y = f(-x).

Reflection across the y-axis keeps every height and flips the sign of every input, so map each feature by negating its first coordinate:

(3,5)(3,5),(1,2)(1,2).(3, 5) \longrightarrow (-3, 5), \qquad (-1, 2) \longrightarrow (1, 2).

The x-intercept at x=4x = 4 moves to x=4x = -4, since setting the inside x=4-x = 4 gives x=4x = -4. Any point that happened to sit on the y-axis, where the input is 00, would not move at all. So y=f(x)y = f(-x) is the mirror image of y=f(x)y = f(x) across the vertical axis, with the whole picture swapped left for right while every height is preserved.

Check your understanding

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

Answer choices

Combining a scaling with a shift

Scalings and shifts stack, so a rule can do several things at once. Reading it correctly means separating what happens to the output from what happens to the input. For a vertical scaling followed by a shift,

y=af(xh)+k,y = a\,f(x - h) + k,

the inside xhx - h moves the graph right by hh, while the outside multiplies each height by aa and then adds kk. Tracking a single point makes the order clear: a point (p,q)(p, q) on y=f(x)y = f(x) reappears at

(p+h, aq+k).\big(p + h,\ a q + k\big).

The input picks up the shift hh, and the output is first scaled by aa (which also flips it when aa is negative) and then raised by kk. The horizontal part touches only the first coordinate and the vertical part only the second, exactly as with pure shifts.

For a parabola this is the vertex form you already know, now read as a transformation. The rule y=a(xh)2+ky = a(x - h)^2 + k takes y=x2y = x^2, scales it vertically by aa (reflecting it downward when a<0a < 0), then moves the vertex to (h,k)(h, k). The number aa controls how narrow the bowl is and which way it opens; hh and kk say where its vertex sits.

Reflect and stretch: y = x squared to y = negative 2x squaredThe upward parabola y = x squared, dashed, and the solid downward parabola y = negative 2 x squared, which is reflected across the horizontal axis and stretched to twice the height, sharing the vertex at the origin.xy-111-2(1, 1)(1, -2)y = x²y = −2x²
The dashed parabola y = x squared opens upward from the origin. The rule y = negative 2x squared multiplies every output by negative 2, so it reflects across the x-axis and stretches to twice the height, giving the solid downward parabola. The point (1, 1) lands at (1, negative 2), and the shared vertex at the origin is now a maximum instead of a minimum.

Worked example 5 Graph y=2x2y = -2x^2

Read the rule y=2x2y = -2x^2 as y=ax2y = a\,x^2 with a=2a = -2, a single number that does two jobs. Its size, a=2\lvert a \rvert = 2, stretches the bowl vertically to twice its height, and its sign, negative, reflects it across the x-axis so it opens downward.

Apply both to the anchor points of y=x2y = x^2. Multiply each height by 2-2:

(1,1)(1,2),(2,4)(2,8).(1, 1) \longrightarrow (1, -2), \qquad (2, 4) \longrightarrow (2, -8).

The vertex (0,0)(0, 0) holds still, since 2×0=0-2 \times 0 = 0. Plotting the results gives a downward parabola, narrower than y=x2y = x^2, whose highest point is the origin. What was the minimum of the plain bowl has become a maximum, and the graph is twice as steep, all encoded in the single coefficient 2-2.

A scaling also reshapes the domain and range, and each type touches only one of them. A vertical scaling by aa multiplies every output by aa, so it scales the range. A horizontal scaling by bb divides every input by bb, so it scales the domain. A reflection swaps the endpoints of whichever interval it acts on.

Worked example 6 Track the domain and range through a scaling

Suppose ff has domain 0x80 \le x \le 8 and range 2y6-2 \le y \le 6. Describe the domain and range of two transformed graphs.

For y=2f(x)y = -2f(x), only the outputs change, so the domain stays 0x80 \le x \le 8. Each output is multiplied by 2-2, which scales the range endpoints and swaps them because the factor is negative:

2×(2)=4,2×6=12,-2 \times (-2) = 4, \qquad -2 \times 6 = -12,

so the new range runs from the lower value up, 12y4-12 \le y \le 4. The reflection is what turned the top of the old range into the bottom of the new one.

For y=f(2x)y = f(2x), only the inputs change, so the range stays 2y6-2 \le y \le 6. Each input is divided by 22 (the inside 2x2x reaches the old inputs at half the xx), so the domain endpoints halve:

0x80x4.0 \le x \le 8 \quad \longrightarrow \quad 0 \le x \le 4.

The graph is squeezed into half the horizontal room while covering the same heights.

The scalings and reflections are worth keeping in one place. In each row, a>1a > 1 and b>1b > 1.

RuleEffect on the graph of y=f(x)y = f(x)
y=af(x)y = a\,f(x)vertical stretch by aa (taller)
y=1af(x)y = \tfrac{1}{a}f(x)vertical compression by aa (shorter)
y=f(x)y = -f(x)reflection across the x-axis
y=f(bx)y = f(bx)horizontal compression by bb (narrower)
y=f ⁣(xb)y = f\!\left(\tfrac{x}{b}\right)horizontal stretch by bb (wider)
y=f(x)y = f(-x)reflection across the y-axis

Check your understanding

The parabola y=3x2y = -3x^2 transforms y=x2y = x^2. Which description is correct?

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)

A painter who needs a hundred different faces cannot invent every one from nothing. Albrecht Durer, a German painter who studied geometry, wondered whether a face could be altered by rule instead of by guesswork.

His answer appeared in 1528, in a book about human proportion. Durer drew a head over a square grid. Then he copied it across, square by square, onto a grid whose spacing he had deliberately changed. Pull the columns apart and the face broadens. Squeeze the rows together and it turns squat. Slant the whole grid and the head leans. Every one of those heads is the same head, redrawn against different spacings.

Those grids carry the exact distinction this lesson draws. Stretch both directions by the same factor and the shape survives untouched, since only its size has changed. Stretch one direction alone and the shape itself is remade. That is why y=2f(x)y = 2f(x) and y=f(2x)y = f(2x) do such different things to a single curve. It is also why a squeeze in one direction alone turns a careful portrait into a caricature.

Durer had a grid and a patient hand, and no equations whatever. You have the rule instead. Multiply the output by aa and every height is scaled by aa. Multiply the input by bb and every width is divided by bb. Put a minus sign on either one and the same operation arrives with a mirror attached.