Moving and stretching a graph
The four changes you can make to a formula, and what each does to the picture.
There are only four things you can do to a function that change its graph without changing its family: slide it up or down, slide it left or right, stretch it vertically, and stretch it horizontally. Reflections come free, as stretches by a negative amount.
Rather than being told which does what, produce a table and read it. The middle column is the parent and the others are the same rule with one change each.
Change f(x - 2) to f(x + 2) and run it again. Which way along the row does the zero move now?
Four observations, one per column. Adding 3 outside raised every output by 3, so the graph moved up 3. The column has the value 0 at rather than at , so the graph moved right 2. Multiplying by 3 outside made every output three times as tall. And reaches at what the parent reached at , so it has been squashed towards the vertical axis.
The four rules
Now the names. In each rule below, is any function and the number is a constant.
| New rule | Effect on the graph | Called |
|---|---|---|
| Up if , down if | Vertical translation | |
| Right if , left if | Horizontal translation | |
| Stretched vertically by a factor | Vertical stretch | |
| Every horizontal distance from the vertical axis is divided by | Horizontal stretch | |
| Flipped over the horizontal axis | Reflection in the x-axis | |
| Flipped over the vertical axis | Reflection in the y-axis |
The horizontal row of that table needs one extra sentence, because the single word squash is only half the story. Dividing the horizontal distances by pulls the graph in when is bigger than 1 and pushes it out when is between 0 and 1.
Numbers make that concrete. With , the height the parent reached at is now reached at , because is what has to be fed in. Every feature has moved half as far from the vertical axis, so the graph is squashed towards it.
With the same arithmetic runs the other way. To feed the parent the input 2 you now need , so . What happened at now happens at , twice as far out, so the graph is stretched away from the vertical axis rather than squashed towards it.
Anything written outside the function acts on the output, which is the vertical direction, and it acts exactly as you would expect. Anything written inside acts on the input, which is the horizontal direction, and it acts backwards.
That backwards behaviour is worth understanding rather than memorising. To make produce the value that produced at 0, you need , so you need . Every feature of the graph therefore needs a larger input than before, which is a move to the right. Run the argument.
Change f(x - 2) to f(x - 5), and change the printed x - 2 to x - 5. The corner moves to wherever the fed value hits 0.
- Corner is at
- 0
- Corner is at
- 0
- Height at
- 0
Drag h and watch the corner track it exactly. Then set a negative and see the V turn over.
Reading a transformation off a graph
The exam question usually runs the other way: here is a graph, here is the parent, describe the change or write the equation. Work in a fixed order.
- Identify the parent family from the shape: a V, a U, a line, and so on.
- Find the feature you can locate exactly. For a V it is the corner, for a parabola the turning point, for a cubic the flat spot.
- Compare that feature with where the parent has it, at the origin. The horizontal move is and the vertical move is .
- Take one more point off the graph and solve for the stretch .
One worked example in full. A V-shaped graph has its corner at and passes through . Find its equation.
- The shape is a V, so the parent is and the equation has the form .
- The corner sits at , so and , giving .
- Substitute the extra point, and : .
- So , giving and .
- The equation is . Check it against the corner: , as required.
The graph of is moved 4 left and 6 down. What is the new equation?
. Left is the negative direction, so , and becomes . Down 6 is , written outside as a subtraction. The turning point is now at .