Free for students · Ad-free · WCAG 2.1 AA Compliant · Accessibility

Transformations of Functions

Lesson ~14 min read 8 MCQs

In simple terms: In simple terms, function transformations are about taking a basic graph and sliding, stretching, squishing, or flipping it to create new, related graphs.

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.

Visualizing how a parent function transforms into a new function through shifts, stretches, and reflections.

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)];
This diagram shows a flowchart for applying function transformations. It starts with a parent function and follows the order of operations: horizontal shift, horizontal stretch/reflection, vertical stretch/reflection, and finally vertical shift.

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 k is positive, the graph shifts up. g(x) = x^2 + 3 moves the parabola up 3 units. The new vertex is at (0, 3).
  • If k is negative, the graph shifts down. g(x) = x^2 - 4 moves 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 by h units.
  • If you see x - h (e.g., g(x) = (x - 5)^2), the graph shifts right by h units.
  • For (x + 2)^2, you'd need x = -2 to make the inside zero. The vertex moves from x=0 to x=-2. That's a shift to the left.
  • For (x - 5)^2, you'd need x = 5 to make the inside zero. The vertex moves to x=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 Stretch
    If |a| > 1 (e.g., a=3 or a=-3), the graph is stretched vertically. g(x) = 3x^2 makes the parabola appear "skinnier" because every y-value is tripled.
  • Vertical Compression
    If 0 < |a| < 1 (e.g., a=0.5 or a=-0.5), the graph is compressed vertically. g(x) = 0.5x^2 makes the parabola appear "wider" because every y-value is halved.
  • Reflection over the x-axis
    If a is negative, the graph flips upside down over the x-axis. g(x) = -x^2 turns our "U" shape into an upside-down "U". g(x) = -3x^2 would 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 Compression
    If |b| > 1 (e.g., b=2), the graph is compressed horizontally by a factor of 1/|b|. The function g(x) = (2x)^2 squishes the graph toward the y-axis. It gets steeper, faster.
  • Horizontal Stretch
    If 0 < |b| < 1 (e.g., b=0.5), the graph is stretched horizontally by a factor of 1/|b|. The function g(x) = (0.5x)^2 stretches the graph away from the y-axis, making it look wider.
  • Reflection over the y-axis
    If b is negative, the graph flips sideways over the y-axis. For f(x) = x^2, you wouldn't notice this because it's already symmetric. But for a function like f(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:

  1. h: Horizontal shift (remember, x-h is a shift right)
  2. b: Horizontal stretch/compression (by 1/b) and/or y-axis reflection.
  3. a: Vertical stretch/compression and/or x-axis reflection.
  4. 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 (h and b) affect the domain. If you shift the graph left or stretch it horizontally, the set of possible x-values might change.
  • Vertical transformations (k and a) 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.

Example 1

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|.

  1. 1
    Identify the parameters
    • a = -1/2
    • h = -3 (because the form is x-h and we have x+3, which is x - (-3))
    • k = -4
  2. 2
    Translate parameters into transformations
    • Horizontal Shift (h): The +3 inside the absolute value bars corresponds to h = -3. This means the graph shifts left by 3 units.
    • Vertical Dilation & Reflection (a): The a = -1/2 does two things. The negative sign tells us there is a reflection over the x-axis. The 1/2 tells us there is a vertical compression by a factor of 1/2. This will make the "V" shape wider.
    • Vertical Shift (k): The -4 outside the function tells us the graph shifts down by 4 units.

Final Description: To get the graph of g(x) from f(x), you would:

  1. Shift the graph of |x| left 3 units.
  2. Vertically compress it by a factor of 1/2.
  3. Reflect it over the x-axis.
  4. 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).
Example 2

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:

  1. 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 b must be negative. So, b = -2. The inside of our new function will be f(-2x).
    • "Vertical shift up by 7 units": This is a +k outside the function, so k = 7.
    • Combining these, we get: g(x) = f(-2x) + 7.
  2. Determine the new domain:

    • The domain is affected by horizontal transformations. Our original domain is -10 <= x <= 10.
    • The transformation is applied to the x inside the function. So, we need to find the new bounds for x such that the input to f, 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.
  3. Determine the new range:

    • The range is affected by vertical transformations. Our original range is [0, 5], or 0 <= 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].

Final Answer: The new function is g(x) = f(-2x) + 7, its domain is [-5, 5], and its range is [7, 12].

Visualizing the transformations from f(x)=|x| to g(x) = -1/2 * |x + 3| - 4.

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!

Visualizing the transformations from f(x)=sqrt(x) to g(x) = -sqrt(x+4)+1.