12.2 Composite Transformations

SL 2.11

In this section you will learn
  • why the order of transformations matters
  • how to sketch \(y = c\,f(x) + d\) from the graph of \(y = f(x)\)
  • how to combine a horizontal change and a vertical change, such as \(y = f(x - h) + d\) or \(y = p\,f(qx)\)
  • how to find the image of a point after several transformations
  • how to find the equation of a graph after a given sequence of transformations, and how to work backwards

Transformations of the form \(y = f(ax + b)\) are HL only: see 12.3.

Order matters

A composite transformation is two or more transformations done one after the other. The order is important. Look at what happens to the point \((4, 0)\):

  • Stretch first, then translate. Stretch parallel to the \(y\)-axis with scale factor \(3\): \((4, 0) \to (4, 0)\). Then translate up \(2\): \(\to (4, 2)\).
  • Translate first, then stretch. Translate up \(2\): \((4, 0) \to (4, 2)\). Then stretch: \(\to (4, 6)\).

Different order, different answer. For example, \(y = x^2\) is mapped onto \(y = 3x^2 + 2\) by a stretch parallel to the \(y\)-axis with scale factor \(3\), followed by a translation by \(\begin{pmatrix} 0 \\ 2 \end{pmatrix}\). If we translate first, we get \(y = 3(x^2 + 2) = 3x^2 + 6\) instead. So we need a safe method for each type of equation.

Graphs of \(y = c\,f(x) + d\)

Here both changes are outside \(f\), so both act on \(y\). Think about how you calculate \(y\): first find \(f(x)\), then multiply by \(c\), then add \(d\). Do the transformations in the same order.

Sketching \(y = c\,f(x) + d\) from \(y = f(x)\) (with \(c > 0\)) Not in the formula booklet

  1. \(y = f(x) \;\to\; y = c\,f(x)\): stretch parallel to the \(y\)-axis, scale factor \(c\).
  2. \(y = c\,f(x) \;\to\; y = c\,f(x) + d\): translate \(d\) units parallel to the \(y\)-axis.

Each point moves like this: \(\quad (x,\, y) \;\longmapsto\; (x,\, cy + d)\).

If \(c < 0\), step 1 also includes a reflection in the \(x\)-axis: \(y = -|c|\,f(x)\).

Example 1 The graph of \(y = f(x)\) crosses the \(x\)-axis at \((-5, 0)\) and at the origin \(O\). It has a minimum point \(P(-3, -2)\), a maximum point \(Q(2, 3)\), and the asymptote \(y = 2\).

Sketch the graph of \(y = \frac{1}{2}f(x) + 1\). Show the images of \((-5, 0)\), \(O\), \(P\) and \(Q\), and the asymptote.

First stretch parallel to the \(y\)-axis with scale factor \(\frac{1}{2}\), then translate up \(1\): \(\;(x, y) \longmapsto \left(x, \frac{1}{2}y + 1\right)\).

Point \((-5, 0)\) \(O(0, 0)\) \(P(-3, -2)\) min \(Q(2, 3)\) max
Image \((-5, 1)\) \((0, 1)\) \((-3, 0)\) min \(\left(2, \frac{5}{2}\right)\) max

Asymptote: \(y = 2 \to y = \frac{1}{2} \times 2 + 1 = 2\). (It does not move!)

The minimum point is now on the \(x\)-axis, so the new graph touches the \(x\)-axis at \((-3, 0)\). The \(y\)-intercept is \((0, 1)\).

Image of a point and sequences of transformations

All the rules combine. Changes inside \(f\) act on \(x\) (and do the opposite); changes outside \(f\) act on \(y\) (and do what they say).

A horizontal change and a vertical change do not affect each other: one changes only \(x\), the other changes only \(y\). So for \(y = f(x - h) + d\) or \(y = p\,f(qx)\) you may do the two transformations in either order. Order matters only when two changes act in the same direction, as in \(y = c\,f(x) + d\).

The image of a point under \(y = c\,f(x - h) + d\) and under \(y = p\,f(qx)\) Not in the formula booklet

