Transformations of graphs

AS · P1 · 12 min

Changing the equation of a graph in a simple way moves or stretches the graph in a predictable way. Knowing the four basic transformations lets you sketch y=3sin⁡2x+1y = 3\sin 2x + 1 or y=2(x−1)2−5y = 2(x - 1)^2 - 5 without plotting a single point, and lets you describe a change of graph in the precise words Cambridge demands: translation, reflection, stretch. Transformation questions appear on most papers, often applied to a function you have just met, or to a graph given only by its features.

The four basic transformations

Start with any graph y=f(x)y = f(x). There are two places you can change the equation: outside ff (changing the output) or inside ff (changing the input).

Key result
New equationTransformationPoint (p,q)(p, q) moves to
y=f(x)+ay = f(x) + atranslation by (0a)\begin{pmatrix} 0 \\ a \end{pmatrix}(p, q+a)(p,\ q + a)
y=f(x+a)y = f(x + a)translation by (−a0)\begin{pmatrix} -a \\ 0 \end{pmatrix}(p−a, q)(p - a,\ q)
y=af(x)y = af(x)stretch parallel to the yy-axis, scale factor aa(p, aq)(p,\ aq)
y=f(ax)y = f(ax)stretch parallel to the xx-axis, scale factor 1a\dfrac{1}{a}(pa, q)\left(\dfrac{p}{a},\ q\right)
y=−f(x)y = -f(x)reflection in the xx-axis(p, −q)(p,\ -q)
y=f(−x)y = f(-x)reflection in the yy-axis(−p, q)(-p,\ q)

Outside changes act on yy and do what they say. Inside changes act on xx and do the opposite.

Outside changes: the output

y=f(x)+3y = f(x) + 3 takes every yy-value of the original and adds 33, so the whole graph moves up 33. y=2f(x)y = 2f(x) doubles every yy-value, so the graph is stretched away from the xx-axis by factor 22. Points on the xx-axis (y=0y = 0) stay where they are.

Inside changes: the input

y=f(x−2)y = f(x - 2) moves the graph right by 22, not left. Here is why. The original graph has some feature (a vertex, say) where the input to ff is 00. In f(x−2)f(x - 2) the input is 00 when x=2x = 2. So the feature now happens at x=2x = 2: two units to the right.

Similarly y=f(2x)y = f(2x): the input 2x2x reaches any given value at half the xx it used to, so the graph is squashed towards the yy-axis by factor 12\tfrac{1}{2}. Points on the yy-axis (x=0x = 0) stay where they are.

y = x^2 y = (x - 2)^2 y = x^2 + 1

The graphs above are y=x2y = x^2, y=(x−2)2y = (x - 2)^2 (translated 22 right) and y=x2+1y = x^2 + 1 (translated 11 up).

y = sin x y = 2 sin x y = sin 2x

Here y=sin⁡xy = \sin x, y=2sin⁡xy = 2\sin x (stretch parallel to the yy-axis, factor 22: the peaks rise to 22) and y=sin⁡2xy = \sin 2x (stretch parallel to the xx-axis, factor 12\tfrac{1}{2}: two full waves in the space of one).

Describing transformations in words

Cambridge awards marks for the exact vocabulary. Each description needs the type and all its details.

TypeDetails you must giveExample wording
Translationthe vectortranslation by (3−2)\begin{pmatrix} 3 \\ -2 \end{pmatrix}
Stretchthe direction and the scale factorstretch parallel to the yy-axis with scale factor 33
Reflectionthe mirror linereflection in the xx-axis

"Stretch in the xx-direction" and "stretch parallel to the xx-axis" both mean the same and are both accepted. Words such as "shift", "move", "squash" or "enlarge" are not accepted.

A combined translation

Describe the transformation that maps y=x2y = x^2 onto y=(x−3)2+2y = (x - 3)^2 + 2.

Solution

