Transformations of Functions

Transformations of functions move, flip or stretch the graph of a parent function. In g(x) = a\,f(x - h) + k, the number h shifts the graph left or right, k shifts it up or down, and a stretches it and can reflect it. Each change follows a rule, so you can graph g quickly from f.

Before this lesson: You should know Parent Functions, Function Notation and Domain and Range.

The Idea: Start from a Parent Graph

A parent function, like f(x) = x^2 or f(x) = \sqrt{x}, is the simplest member of its family. Every other function in the family is a transformed copy of it. Instead of making a new table each time, you move the points you already know.

There are three kinds of moves. A translation slides the graph. A reflection flips it over an axis. A stretch or compression pulls it away from or squeezes it toward an axis. These match the translations, reflections and dilations you met in Geometry.

The Transformation Rules

EquationWhat happens to the graph of fPoint (x, y) moves to
f(x) + kUp k units (down if k \lt 0)(x, y + k)
f(x - h)Right h units (left if h \lt 0)(x + h, y)
-f(x)Reflect across the x-axis(x, -y)
f(-x)Reflect across the y-axis(-x, y)
a\,f(x), a \gt 1Vertical stretch by a(x, ay)
a\,f(x), 0 \lt a \lt 1Vertical compression by a(x, ay)
f(bx)Horizontal compression by b (stretch if 0 \lt b \lt 1)\left(\frac{x}{b}, y\right)

Changes outside the function (to the output) act the way you expect. Changes inside the parentheses (to the input) act the opposite way. So f(x - 2) moves the graph 2 units right, not left.

Coordinate grid with the parent graph y = x squared, a dashed blue parabola with vertex (0, 0), and the transformed graph y = (x − 2) squared − 3, a solid orange parabola with vertex (2, −3). An arrow shows the vertex moving 2 right and 3 down. Every point moves the same way.
The graph of y = (x − 2)² − 3 is y = x² moved 2 right and 3 down.

How to Graph a Transformed Function

  1. Name the parent function and a few of its key points.
  2. Read a, h and k from g(x) = a\,f(x - h) + k. Write x + 4 as x - (-4), so h = -4.
  3. Stretch or compress by a and reflect if a is negative: multiply each y-coordinate by a.
  4. Shift: add h to each x-coordinate and k to each y-coordinate.
  5. Plot the new points and draw the curve with the same shape.

Worked Examples

Example 1: Inside or outside?

Compare g(x) = x^2 + 3 and h(x) = (x + 3)^2 with f(x) = x^2.

  1. In g(x) = x^2 + 3, the 3 is added outside, to the output. Every y-value goes up 3: the graph shifts up 3, and the vertex is (0, 3).
  2. In h(x) = (x + 3)^2, the 3 is inside. Rewrite: (x - (-3))^2, so h = -3.
  3. The graph shifts left 3, and the vertex is (−3, 0).
  4. Check: h(-3) = (-3 + 3)^2 = 0^2 = 0.

Answer: g is f shifted up 3. h is f shifted left 3.

Example 2: Two shifts

Describe g(x) = |x - 2| - 5 as a transformation of f(x) = |x|. Find the vertex.

  1. Read the inside: x - 2, so h = 2. Shift right 2.
  2. Read the outside: -5, so k = -5. Shift down 5.
  3. Move the vertex of f, (0, 0): add 2 to x and −5 to y: (2, −5).

Answer: The graph of |x| shifts right 2 and down 5. The vertex is (2, −5).

Example 3: Reflect and stretch

Graph g(x) = -2\sqrt{x} using key points of f(x) = \sqrt{x}.

Coordinate grid with the parent graph y = square root of x, a dashed blue curve through (0, 0), (1, 1) and (4, 2), and the graph y = −2 times the square root of x, a solid orange curve through (0, 0), (1, −2) and (4, −4). The orange graph is the blue graph stretched vertically by 2 and reflected across the x-axis.
Multiplying by −2 doubles each y-value and flips it below the x-axis.
  1. List key points of f: (0, 0), (1, 1), (4, 2).
  2. Here a = -2. Multiply each y-coordinate by −2: 0 \cdot (-2) = 0, 1 \cdot (-2) = -2, 2 \cdot (-2) = -4.
  3. New points: (0, 0), (1, −2), (4, −4).
  4. Plot them and draw the curve. It opens down and to the right.

Answer: The graph is \sqrt{x} stretched vertically by 2 and reflected across the x-axis. Its domain is [0, \infty) and its range is (-\infty, 0].

Example 4: Write the equation

Start with f(x) = x^2. Compress it vertically by a factor of ½, shift it left 4 and shift it down 1. Write the new function.

  1. A vertical compression by ½ means a = \tfrac{1}{2}.
  2. Left 4 means h = -4, so the inside is x - (-4) = x + 4.
  3. Down 1 means k = -1.
  4. Put them into a\,f(x - h) + k: g(x) = \tfrac{1}{2}(x + 4)^2 - 1
  5. Check the vertex: g(-4) = \tfrac{1}{2}(0)^2 - 1 = -1, so the vertex is (−4, −1).

Answer: g(x) = \tfrac{1}{2}(x + 4)^2 - 1. This is the vertex form of a quadratic.