\[ \begin{gathered} y = c\,f(x - h) + d: \quad (x,\, y) \;\longmapsto\; (x + h,\; cy + d) \\[4pt] y = p\,f(qx): \quad (x,\, y) \;\longmapsto\; \left(\frac{x}{q},\; py\right) \end{gathered} \]

  • \(h\): the horizontal translation (\(h > 0\): right; \(h < 0\): left)
  • \(c\), \(p\): the vertical scale factors (they multiply \(f\))
  • \(d\): the vertical translation (added outside \(f\))
  • \(q\): the number that multiplies \(x\) inside \(f\) (\(q > 0\)); the horizontal scale factor is \(\frac{1}{q}\)

Example 2 The graph of \(y = f(x)\) passes through \(A(-2, 0)\) and \(C(4, 0)\), and it has a minimum point \(B(1, -4)\). Find the images of \(A\), \(B\) and \(C\) on the graph of

(a) \(y = f(x + 3) - 2\)

(b) \(y = 3f\left(\frac{1}{2}x\right)\)

(a) Translate \(3\) left and \(2\) down: \((x, y) \longmapsto (x - 3,\; y - 2)\).

\(A(-2, 0) \to (-5, -2)\), \(\;B(1, -4) \to (-2, -6)\) (still a minimum), \(\;C(4, 0) \to (1, -2)\).

(b) Stretch parallel to the \(x\)-axis with scale factor \(2\) (because \(q = \frac{1}{2}\), so \(\frac{1}{q} = 2\)) and parallel to the \(y\)-axis with scale factor \(3\): \((x, y) \longmapsto (2x,\; 3y)\).

\(A(-2, 0) \to (-4, 0)\), \(\;B(1, -4) \to (2, -12)\) (still a minimum), \(\;C(4, 0) \to (8, 0)\).

In both parts the order of the two transformations does not matter, because one is horizontal and one is vertical.

When you are given a sequence of transformations, apply them to the equation one at a time, in the order given. Each step replaces \(x\) (for a horizontal change) or changes the whole right-hand side (for a vertical change).

Example 3 The curve \(y = x^3\) is transformed by

  • a translation of \(2\) units in the negative \(x\)-direction, followed by
  • a reflection in the \(y\)-axis, followed by
  • a stretch parallel to the \(y\)-axis with scale factor \(3\).

Find the equation of the final curve.

Work one step at a time.

  1. Translate \(2\) left: replace \(x\) by \(x + 2\). \(\quad y = (x + 2)^3\).
  2. Reflect in the \(y\)-axis: replace \(x\) by \(-x\). \(\quad y = (-x + 2)^3 = (2 - x)^3\).
  3. Stretch, factor \(3\), parallel to the \(y\)-axis: multiply by \(3\). \(\quad y = 3(2 - x)^3\).

The final curve is \(y = 3(2 - x)^3\), which is the same as \(y = -3(x - 2)^3\).

Note: in step 2 the \(x\) inside \(x + 2\) is replaced, which is why we get \(2 - x\) and not \(-x - 2\).

Example 4 The diagram shows the graph of \(y = 2f(x - 1)\). It passes through \(A(-4, 0)\), \(B(0, 6)\), \(C(3, 0)\) and \(E(8, 0)\), it has a minimum point \(D(5, -4)\), and its asymptotes are \(x = -2\) and \(y = 2\).

Sketch the graph of \(y = f(x)\). Give the points corresponding to \(A\), \(B\), \(C\), \(D\) and \(E\), and the asymptotes.

From \(y = f(x)\) to \(y = 2f(x - 1)\) the points move by \((x, y) \longmapsto (x + 1, 2y)\). To go backwards, undo each step: \((x, y) \longmapsto \left(x - 1, \frac{y}{2}\right)\).

On \(y = 2f(x - 1)\) \(A(-4, 0)\) \(B(0, 6)\) \(C(3, 0)\) \(D(5, -4)\) min \(E(8, 0)\)
On \(y = f(x)\) \((-5, 0)\) \((-1, 3)\) \((2, 0)\) \((4, -2)\) min \((7, 0)\)

Asymptotes: \(x = -2 \to x = -3\) and \(y = 2 \to y = 1\).

Notice that \(B\) was on the \(y\)-axis, but its partner \((-1, 3)\) is not. We do not know the \(y\)-intercept of \(y = f(x)\) from the information given.