Replacing xx by x−3x - 3 translates the graph 33 units in the positive xx-direction; adding 22 outside translates it 22 units in the positive yy-direction. Together:

a translation by (32)\text{a translation by } \begin{pmatrix} 3 \\ 2 \end{pmatrix}

The vertex moves from (0,0)(0, 0) to (3,2)(3, 2), which agrees with the completed square form.

Images of a point

The point P(4,−2)P(4, -2) lies on the curve y=f(x)y = f(x). State the coordinates of the image of PP on each of the following curves.

(a) y=3f(x)y = 3f(x) (b) y=f(x−1)y = f(x - 1) (c) y=f(2x)y = f(2x) (d) y=−f(x)+5y = -f(x) + 5 (e) y=f(−x)y = f(-x)

Solution

(a) Stretch parallel to the yy-axis, factor 33: (4,−6)(4, -6).

(b) Translation by (10)\begin{pmatrix} 1 \\ 0 \end{pmatrix}: (5,−2)(5, -2).

(c) Stretch parallel to the xx-axis, factor 12\tfrac{1}{2}: (2,−2)(2, -2).

(d) Reflection in the xx-axis gives (4,2)(4, 2); then translation by (05)\begin{pmatrix} 0 \\ 5 \end{pmatrix} gives (4,7)(4, 7).

(e) Reflection in the yy-axis: (−4,−2)(-4, -2).

Check (c): on y=f(2x)y = f(2x) at x=2x = 2, the input is f(4)=−2f(4) = -2. Correct.

Combining transformations

When two transformations act in different directions (one on xx, one on yy), the order does not matter. When they act in the same direction, it does.

Outside: follow the order of operations

y=2f(x)+3y = 2f(x) + 3 means: take f(x)f(x), multiply by 22, then add 33. So the transformations are, in order:

  1. stretch parallel to the yy-axis, scale factor 22;
  2. translation by (03)\begin{pmatrix} 0 \\ 3 \end{pmatrix}.

Doing them the other way round would give 2(f(x)+3)=2f(x)+62\left(f(x) + 3\right) = 2f(x) + 6, which is different.

Inside: reverse the order of operations on xx

y=f(2x−4)y = f(2x - 4): write the inside as 2(x−2)2(x - 2). Then two valid descriptions are:

  • translation by (40)\begin{pmatrix} 4 \\ 0 \end{pmatrix}, then stretch parallel to the xx-axis with factor 12\tfrac{1}{2} (check: translating gives f(x−4)f(x - 4); stretching replaces xx by 2x2x, giving f(2x−4)f(2x - 4));
  • stretch parallel to the xx-axis with factor 12\tfrac{1}{2}, then translation by (20)\begin{pmatrix} 2 \\ 0 \end{pmatrix} (stretching gives f(2x)f(2x); translating replaces xx by x−2x - 2, giving f(2(x−2))f(2(x - 2))).
Tip

To check any sequence, apply each step to the equation in turn. A translation by (h0)\begin{pmatrix} h \\ 0 \end{pmatrix} means replace xx by x−hx - h. A stretch parallel to the xx-axis with factor kk means replace xx by xk\dfrac{x}{k}. For the yy-direction, apply the change to the whole right-hand side.

Finding the equation after a sequence of transformations
  1. Start with y=f(x)y = f(x).
  2. Apply the first transformation to the equation, using the replacement rules.
  3. Apply the second transformation to the new equation.
  4. Simplify, and check with one point (for example the vertex or an intercept).
A trigonometric combination

Describe a sequence of transformations that maps the graph of y=cos⁡xy = \cos x onto the graph of y=1−cos⁡2xy = 1 - \cos 2x.

Solution

Build 1−cos⁡2x1 - \cos 2x from cos⁡x\cos x step by step:

cos⁡x ⟶ cos⁡2x ⟶ −cos⁡2x ⟶ 1−cos⁡2x\cos x \ \longrightarrow\ \cos 2x \ \longrightarrow\ -\cos 2x \ \longrightarrow\ 1 - \cos 2x
  1. Stretch parallel to the xx-axis with scale factor 12\tfrac{1}{2}.
  2. Reflection in the xx-axis.
  3. Translation by (01)\begin{pmatrix} 0 \\ 1 \end{pmatrix}.

Step 1 can be done at any point in the sequence (it is the only xx-direction change), but steps 2 and 3 must be in this order.

y = cos x y = 1 - cos 2x
The equation after a stretch and a translation

The function ff is defined by f(x)=x2−6x+11f(x) = x^2 - 6x + 11 for x∈Rx \in \mathbb{R}. The graph of y=f(x)y = f(x) is transformed to the graph of y=g(x)y = g(x) by a stretch parallel to the yy-axis with scale factor 22, followed by a translation by (1−5)\begin{pmatrix} 1 \\ -5 \end{pmatrix}. Find g(x)g(x) in the form ax2+bx+cax^2 + bx + c.

Solution

Stretch: y=2f(x)y = 2f(x). Then translate: replace xx by x−1x - 1 and subtract 55:

g(x)=2f(x−1)−5g(x) = 2f(x - 1) - 5

Now f(x)=(x−3)2+2f(x) = (x - 3)^2 + 2, so f(x−1)=(x−4)2+2f(x - 1) = (x - 4)^2 + 2 and

g(x)=2[(x−4)2+2]−5=2(x−4)2−1=2x2−16x+31g(x) = 2\left[(x - 4)^2 + 2\right] - 5 = 2(x - 4)^2 - 1 = 2x^2 - 16x + 31

Check with the vertex: ff has vertex (3,2)(3, 2). The stretch sends it to (3,4)(3, 4) and the translation to (4,−1)(4, -1). And g(x)=2(x−4)2−1g(x) = 2(x - 4)^2 - 1 has vertex (4,−1)(4, -1). Correct.

Identifying transformations from the equations

The function ff is defined by f(x)=x2−4x+7f(x) = x^2 - 4x + 7, and g(x)=x2+2x+2g(x) = x^2 + 2x + 2. Describe fully the single transformation that maps y=f(x)y = f(x) onto y=g(x)y = g(x).

Solution

Complete the square on both:

f(x)=(x−2)2+3,g(x)=(x+1)2+1f(x) = (x - 2)^2 + 3, \qquad g(x) = (x + 1)^2 + 1

The vertex moves from (2,3)(2, 3) to (−1,1)(-1, 1) and the shape is unchanged (both have x2x^2 coefficient 11). So the transformation is a translation by

(−1−21−3)=(−3−2)\begin{pmatrix} -1 - 2 \\ 1 - 3 \end{pmatrix} = \begin{pmatrix} -3 \\ -2 \end{pmatrix}

Check: f(x+3)−2=(x+1)2+3−2=(x+1)2+1=g(x)f(x + 3) - 2 = (x + 1)^2 + 3 - 2 = (x + 1)^2 + 1 = g(x). Correct.

A graph given by its features

The graph of y=f(x)y = f(x) has a maximum point at (2,5)(2, 5) and crosses the xx-axis at (−1,0)(-1, 0) and (4,0)(4, 0). The graph is transformed to y=3−2f(x)y = 3 - 2f(x). Describe the transformations in order and find the images of the three given points. State whether the image of (2,5)(2, 5) is a maximum or minimum.

Solution

3−2f(x)=−2f(x)+33 - 2f(x) = -2f(x) + 3: multiply f(x)f(x) by −2-2, then add 33. So:

  1. stretch parallel to the yy-axis with scale factor 22;
  2. reflection in the xx-axis;
  3. translation by (03)\begin{pmatrix} 0 \\ 3 \end{pmatrix}.

(Steps 1 and 2 can be swapped, since both are multiplications; the translation must come last.)

