Translate, reflect and stretch graphs, combine transformations in the right order, and find the image of points, asymptotes and equations under each one.
IB Mathematics: Analysis and Approaches
Part of 2 Functions
SL and HL
Key terms introduced here
Each is in the Maths AA glossary, with every other term in the subject.
A transformation that multiplies the distance of every point from an axis by a scale factor. y=pf(x) is a vertical stretch with scale factor p; y=f(qx) is a horizontal stretch with scale factor q1
A transformation that slides every point of a graph the same distance in the same direction, without changing its shape. A translation by the vector (ba) maps y=f(x) to y=f(x−a)+b
Notes on 2.11 Transformations of graphs
30 min readLast reviewed
Questions on 2.11
46 exam-style questions on this subtopic, written in the style of the IB papers. The first has its markscheme open. Counted on
Question 1 · AA-00185HL only · 18 marks
Consider the function f(x)=2cos(x−6π)sin(x+3π)
Try a quick-fire question
One of 35 short multiple-choice questions on 2.11. Pick an answer to see why it's right or wrong.
Stretching y=x2 horizontally with scale factor 21 gives the same graph as a vertical stretch with which scale factor?
, from which every other member can be obtained by transformations.
is its reflection in the
y
-axis.
.
.
from the graph of
y=f(x)
, and describe them as a translation by a vector.
Sketch and describe the reflections y=−f(x) and y=f(−x).
Sketch and describe the vertical stretch y=pf(x) and the horizontal stretch y=f(qx), stating each scale factor.
Find the image of a point, an asymptote or a key feature under one or more transformations.
Determine the equation of a transformed graph from a description, and describe the transformations that produce a given equation.
Explain why the order of composite transformations matters, and apply them in the correct order.
A transformation of a graph moves, flips or resizes it by changing the equation in a controlled way. Many functions met in the course are transformations of a small set of simple graphs: every parabola y=a(x−h)2+k comes from y=x2, every graph of the form y=x−ha+k comes from y=x1, and every sinusoidal model comes from y=sinx. Knowing what each change to an equation does to its graph makes it possible to sketch a new function quickly, to read its key features without a calculator, and to adjust a model when the situation it describes changes.
Describing a transformation
Parent functions and images
A family of graphs is usually built from its simplest member, called the parent function. The graphs y=x2, y=x3, y=x1, y=x, y=ex and y=lnx are the parent functions used most often. A transformed graph keeps the general shape of its parent, but it may sit in a different place, face a different way or be wider, narrower, taller or flatter.
The image of a point is the key to every transformation. Instead of trying to picture a whole curve moving at once, it is easier to follow a few important points (intercepts, turning points, end points) and the asymptotes, then draw the same shape through their images. An invariant point lies on both the original graph and the transformed graph, so it is a useful check on any sketch.
Changes outside and inside the function
Every transformation in the course changes the equation y=f(x) in one of two places.
A change outside the function, such as f(x)+3 or 2f(x), acts on the output y. It changes the graph vertically, and it does exactly what it appears to do: +3 moves every point up 3, and ×2 doubles every y-coordinate.
A change inside the function, such as f(x+3) or f(2x), acts on the input x. It changes the graph horizontally, and it does the opposite of what it appears to do: f(x+3)
The reason for the "opposite" behaviour is explained with each transformation. Remembering the outside–inside split alone already sorts every transformation into vertical or horizontal.
Translations
Vertical translations: y=f(x)+b
Adding a constant b to the output raises every y-coordinate by b while keeping its x-coordinate. The point (x,y) on y=f(x) therefore has image (x,y+b) on y=f(x)+b. The translation is upwards when b>0 and downwards when b<0, and its vector is (0b).
y = x²
y = x² + 3
y = x² − 2
Adding 3 to the output moves every point of y = x² up 3 units; subtracting 2 moves every point down 2. The shape does not change, only its height.
A vertical translation moves horizontal asymptotes and changes the range, but it leaves vertical asymptotes, the domain and the x-coordinates of turning points as they were. No point is invariant under a vertical translation (unless b=0), because every point moves.
Horizontal translations: y=f(x−a)
Replacing x with x−a moves the graph a units to the right when a>0 and ∣a∣ units to the left when a<0. The sign looks backwards, and the reason comes from following one point.
Suppose (x0,y0) lies on y=f(x), so f(x0)=y0. On the new graph y=f(x−a), the output y0 appears when the input to f is x0, that is when x−a=x0. Solving gives x=x0+a. The same height y0 is now reached a units further to the right, so the image of (x0,y0) is (x0+a,y0).
y=f(x−a)maps(x,y)↦(x+a,y)
y = x²
y = (x − 3)²
y = (x + 2)²
y = (x − 3)² is y = x² moved 3 units right, and y = (x + 2)² is y = x² moved 2 units left. The vertex moves to the value of x that makes the bracket zero.
A quick way to find the direction is to ask which value of x makes the inside of the function equal to the old key value. For y=(x−3)2 the vertex is where x−3=0, at x=3: the graph has moved right. A horizontal translation moves vertical asymptotes and changes the domain, but leaves horizontal asymptotes and the range unchanged.
Translation by a vector
Both translations can happen together. The graph of y=f(x−a)+b is the graph of y=f(x) translated by the vector (ab): a units horizontally and b units vertically. The top entry of the vector is the horizontal movement and the bottom entry the vertical movement, matching the order of coordinates (x,y).
y=f(x−a)+bmaps(x,y)↦(x+a,y+b)
Because one translation is horizontal and the other vertical, they do not affect each other, and they can be carried out in either order.
The same reasoning finds the equation of a translated graph. To translate y=f(x) by (ab), replace x with x−a and add b to the whole function.
Reflections in the axes
Reflection in the x-axis: y=−f(x)
Multiplying the output by −1 changes the sign of every y-coordinate. The point (x,y) has image (x,−y), so the part of the graph that lay over the x-axis now lies under it and the other way round. This is a reflection in the x-axis.
The invariant points are the points with y=0, the x-intercepts, because −0=0. A local maximum becomes a local minimum at the same x, and a horizontal asymptote y=c becomes y=−c.
Reflection in the y-axis: y=f(−x)
Replacing x with −x changes the input. The value that f took at x0 is now taken at x=−x0, so the image of (x,y) is (−x,y). This is a reflection in the y-axis. The invariant point is the y-intercept, where x=0, and a vertical asymptote x=c becomes x=−c.
y = √x
y = −√x
y = √(−x)
The point (4, 2) on y = √x is reflected to (4, −2) by y = −√x and to (−4, 2) by y = √(−x). The origin is invariant under both reflections.
The reflection y=f(−x) also changes the domain. The function f(x)=x is defined for x≥0, so y=−x is defined for −x≥0, which is x≤0.
Some graphs are unchanged by one of these reflections. If f(−x)=f(x) for every x, as for y=x2, the graph is symmetrical in the y-axis and the reflection y=f(−x) gives the same graph. Functions with this property, and those with f(−x)=−f(x), are studied as even and odd functions in 2.14 (HL).
Stretches
Vertical stretch: y=pf(x)
Multiplying the output by a positive constant p multiplies every y-coordinate by p and leaves every x-coordinate alone. The image of (x,y) is (x,py). This is a vertical stretch with scale factor p, also described as a stretch parallel to the y-axis.
If p>1, the graph is pulled away from the x-axis and looks taller and steeper.
If 0<p<1, the graph is pressed towards the x-axis and looks flatter. A stretch with scale factor 21 is still called a stretch, not a compression.
Points on the x-axis are invariant, since p×0=0, so the x-intercepts do not move. A horizontal asymptote y=c becomes y=pc, and the range is multiplied by p.
Horizontal stretch: y=f(qx)
Multiplying the input by q changes the graph horizontally. Following one point, the value f(x0)=y0 is now reached when qx=x0, so when x=qx0. The image of (x,y) is (qx,y).
y=f(qx)is a horizontal stretch with scale factor q1
So y=f(2x) is a horizontal stretch with scale factor 21: every x-coordinate is halved and the graph looks narrower. In the other direction, y=f(3x) has q=31, so it is a horizontal stretch with scale factor 3 and the graph looks three times as wide. Points on the y-axis are invariant, and a vertical asymptote x=c becomes x=qc.
y = f(x) = x³ − 4x
y = 2f(x)
y = f(x/2)
y = 2f(x) keeps the zeros of f at −2, 0 and 2 but doubles every height. y = f(x/2) keeps every height but doubles every x-coordinate, so its zeros move to −4, 0 and 4.
The cubic f(x)=x3−4x=x(x−2)(x+2) shows the difference clearly. Its zeros −2, 0 and 2 stay put under the vertical stretch, because they lie on the x-axis. Under the horizontal stretch with scale factor 2 they move to −4, 0 and 4; only the origin, on the y-axis, stays where it was.
Negative scale factors
A stretch with a negative scale factor combines a stretch and a reflection. For example, y=−3f(x) is a vertical stretch with scale factor 3 together with a reflection in the x-axis, and y=f(−2x) is a horizontal stretch with scale factor 21 together with a reflection in the y-axis. A stretch and a reflection in the same direction can be done in either order, because multiplying by 3 and by −1 gives the same result in either order.
Different transformations, same graph
Two different descriptions sometimes produce the same graph. For f(x)=x2, the horizontal stretch y=f(2x)=(2x)2=4x2 is the same as the vertical stretch y=4f(x). For f(x)=2x, the translation y=f(x+3)=2x+3=8×2x is the same as a vertical stretch with scale factor 8. These equivalences come from the laws of indices, and they show that a description of a transformation is not always unique. Unless a question names the type of transformation, any correct description is acceptable.
Summary of single transformations
The table collects the six single transformations, written for constants a, b, p>0 and q>0.
Equation
Transformation of y=f(x)
Image of (x,y)
Invariant points
y=f(x)+b
Translation by (0b)
(x,y+b)
None (b=0)
y=f(x−a)
Translation by (a0)
(x+a,y)
y=−f(x)
Reflection in the x-axis
(x,−y)
Points on the x-axis
y=f(−x)
Reflection in the y-axis
(−x,y)
Points on the y
y=pf(x)
Vertical stretch, scale factor p
(x,py)
Points on the x-axis
y=f(qx)
Horizontal stretch, scale factor q1
(qx,y)
Composite transformations
A composite transformation is a sequence of single transformations applied one after the other. Two transformations in different directions, one horizontal and one vertical, never interfere with each other. Two transformations in the same direction usually do, and then the order in which they are applied changes the final graph.
Vertical transformations: order matters
Consider a vertical stretch with scale factor 2 and a vertical translation by (03), applied to y=f(x) in the two possible orders.
Stretch, then translate. The stretch gives y=2f(x). Translating up 3 adds 3 to the whole function: y=2f(x)+3.
Translate, then stretch. The translation gives y=f(x)+3. Stretching multiplies the whole function by 2: y=2(f(x)+3)=2f(x)+6.
The two results differ by 3 units. When the translation comes first, the stretch doubles the translation as well. In terms of a point, (x,y)↦(x,2y+3) in the first order and (x,y)↦(x,2y+6) in the second.
y = x²
y = 2x² + 3 (stretch, then translate)
y = 2(x² + 3) (translate, then stretch)
The same two transformations in a different order give different graphs. The point (1, 1) goes to (1, 5) when the stretch comes first, and to (1, 8) when the translation comes first.
Vertical transformations act on the output, which is calculated after f. They are therefore applied in the same order as the operations in the equation, following the usual order of operations: in y=2f(x)+3, the output of f is multiplied by 2 and then has 3 added, so the graph is stretched first and translated second.
Horizontal transformations: reverse order
Horizontal transformations act on the input before f sees it, so they work backwards. In y=f(2x−6), the input x is first multiplied by 2 and then has 6 subtracted. To find where an old point (x0,y0) goes, solve 2x−6=x0:
x=2x0+6
Read from the old point outwards, this adds 6 first (a translation by (60)) and then divides by 2 (a horizontal stretch with scale factor 21). The operations on the graph are the inverse operations, in the reverse order.
Changes outside f are applied to the graph in the order they appear. Changes inside f are undone in reverse order, which is why the graph moves the opposite way.
The same graph can also be described with the stretch first. Factorising the inside gives f(2x−6)=f(2(x−3)). Read this way, x is first stretched with scale factor 21 and then translated by (30). Both descriptions are correct, and they give the same final graph:
Order
First
Second
From f(2x−6)
Translation by (60)
Horizontal stretch, scale factor 21
From f(2(x−3))
Horizontal stretch, scale factor 21
Translation by (30)
The general mapping
Combining everything, the graph of
y=pf(q(x−a))+b
is obtained from y=f(x) by a horizontal stretch with scale factor q1, a vertical stretch with scale factor p, and then a translation by (ab). In this form the stretches can be done first in either order, and the translation last. A point and its image are linked by
(x,y)↦(qx+a,py+b)
This formula is not needed if each step is followed separately, but it gives a quick check. A negative p adds a reflection in the x-axis, and a negative q adds a reflection in the y-axis.
Effect on key features and asymptotes
Asymptotes, intercepts and turning points all transform like points, with one adjustment: a vertical line x=c is affected only by the horizontal transformations, and a horizontal line y=c only by the vertical ones.
Feature of y=f(x)
Under y=pf(q(x−a))+b
Point (x0,y0)
(qx0+a,py0+b)
Vertical asymptote x=c
x=qc+a
Horizontal asymptote y=c
y=pc+b
Domain x≥d (with q>0)
x≥qd+a
Range y≥r (with p>0)
y≥pr+b
If p<0, the inequality in the range reverses, because the reflection turns a minimum value into a maximum value. The same happens to the domain when q<0.
Finding equations and transformations
Questions on transformations run in two directions. Given a description, find the new equation by building it up one step at a time. Given an equation, find the transformations by reading the changes inside and outside the function.
From a description to an equation
To build the equation, apply each transformation to the equation obtained so far, using these replacements.
Vertical translation by b: add b to the whole right-hand side.
Vertical stretch with scale factor p: multiply the whole right-hand side by p.
Reflection in the x-axis: multiply the whole right-hand side by −1.
Horizontal translation by a: replace everyx with (x−a).
Horizontal stretch with scale factor k: replace everyx with (kx).
Reflection in the y-axis: replace everyx with (−x).
The order of the steps in the description matters here too. If the translation had been applied first, the stretch and the reflection would have acted on it as well, giving y=−2x+3−1, a different graph that starts at (−6,−1).
From a graph to an equation
When the shape of a graph is known, its transformations can be found from features such as asymptotes and a point on the curve. Each unknown in the equation needs one piece of information.
Transformations in a model
Transformations give a quick way to adjust a mathematical model when the situation it describes changes, without building a new model from scratch. A change to the output (a different unit, a constant extra amount) is a vertical transformation; a change to the input (a delay, a different time scale) is a horizontal one.
The domain matters in a model. A horizontal translation or stretch moves the interval of times for which the model applies, and forgetting to change it leaves part of the transformed model undefined.
Exam-style questions on transformations
The two questions show a non-calculator question built on a quadratic and a question on a logarithmic graph that mixes describing, finding images and asymptotes.
Self-check
To do:
I can describe y=f(x−a)+b as a translation by the vector (ab) and explain why f(x−a) moves the graph to the right when a>0.
To do:
I can sketch and describe the reflections y=−f(x) and y=f(−x), and name their invariant points.
To do:
I can state the scale factor of y=pf(x) and of y=f(qx), and say which axis each one keeps fixed.
To do:
I can find the image of a point, an asymptote, a turning point, the domain and the range under several transformations.
To do:
I can explain why y=2f(x)+3 and y=2(f(x)+3) are different graphs.
To do:
I can describe the transformations in an equation such as y=f(2x−6) in a correct order, including factorising the inside first.
To do:
I can build the equation of a graph from a list of transformations, and find unknown parameters from asymptotes and a point.
To do:
I can adjust a model by translating or stretching it, and change its domain to match.
, for
0≤x≤π
.
(a)
Show that cos(x−6π)≡sin(x+3π).
[3]3 marks
Markscheme (a)
cos(x−6π)=cosxcos6π+sinxsin6π=23cosx+21sinx
(b)
Hence show that f(x)=1−cos(2x+32π).
[3]3 marks
(c)
Write down the range of f.
[1]1 mark
Markscheme (c)
0≤f(x)≤2A1
(d)
Describe a sequence of transformations that maps the graph of y=cosx onto the graph of y=f(x).
[4]4 marks
Markscheme (d)
horizontal stretch with scale factor 21
(e)
Solve the equation f(x)=21.
[3]3 marks
Markscheme (e)
cos(2x+32π)=21
(f)
Find the exact area between the graph of f and the x-axis, from x=0 to x=2π
(b) Adding 3 inside the function is a translation by (−30). The new graph reaches the value f(2)=5 when x+3=2, so when x=−1.
P(2,5)↦(−1,5)
(c) This is a translation by (14): 1 unit right and 4 units up.
P(2,5)↦(3,9)
Check (c) by substitution: on y=f(x−1)+4 at x=3, y=f(2)+4=5+4=9.
The vertex (0,0) of y=x2 moves to (0+3,0−2)=(3,−2).
(b) Replace x with x−(−1)=x+1 and add 4.
y=2x+1+4
The parent graph y=2x has horizontal asymptote y=0. A horizontal movement does not change a horizontal line, and the vertical movement of 4 moves it to y=4.
For the y-intercept, substitute x=0: y=21+4=6, so the intercept is (0,6).
(b) Replace every x with −x, using (−x)3=−x3.
y=f(−x)=(−x)3−2(−x)+1=−x3+2x+1
(c) In the x-axis, (x,y)↦(x,−y), so (1,0)↦(1,0). The point is an x-intercept, so it is invariant.
In the y-axis, (x,y)↦(−x,y), so (1,0)↦(−1,0).
Check (c): f(−x) at x=−1 is −(−1)3+2(−1)+1=1−2+1=0.
. The zeros come from
x(x−4)=0
:
x=0
and
x=4
.
(a) A vertical stretch with scale factor 3 is y=3f(x).
y=3(x2−4x)=3x2−12x
Every y-coordinate is multiplied by 3, so the vertex (2,−4)↦(2,−12). The zeros x=0 and x=4 are invariant.
(b) A horizontal stretch with scale factor 21 is y=f(qx) with q1=21, so q=2. Replace every x with 2x.
y=(2x)2−4(2x)=4x2−8x
Every x-coordinate is halved: the zeros move to x=0 and x=2, and the vertex (2,−4)↦(1,−4).
Check: 4x2−8x=4x(x−2) has zeros 0 and 2, and at x=1 the value is 4−8=−4.
None (a=0)
-axis
Points on the y-axis
.
(b) Follow A through the two steps. The translation gives (4+6,−1)=(10,−1). The stretch halves the x-coordinate, giving (5,−1).
Check by solving "new inside = old x": 2x−6=4 gives x=5, and the y-coordinate is unchanged. On y=f(2x−6) at x=5, y=f(4)=−1, so the image is (5,−1).
The other order also works: stretch first, (4,−1)↦(2,−1), then translate by (30) to get (5,−1).
. (The reflection and the stretch can be swapped, and the horizontal part of the translation can be done at any point.)
(b) The vertical asymptote only feels the horizontal change: x=2+1=3.
The horizontal asymptote only feels the vertical changes: y=−2(0)+5=5.
(c) The mapping is (x,y)↦(x+1,−2y+5).
(3,4)↦(3+1,−2(4)+5)=(4,−3)
The reflection in the x-axis turns the curve upside down, so the local maximum becomes a local minimum at (4,−3).
Reflection in the x-axis: multiply the whole right-hand side by −1.
y=−2x
Translation by (−31): replace x with x+3 and add 1.
y=−2x+3+1
The parent graph starts at (0,0) and has domain x≥0 and range y≥0. Follow the starting point: the stretch leaves (0,0) where it is, the reflection leaves it too, and the translation moves it to (−3,1). The domain becomes x≥−3. The reflection turns the curve downwards, so the range is y≤1.
moves them to
x=h
and
y=k
. Hence
h=2
and
k=−1
.
Substitute (3,2) into y=x−2a−1:
2=3−2a−1⇒a=3
(b) y=x−23−1 is a vertical stretch of y=x1 with scale factor 3, followed by a translation by (2−1).
y = 1/x
y = 3/(x − 2) − 1
The point (1, 1) on y = 1/x is stretched to (1, 3) and then translated to (3, 2). The asymptotes x = 0 and y = 0 move with the translation only.
(c) Every value occurs 2 hours later, a horizontal translation by (20), so replace t with t−2. The domain moves 2 hours later as well.
T3(t)=T(t−2)=−0.25(t−16)2+25,8≤t≤24
(d) F=1.8T+32 multiplies every output by 1.8 and then adds 32: a vertical stretch with scale factor 1.8, followed by a vertical translation by (032). The maximum moves to
F=1.8(25)+32=77 °F
still at 14:00, because neither transformation is horizontal.
Day 1: T(t)
Day 2: T(t) + 3
Day 3: T(t − 2)
A warmer day moves the curve up; a later day moves it right, together with its domain. Neither change alters the shape of the curve.
. Find
g(x)
in the form
ax2+bx+c
.
(b) "Hence" means use part (a). Comparing with y=(x−h)2+k, the graph of y=x2 is translated by the vector (3−4).
(c) The vertical stretch with scale factor 2 gives y=2f(x). The translation then replaces x with x+1 and adds 3.
g(x)=2f(x+1)+3=2((x+1−3)2−4)+3=2(x−2)2−5
Expand to reach the requested form.
g(x)=2(x2−4x+4)−5=2x2−8x+3
(d) From g(x)=2(x−2)2−5, the vertex is (2,−5).
Check by following the vertex of f: (3,−4)↦(3,−8) after the stretch, then (3−1,−8+3)=(2,−5) after the translation.
Marks are usually given for the completed square, for the vector in (b), for substituting x+1 into the stretched function in (c) and for a correct expansion.
.
(An equivalent answer from g(x)=ln(2(x−2)) is a horizontal stretch with scale factor 21, followed by a translation by (20).)
(b) The asymptote x=0 of y=lnx moves to x=20+4=2. Equivalently, ln(2x−4) is defined when 2x−4>0, so the asymptote is x=2 and the domain is x>2.
(c) Solve ln(2x−4)=0: this needs 2x−4=1, so x=2.5. The x-intercept is (2.5,0).
(d) Solve "new inside = old x": 2x−4=e, so x=2e+4. The image is (2e+4,1), approximately (3.36,1).
(e) Factorise inside the logarithm and use the law ln(ab)=lna+lnb.
g(x)=ln(2(x−2))=ln2+ln(x−2)
This is f(x−2)+ln2, so the single transformation is a translation by (2ln2).
y = ln x
y = ln(2x − 4)
For a logarithm, the horizontal stretch is equivalent to a vertical translation by ln 2, so the whole change is one translation by the vector (2, ln 2).
translation of 3π units in the negative x-direction A1
reflection in the x-axis A1
translation of 1 unit in the positive y-direction A1
Note: Accept a horizontal translation of 32π units in the negative x-direction followed by a horizontal stretch with scale factor 21. Award A0 for a horizontal translation of 32π applied after the stretch. The reflection and the vertical translation may be replaced by a vertical stretch with scale factor −1 followed by the translation.
, with
32π≤2x+32π≤38π
M1
2x+32π=35π,37πA1
x=2π,65πA1
.
[4]4 marks
Markscheme (f)
area =∫02π(1−cos(2x+32π))dx (since f(x)≥0) M1
=[x−21sin(2x+32π)]02π
=2π−21sin35π+21sin32π
=2π+43+43=2π+23
is translated by the vector
(k0)
, where
k>0
, onto the graph of
y=g(x)
. Write down the smallest possible value of
k
.
[1]1 mark
(c)
Let h(x)=tan(x+2π), where x∈R, sinx=0.
Show that h(x)=−cotx.
[2]2 marks
(d)
Hence solve h(x)=3 for 0<x<π.
[2]2 marks
. Find the smallest positive value of
q
.
[3]3 marks
(e)
The model can also be written as D(t)=−acos(b(t−r))+d. Find the smallest positive value of r.
[2]2 marks
(f)
Find the first time after midnight at which the depth is 7 metres.
[2]2 marks
(g)
A ship can only enter the harbour when the depth is at least 7 metres. By using the symmetry of the graph of D about each high tide, find the total length of time between midnight and 24:00 during which the ship can enter the harbour.