KS Maths
Topic 2.11 · AA Standard Level

Transformations of graphs

Stretch then shift is not shift then stretch

Stretch y = x² by 3 and then lift it by 2 and you get 3x² + 2. Lift it first and then stretch and you get 3x² + 6. Same two instructions, and the two curves are 4 apart at every x.

Words you need (10 key words in this lesson)

The maths words this lesson uses, in plain English. Open this before you start if English is not your first language.

graph
A picture that shows how numbers relate.The graph shows distance and time.
transformation
A change to a shape or graph, such as a move, flip or turn.A reflection is a transformation.
stretch
Pull a graph in one direction.A stretch makes the graph taller.
translation
Slide a shape without turning or flipping it.Translate the shape 3 units right.
function
A rule that gives exactly one output for each input.f(x) = x plus 2 is a function.
factor
A whole number that divides another number exactly.The factors of 6 are 1, 2, 3 and 6.
equation
A statement that two things are equal. It has an equals sign.x plus 2 = 5 is an equation.
scale factor
The number you multiply lengths by to enlarge a shape.Scale factor 3 makes lengths three times longer.
axis
A number line that a graph is drawn on. The x-axis goes across and the y-axis goes up.The y-axis is vertical.
coordinates
A pair of numbers that gives a position on a grid.(3, 2) means 3 across and 2 up.

Warm-up

Four quick ones from earlier work. Try each on paper before you open the answer; a slip here shows you what to watch for later in the lesson.

  1. The function f is given by f(x) = x² + 1. Find f(3) and f(−3).
    Answer

    f(3) = 9 + 1 = 10 and f(−3) = 9 + 1 = 10. Squaring removes the sign, so the two are equal: this is what makes x² an even function.

  2. Expand 4(x² + 5).
    Answer

    4x² + 20. The 4 multiplies every term in the bracket, not only the first: leaving 4x² + 5 is the slip.

  3. Write down the vertex of y = 2(x − 1)² + 5.
    Answer

    (1, 5). The bracket is zero at x = 1, and 5 is read off with its own sign. This is the vertex form from the quadratic function lesson.

  4. You are told that f(3) = 11 and f(2) = 7. Write down f(2) + 1, and then f(2 + 1).
    Answer

    f(2) + 1 = 8, because the 1 is added to the answer. f(2 + 1) = f(3) = 11, because the 1 is added to the input. Inside and outside the function do different things.

Words used in this lesson
transformation
a change that moves or reshapes a graph. For example: reflecting a curve in the x-axis is a transformation.
translation
a slide: the shape moves without turning or changing size. For example: moving a graph 3 units right is a translation.
stretch
pulling the graph away from an axis by a factor. For example: a vertical stretch with factor 2 doubles every height.
reflection
a mirror image across a line. For example: reflecting y = x² in the x-axis turns it upside down.
scale factor
the number by which every length is multiplied. For example: a vertical stretch with scale factor 3 makes every point three times as far from the x-axis.
image
what a point or curve becomes after the transformation. For example: the image of (2, 4) under a shift 1 up is (2, 5).
even function
a function whose graph is the same on both sides of the y-axis. For example: x² is even because (−2)² = 2².
vertical, horizontal
up and down; across. For example: a vertical stretch changes the heights.
describe fully
give the type, the direction and the size. For example: “translation 4 units down” describes fully; “it moves” does not.
in that order
do the first one, then the second to the result. For example: stretch, then translate, in that order.
the two orders x = 1.0
5.003x² + 2, stretch first
9.003x² + 6, shift first
4.00 apartand always will be

On the first view, move the slider anywhere: the gap does not change, which is what makes the order a real difference rather than a near miss. The second view has nothing to slide, so the slider rests there.

The six transformations

WrittenWhat it doesWatch out
y = f(x) + bTranslate up by b.Outside the function, so it does what it says.
y = f(x − a)Translate right by a.The minus moves it the POSITIVE way. Inside the function, everything is backwards.
y = −f(x)Reflect in the x-axis.Outside: the y values flip.
y = f(−x)Reflect in the y-axis.Inside: the x values flip.
y = p f(x)Vertical stretch, factor p.Outside: stretches by p, as expected.
y = f(qx)Horizontal stretch, factor 1/q.Inside: q = 3 SQUASHES by three.

The pattern is worth more than the six rows: outside the function means vertical and behaves normally; inside the function means horizontal and behaves backwards. Every one of the "watch out" entries is that sentence applied.

Why the order changes the answer

Take y = x², a vertical stretch of 3, and a translation of 2 up.

Stretch first, then translate:

x² → 3x² → 3x² + 2,  vertex (0, 2)

Translate first, then stretch:

x² → x² + 2 → 3(x² + 2) = 3x² + 6,  vertex (0, 6)

and the difference is 4 at every x, because the second order stretches the translation as well:

3 × 2 − 2 = 4

At x = 1 the two are 5 and 9; at x = 2 they are 14 and 18. The gap never closes, which is how you know it is not a rounding or a special case.

So read the final equation, not the list of instructions. 3x² + 2 says: multiply the function by 3, then add 2. The outermost operation is the LAST one applied. Work from the outside in and the order comes off the page rather than out of memory.

And the reverse: if a question gives you the instructions and asks for the equation, apply them in the order stated and build the expression from the inside out.

The sign that catches everybody

y = (x − 3)² is y = x² moved 3 to the right, not the left. Its vertex is at x = 3.

Why. The curve is at its lowest where the bracket is zero, and x − 3 is zero at x = 3. That is the whole argument. At x = 0 the curve is at 9, and at x = −3 it is at 36, both a long way up.

The reason it feels wrong is the pattern above: inside the function, everything is backwards. To get the same output as before you now have to feed in a bigger x, so the picture moves the positive way.

For an even function, one of the two reflections does nothing. x² is even, so f(−x) = f(x) and reflecting in the y-axis leaves it exactly where it was: f(−2) and f(2) are both 4. The other reflection does plenty: −f(2) = −4. If a question's answer looks identical to the original, check whether the function was even before assuming you have made a mistake.

Not required at Standard Level: f(ax + b). A combination of a horizontal stretch and a horizontal translation in one bracket is Higher Level material, at AHL 2.16. At Standard Level you will be given the transformations one at a time, in a stated order, which is exactly why the order is what gets examined.

On the GDC: watching the order

Typing both orders as two functions and drawing them together turns the question "does the order matter" into something you can see, and it takes two entries.

When you may use it. Analysis Paper 1 is non-calculator, and sketching a transformed graph from a given one is Paper 1 work. Use the machine to check that your two orders really are different, then put it away.

TI-Nspire CX II

  1. A Graphs page with f1(x)=x^2, then f2(x)=3*f1(x)+2 and f3(x)=3*(f1(x)+2)
  2. Writing them in terms of f1 rather than typing x² again is the point: the two orders are visible in the brackets
  3. menu → Trace → Graph Trace, then the up arrow to hop between curves at the same x. The gap reads 4 wherever you stand
  4. Hide f1 with menu → Actions → Hide/Show once the comparison is made

Casio fx-CG50

  1. MENU → Graph with Y1=X^2, then Y2=3Y1+2 and Y3=3(Y1+2)
  2. The Y symbols come from VARS → F4 GRAPH, not from the alpha keys; typing the letter Y gives a variable
  3. F1 deselects Y1 so only the two transformed curves draw
  4. SHIFT F1 TRACE and the up arrow steps between curves at a fixed x, so the difference of 4 can be read off

The mark people lose. Doing the translation before the stretch when the equation says otherwise. 3x² + 2 has the 3 applied to the function and the 2 added afterwards, so the stretch is first. Read the expression from the outside in: the outermost operation was done last. The other half of the same mark is the sign inside the bracket, where (x − 3)² moves RIGHT; check it by asking where the bracket is zero, which takes four words and never misleads.

A second example, finished by you

The same method on a new pair of instructions. The first steps are written out with the reason for each; the last one is yours. Cover the reasons and see whether you can say them first.

The graph of y = x² is reflected in the x-axis, then translated 5 units up, and then stretched vertically with scale factor 2. Find the y-value of the image curve when x = 3.

  1. Reflect in the x-axis: y = −x².Outside the function, so every y value changes sign.
  2. Translate 5 units up: y = −x² + 5.Add 5 to the whole expression: outside the function, and it does what it says.
  3. The third instruction applies to the whole of what you now have, and not to one term of it. Write the new equation, then substitute x = 3.Your step. Write it out in full before you type the answer below.

Your answer. Type the y-value of the final curve at x = 3.

Check before you go on

One question that tells you whether the main idea has landed. Each wrong option is a different common slip, so the reply tells you which one you made.

The graph of y = f(x) is reflected in the x-axis and then translated 3 units up. What is the equation of the image?

The graph of y = f(x) is reflected in the x-axis and then translated 3 units up. What is the equation of the image?

Where the order of a transformation decides something

A graph shows the temperature of a room, y = T(x), in degrees Celsius. To redraw it in degrees Fahrenheit, the graph is stretched vertically with scale factor 1.8 and then translated 32 units up. At one moment the room is at 25 degrees Celsius.

What is the reading on the redrawn graph at that moment, in degrees Fahrenheit?

Your turn

New numbers, so nothing can be read off the page above: the same ideas, on curves you have not seen yet.

1. For y = 5x² + 2, find y when x = 2.

2. For y = 5(x² + 2), find y when x = 2.

3. Where is the vertex of y = (x + 4)²? Give the x value.

4. For f(x) = x² − 5, find −f(4).

