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)
  • Recognize y=a(x−h)2+ky = a(x - h)^2 + k as vertex form for a parabola

Vertical stretches and compressions: scale the output

Take the familiar graph y=x2y = x^2. The point (1,1)(1, 1) sits at height 11. Multiply every output by 22, giving y=2x2y = 2x^2, and at that same input 11 the height becomes 2×1=22 \times 1 = 2, twice as far from the x-axis.

The same idea works for any function ff and any positive constant aa:

y=a f(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 moves every point that same factor farther from the x-axis when a>1a > 1, or closer to it when 0<a<10 < a < 1, whether the point sits above the axis or below it. We call the first a vertical stretch and the second a vertical compression. The case a=1a=1 leaves the graph unchanged.

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

For f(x)=x2f(x)=x^2 and a=3a=3, the point (−1,1)(-1,1) becomes (−1,3)(-1,3): the height triples while the input stays fixed.

In general, let g(x)=a f(x)g(x)=a\,f(x) with a>0a>0. At each input xx in the domain,

g(x)=a f(x).g(x)=a\,f(x).

Thus the old point (x,f(x))(x,f(x)) becomes (x,a f(x))(x,a\,f(x)). This describes every point of the new graph, because the domain is unchanged. The distance from the x-axis changes from ∣f(x)∣\lvert f(x)\rvert to a∣f(x)∣a\lvert f(x)\rvert, including when the output is negative.

So a>1a>1 stretches vertically, 0<a<10<a<1 compresses vertically, and a=1a=1 leaves the graph unchanged. Finally, af(x)=0a f(x)=0 exactly when f(x)=0f(x)=0, since a≠0a\ne0. The x-intercepts are therefore unchanged.

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=a f(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 transform 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=−∣a∣a = -\lvert a \rvert, the rule y=a f(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. The width is the same, because reflecting only reverses the sign of each height without rescaling it.

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).

You might expect multiplying the input by 22 to widen the graph; it narrows it. When b>1b>1, each nonzero input coordinate moves closer to the y-axis: the graph is compressed horizontally. As with shifts, solve for the new input that reproduces an old input.

For example, if (8,5)(8, 5) lies on y=f(x)y = f(x), that same height reappears on y=f(2x)y = f(2x) at input 44, because 2×4=82 \times 4 = 8: half of the original input, not double it. The proof below shows why this works in general.

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

If f(6)=1f(6)=1, then g(x)=f(3x)g(x)=f(3x) has g(2)=f(6)=1g(2)=f(6)=1. The point (6,1)(6,1) becomes (2,1)(2,1), so its input coordinate is divided by 33.

Let g(x)=f(bx)g(x)=f(bx) with b>0b>0, and take any input pp in the domain of ff. To feed ff this input, solve

bx=p⟹x=pb.bx=p \quad\Longrightarrow\quad x=\frac{p}{b}.

Substituting gives g(p/b)=f(p)g(p/b)=f(p). Thus (p,f(p))(p,f(p)) becomes (p/b,f(p))(p/b,f(p)): the input is divided by bb and the output stays fixed. Conversely, every allowed input xx of gg gives an old input p=bxp=bx, so this accounts for the entire new graph.

For b>1b>1, each nonzero input is closer to 00, giving a horizontal compression. For 0<b<10<b<1, it is farther from 00, giving a horizontal stretch. For b=1b=1, nothing changes. A point on the y-axis stays fixed because 0/b=00/b=0.

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=8⟹x=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 (p,f(p))(p, f(p)) reappears where the inside −x-x equals pp, that is, at x=−px = -p, so it moves to (−p,f(p))(-p, f(p)). 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 p=0p = 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.

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

For any negative bb, the same input equation bx=pbx=p gives x=p/bx=p/b. This combines a horizontal scaling by 1/∣b∣1/\lvert b\rvert with reflection across the y-axis. For example, (6,4)(6,4) becomes (−3,4)(-3,4) under f(−2x)f(-2x).

The scaling rules here use nonzero factors. If a=0a=0, then af(x)=0a f(x)=0 at every input in the original domain. If b=0b=0, then f(bx)=f(0)f(bx)=f(0) is constant for all real xx when 00 is in the domain of ff; otherwise the expression is undefined. These cases do not stretch a graph.

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=a f(x−h)+k,y = a\,f(x - h) + k,

the inside x−hx - h moves the graph right by hh, while the outside multiplies each height by aa and then adds kk. Track a single point to see the order: 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≠0a\ne0, this gives the vertex form you already know, now read as a transformation. The rule y=a(x−h)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=a x2y = 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.

Worked example 6 Include an actual shift: y=−2(x−3)2+1y = -2(x - 3)^2 + 1

That last example had no shift at all, since h=0h = 0 and k=0k = 0. Here is a rule where every part is doing something: a=−2a = -2, h=3h = 3, k=1k = 1. Track it with the point rule from before, (p,q)→(p+h, aq+k)(p, q) \to (p + h,\ a q + k).

(0,0)⟶(0+3, −2×0+1)=(3,1),(1,1)⟶(1+3, −2×1+1)=(4,−1).\begin{aligned} (0, 0) &\longrightarrow (0 + 3,\ -2 \times 0 + 1) \\ &= (3, 1), \\[4pt] (1, 1) &\longrightarrow (1 + 3,\ -2 \times 1 + 1) \\ &= (4, -1). \end{aligned}

The vertex of y=x2y = x^2 at (0,0)(0, 0) becomes the vertex of this parabola at (3,1)(3, 1): shifted right 33 and up 11. Because a=−2a = -2 is negative, the graph opens downward and is twice as steep as y=x2y = x^2.

Check your understanding

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

Answer choices

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=a f(x)y = a\,f(x)vertical stretch by aa (taller)
y=1af(x)y = \tfrac{1}{a}f(x)vertical compression: heights multiply by 1a\tfrac{1}{a}
y=−f(x)y = -f(x)reflection across the x-axis
y=f(bx)y = f(bx)horizontal compression: x-coordinates multiply by 1b\tfrac{1}{b} (narrower)
y=f ⁣(xb)y = f\!\left(\tfrac{x}{b}\right)horizontal stretch: x-coordinates multiply 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

Tracking domain and range

Scaling also reshapes the domain and range: a vertical scaling touches only the range, and a horizontal scaling touches only the domain.

Suppose ff has domain 0≤x≤80 \le x \le 8 and range −2≤y≤6-2 \le y \le 6. Track the domain and range of two transformed graphs.

For y=−2f(x)y = -2f(x), only the outputs change, so the domain stays 0≤x≤80 \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, −12≤y≤4-12 \le y \le 4.

For y=f(2x)y = f(2x), only the inputs change, so the range stays −2≤y≤6-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:

0≤x≤8⟶0≤x≤4.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 same endpoint rule works for a negative horizontal factor. On y=f(−2x)y=f(-2x), the old domain endpoints 00 and 88 become 00 and −4-4, so the new domain is −4≤x≤0-4\le x\le0. Multiplying or dividing by a negative number reverses the order, just as in inequalities. Included endpoints stay included, and excluded endpoints stay excluded.

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)

Could an artist find one perfect set of human proportions? Albrecht Durer, a German painter who studied geometry, spent nearly thirty years investigating this question. Around 1500 he hoped to construct an ideal figure mathematically, something an artist could use directly in a picture.

He measured several hundred people and gradually abandoned the search for a single ideal. Instead, he assembled different sets of proportions for bodies of different shapes and sizes. The illustrations showed whole figures from more than one direction, as well as facial types, hands, feet, and geometric diagrams. In the third part of the book, he changed proportions by mathematical rules to produce very broad and very thin figures. That part also explored the construction of heads: measured shapes could become starting points for deliberate transformations.

His book was nearly finished when he died in 1528. His widow Agnes published it that year.

The British Museum describes Durer’s 1528 book and its illustrations.The National Library of Scotland describes the mathematical changes in the third part.

Your progress

See all your progress →