Transformations of Functions
Why this matters
Imagine you're designing a level for a video game. You've created one perfect spike trap, f(x). Now, you need to reuse it all over the level. You don't want to code a new trap from scratch each time. Instead, you'll take your original trap and apply transformations. You'll need to slide it 50 pixels to the right, make another version that's twice as tall, and maybe create an upside-down version for the ceiling.
This is exactly what function transformations are. It's a powerful toolkit that lets you take a basic "parent" function and move it, scale it, and flip it to fit any situation. By the end of this lesson, you'll be able to look at a complex function and see it for what it is: a simple graph that's been transformed in a few predictable ways.
Concept overview
flowchart TD
A[Start with parent function f(x)] --> B{g(x) = a * f(b(x-h)) + k};
B --> C{Inside Parentheses};
C --> D[1. Horizontal Shift by h units];
D --> E[2. Horizontal Stretch/Compress by 1/b];
E --> F{Reflect over y-axis if b < 0};
B --> G{Outside Parentheses};
G --> H[3. Vertical Stretch/Compress by a];
H --> I{Reflect over x-axis if a < 0};
I --> J[4. Vertical Shift by k units];
F --> G;
J --> K[Final Transformed Graph g(x)];
Core explanation
Let's start with a basic "parent" function that we all know: the parabola, f(x) = x^2. Its graph is a simple "U" shape with its bottom point, the vertex, at the origin (0, 0). We're going to use this simple function to explore four types of transformations.
Additive Transformations: Shifts and Translations
Think of these as simply moving the entire graph without changing its shape.
1. Vertical Shifts: g(x) = f(x) + k
This is the most straightforward transformation. The + k is outside the function's parentheses.
- If
kis positive, the graph shifts up.g(x) = x^2 + 3moves the parabola up 3 units. The new vertex is at (0, 3). - If
kis negative, the graph shifts down.g(x) = x^2 - 4moves the parabola down 4 units. The new vertex is at (0, -4).
Analogy: Think of the + k as an elevator. +3 takes you up 3 floors. -4 takes you down 4 floors.
2. Horizontal Shifts: g(x) = f(x + h)
Here, the change is inside the parentheses with the x. This is where things get a little counterintuitive.
- If you see
x + h(e.g.,g(x) = (x + 2)^2), the graph shifts left byhunits. - If you see
x - h(e.g.,g(x) = (x - 5)^2), the graph shifts right byhunits.
- For
(x + 2)^2, you'd needx = -2to make the inside zero. The vertex moves fromx=0tox=-2. That's a shift to the left. - For
(x - 5)^2, you'd needx = 5to make the inside zero. The vertex moves tox=5. That's a shift to the right.
Mantra: "Inside is opposite." What you see inside the parentheses does the opposite of what you'd expect.
Multiplicative Transformations: Dilations and Reflections
These transformations change the shape or orientation of the graph.
*3. Vertical Stretches, Compressions, and Reflections: `g(x) = a f(x)** The multiplierais *outside* the function. It affects they`-values directly.
- Vertical StretchIf
|a| > 1(e.g.,a=3ora=-3), the graph is stretched vertically.g(x) = 3x^2makes the parabola appear "skinnier" because every y-value is tripled. - Vertical CompressionIf
0 < |a| < 1(e.g.,a=0.5ora=-0.5), the graph is compressed vertically.g(x) = 0.5x^2makes the parabola appear "wider" because every y-value is halved. - Reflection over the x-axisIf
ais negative, the graph flips upside down over the x-axis.g(x) = -x^2turns our "U" shape into an upside-down "U".g(x) = -3x^2would stretch it by a factor of 3 and flip it.
*4. Horizontal Stretches, Compressions, and Reflections: `g(x) = f(b x)** The multiplierb` is inside the parentheses. And just like horizontal shifts, its effect is counterintuitive.
- Horizontal CompressionIf
|b| > 1(e.g.,b=2), the graph is compressed horizontally by a factor of1/|b|. The functiong(x) = (2x)^2squishes the graph toward the y-axis. It gets steeper, faster. - Horizontal StretchIf
0 < |b| < 1(e.g.,b=0.5), the graph is stretched horizontally by a factor of1/|b|. The functiong(x) = (0.5x)^2stretches the graph away from the y-axis, making it look wider. - Reflection over the y-axisIf
bis negative, the graph flips sideways over the y-axis. Forf(x) = x^2, you wouldn't notice this because it's already symmetric. But for a function likef(x) = sqrt(x),g(x) = sqrt(-x)would be a reflection over the y-axis.
Mantra again: "Inside is opposite." A big multiplier b inside results in a small compression factor 1/b.
Putting It All Together
We can combine all these transformations into one glorious equation:
g(x) = a * f(b(x - h)) + k
To decode this, work from the inside out:
h: Horizontal shift (remember,x-his a shift right)b: Horizontal stretch/compression (by1/b) and/or y-axis reflection.a: Vertical stretch/compression and/or x-axis reflection.k: Vertical shift.
A critical warning: If you see an equation like g(x) = sqrt(2x + 6), you MUST factor the inside before identifying the horizontal shift.
g(x) = sqrt(2(x + 3))
Now we can see it clearly: It's a horizontal compression by a factor of 1/2, followed by a horizontal shift left 3 units, not 6.
Impact on Domain and Range
- Horizontal transformations (
handb) affect the domain. If you shift the graph left or stretch it horizontally, the set of possible x-values might change. - Vertical transformations (
kanda) affect the range. If you shift the graph up or stretch it vertically, the set of possible y-values will change.
For our parabola f(x) = x^2, the domain is all real numbers and the range is [0, ∞). For the transformed function g(x) = -2(x - 3)^2 + 1:
- The horizontal shift doesn't change the domain; it's still all real numbers.
- The reflection and vertical shift do change the range. The vertex moves to (3, 1), and the parabola opens downward. The new range is
(-∞, 1].
Worked examples
Let's put this into practice.
Describing Transformations
Problem: Let f(x) = |x|. Describe the sequence of transformations that turns f(x) into g(x) = -1/2 * |x + 3| - 4.
Solution Walkthrough:
We'll break down the new function g(x) by comparing it to the general form a * f(x - h) + k. Here, our parent function is f(x) = |x|, so f(x+3) becomes |x+3|.
- 1Identify the parameters
a = -1/2h = -3(because the form isx-hand we havex+3, which isx - (-3))k = -4
- 2Translate parameters into transformations
- Horizontal Shift (
h): The+3inside the absolute value bars corresponds toh = -3. This means the graph shifts left by 3 units. - Vertical Dilation & Reflection (
a): Thea = -1/2does two things. The negative sign tells us there is a reflection over the x-axis. The1/2tells us there is a vertical compression by a factor of 1/2. This will make the "V" shape wider. - Vertical Shift (
k): The-4outside the function tells us the graph shifts down by 4 units.
- Horizontal Shift (
Final Description: To get the graph of g(x) from f(x), you would:
- Shift the graph of
|x|left 3 units. - Vertically compress it by a factor of 1/2.
- Reflect it over the x-axis.
- Shift it down 4 units. (Note: The order of steps 2 and 3 can be swapped, but shifts should be done first or last for clarity).
Building a New Function
Problem: Let the function f(x) have a domain of [-10, 10] and a range of [0, 5]. A new function g(x) is created by transforming f(x) as follows: a horizontal compression by a factor of 1/2, a reflection across the y-axis, and a vertical shift up by 7 units. Write the equation for g(x) and find its new domain and range.
Solution Walkthrough:
-
Build the equation for
g(x):- "Horizontal compression by a factor of 1/2": This means
1/|b| = 1/2, so|b| = 2. - "Reflection across the y-axis": This means
bmust be negative. So,b = -2. The inside of our new function will bef(-2x). - "Vertical shift up by 7 units": This is a
+koutside the function, sok = 7. - Combining these, we get:
g(x) = f(-2x) + 7.
- "Horizontal compression by a factor of 1/2": This means
-
Determine the new domain:
- The domain is affected by horizontal transformations. Our original domain is
-10 <= x <= 10. - The transformation is applied to the
xinside the function. So, we need to find the new bounds forxsuch that the input tof, which is-2x, stays within the original domain. - We set up inequalities:
-10 <= -2x <= 10. - To solve for
x, we divide by -2. This is a common mistake spot! When you multiply or divide an inequality by a negative number, you must flip the inequality signs. (-10)/(-2) >= x >= (10)/(-2)5 >= x >= -5- Rewriting this in standard form, the new domain is
[-5, 5]. This makes sense: compressing the graph by a factor of 1/2 makes the domain half as wide.
- The domain is affected by horizontal transformations. Our original domain is
-
Determine the new range:
- The range is affected by vertical transformations. Our original range is
[0, 5], or0 <= y <= 5. - The only vertical transformation is a shift up by 7. So, we add 7 to the bounds of the original range.
- New lower bound:
0 + 7 = 7. - New upper bound:
5 + 7 = 12. - The new range is
[7, 12].
- The range is affected by vertical transformations. Our original range is
Final Answer: The new function is g(x) = f(-2x) + 7, its domain is [-5, 5], and its range is [7, 12].
Try it yourself
Time to try it on your own. Don't worry about getting it perfect on the first try; focus on applying the steps.
Problem 1: The graph of f(x) = sqrt(x) is transformed. The new function, g(x), is created by shifting the graph left 4 units, reflecting it over the x-axis, and shifting it up 1 unit. Write the equation for g(x).
Hint: Build the equation piece by piece. Where does the "left 4" go? What about the reflection? The "up 1"?
Problem 2: Describe the transformations that map the graph of f(x) to the graph of g(x) = f(-1/2 * x) + 5. Be specific about the direction of shifts and the factors of any stretches or compressions.
Hint: Look inside the parentheses first, then outside. Remember our mantra for what happens inside!
Practice — 8 questions
In simple terms, function transformations are about taking a basic graph and sliding, stretching, squishing, or flipping it to create new, related graphs.
- 1.12.A: Construct a function that is an additive and/or multiplicative transformation of another function.
- 1.12.A.1
- The function g(x) = f(x) + k is an additive transformation of the function f that results in a vertical translation of the graph of f by k units.
- 1.12.A.2
- The function g(x) = f (x + h) is an additive transformation of the function f that results in a horizontal translation of the graph of f by –h units.
- 1.12.A.3
- The function g(x) = a f (x), where a ≠ 0, is a multiplicative transformation of the function f that results in a vertical dilation of the graph of f by a factor of |a|. If a < 0, the transformation involves a reflection over the x-axis.
- 1.12.A.4
- The function g(x) = f (bx), where b ≠ 0, is a multiplicative transformation of the function f that results in a horizontal dilation of the graph of f by a factor of 1/|b|. If b < 0, the transformation involves a reflection over the y-axis.
- 1.12.A.5
- Additive and multiplicative transformations can be combined, resulting in combinations of horizontal and vertical translations and dilations.
- 1.12.A.6
- The domain and range of a function that is a transformation of a parent function may be different from those of the parent function.
flowchart TD
A[Start with parent function f(x)] --> B{g(x) = a * f(b(x-h)) + k};
B --> C{Inside Parentheses};
C --> D[1. Horizontal Shift by h units];
D --> E[2. Horizontal Stretch/Compress by 1/b];
E --> F{Reflect over y-axis if b < 0};
B --> G{Outside Parentheses};
G --> H[3. Vertical Stretch/Compress by a];
H --> I{Reflect over x-axis if a < 0};
I --> J[4. Vertical Shift by k units];
F --> G;
J --> K[Final Transformed Graph g(x)];
Read what Saavi narrates
Hey everyone, it's Saavi. Today we're talking about one of my favorite topics, because it's like a secret decoder ring for functions: transformations.
Imagine you're in a photo editing app. You have a picture. You can drag it around the screen, right? That's a translation, or a shift. You can pinch and zoom to make it bigger or smaller... that's a dilation, or a stretch. And you can flip it horizontally or vertically... that's a reflection.
That's all we're doing today. We're taking a basic function graph and learning the controls to slide it, stretch it, and flip it. We can move a graph up, down, left, or right. We can make it taller, shorter, wider, or skinnier. And we can flip it upside down or backwards. It's a powerful toolkit.
Let's try one together. Imagine we start with the absolute value function, which looks like a V. Its equation is f of x equals the absolute value of x. Now let's say we want to graph g of x equals negative one-half times the absolute value of x plus three... and then subtract four at the end. Whoa, that sounds complicated. But it's not, if we break it down.
First, look inside the absolute value bars. We see x plus three. The plus three is inside, so it's a horizontal shift. And because inside is opposite, plus three means we shift LEFT three units. Okay, step one done.
Next, look at the numbers outside. We have a negative one-half out front. The negative sign flips the graph over the x-axis. So our V is now an upside-down V. The one-half is a vertical compression. It squishes the graph, making it wider.
Finally, that minus four at the very end is a vertical shift. It's outside, so it does exactly what it looks like. It moves the whole graph down four units.
See? Not so bad. We just followed the recipe.
The biggest mistake I see every year is with the horizontal shifts. People see x plus three and they want to move right. Please, please remember: inside is opposite. Plus three means left three. If you can remember that one rule, you are already way ahead of the game.
This skill is all about being a detective. Look for the clues, and apply the rules one step at a time. You can do this.
Horizontal shifts work in the opposite direction of the sign. You're looking for the x-value that makes the argument zero. `x = -4` makes `x+4` zero, so it's a shift to the left.
Remember the mantra "inside is opposite." A `+h` inside the parentheses means a shift in the negative direction (left).
The factor `b` inside the function causes a horizontal compression by `1/b`. The function's x-values are "sped up," so the graph completes its features in half the horizontal space.
Remember "inside is opposite" applies to scaling too. A multiplier `b` inside leads to a stretch/compression by `1/|b|`.
You haven't accounted for the horizontal compression. The shift is applied *after* the compression is factored out.
Always factor the coefficient of `x` out from the terms inside the function. `f(3x + 9)` becomes `f(3(x + 3))`. Now you can see it's a horizontal compression by `1/3` and a horizontal shift left by `3`.
The placement of the negative sign is critical. `-f(x)` negates the output (the y-value), causing a reflection over the x-axis. `f(-x)` negates the input (the x-value), causing a reflection over the y-axis.
Think about what is being made negative. If the whole function is negated, it's a vertical flip. If only the `x` is negated, it's a horizontal flip.
If a range is `[-2, 4]` and you apply a vertical stretch by `a=3`, you can't just stretch the width of the interval. You must multiply each endpoint by 3.
Multiply the upper and lower bounds of the range by the stretch factor `a`. The new range would be `[-2*3, 4*3]`, which is `[-6, 12]`. If there's a reflection, the interval might flip, so be careful.