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.

How to do it
- Define the function. Type
f(x) = …on the first line, for examplef(x) = x^2 - 2xorf(x) = sin x. It is drawn as the original graph. - 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. - 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.
- Check a point. Tap the transformed curve to see its turning points and intercepts, and check where a point of f has moved to.

Good to know
- Order matters: y = af(b(x − c)) + d applies the horizontal stretch, then the horizontal translation, then the vertical stretch, then the vertical translation.
f(x - 2) + 3and-f(x)work directly too, without sliders.- Drag a point like
(c, d)to move both sliders at once.
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
- Function transformations (AA SL notes)
- Quadratics and the discriminant (AA SL notes)
- Graphs of common functions
- Exponential and log functions (AA SL notes)
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.