Skip to content
Brainlag
← All simulations

Graph transformations

Pick a graph, then stretch, reflect and slide it with y = a f(b(x − h)) + k. The faint curve is the original, the bold one is the image, and the gold point shows exactly where one point goes. For GCSE Higher and A-level maths: change the controls and watch what happens.

Just need the number? Graphing calculator

What's happening

Changes outside the bracket act on y and do what they look like: y = a f(x) stretches the graph parallel to the y-axis by scale factor a (a negative a also reflects it in the x-axis), and y = f(x) + k moves it up by k. Changes inside the bracket act on x and do the opposite of what they look like: y = f(bx) stretches parallel to the x-axis by scale factor 1/b, so f(2x) squashes the graph to half its width, and f(x − h) moves it right by h, so f(x + 2) moves it left by 2. Put together, every point (x, y) on y = f(x) goes to (x/b + h, ay + k).

Order matters inside the bracket: f(2x − 6) is f(2(x − 3)), a stretch by 1/2 and then a move of 3 to the right, not 6. Asymptotes move with the graph, so 1/(x − 3) + 1 has asymptotes x = 3 and y = 1.

  • General transformationy = a f(b(x − h)) + k
  • Where a point moves(x, y) → (x/b + h, ay + k)
  • Translationf(x − h): translation by (h, 0)
  • Stretch along the x-axisf(bx): stretch parallel to the x-axis, scale factor 1/b

On the syllabus

  • GCSE Maths Higher AQA, Edexcel, OCRtranslations and reflections of graphs, y = f(x) + a, f(x + a), −f(x) and f(−x)
  • A-Level Mathsstretches y = af(x) and y = f(ax), combined transformations and asymptotes

Challenge

Predict first: the point (2, 4) lies on y = x². Where does it go on y = 2(x + 1)² − 3? Work out the new x-coordinate, type it in, press Check, then set a = 2, h = −1 and k = −3 with the point at x = 2.

Learn this properly

Lessons from the Maths course on this topic: worked steps, then exam-style questions with new numbers every time.

See the whole course

FAQ

Why does f(x + 2) move the graph left?

Because the new graph reaches each value 2 earlier: whatever f did at x = 0 now happens at x = −2. So y = f(x + a) is a translation by the vector (−a, 0).

What is the difference between 2f(x) and f(2x)?

2f(x) doubles every y-value: a stretch parallel to the y-axis, scale factor 2. f(2x) reaches each value at half the x: a stretch parallel to the x-axis, scale factor 1/2.

What do −f(x) and f(−x) do?

−f(x) is a reflection in the x-axis (every y changes sign). f(−x) is a reflection in the y-axis (every x changes sign).

How do I describe y = f(2x − 6)?

Factor the bracket first: f(2x − 6) = f(2(x − 3)). That is a stretch parallel to the x-axis with scale factor 1/2, then a translation by (3, 0). Translating by 6 first would give the wrong graph.

Which point maps to (5, 7) under y = 2f(x − 3) + 1?

Undo each step: x = 5 − 3 = 2 and y = (7 − 1) / 2 = 3, so (2, 3) maps to (5, 7). In Solve for, pick Point that maps to it, type a = 2, b = 1, h = 3, k = 1 and the image.