Example 5: Word problem with a ball

A ball dropped from 64 ft has height h(t) = -16t^2 + 64 after t seconds. A second ball is dropped at the same moment from a platform 10 ft higher. Write its height function g(t), and find when it hits the ground. Round to the nearest hundredth.

  1. Every height is 10 ft greater, so shift up 10: g(t) = h(t) + 10
  2. Substitute: g(t) = -16t^2 + 64 + 10
  3. Combine like terms: g(t) = -16t^2 + 74
  4. The ball hits the ground when g(t) = 0: -16t^2 + 74 = 0
  5. Subtract 74 from both sides: -16t^2 = -74
  6. Divide both sides by −16: t^2 = 4.625
  7. Take the positive square root (see solving quadratics with square roots): t \approx 2.15

Answer: g(t) = -16t^2 + 74. It hits the ground after about 2.15 seconds, later than the first ball, which lands at 2 seconds.

Common Mistakes

MistakeExample of the errorFix
Moving the wrong way for an inside change(x - 2)^2 shifts left 2Inside changes go the opposite way: right 2.
Mixing up the two reflections-f(x) reflects across the y-axis-f(x) flips across the x-axis. f(-x) flips across the y-axis.
Shifting before stretchingFor 2f(x) + 3, adding 3 then doublingMultiply by a first, then add k.
Forgetting to change the domain or rangeRange of -2\sqrt{x} is [0, \infty)A reflection across the x-axis flips the range: (-\infty, 0].
Thinking f(2x) is a stretchf(2x) makes the graph twice as wideInside multiplying by 2 compresses the graph to half its width.

Practice Problems

  1. Describe how g(x) = (x - 6)^2 relates to f(x) = x^2.
  2. Describe how g(x) = \sqrt{x} + 4 relates to f(x) = \sqrt{x}.
  3. Describe g(x) = |x + 1| - 3 and give its vertex.
  4. Describe g(x) = -x^3 as a transformation of f(x) = x^3.
  5. Describe g(x) = 4|x| as a transformation of f(x) = |x|.
  6. Describe g(x) = \sqrt{-x} as a transformation of f(x) = \sqrt{x}, and give its domain.
  7. Write the function for f(x) = |x| shifted right 3 and up 2.
  8. Write the function for f(x) = x^2 reflected across the x-axis and then shifted up 5.
  9. The point (4, 2) is on the graph of f. Find the matching point on g(x) = -f(x + 2) + 6.
  10. The point (4, 2) is on the graph of f. Find the matching point on g(x) = f\left(\tfrac{1}{2}x\right).
Show answers
  1. Inside, x - 6 gives h = 6: shift right 6.
  2. Outside, +4 gives k = 4: shift up 4.
  3. Inside, x + 1 = x - (-1) gives h = -1: shift left 1
    Outside, −3 gives k = -3: shift down 3
    Move the vertex (0, 0): (−1, −3)
  4. The negative sign is outside, so it reflects the graph across the x-axis.
  5. a = 4 \gt 1, so it is a vertical stretch by a factor of 4.
  6. The negative sign is inside, so it reflects the graph across the y-axis.
    The inside must be at least 0: -x \ge 0
    Multiply both sides by −1 and flip the sign: x \le 0. Domain: (-\infty, 0]
  7. Right 3 gives x - 3 inside: |x - 3|
    Up 2 adds 2 outside: g(x) = |x - 3| + 2
  8. Reflect across the x-axis: -x^2
    Then shift up 5: g(x) = -x^2 + 5
  9. The inside x + 2 must equal 4: x + 2 = 4
    Subtract 2 from both sides: x = 2
    The output is -f(4) + 6 = -2 + 6 = 4
    The point is (2, 4).
  10. The inside \tfrac{1}{2}x must equal 4: \tfrac{1}{2}x = 4
    Multiply both sides by 2: x = 8
    The output stays f(4) = 2
    The point is (8, 2). The graph is stretched horizontally by 2.

FAQ

What are the four types of transformations of functions?

Translations (shifts), reflections (flips), vertical stretches and compressions, and horizontal stretches and compressions.

Why does f(x − 2) move the graph to the right?

The output of f(x - 2) at x = 2 equals the output of f at 0. Every value of f now happens 2 units later, so the graph sits 2 units to the right.

How do you tell a vertical stretch from a horizontal stretch?

A number multiplying the whole function, outside, stretches vertically. A number multiplying x inside the function changes the width, and it works the opposite way.

In what order do you apply transformations?

For a\,f(x - h) + k, apply the stretch or reflection from a first, then the shifts from h and k.

Summary

  • g(x) = a\,f(x - h) + k transforms the parent f.
  • k shifts up or down. h shifts right or left, opposite to the sign you see.
  • -f(x) reflects across the x-axis. f(-x) reflects across the y-axis.
  • |a| \gt 1 stretches vertically and 0 \lt |a| \lt 1 compresses. Inside numbers change the width the opposite way.
  • Transform key points, then draw the same shape through them.

Previous lesson: Parent Functions

Next lesson: Absolute Value Functions

Back to the Algebra 2 Index