5. Why do the two orders give different curves?

Question 5. Why do the two orders give different curves?

6. The point (6, 5) lies on the graph of y = f(x). Its image on the graph of y = f(3x) has the same y-coordinate, 5. Find its x-coordinate.

Where the marks go

1 markEach transformation named, with its direction and factor.

1 markThe order, where more than one is involved.

1 markThe resulting equation, or the sketch with the image of one named point marked.

On "describe the transformation" questions the words matter: a translation needs a vector or a direction and a distance, and a stretch needs a direction and a factor. "It moves and gets bigger" earns nothing.

Something to think about

What if a horizontal stretch with scale factor 2 can be replaced by a vertical one? Take y = x². Its horizontal stretch with factor 2 is y = (x/2)². Is that curve also a vertical stretch of y = x², and by what factor? Test the same question on y = x³ and then on y = 2x.

One way to think about it

Replace x by x/2 in each function and simplify. Then ask whether what you get is the original function multiplied by a single constant. Try one numerical value of x for the exponential if the algebra is awkward.

Climb to an exam question

Four steps, each one a little harder, all about the point P(4, 9) on the graph of y = f(x). Every step is a piece of the exam question at the end. The exam is a non-calculator paper, so answers are exact.

Step 1 of 4: inside the function moves it sideways. The point P(4, 9) lies on the graph of y = f(x). Find the x-coordinate of the image of P on the graph of y = f(x − 3) + 1.

Step 2 of 4: stretch, then translate. The graph of y = f(x) is stretched vertically with scale factor 4 and then translated 3 units down. Find the y-coordinate of the image of P(4, 9).

Step 3 of 4: write the equation. The graph of y = f(x) is stretched vertically with scale factor 2 and then translated 3 units to the left. Which equation gives the image?

The graph of y = f(x) is stretched vertically with scale factor 2 and then translated 3 units to the left. Which equation gives the image?

Step 4 of 4: combine three changes. Find the y-coordinate of the image of P(4, 9) on the graph of y = −2f(x − 3) + 1.

The exam question

Written for this site in the style of the real papers. Do it on paper first, as you would in the exam, and show your working: most of the marks are for method. There is no calculator on this paper, so give exact answers (fractions, surds, multiples of π) unless the question says otherwise. Then check each part below.

Paper 1 style · no calculator · 16 marks · about 18 minutes

The function f is defined by f(x) = −x² + 4x + 1, for x ∈ ℝ. The graph of y = f(x) has its maximum point at A(2, 5).

(a) The graph of y = f(x) is reflected in the x-axis and then translated 4 units to the right. Write down the equation of the image, in terms of f. [2]

(b) Find the coordinates of the image of A under the transformations in part (a). [2]

(c) The graph of y = f(x) is stretched vertically with scale factor 2 and then translated 3 units down. Show that the equation of the image is y = −2x² + 8x − 1. [3]

(d) Hence find the coordinates of the maximum point of the image curve in part (c). [3]

(e) The same two instructions are carried out in the opposite order: translate 3 units down, then stretch vertically with scale factor 2. Find the y-coordinate of the image of A. [2]

(f)(i) The graph of y = f(x) is mapped onto the graph of y = 1 − 2f(x + 3). Find the coordinates of the image of A. [2]

(ii) State whether this point is a maximum or a minimum point of the graph of y = 1 − 2f(x + 3). Justify your answer. [2]

Check (a). Which equation gives the image?

Which equation gives the image?

Check (b). Type the y-coordinate of the image of A.

Check your working for (c)

Apply the stretch to the whole of f(x), including the constant, and then subtract 3 from the result. Write the bracket out before you expand it, so that every line leads to the given equation.

Check (d). Type the maximum value of the image curve.

Check (e). Type the y-coordinate of the image of A.

Check (f)(i). Type the y-coordinate of the image of A.

Check your working for (ii)

Say what the negative factor in front of f does to the graph, and so what happens to a highest point. One sentence that names the transformation is enough.

Want the rest of this topic?

This is a free sample lesson. The IB Diploma plan opens every other Diploma lesson, AA and AI, SL and HL, and every lesson from Year 7 for the refreshers. It covers every child in the family and includes all seven revision packs.

$99 for 12 months, or $149 for 2 years

One plan opens every Diploma lesson, AA and AI, SL and HL, for the whole family.

That is $8.25 a month for the whole family.

Student without a card? in one tap.

One payment. Nothing renews. Full refund within 30 days. Prices are in US$; Gumroad shows your local currency at checkout. Already paid? Type the email you paid with in the sign-in box, then click the link we send. See every price, including $19 revision packs.

Teaching this lesson?

Every lesson here has a teacher page beside it: worked answers, what each common wrong answer tells you about a student's thinking, and questions at three levels for the board. Every unit has a free sample lesson for students, and a plan opens every other lesson.

See the teacher pages