AP Precalculus · Study guide

Transformations of Functions

AP® Precalculus · Unit 1 · Polynomial and Rational Functions

Transformations of Functions

Shifting, stretching and flipping a known graph is the fastest way to draw a new one. This guide shows what each change to a formula does to the graph, how to combine several changes, and how they move points, domains and ranges.

The idea in one paragraph

Changes made outside the function act on outputs, so they move the graph vertically: \(f(x) + k\) shifts it by \(k\), and \(a f(x)\) stretches it by \(|a|\) (flipping over the x-axis if \(a \lt 0\)). Changes made inside act on inputs and move it horizontally, in the reverse of what the numbers suggest: \(f(x + h)\) shifts by \(-h\), and \(f(bx)\) stretches by \(\frac{1}{|b|}\) (flipping over the y-axis if \(b \lt 0\)). The original points are the preimage; the moved points are the image.

1Translations

Adding a number after the function has done its work raises or lowers every output, so the whole graph slides up or down. Adding a number to the input before \(f\) sees it changes which input produces each output. To get the output \(f\) used to give at \(x = 0\), the function \(f(x - 3)\) needs \(x = 3\). So the graph slides right by 3.

Figure 1. Adding outside the function moves the graph up or down. Replacing x with x − 3 inside moves it 3 units to the right, the direction opposite the sign shown.
Worked Example 1 Naming the moves

Describe how the graph of \(g(x) = f(x - 3) + 2\) relates to the graph of \(f\).

  1. 1
    Inside, \(x - 3\) is \(x + h\) with \(h = -3\): a horizontal translation by \(-h = 3\), so 3 units right.
  2. 2
    Outside, \(+2\): a vertical translation 2 units up.
Answer: Shift f right 3 and up 2 (Figure 1).
Common Mistake 1 · Shifting the wrong way

\(f(x - 3)\) moves the graph right, not left. Ask: “what input gives the old input?” \(x - 3 = 0\) at \(x = 3\).

2Dilations and reflections

New functionEffect on the graph of fA point (p, q) goes to
\(f(x) + k\)Vertical translation by \(k\) (up if \(k \gt 0\))\((p, q + k)\)
\(f(x + h)\)Horizontal translation by \(-h\) (left if \(h \gt 0\))\((p - h, q)\)
\(a f(x)\)Vertical dilation by factor \(|a|\); reflect over the x-axis if \(a \lt 0\)\((p, aq)\)
\(f(bx)\)Horizontal dilation by factor \(\frac{1}{|b|}\); reflect over the y-axis if \(b \lt 0\)\(\left(\frac{p}{b}, q\right)\)
Figure 2. A factor outside, a·f(x), changes heights. A factor inside, f(bx), changes horizontal distances by 1/b, so f(2x) is squeezed to half its width.
Worked Example 2 One point, several changes

The point \((4, 1)\) is on the graph of \(f\). Find the matching point on \(y = 3f(x)\), \(y = f\!\left(\frac12 x\right)\) and \(y = f(-x)\).

  1. 1
    \(3f(x)\): heights times 3, so \((4, 3)\).
  2. 2
    \(f\!\left(\frac12 x\right)\): \(b = \frac12\), horizontal factor \(\frac{1}{1/2} = 2\). The input must be 8 to feed 4 into \(f\): \((8, 1)\).
  3. 3
    \(f(-x)\): reflection over the y-axis, \((-4, 1)\).
Answer: \((4, 3)\), \((8, 1)\), \((-4, 1)\)
Common Mistake 2 · Stretching by b instead of 1/b

\(f(2x)\) is half as wide, not twice as wide: the graph reaches each output at half the input. The horizontal factor is \(\frac{1}{|b|}\).

3Combining transformations