Common errors

✗ Wrong ✓ Right Why
\(y = 3f(x) + 2\): translate up 2, then stretch by 3 Stretch by 3 first, then translate up 2 Follow the order of calculation: multiply, then add. Otherwise \((x, 0)\) goes to \((x, 6)\), not \((x, 2)\).
Under \(y = f(x - 3) + 2\), \((1, 5) \to (-2, 7)\) \((1, 5) \to (4, 7)\) \(x - 3\) inside \(f\) means \(3\) units to the right. Inside changes do the opposite.
Under \(y = 2f(3x)\), \((6, 1) \to (18, 2)\) \((6, 1) \to (2, 2)\) The horizontal scale factor is \(\frac{1}{3}\): divide \(x\) by \(3\).
Translate \(y = x^3\) left 2 then reflect in the \(y\)-axis: \(y = -x^3 + 2\) or \((-x - 2)^3\) \(y = (-x + 2)^3\) Replace each \(x\) in the current equation by \(-x\).
Working backwards with the same rule Undo each step: subtract instead of add, divide instead of multiply The inverse of \((x, y) \mapsto (x + 1, 2y)\) is \((x, y) \mapsto \left(x - 1, \frac{y}{2}\right)\).

Exercises

1 Describe a sequence of two transformations that maps the graph of \(y = x^2\) onto the graph of \(y = 2x^2 - 5\).

A stretch parallel to the \(y\)-axis with scale factor \(2\) (\(y = 2x^2\)), followed by a translation by the vector \(\begin{pmatrix} 0 \\ -5 \end{pmatrix}\).

2 The point \((6, -2)\) lies on the graph of \(y = f(x)\). Find its image on the graph of

(a) \(y = 3f(x) - 1\)

(b) \(y = -f(x - 1) + 2\)

(c) \(y = f(x + 4) - 3\)

(d) \(y = 2f\left(\frac{1}{2}x\right)\)

(a) \((6, 3 \times (-2) - 1) = (6, -7)\).

(b) \((6 + 1, -(-2) + 2) = (7, 4)\).

(c) Translate \(4\) left and \(3\) down: \((6 - 4, -2 - 3) = (2, -5)\).

(d) \((x, y) \mapsto (2x, 2y)\): \((12, -4)\).

3 Describe a sequence of transformations that maps the graph of \(y = \sqrt{x}\) onto the graph of \(y = 3 - \sqrt{x + 1}\). Write down the domain, the range and the end point of the new graph.

\(3 - \sqrt{x + 1} = -\sqrt{x + 1} + 3\). A translation of \(1\) unit in the negative \(x\)-direction (\(y = \sqrt{x + 1}\)), then a reflection in the \(x\)-axis (\(y = -\sqrt{x + 1}\)), then a translation of \(3\) units in the positive \(y\)-direction.

The end point moves \((0, 0) \to (-1, 0) \to (-1, 0) \to (-1, 3)\).

Domain \(x \ge -1\). Since \(\sqrt{x + 1} \ge 0\), the range is \(y \le 3\).

4 The graph of \(y = x^2\) is translated by the vector \(\begin{pmatrix} -1 \\ 0 \end{pmatrix}\), then stretched parallel to the \(y\)-axis with scale factor \(3\), then translated by the vector \(\begin{pmatrix} 0 \\ -4 \end{pmatrix}\). Find the final equation and the vertex of the final graph.

\(y = (x + 1)^2 \;\to\; y = 3(x + 1)^2 \;\to\; y = 3(x + 1)^2 - 4\).

The vertex \((0, 0) \to (-1, 0) \to (-1, 0) \to (-1, -4)\).

5 The graph of \(y = \dfrac{1}{x}\) is transformed in two ways:

(i) stretch parallel to the \(y\)-axis with scale factor \(2\), then translate by \(\begin{pmatrix} 0 \\ 3 \end{pmatrix}\);

(ii) translate by \(\begin{pmatrix} 0 \\ 3 \end{pmatrix}\), then stretch parallel to the \(y\)-axis with scale factor \(2\).

For each final graph, find the equation, the horizontal asymptote and the \(x\)-intercept.