Each point (p,q)(p, q) goes to (p,3−2q)(p, 3 - 2q):

  • (2,5)→(2,−7)(2, 5) \to (2, -7);
  • (−1,0)→(−1,3)(-1, 0) \to (-1, 3);
  • (4,0)→(4,3)(4, 0) \to (4, 3).

The reflection turns the curve upside down, so the maximum becomes a minimum at (2,−7)(2, -7).

Watch out

Inside changes the wrong way. f(x+3)f(x + 3) moves the graph left 33; f(3x)f(3x) squashes it by factor 13\tfrac{1}{3}, it does not stretch it by 33.

Translation vector with the wrong sign or order. The vector is (x-shifty-shift)\begin{pmatrix} x\text{-shift} \\ y\text{-shift} \end{pmatrix}. y=f(x−2)+5y = f(x - 2) + 5 is a translation by (25)\begin{pmatrix} 2 \\ 5 \end{pmatrix}.

Incomplete descriptions. "A stretch of factor 2" is missing the direction. "A translation of 3" is missing the vector. Each loses the mark.

Wrong order in the yy-direction. 2f(x)+32f(x) + 3 is "stretch, then translate by 33"; translating first would need a translation by 32\tfrac{3}{2}.

Translating before reflecting in f(−x)f(-x) problems. Reflecting y=f(x)y = f(x) in the yy-axis and then translating by (20)\begin{pmatrix} 2 \\ 0 \end{pmatrix} gives y=f(−(x−2))=f(2−x)y = f(-(x - 2)) = f(2 - x), not f(−x−2)f(-x - 2).

Exam tip
  • Use the words translation, stretch and reflection, with the vector, the direction and scale factor, or the mirror line. Typically one mark per transformation, and only if every detail is correct.
  • If the question says "a sequence of transformations", give them in a valid order and state the order (first, then).
  • Questions can involve any function: quadratics, trigonometric functions, or "other graphs with given features" such as a curve described only by a few points. Track key points through each step.
  • Always check your answer with one point. It takes a few seconds and catches most sign errors.
Summary
  • f(x)+af(x) + a: translation (0a)\begin{pmatrix} 0 \\ a \end{pmatrix}. f(x+a)f(x + a): translation (−a0)\begin{pmatrix} -a \\ 0 \end{pmatrix}.
  • af(x)af(x): stretch parallel to the yy-axis, factor aa. f(ax)f(ax): stretch parallel to the xx-axis, factor 1a\tfrac{1}{a}.
  • −f(x)-f(x): reflection in the xx-axis. f(−x)f(-x): reflection in the yy-axis.
  • Outside changes act on yy as written; inside changes act on xx in the opposite way.
  • In the yy-direction, the order follows the arithmetic: multiply, then add.
  • Replacement rules: translate by hh in xx, replace xx by x−hx - h; stretch by kk in xx, replace xx by xk\tfrac{x}{k}.
  • Describe fully: type plus vector, direction and factor, or mirror line.

Practice questions

