Part 25 of 30 · TransformationsSee the whole course

Stretching and squashing a graph: a·f(x) and f(bx)

Short answer

A number in front, a·f(x), multiplies every height: bigger than 1 stretches the graph taller, between 0 and 1 squashes it flatter. A number on x, f(bx), acts sideways, and backwards: b bigger than 1 squeezes the graph toward the y-axis.

A number in front: stretch and squash

Multiplying the outside multiplies every output. Take f(x) = x² and put a 2 in front:

x: 0, 1, 2, 3
x²: 0, 1, 4, 9
2x²: 0, 2, 8, 18

The graph climbs twice as fast, so it is taller. That makes it look narrower, which surprises many people. A number between 0 and 1, like ½x², does the opposite: it flattens the bowl, so it looks wider. The vertex does not move, because 0 × anything is 0.

A number on x: sideways, and backwards

A number inside acts on x, so it acts sideways, and backwards. In y = (2x)² the graph reaches each height at half the old x, so it is squeezed toward the y-axis. A number below 1, as in (½x)², pulls the graph out wider.

(2x)² = 4x², so squeezing x² by 2 is the same as stretching it ×4.
√(4x) = 2√x, so squeezing √x by 4 is the same as stretching it ×2.

That is a special feature of these shapes. Do not rely on it for every function. Play with both numbers in the figure below.

y = 2x²
  1. in front: 2, every height ×2, taller
  2. on x: 1, no change sideways
  3. point (1, 1) → (1, 2) · same as y = 2x²
A number in front multiplies the heights, so the graph is taller and looks narrower.

All four moves together

For y = −2(x − 1)² + 3, read the moves from the inside out: slide 1 right, stretch by 2 and flip, lift 3 up. Check with a point: the parent point (1, 1) goes to x = 2, then −2 × 1 = −2, then +3 gives 1, so it lands on (2, 1). And −2(2 − 1)² + 3 = 1 ✓.

Sketch it fast

For y = a(x − h)² + k, start at the vertex (h, k). Then step 1 sideways and a up, then 2 sideways and 4a up. For y = 2(x − 1)² + 3: vertex (1, 3), then (2, 5) and (0, 5), then (3, 11) and (−1, 11).

Watch it explained in under a minute

The same idea, narrated step by step. Square version for sharing: download the 1:1 video.

The four mistakes to avoid

Try it yourself

Tap a question to see the answer.

1. Describe y = 3x² and say where it passes through.

It is x² stretched by 3: taller and narrower. The vertex stays at (0, 0), and it passes through (1, 3).

2. How does y = ½|x| compare with y = |x|? Does it pass through (4, 2)?

It is squashed to half the height, so it is flatter and wider. At x = 4: ½ × 4 = 2, so yes.

3. Find the moves, vertex and direction of y = −2(x + 1)² + 4.

Left 1, stretch 2 and flip, up 4. The vertex is (−1, 4) and it opens downward. It passes through (0, 2): −2(1)² + 4 = 2 ✓.

Where this fits in

That completes the four moves: shift, flip and stretch. y = a(x − h)² + k is exactly these moves applied to y = x², which makes it the vertex form of a quadratic. The next part of the course starts there, with what a quadratic function is.

Quick answers

Questions about this topic

What does a number in front of a function do to its graph?

It multiplies every height. A number bigger than 1 stretches the graph taller, and a number between 0 and 1 squashes it flatter.

Why does 2x² look narrower, not wider?

Every height is doubled, so the graph climbs faster. A graph that rises faster looks narrower.

What does a number inside, as in f(2x), do?

It acts on x, sideways and backwards. f(2x) is squeezed toward the y-axis to half the width, and f(½x) is pulled out to twice the width.

In what order do you apply the moves?

In the same order you would calculate the rule: the inside first, then the number in front, then the number added at the end.

Keep going

Learn it by playing

Pip: Math Adventure is a math game for iPhone where functions, lines, equations and calculus are puzzles you solve by playing. It is coming soon to the App Store.

Join the list and we will tell you the day Pip is out.