Educerie · IB Diploma · Mathematics: analysis and approaches
Topic 2 Functions · 2.11 Transformations of graphs
What you must be able to do
| You must be able to | Level | What it looks like in the exam |
|---|---|---|
| Translate a graph: y = f(x) + b and y = f(x − a) | SL, HL | "Describe the transformation that maps f onto g" (2 marks); "write down the image of (2, 5)" (1 to 2 marks) |
| Reflect a graph in the x-axis, y = −f(x), and in the y-axis, y = f(−x) | SL, HL | "Sketch y = f(−x)" on a grid, with the key points labelled (2 to 3 marks) |
| Stretch a graph vertically, y = p·f(x), with scale factor p | SL, HL | "Describe fully" — name, direction and scale factor all needed for the marks |
| Stretch a graph horizontally, y = f(qx), with scale factor 1/q | SL, HL | The scale factor 1/q is the mark most often lost |
| Combine transformations and know when the order matters | SL, HL | "g is obtained by a vertical stretch followed by a translation. Find g(x)" (3 to 4 marks) |
| Use a known graph, such as y = x², to sketch a transformed one, such as y = 3x² + 2 | SL, HL | Paper 1 sketch with vertex, intercepts and asymptotes labelled |
| Track asymptotes, intercepts and turning points through a transformation | SL, HL | "Write down the equation of the horizontal asymptote of g" (1 mark) |
Before you start
You need function notation and the idea of a graph as every point (x, f(x)) from 2.2 and 2.3, and composite functions from 2.5, because every transformation here is a composite: something done to x before f acts, or something done to f(x) after. Know the basic shapes by heart: x², x³, 1/x, 2ˣ, √x.
1The idea in one paragraph
Every point on the graph of y = f(x) is a pair (x, f(x)). Change the equation and every one of those points moves in the same way, so the whole graph moves as one piece. There are only three kinds of movement at this level: a translation (a slide), a reflection (a flip) and a stretch (a pull away from an axis). Where you make the change decides which way the graph moves. A change outside the function, to f(x) itself, acts on the y-coordinates, so the graph moves vertically and it does exactly what the algebra says. A change inside the bracket, to x before f sees it, acts on the x-coordinates, so the graph moves horizontally and it does the opposite of what the algebra seems to say. Learn that one sentence and the rest of this subtopic is detail.
2The graph we will move
To see what each change does, take one function and keep it fixed through the page:
f(x) = ½(x − 1)²(x + 2)
It has four points worth watching: A(−2, 0), B(−1, 2), which is its local maximum, C(0, 1), the y-intercept, and D(1, 0), where it touches the x-axis. It is lopsided on purpose, so the two reflections look different. In every figure the original graph is teal and the transformed graph is amber.
3Translations
Vertical translation: y = f(x) + b. The new function takes each output of f and adds b. The x-coordinates are untouched; every y-coordinate goes up by b. So the graph moves b units up (down if b is negative). Figure 1(a) shows y = f(x) + 2: B(−1, 2) moves to (−1, 4), and every other point moves up 2 with it.
Horizontal translation: y = f(x − a). This is the one that feels backwards. The graph moves a units to the right, even though the bracket shows a minus. Here is why. The new function g(x) = f(x − 3) gives, at x = 3, the value f(0). So whatever f did at x = 0, g does at x = 3: three units later. Every feature arrives 3 units further right. Figure 1(b) shows y = f(x − 3): C(0, 1) moves to (3, 1). And y = f(x + 3) is f(x − (−3)), a translation 3 units to the left.
Both are translations by a vector. The IB writes the vector as a column, the horizontal move on top and the vertical move below. In these notes it is written on one line, so "translation by the vector (3, 0)" means 3 right and 0 up. The two combine without any fuss: y = f(x − 3) + 2 is a translation by the vector (3, 2), and every point (x, y) goes to (x + 3, y + 2).
4Reflections
y = −f(x): reflection in the x-axis. Every output changes sign, so every point (x, y) goes to (x, −y). Points above the x-axis go below it and the other way round. Points on the x-axis stay where they are: in Figure 2(a), A(−2, 0) and D(1, 0) do not move, and the maximum B(−1, 2) becomes a minimum at (−1, −2).
y = f(−x): reflection in the y-axis. Now the input changes sign. The new function at x = 2 gives f(−2), so what f did at −2, the new graph does at +2. Every point (x, y) goes to (−x, y). Points on the y-axis stay put: C(0, 1) is fixed in Figure 2(b), while B(−1, 2) moves to (1, 2).
Fixed points check a sketch: a reflection leaves every point on its mirror line where it was.
5Stretches
y = p·f(x): vertical stretch with scale factor p. Every output is multiplied by p, so every point (x, y) goes to (x, py). Each point moves away from the x-axis to p times its distance. With p = 2 in Figure 3(a), B(−1, 2) goes to (−1, 4) and C(0, 1) goes to (0, 2). The points on the x-axis, A and D, have distance zero, and twice zero is zero, so they stay put. If 0 < p < 1 the "stretch" squashes the graph towards the x-axis, and it is still called a stretch, with a scale factor less than 1.
y = f(qx): horizontal stretch with scale factor 1/q. Every point (x, y) goes to (x/q, y). With q = 2, the new function reaches at x = 0.5 the value f had at x = 1: it gets there twice as fast, so the graph is squeezed towards the y-axis to half its width. The scale factor is ½, not 2. In Figure 3(b), B(−1, 2) moves to (−0.5, 2) and D(1, 0) moves to (0.5, 0), while C(0, 1) on the y-axis stays where it is. By the same reasoning y = f(x/3), which is f(⅓x), is a horizontal stretch with scale factor 3: three times as wide.
Every stretch has an invariant line, the axis it stretches away from. Say which in your description: "a vertical stretch, scale factor 3" is enough, because vertical stretches always pull away from the x-axis, and "a stretch parallel to the y-axis with scale factor 3" means the same thing and is also accepted.
6The whole set on one table
Every standard level transformation, what it does to a point, and P(4, −3) taken through each one. Memorise this table.
| Equation | Transformation, described fully | (x, y) goes to | P(4, −3) goes to |
|---|---|---|---|
| y = f(x) + b | translation by the vector (0, b): up b | (x, y + b) | b = 5: (4, 2) |
| y = f(x − a) | translation by the vector (a, 0): right a | (x + a, y) | y = f(x + 2), so a = −2: (2, −3) |
| y = −f(x) | reflection in the x-axis | (x, −y) | (4, 3) |
| y = f(−x) | reflection in the y-axis | (−x, y) | (−4, −3) |
| y = p·f(x) | vertical stretch, scale factor p | (x, py) | p = 3: (4, −9) |
| y = f(qx) | horizontal stretch, scale factor 1/q | (x/q, y) | y = f(4x): (1, −3) |
| y = f(x/2) | horizontal stretch, scale factor 2 | (2x, y) | (8, −3) |
Figure 4 is the reason behind the whole table. Read y = p·f(x − a) + b as a machine. The input x is changed first, before f sees it: that is the inside, and it moves the graph sideways, undoing what it appears to do. Then f acts. Then the output is multiplied and added to: that is the outside, and it moves the graph up and down, doing exactly what it says.
This is composite functions (2.5) in disguise. y = f(x) + b is g ∘ f with g(x) = x + b: the extra function acts after f, on the output. y = f(x − a) is f ∘ h with h(x) = x − a: the extra function acts before f, on the input. Which side of f the new function sits on decides which coordinate it changes.
7Using a graph you know: y = x² to y = 3x² + 2
The guide's own example is to sketch y = 3x² + 2 from y = x². Read the machine: x is squared, then multiplied by 3, then 2 is added. So the transformations are, in that order:
- a vertical stretch with scale factor 3, giving y = 3x²;
- a translation by the vector (0, 2), giving y = 3x² + 2.
Figure 5 draws both steps and follows the point (1, 1): the stretch takes it to (1, 3), the translation to (1, 5). The vertex (0, 0) is on the x-axis, so the stretch leaves it alone, and the translation lifts it to (0, 2). The sketch needs the vertex (0, 2), the axis of symmetry x = 0, and a parabola narrower than x², since every height has been tripled.
The vertex form of a quadratic from 2.6 is exactly this idea. y = 2(x − 3)² − 5 is y = x² translated 3 right, stretched vertically by factor 2, then translated 5 down. The vertex (0, 0) goes to (3, 0), stays at (3, 0) under the stretch, and ends at (3, −5), which is why the vertex of a(x − h)² + k is (h, k). Every parabola is one parabola, transformed.
8Two or more transformations, and when the order matters
A question may give you a sequence of transformations and ask for the new equation, or give you the equation and ask for the sequence. Both need one rule.
Vertical changes happen in the order they are applied to f(x). Horizontal changes happen to x. A horizontal change and a vertical change never interfere with each other.
Two vertical changes: the order matters. Start from y = f(x) and take two changes: a vertical stretch by 2 and a translation up 1.
- Stretch first, then translate: f(x) becomes 2f(x), then 2f(x) + 1.
- Translate first, then stretch: f(x) becomes f(x) + 1, then 2(f(x) + 1) = 2f(x) + 2.
The second is a different graph, because the stretch has stretched the translation as well. Figure 6 shows both, following B(−1, 2): it ends at (−1, 5) one way and (−1, 6) the other.
The same goes for a reflection and a translation: reflect-then-add-3 turns 2ˣ into −2ˣ + 3, while add-3-then-reflect gives −(2ˣ + 3) = −2ˣ − 3.
A stretch and a reflection in the same direction can be done in either order: −2f(x) is both 2(−f(x)) and −(2f(x)). A horizontal and a vertical change can also be done in either order, because one works on x and the other on y. In y = 3f(x − 2) + 1 the translation of 2 to the right can come first, last or in the middle; only the stretch by 3 must come before the +1.
Worked example 1 · from words to an equation (Paper 1). Let f(x) = x² − 4x. The graph of f is translated by the vector (−1, 3) and then stretched vertically with scale factor 2 to give the graph of g. Find g(x).
Had the stretch come first, the answer would be 2f(x + 1) + 3 = 2x² − 4x − 3.
Worked example 2 · from an equation to words. Describe a sequence of transformations that maps y = f(x) onto y = 5 − 2f(x).
Rewrite it in the machine order: y = −2f(x) + 5. The outputs of f are multiplied by −2, then 5 is added. So:
- a vertical stretch with scale factor 2,
- a reflection in the x-axis (these first two in either order),
- a translation by the vector (0, 5).
The point (1, 4) on f goes to (1, 8), then (1, −8), then (1, −3). Check with the equation: 5 − 2 × 4 = −3.
Worked example 3 · one change inside, one outside. The point (4, −3) lies on y = f(x). Find its image on y = 2f(x + 1) − 3.
The inside +1 moves every point 1 to the left, so x = 4 becomes 3. The outside doubles and then subtracts 3, so y = −3 becomes 2(−3) − 3 = −9. The image is (3, −9).
9Asymptotes, intercepts and turning points move too
An asymptote is a line the graph approaches, and the transformation moves it exactly as it moves the graph. So when you sketch, transform the asymptote first and the curve second.
Take y = 2ˣ, with horizontal asymptote y = 0 and y-intercept (0, 1). Reflect it in the x-axis to get y = −2ˣ: the asymptote y = 0 lies on the mirror line, so it does not move, and (0, 1) becomes (0, −1). Now translate by the vector (1, 3) to get y = −2ˣ⁻¹ + 3. Figure 7 shows both stages.
- The horizontal asymptote moves up 3, to y = 3. A horizontal line is not affected by the move to the right.
- The y-intercept does not come from moving (0, −1), because (0, −1) moves to (1, 2), which is not on the y-axis. Always find a new intercept from the new equation: at x = 0, y = −2⁻¹ + 3 = 2.5.
- The x-intercept: −2ˣ⁻¹ + 3 = 0 gives 2ˣ⁻¹ = 3, so x − 1 = log₂ 3 and x = 1 + log₂ 3 = log₂ 6 ≈ 2.58.
That second bullet is the trap. Transformations carry points to points, but an intercept is defined by an axis, and the axes do not move. Turning points, on the other hand, are carried faithfully: a local maximum of f at (−1, 2) becomes a local maximum of f(x − 3) + 2 at (2, 4), and a local minimum of −f(x), because a reflection in the x-axis turns maxima into minima.
The same thinking handles 2.8: y = 6/(x + 2) + 1 is y = 1/x stretched vertically by 6 and translated by (−2, 1), so its asymptotes are x = −2 and y = 1, the axes moved.
10With technology
On Paper 2, graph f and the transformed function on the same axes and check where the key points went. Better still, use the GDC once to find a feature of f, such as a turning point, and then write down the matching feature of the new function by transforming it. That second step is what a "hence" question rewards, and it is Q5 below.
11Where marks are lost
Moving f(x − 3) to the left. The minus inside the bracket moves the graph 3 units to the right. Check with one point: the new function at x = 3 gives f(0).
Giving the horizontal scale factor as q. y = f(2x) is a horizontal stretch with scale factor ½, not 2. The graph gets narrower.
Describing without the detail. "A translation" or "a stretch" scores nothing on its own. A translation needs its vector; a stretch needs its direction and scale factor; a reflection needs its axis.
Ignoring the order of two vertical changes. "Translate up 1, then stretch by 2" is 2f(x) + 2, not 2f(x) + 1. Write each step as an equation and apply the next step to the whole of it.
Moving the intercepts with the graph. The image of the y-intercept is usually not the new y-intercept. Find intercepts from the new equation.
Forgetting the asymptote. A sketch of y = 3 − 2ˣ⁻¹ without the dashed line y = 3, labelled, loses a mark even if the curve is perfect.
Reflecting in the wrong axis. −f(x) changes y, so it flips over the x-axis; f(−x) changes x, so it flips over the y-axis. Test one point if you are unsure.
12Work it right
- Write the new function in machine order: y = p·f(x − a) + b, with the inside and the outside clearly separated.
- Deal with the inside (horizontal) and the outside (vertical) separately; they do not interfere.
- Apply vertical changes in the order they act on f(x), and when turning words into an equation, apply each step to the whole of the previous expression.
- For "describe fully", give each transformation its detail: vector, axis, or direction and scale factor.
- Take three or four key points through the transformation (turning points, intercepts) with (x, y) → (x + a, p·y + b), and plot those first.
- Move every asymptote, draw it dashed and label it with its equation.
- Recalculate intercepts from the new equation.
13Try it
Marks in brackets. Q1 to Q4 are Paper 1 style, no calculator. Q5 is Paper 2 style, with a GDC.
Q1. The point A(2, −5) lies on the graph of y = f(x). Write down the coordinates of the image of A on each of these graphs.
(a) y = f(x − 3) 1 mark
(b) y = f(x) − 3 1 mark
(c) y = −2f(x) 1 mark
(d) y = f(½x) 1 mark
Q2. Describe fully a sequence of transformations that maps the graph of y = x² onto the graph of y = 5 − 2(x − 1)². 4 marks
Q3. Let f(x) = x² + 2x. The graph of f is reflected in the y-axis and then translated by the vector (0, −3) to give the graph of g.
(a) Show that g(x) = x² − 2x − 3. 2 marks
(b) Find the zeros of g. 2 marks
Q4. Let f(x) = 2/x, x ≠ 0. The graph of f is stretched vertically with scale factor 3 and then translated by the vector (−2, 1) to give the graph of g.
(a) Write down an expression for g(x). 2 marks
(b) Write down the equations of the asymptotes of the graph of g. 2 marks
(c) Find the coordinates of the points where the graph of g meets the axes. 3 marks
Q5. Let f(x) = x³ − 2x + 1.
(a) Find the coordinates of the local minimum point of the graph of f for x > 0. 2 marks
(b) Let g(x) = 3f(x − 2) + 1. Hence write down the coordinates of the local minimum point of the graph of g. 2 marks
Q6. The point (3, 4) lies on the graph of y = f(x). The graph of f is transformed in two steps: a translation by the vector (0, 2), and a vertical stretch with scale factor 3.
(a) Write down the equation of the new graph, in terms of f, if the translation is done first. 1 mark
(b) Write down the equation of the new graph if the stretch is done first. 1 mark
(c) Find the image of (3, 4) in each case. 2 marks
14In one breath
Every point (x, y) on y = f(x) moves the same way when you change the equation, so the whole graph translates, reflects or stretches as one piece. Changes outside f act on y and do what they say: f(x) + b moves up b, −f(x) reflects in the x-axis, p·f(x) stretches vertically with scale factor p. Changes inside the bracket act on x and do the opposite: f(x − a) moves right a, f(−x) reflects in the y-axis, f(qx) stretches horizontally with scale factor 1/q. Points on a mirror line or an invariant axis stay put. Two vertical changes must be done in the order they act on f(x), because stretch-then-add is not add-then-stretch, while a horizontal and a vertical change never interfere. Take key points through with (x, y) → (x + a, py + b), move asymptotes with the graph, find intercepts again from the new equation, and describe every transformation fully: vector, axis, or direction and scale factor.
Answers
Q1. (a) Right 3: (5, −5). (b) Down 3: (2, −8). (c) Stretch by 2 and reflect in the x-axis: (2, 10). (d) Horizontal stretch with scale factor 2: (4, −5). A1 for each. In (d), (1, −5) is the common wrong answer and scores A0.
Q2. Write it in machine order: y = −2(x − 1)² + 5. A translation by the vector (1, 0), or 1 unit right; a vertical stretch with scale factor 2; a reflection in the x-axis; a translation by the vector (0, 5). The stretch and reflection must come before the vertical translation; the horizontal translation may come at any point. A single translation by the vector (1, 5) at the end, after the stretch and reflection, is equally correct. A1 for the horizontal translation with its vector, A1 for the stretch with its scale factor, A1 for the reflection in the x-axis, A1 for the vertical translation with its vector in a correct order. Doing the vertical translation before the stretch loses the last mark.
Q3. (a) Reflecting in the y-axis gives f(−x) = (−x)² + 2(−x) = x² − 2x. Translating by (0, −3) gives g(x) = x² − 2x − 3, as required. M1 for replacing x with −x, A1 for subtracting 3 to reach the given answer, with f(−x) shown. This is a "show that": the answer is given, so the step f(−x) = x² − 2x must be seen.
(b) x² − 2x − 3 = (x − 3)(x + 1) = 0, so x = 3 or x = −1. M1 for factorising or the formula, A1 for both values.
Q4. (a) g(x) = 3 × 2/(x + 2) + 1 = 6/(x + 2) + 1. M1 for the stretch applied to f, A1 for the correct expression.
(b) x = −2 and y = 1: the asymptotes x = 0 and y = 0 of f moved by the vector (−2, 1). A1 for each, as equations.
(c) At x = 0: g(0) = 6/2 + 1 = 4, giving (0, 4). At y = 0: 6/(x + 2) = −1, so x + 2 = −6 and x = −8, giving (−8, 0). A1 for (0, 4), M1 for setting g(x) = 0 and rearranging, A1 for (−8, 0).
Q5. (a) Using the GDC, the local minimum is (0.816, −0.0887) (3 s.f.). The exact value is x = √(2/3). A1 for x, A1 for y.
(b) The translation moves the point 2 right; the stretch and the +1 act on y: 3 × (−0.08866…) + 1 = 0.734. The local minimum of g is (2.82, 0.734). A1 for x = 2.82, A1 for y = 0.734. Use the stored value from (a): using −0.0887 gives 0.734 as well, but using −0.09 gives 0.73, which is not to 3 s.f. and loses the mark. Finding the minimum of g directly on the GDC also earns the marks if the values are right, but "hence" is pointing you to the quicker route.
Q6. (a) y = 3(f(x) + 2), that is y = 3f(x) + 6. A1.
(b) y = 3f(x) + 2. A1.
(c) Translation first: (3, 4) → (3, 6) → (3, 18). Stretch first: (3, 4) → (3, 12) → (3, 14). A1 for each. The x-coordinate is unchanged in both, since both transformations are vertical.
Educerie · written from the published IB Diploma Programme Mathematics: analysis and approaches guide, first assessment 2021, section 2.11 Transformations of graphs. Original text, examples and questions. Diagrams drawn by Educerie. Last reviewed 25 September 2026.