Question
  1. Describe the transformation that maps y=x2y = x^2 onto y=(x+4)2−1y = (x + 4)^2 - 1.
  2. Describe the transformation that maps y=f(x)y = f(x) onto y=f(13x)y = f\left(\tfrac{1}{3}x\right).
  3. Describe the transformations that map y=f(x)y = f(x) onto (a) y=−f(x)y = -f(x), (b) y=f(−x)y = f(-x).
  4. The point (2,6)(2, 6) lies on y=f(x)y = f(x). Find its image on (a) y=f(x)−4y = f(x) - 4, (b) y=f(x+3)y = f(x + 3), (c) y=12f(x)y = \tfrac{1}{2}f(x), (d) y=f(2x)y = f(2x), (e) y=f(−x)y = f(-x).
  5. f(x)=x2+2xf(x) = x^2 + 2x. The graph of y=f(x)y = f(x) is translated by (30)\begin{pmatrix} 3 \\ 0 \end{pmatrix}. Find the equation of the new graph in the form y=x2+bx+cy = x^2 + bx + c.
  6. Describe a sequence of transformations that maps y=sin⁡xy = \sin x onto y=2+sin⁡(12x)y = 2 + \sin\left(\tfrac{1}{2}x\right).
  7. Describe, in order, transformations that map y=f(x)y = f(x) onto y=2f(x)+3y = 2f(x) + 3, and find the image of (−1,4)(-1, 4).
  8. The graph of y=f(x)y = f(x) is reflected in the yy-axis and then translated by (20)\begin{pmatrix} 2 \\ 0 \end{pmatrix}. Find the equation of the resulting graph in terms of ff.
  9. f(x)=2x2−8x+5f(x) = 2x^2 - 8x + 5 and g(x)=2x2+4x−1g(x) = 2x^2 + 4x - 1. Find the translation that maps y=f(x)y = f(x) onto y=g(x)y = g(x).
  10. The graph of y=f(x)y = f(x) is transformed to y=4−f(2x)y = 4 - f(2x). (a) Describe a sequence of transformations. (b) The point (6,1)(6, 1) is on y=f(x)y = f(x). Find its image. (c) If y=f(x)y = f(x) has an asymptote y=2y = 2, state the equation of the corresponding asymptote of y=4−f(2x)y = 4 - f(2x).
Answers
  1. Translation by (−4−1)\begin{pmatrix} -4 \\ -1 \end{pmatrix}.

  2. Stretch parallel to the xx-axis with scale factor 33.

  3. (a) Reflection in the xx-axis. (b) Reflection in the yy-axis.

  4. (a) (2,2)(2, 2). (b) (−1,6)(-1, 6). (c) (2,3)(2, 3). (d) (1,6)(1, 6). (e) (−2,6)(-2, 6).

  5. f(x−3)=(x−3)2+2(x−3)=x2−6x+9+2x−6=x2−4x+3f(x - 3) = (x - 3)^2 + 2(x - 3) = x^2 - 6x + 9 + 2x - 6 = x^2 - 4x + 3.

  6. Stretch parallel to the xx-axis with scale factor 22, and translation by (02)\begin{pmatrix} 0 \\ 2 \end{pmatrix} (in either order, as they act in different directions).

  7. Stretch parallel to the yy-axis with scale factor 22, then translation by (03)\begin{pmatrix} 0 \\ 3 \end{pmatrix}. Image: (−1,2(4)+3)=(−1,11)(-1, 2(4) + 3) = (-1, 11).

  8. Reflection gives y=f(−x)y = f(-x). Translating replaces xx by x−2x - 2: y=f(−(x−2))=f(2−x)y = f(-(x - 2)) = f(2 - x).

  9. f(x)=2(x−2)2−3f(x) = 2(x - 2)^2 - 3, vertex (2,−3)(2, -3); g(x)=2(x+1)2−3g(x) = 2(x + 1)^2 - 3, vertex (−1,−3)(-1, -3). Same shape, so translation by (−30)\begin{pmatrix} -3 \\ 0 \end{pmatrix}. Check: f(x+3)=2(x+1)2−3=g(x)f(x + 3) = 2(x + 1)^2 - 3 = g(x).

  10. (a) Stretch parallel to the xx-axis with scale factor 12\tfrac{1}{2}; reflection in the xx-axis; translation by (04)\begin{pmatrix} 0 \\ 4 \end{pmatrix} (the reflection must come before the translation). (b) (6,1)→(3,1)→(3,−1)→(3,3)(6, 1) \to (3, 1) \to (3, -1) \to (3, 3). (c) Horizontal asymptotes are unchanged by the xx-stretch; reflection gives y=−2y = -2; translation gives y=2y = 2. So the asymptote is y=4−2=2y = 4 - 2 = 2.

How well do you know this?

Builds on

Where this leads

Console

Search notes, courses and tools, or run an action