(i) \(y = \frac{2}{x} \to y = \frac{2}{x} + 3\). Asymptote \(y = 3\). \(\;\frac{2}{x} = -3 \Rightarrow x = -\frac{2}{3}\), so \(\left(-\frac{2}{3}, 0\right)\).

(ii) \(y = \frac{1}{x} + 3 \to y = 2\left(\frac{1}{x} + 3\right) = \frac{2}{x} + 6\). Asymptote \(y = 6\). \(\;\frac{2}{x} = -6 \Rightarrow x = -\frac{1}{3}\), so \(\left(-\frac{1}{3}, 0\right)\).

The two graphs are different: the order matters.

6 The graph of \(y = f(x)\) has a maximum point \((3, 4)\) and asymptotes \(x = -1\) and \(y = 1\). For each graph, state the image of the maximum point (and whether it is a maximum or a minimum) and the asymptotes.

(a) \(y = 2f(x) - 3\)

(b) \(y = f(x - 2) + 1\)

(c) \(y = 4 - f(x)\)

(a) \((x, y) \mapsto (x, 2y - 3)\): maximum \((3, 5)\); asymptotes \(x = -1\) and \(y = 2 - 3 = -1\).

(b) \((x, y) \mapsto (x + 2, y + 1)\): maximum \((5, 5)\); asymptotes \(x = 1\) and \(y = 2\).

(c) \(y = -f(x) + 4\), so \((x, y) \mapsto (x, -y + 4)\). The maximum becomes a minimum \((3, 0)\); asymptotes \(x = -1\) and \(y = -1 + 4 = 3\).

7 Describe a sequence of transformations that maps the graph of \(y = \dfrac{1}{x}\) onto the graph of \(y = \dfrac{3}{x - 2} + 1\). State the asymptotes of the final graph.

A stretch parallel to the \(y\)-axis with scale factor \(3\) (giving \(y = \frac{3}{x}\)), then a translation by the vector \(\begin{pmatrix} 2 \\ 1 \end{pmatrix}\).

Asymptotes: \(x = 2\) and \(y = 1\).

8 The graph of \(y = \mathrm{e}^x\) is reflected in the \(y\)-axis, then reflected in the \(x\)-axis, then translated by \(\begin{pmatrix} 0 \\ 4 \end{pmatrix}\).

(a) Find the final equation.

(b) State the asymptote.

(c) Find the axis intercepts.

(a) \(y = \mathrm{e}^{-x} \to y = -\mathrm{e}^{-x} \to y = 4 - \mathrm{e}^{-x}\).

(b) \(y = 0 \to y = 0 \to y = 0 \to y = 4\).

(c) \(x = 0\): \(y = 4 - 1 = 3\). \(\quad y = 0\): \(\mathrm{e}^{-x} = 4 \Rightarrow x = -\ln 4\). Intercepts \((0, 3)\) and \((-\ln 4, 0)\).

9 The point \((2, 5)\) lies on \(y = f(x)\).

(a) The graph is reflected in the \(x\)-axis and then translated by \(\begin{pmatrix} 0 \\ 3 \end{pmatrix}\). Write the new equation in terms of \(f\) and find the image of \((2, 5)\).

(b) Repeat (a) with the two transformations in the opposite order.

(a) \(y = -f(x) \to y = -f(x) + 3\). \(\;(2, 5) \to (2, -5) \to (2, -2)\).

(b) \(y = f(x) + 3 \to y = -\big(f(x) + 3\big) = -f(x) - 3\). \(\;(2, 5) \to (2, 8) \to (2, -8)\).

10 Write \(2x^2 - 12x + 13\) in the form \(a(x - h)^2 + k\). Hence describe a sequence of transformations that maps \(y = x^2\) onto \(y = 2x^2 - 12x + 13\).

\(2x^2 - 12x + 13 = 2(x^2 - 6x) + 13 = 2\big((x - 3)^2 - 9\big) + 13 = 2(x - 3)^2 - 5\).

A stretch parallel to the \(y\)-axis with scale factor \(2\), followed by a translation by the vector \(\begin{pmatrix} 3 \\ -5 \end{pmatrix}\). (The vertex moves from \((0, 0)\) to \((3, -5)\).)