Algebra 2

Transformations of functions

A transformation moves or reshapes a parent graph like y=x2y = x^2. Changes outside the function act on y: f(x)+kf(x) + k shifts up k, a f(x)a\,f(x) stretches vertically, and −f(x)-f(x) reflects over the x-axis. Changes inside act on x and work backwards: f(x−h)f(x - h) shifts right h, f(bx)f(bx) squeezes horizontally by a factor of 1b\frac{1}{b}, and f(−x)f(-x) reflects over the y-axis.

Updated

The key idea

Every transformation can be read from one general form. Outside numbers change outputs (y values). Inside numbers change inputs (x values), and they do the opposite of what they look like.

y=a f(b(x−h))+ky = a\,f\big(b(x - h)\big) + k
What each change does to the graph of y = f(x)
ChangeEffectExample with f(x)=x2f(x) = x^2
f(x)+kf(x) + kUp k (down if k is negative)x2+3x^2 + 3: up 3
f(x−h)f(x - h)Right h (left if h is negative)(x−3)2(x - 3)^2: right 3
a f(x)a\,f(x)Vertical stretch by a (shrink if 0<a<10 < a < 1)4x24x^2: 4 times as tall
f(bx)f(bx)Horizontal squeeze by 1b\frac{1}{b}(2x)2(2x)^2: half as wide
−f(x)-f(x)Reflect over the x-axis−x2-x^2: opens down
f(−x)f(-x)Reflect over the y-axis2−x2^{-x} mirrors 2x2^x

To move one point, use the rule: a point (p,q)(p, q) on f moves to (pb+h, aq+k)\left(\frac{p}{b} + h,\ aq + k\right) on y=a f(b(x−h))+ky = a\,f(b(x - h)) + k.

Worked examples

Example 1: describe the shifts

Problem Describe how the graph of g(x)=(x+3)2−5g(x) = (x + 3)^2 - 5 relates to y=x2y = x^2, and find its vertex.

  1. Rewrite it in the f(x−h)+kf(x - h) + k pattern so the signs are clear.
    (x+3)2−5=(x−(−3))2+(−5)(x + 3)^2 - 5 = (x - (-3))^2 + (-5)
  2. So h=−3h = -3: the graph shifts left 3. And k=−5k = -5: it shifts down 5.
  3. The vertex of y=x2y = x^2 is (0,0)(0, 0). Move it left 3 and down 5.

Answer Left 3 and down 5, so the vertex is (−3,−5)(-3, -5).

Example 2: move a single point

Problem The graph of y=f(x)y = f(x) passes through (2,6)(2, 6). Which point must be on the graph of y=2f(x−1)+3y = 2f(x - 1) + 3?

  1. The inside change x−1x - 1 moves points right 1.
    2+1=32 + 1 = 3
  2. The outside changes double the y value, then add 3.
    2⋅6+3=152 \cdot 6 + 3 = 15
  3. Check: at x=3x = 3, 2f(3−1)+3=2f(2)+3=2(6)+3=152f(3 - 1) + 3 = 2f(2) + 3 = 2(6) + 3 = 15.

Answer (3,15)(3, 15)

Example 3: build an equation from a description

Problem Start with y=∣x∣y = |x|. Reflect it over the x-axis, stretch it vertically by a factor of 3, then shift it right 2 and up 4. Write the new equation.

  1. Reflect over the x-axis: put a minus sign outside.
    −∣x∣-|x|
  2. Stretch vertically by 3: multiply the output by 3.
    −3∣x∣-3|x|
  3. Shift right 2: replace x with x−2x - 2.
    −3∣x−2∣-3|x - 2|
  4. Shift up 4: add 4 outside.
    −3∣x−2∣+4-3|x - 2| + 4

Answer y=−3∣x−2∣+4y = -3|x - 2| + 4, an upside-down V with its peak at (2,4)(2, 4).

Example 4 (test-hard): factor the inside first

Problem Describe how g(x)=−2x+6g(x) = \sqrt{-2x + 6} is built from f(x)=xf(x) = \sqrt{x}, and give its domain.

  1. Factor the number in front of x out of the inside. This step is what most people skip.
    −2x+6=−2(x−3)\sqrt{-2x + 6} = \sqrt{-2(x - 3)}
  2. Now read it as f(b(x−h))f(b(x - h)) with b=−2b = -2 and h=3h = 3. The minus reflects over the y-axis, the 2 squeezes the graph to half its width, and the shift is right 3, not right 6.
  3. Domain: the inside of a square root cannot be negative.
    −2x+6≥0-2x + 6 \ge 0
  4. Divide by −2-2 and flip the sign.
    x≤3x \le 3
  5. Check one point. (4,2)(4, 2) is on x\sqrt{x}. The rule sends it to (4−2+3,2)=(1,2)\left(\frac{4}{-2} + 3, 2\right) = (1, 2), and indeed:
    −2(1)+6=2\sqrt{-2(1) + 6} = 2

Answer Reflect over the y-axis, squeeze horizontally by a factor of 12\frac{1}{2}, then shift right 3. The domain is x≤3x \le 3.

