Shift, stretch, flip

Start with a base graph y = f(x), shown in grey. The coloured graph is y = a·f(b(x − h)) + k. Move each slider on its own first and watch what it does, then combine them. The dot on the grey graph and the dot on the coloured graph are the same point, before and after.

What's going on

Everything outside the brackets acts on the output, so it moves the graph vertically and behaves the way you expect: a stretches up and down (and flips when negative), k slides up and down. Everything inside the brackets acts on the input, and the input is sneaky. To get the same output as before, you have to feed in a different x. With f(x − 3), the number 5 is treated the way 2 used to be, so the whole picture slides right by 3. With f(2x), the number 1 is treated the way 2 used to be, so the picture is squashed towards the y-axis by a factor of 2, not stretched.

A good habit: read a transformed formula from the inside out. For y = −2(x + 1)² + 3, start with x², shift left 1, stretch vertically by 2, flip, then move up 3. The order between a and k matters: flipping after you move up is not the same as moving up after you flip. The sliders here always apply a before k, as the formula says.

Try the order experiment yourself: set b = 2 and h = 1. Is the graph shifted by 1 or by 1/2? Work it out from the formula a·f(b(x − h)) + k before you look.

Sheets: Shift, stretch, flip and Functions as machines.