For \(g(x) = a f(b(x - h)) + k\), handle the inside and the outside separately. Horizontally: dilate by \(\frac1b\), then shift by \(h\). Vertically: dilate by \(a\) (with any reflection), then shift by \(k\). A point \((p, q)\) on \(f\) becomes \(\left(\frac{p}{b} + h,\; aq + k\right)\).

Worked Example 3 Tracking a point through a combination

\((2, 5)\) is on the graph of \(f\). Where does it go on \(g(x) = -2f(x - 1) + 3\)?

  1. 1
    Horizontal: \(x - 1 = 2\) when \(x = 3\). The point moves right 1.
  2. 2
    Vertical: multiply the height by \(-2\), then add 3: \(-2(5) + 3 = -7\).
Answer: \((3, -7)\)
Worked Example 4 Factor before you shift

Describe \(g(x) = f(2x - 6)\) and find the image of \((4, 1)\).

  1. 1
    Rewrite the inside with the factor pulled out: \(2x - 6 = 2(x - 3)\), so \(g(x) = f(2(x - 3))\).
  2. 2
    That is a horizontal dilation by \(\frac12\) and then a translation 3 units right.
  3. 3
    Point: solve \(2x - 6 = 4\), so \(x = 5\). The image is \((5, 1)\).
Answer: Squeeze horizontally by \(\frac12\), then shift right 3; \((4, 1) \rightarrow (5, 1)\).
Write it like this

“The graph of \(g\) is the graph of \(f\) dilated horizontally by a factor of \(\frac12\), then translated 3 units to the right.” Name the type, the direction, and the amount for each move.

Common Mistake 3 · Shifting by 6 in f(2x − 6)

The shift is read after factoring: \(f(2(x - 3))\) shifts 3, not 6. Check with a point: \(2x - 6 = 4\) gives \(x = 5\), which is the old 4 squeezed to 2 and moved 3.

Common Mistake 4 · Adding before multiplying outside

In \(-2f(x - 1) + 3\), the height 5 becomes \(-2(5) + 3 = -7\), not \(-2(5 + 3) = -16\). Follow the order of operations in the formula.

4Domain and range after a transformation

Horizontal moves change the domain; vertical moves change the range. Push the endpoints of each through the matching transformations.

Worked Example 5 New domain and range

\(f\) has domain \([-2, 4]\) and range \([-1, 2]\). Find the domain and range of \(g(x) = 2f(x + 1) - 5\).

  1. 1
    Domain: \(x + 1\) must be in \([-2, 4]\), so \(x\) is in \([-3, 3]\). (The graph moved 1 left.)
  2. 2
    Range: heights \(-1\) to 2 become \(2(-1) - 5 = -7\) to \(2(2) - 5 = -1\).
Answer: Domain \([-3, 3]\), range \([-7, -1]\).

5Writing a transformed function

To write an equation from a description, start with the parent function, apply the vertical dilation or reflection as a factor in front, then put the horizontal shift inside and the vertical shift outside.

Worked Example 6 Building an equation

The graph of \(y = x^2\) is reflected over the x-axis, stretched vertically by a factor of 3, then moved 2 units left and 5 units up. Write the new function.

  1. 1
    Reflect and stretch: \(-3x^2\).
  2. 2
    Left 2: replace \(x\) with \(x + 2\). Up 5: add 5.
  3. 3
    The vertex moves from \((0, 0)\) to \((-2, 5)\), and the parabola now opens down.
Answer: \(g(x) = -3(x + 2)^2 + 5\)

Quick reference

ChangeWhereGraph moves
\(+k\)OutsideUp \(k\)
\(x + h\)InsideLeft \(h\) (right if \(h \lt 0\))
\(a \cdot\)OutsideVertical factor \(|a|\); flip over x-axis if \(a \lt 0\)
\(bx\)InsideHorizontal factor \(\frac{1}{|b|}\); flip over y-axis if \(b \lt 0\)
\(a f(b(x - h)) + k\)Both\((p, q) \rightarrow \left(\frac{p}{b} + h, aq + k\right)\)