Common mistakes

  • Moving the wrong way inside. (x+3)2(x + 3)^2 moves left, not right. Fix: ask what x makes the inside zero. Here x=−3x = -3, so the vertex moved to −3-3.
  • Shifting before factoring. −2x+6\sqrt{-2x + 6} is a shift of 3, not 6. Fix: factor out the coefficient of x before reading h.
  • Mixing up the two reflections. A minus outside, −f(x)-f(x), flips over the x-axis. A minus inside, f(−x)f(-x), flips over the y-axis.
  • Thinking f(2x)f(2x) stretches. Multiplying the input by 2 makes the graph reach each y value twice as fast, so it gets narrower. Fix: inside numbers act backwards.
  • Adding k inside the function. f(x)+4f(x) + 4 moves up 4, but f(x+4)f(x + 4) moves left 4. Fix: watch where the parentheses close.

Quick methods

Practice

5 practice questions

  1. The graph of y=x2y = x^2 is shifted 4 units left and 2 units down. What is the new equation?

    1. y=(x+4)2−2y = (x + 4)^2 - 2
    2. y=(x−4)2−2y = (x - 4)^2 - 2
    3. y=(x+2)2−4y = (x + 2)^2 - 4
    4. y=(x−4)2+2y = (x - 4)^2 + 2
    Show answer

    Answer: y=(x+4)2−2y = (x + 4)^2 - 2

    Left 4 means replace x with x+4x + 4. Down 2 means subtract 2 outside. (x−4)2(x - 4)^2 would move right, and (x+2)2−4(x + 2)^2 - 4 swaps the two numbers.

  2. The point (−1,5)(-1, 5) is on the graph of y=f(x)y = f(x). Which point must be on the graph of y=f(x+3)−2y = f(x + 3) - 2?

    1. (−4,3)(-4, 3)
    2. (2,3)(2, 3)
    3. (−4,7)(-4, 7)
    4. (2,7)(2, 7)
    Show answer

    Answer: (−4,3)(-4, 3)

    x+3x + 3 moves points left 3: −1−3=−4-1 - 3 = -4. The −2-2 moves them down 2: 5−2=35 - 2 = 3. (2,3)(2, 3) moves right instead of left.

  3. Let f(x)=2xf(x) = 2^x and g(x)=f(−x)g(x) = f(-x). How is the graph of g related to the graph of f?

    1. It is a reflection over the x-axis.
    2. It is a reflection over the y-axis.
    3. It is a shift 1 unit left.
    4. It is a 180 degree rotation about the origin.
    Show answer

    Answer: It is a reflection over the y-axis.

    A minus sign inside, on the input, mirrors the graph left to right. A reflection over the x-axis would be −f(x)=−2x-f(x) = -2^x, and a 180 degree rotation would be −f(−x)-f(-x).

  4. The point (4,−2)(4, -2) is on the graph of y=f(x)y = f(x). Which point must be on the graph of y=f(2x)y = f(2x)?

    1. (2,−2)(2, -2)
    2. (8,−2)(8, -2)
    3. (4,−4)(4, -4)
    4. (4,−1)(4, -1)
    Show answer

    Answer: (2,−2)(2, -2)

    At x=2x = 2, f(2⋅2)=f(4)=−2f(2 \cdot 2) = f(4) = -2. Inside numbers act backwards, so the x value is divided by 2, not multiplied. The y value does not change.

  5. Let f(x)=x2−4x+1f(x) = x^2 - 4x + 1 and g(x)=f(x−3)+2g(x) = f(x - 3) + 2. What is the x-coordinate of the vertex of the graph of g?

    Show answer

    Answer: 5

    The vertex of f is at x=−−42=2x = -\frac{-4}{2} = 2. The graph of g is f moved right 3 and up 2, so its vertex is at x=2+3=5x = 2 + 3 = 5.

Frequently asked questions

Why does f(x - h) move the graph right?

The new graph has to reach each output h units later. For (x−3)2(x - 3)^2, the bottom of the parabola happens when the inside is 0, which is at x=3x = 3 instead of x=0x = 0. So everything slides right 3.

In what order should I apply transformations?

A safe order for a f(b(x−h))+ka\,f(b(x - h)) + k is: horizontal squeeze or reflection (b), horizontal shift (h), vertical stretch or reflection (a), then vertical shift (k). Doing the shift before the stretch on the same axis can give a different graph, so factor first and follow this order.

What is a parent function?

It is the simplest function of a family, before any changes: y=xy = x, y=x2y = x^2, y=x3y = x^3, y=∣x∣y = |x|, y=xy = \sqrt{x}, y=2xy = 2^x and so on. Knowing a few points on each parent graph makes transformations much easier.

How do I tell a vertical stretch from a horizontal squeeze?

Look at where the number sits. Multiplying outside, 3f(x)3f(x), changes every y value, so it is vertical. Multiplying inside, f(3x)f(3x), changes which x gives each y, so it is horizontal, and it squeezes by 13\frac{1}{3} rather than stretching by 3.

Try asking Ducky

  • “Why does (x + 3)^2 move left when there's a plus sign?”
  • “Can you give me a graph and have me write its equation?”
  • “Which order should I do these transformations in for my homework problem?”

Free to start. The web app works in any browser, Chromebooks included; the Mac app can also draw on your real screen.