Skip to main content

Graph transformations with sliders

Define any function f, then plot y = a f(b(x − c)) + d with sliders for a, b, c and d. Move a slider, or press ▶ to animate it, and watch the stretch, reflection or translation happen.

The free IB Math Revision Grapher: f(x) = x² − 2x and y = af(b(x − c)) + d with sliders for a, b, c and d
f(x) = x² − 2x and y = af(b(x − c)) + d with sliders for a, b, c and d. Open it in the full Grapher.

How to do it

  1. Define the function. Type f(x) = … on the first line, for example f(x) = x^2 - 2x or f(x) = sin x. It is drawn as the original graph.
  2. Add the transformed graph. Type y = a f(b(x - c)) + d. The letters a, b, c and d are not defined yet, so the Grapher offers a slider for each.
  3. Move one slider at a time. a stretches vertically (and reflects in the x-axis when negative); b stretches horizontally by scale factor 1/b; c translates right; d translates up. Press ▶ on a slider to animate it.
  4. Check a point. Tap the transformed curve to see its turning points and intercepts, and check where a point of f has moved to.
The Grapher showing f(x) = x² − 2x and y = af(b(x − c)) + d with a = −1 and b = 2: the transformed parabola is reflected and narrower
With a = −1 and b = 2 the transformed parabola is turned upside down and squashed horizontally.

Good to know

Frequently asked questions

What does each letter do in af(b(x − c)) + d?

a is a vertical stretch by scale factor a (a reflection in the x-axis if a < 0); b is a horizontal stretch by scale factor 1/b (a reflection in the y-axis if b < 0); c is a translation c units right; d is a translation d units up.

Can I use my own function?

Yes. Define any f(x) on the first line: a polynomial, sin x, eˣ, |x| or a piecewise function.

Can the sliders animate?

Yes: press ▶ on a slider and it moves back and forth between its minimum and maximum. Change its range in the number boxes beside the slider.

Learn more

More Grapher guides

The Grapher is our own free tool (graph.mathrevision.co.uk), built for IB, A Level and IGCSE students. It is not an exam calculator: practise on your own GDC for calculator papers.