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
| Equation | What happens to the graph of f | Point (x, y) moves to |
|---|---|---|
| f(x) + k | Up 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 1 | Vertical stretch by a | (x, ay) |
| a\,f(x), 0 \lt a \lt 1 | Vertical 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.
How to Graph a Transformed Function
- Name the parent function and a few of its key points.
- Read a, h and k from g(x) = a\,f(x - h) + k. Write x + 4 as x - (-4), so h = -4.
- Stretch or compress by a and reflect if a is negative: multiply each y-coordinate by a.
- Shift: add h to each x-coordinate and k to each y-coordinate.
- 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.
- 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).
- In h(x) = (x + 3)^2, the 3 is inside. Rewrite: (x - (-3))^2, so h = -3.
- The graph shifts left 3, and the vertex is (−3, 0).
- 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.
- Read the inside: x - 2, so h = 2. Shift right 2.
- Read the outside: -5, so k = -5. Shift down 5.
- 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}.
- List key points of f: (0, 0), (1, 1), (4, 2).
- Here a = -2. Multiply each y-coordinate by −2: 0 \cdot (-2) = 0, 1 \cdot (-2) = -2, 2 \cdot (-2) = -4.
- New points: (0, 0), (1, −2), (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.
- A vertical compression by ½ means a = \tfrac{1}{2}.
- Left 4 means h = -4, so the inside is x - (-4) = x + 4.
- Down 1 means k = -1.
- Put them into a\,f(x - h) + k: g(x) = \tfrac{1}{2}(x + 4)^2 - 1
- 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.
- Every height is 10 ft greater, so shift up 10: g(t) = h(t) + 10
- Substitute: g(t) = -16t^2 + 64 + 10
- Combine like terms: g(t) = -16t^2 + 74
- The ball hits the ground when g(t) = 0: -16t^2 + 74 = 0
- Subtract 74 from both sides: -16t^2 = -74
- Divide both sides by −16: t^2 = 4.625
- 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
| Mistake | Example of the error | Fix |
|---|---|---|
| Moving the wrong way for an inside change | (x - 2)^2 shifts left 2 | Inside 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 stretching | For 2f(x) + 3, adding 3 then doubling | Multiply by a first, then add k. |
| Forgetting to change the domain or range | Range of -2\sqrt{x} is [0, \infty) | A reflection across the x-axis flips the range: (-\infty, 0]. |
| Thinking f(2x) is a stretch | f(2x) makes the graph twice as wide | Inside multiplying by 2 compresses the graph to half its width. |
Practice Problems
- Describe how g(x) = (x - 6)^2 relates to f(x) = x^2.
- Describe how g(x) = \sqrt{x} + 4 relates to f(x) = \sqrt{x}.
- Describe g(x) = |x + 1| - 3 and give its vertex.
- Describe g(x) = -x^3 as a transformation of f(x) = x^3.
- Describe g(x) = 4|x| as a transformation of f(x) = |x|.
- Describe g(x) = \sqrt{-x} as a transformation of f(x) = \sqrt{x}, and give its domain.
- Write the function for f(x) = |x| shifted right 3 and up 2.
- Write the function for f(x) = x^2 reflected across the x-axis and then shifted up 5.
- The point (4, 2) is on the graph of f. Find the matching point on g(x) = -f(x + 2) + 6.
- 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
- Inside, x - 6 gives h = 6: shift right 6.
- Outside, +4 gives k = 4: shift up 4.
- 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) - The negative sign is outside, so it reflects the graph across the x-axis.
- a = 4 \gt 1, so it is a vertical stretch by a factor of 4.
- 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] - Right 3 gives x - 3 inside: |x - 3|
Up 2 adds 2 outside: g(x) = |x - 3| + 2 - Reflect across the x-axis: -x^2
Then shift up 5: g(x) = -x^2 + 5 - 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). - 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