# Transformations of functions

Canonical: https://duckyhelper.com/learn/algebra-2/function-transformations/
Updated: 2026-10-01

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

## 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\big(b(x - h)\big) + k
$$

**What each change does to the graph of y = f(x)**

| Change | Effect | Example with \(f(x) = x^2\) |
| --- | --- | --- |
| \(f(x) + k\) | Up k (down if k is negative) | \(x^2 + 3\): up 3 |
| \(f(x - h)\) | Right h (left if h is negative) | \((x - 3)^2\): right 3 |
| \(a\,f(x)\) | Vertical stretch by a (shrink if \(0 < a < 1\)) | \(4x^2\): 4 times as tall |
| \(f(bx)\) | Horizontal squeeze by \(\frac{1}{b}\) | \((2x)^2\): half as wide |
| \(-f(x)\) | Reflect over the x-axis | \(-x^2\): opens down |
| \(f(-x)\) | Reflect over the y-axis | \(2^{-x}\) mirrors \(2^x\) |

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

## Worked examples

**Example 1: describe the shifts**

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

1. Rewrite it in the \(f(x - h) + k\) pattern so the signs are clear.

   $$
   (x + 3)^2 - 5 = (x - (-3))^2 + (-5)
   $$
2. So \(h = -3\): the graph shifts left 3. And \(k = -5\): it shifts down 5.
3. The vertex of \(y = x^2\) is \((0, 0)\). Move it left 3 and down 5.

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

**Example 2: move a single point**

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

1. The inside change \(x - 1\) moves points right 1.

   $$
   2 + 1 = 3
   $$
2. The outside changes double the y value, then add 3.

   $$
   2 \cdot 6 + 3 = 15
   $$
3. Check: at \(x = 3\), \(2f(3 - 1) + 3 = 2f(2) + 3 = 2(6) + 3 = 15\).

Answer: \((3, 15)\)

**Example 3: build an equation from a description**

Problem: Start with \(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|
   $$
2. Stretch vertically by 3: multiply the output by 3.

   $$
   -3|x|
   $$
3. Shift right 2: replace x with \(x - 2\).

   $$
   -3|x - 2|
   $$
4. Shift up 4: add 4 outside.

   $$
   -3|x - 2| + 4
   $$

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

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

Problem: Describe how \(g(x) = \sqrt{-2x + 6}\) is built from \(f(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.

   $$
   \sqrt{-2x + 6} = \sqrt{-2(x - 3)}
   $$
2. Now read it as \(f(b(x - h))\) with \(b = -2\) and \(h = 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 \ge 0
   $$
4. Divide by \(-2\) and flip the sign.

   $$
   x \le 3
   $$
5. Check one point. \((4, 2)\) is on \(\sqrt{x}\). The rule sends it to \(\left(\frac{4}{-2} + 3, 2\right) = (1, 2)\), and indeed:

   $$
   \sqrt{-2(1) + 6} = 2
   $$

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

## Common mistakes

- **Moving the wrong way inside.** \((x + 3)^2\) moves left, not right. Fix: ask what x makes the inside zero. Here \(x = -3\), so the vertex moved to \(-3\).
- **Shifting before factoring.** \(\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)\), flips over the x-axis. A minus inside, \(f(-x)\), flips over the y-axis.
- **Thinking \(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) + 4\) moves up 4, but \(f(x + 4)\) moves left 4. Fix: watch where the parentheses close.

## Quick methods

> **Tip: Track one key point**
>
> Pick an easy point on the parent graph, like the vertex \((0, 0)\) of \(x^2\) or \((1, 1)\) of \(\sqrt{x}\), and move just that point with the rule \(\left(\frac{p}{b} + h,\ aq + k\right)\). It is fast, and it catches sign mistakes.

> **Note: Check with a graphing calculator**
>
> Graph the parent and your answer together in Desmos, with sliders for a, h and k if you want to watch each change. Use it to check your reasoning, not to replace it, since tests often ask you to describe the steps in words.

## Practice

**5 practice questions**

1. The graph of \(y = x^2\) is shifted 4 units left and 2 units down. What is the new equation?
   A. \(y = (x + 4)^2 - 2\)
   B. \(y = (x - 4)^2 - 2\)
   C. \(y = (x + 2)^2 - 4\)
   D. \(y = (x - 4)^2 + 2\)

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

2. The point \((-1, 5)\) is on the graph of \(y = f(x)\). Which point must be on the graph of \(y = f(x + 3) - 2\)?
   A. \((-4, 3)\)
   B. \((2, 3)\)
   C. \((-4, 7)\)
   D. \((2, 7)\)

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

3. Let \(f(x) = 2^x\) and \(g(x) = f(-x)\). How is the graph of g related to the graph of f?
   A. It is a reflection over the x-axis.
   B. It is a reflection over the y-axis.
   C. It is a shift 1 unit left.
   D. It is a 180 degree rotation about the origin.

   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) = -2^x\), and a 180 degree rotation would be \(-f(-x)\).

4. The point \((4, -2)\) is on the graph of \(y = f(x)\). Which point must be on the graph of \(y = f(2x)\)?
   A. \((2, -2)\)
   B. \((8, -2)\)
   C. \((4, -4)\)
   D. \((4, -1)\)

   Answer: \((2, -2)\). At \(x = 2\), \(f(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) = x^2 - 4x + 1\) and \(g(x) = f(x - 3) + 2\). What is the x-coordinate of the vertex of the graph of g?

   Answer: 5. The vertex of f is at \(x = -\frac{-4}{2} = 2\). The graph of g is f moved right 3 and up 2, so its vertex is at \(x = 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\), the bottom of the parabola happens when the inside is 0, which is at \(x = 3\) instead of \(x = 0\). So everything slides right 3.

### In what order should I apply transformations?

A safe order for \(a\,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 = x\), \(y = x^2\), \(y = x^3\), \(y = |x|\), \(y = \sqrt{x}\), \(y = 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)\), changes every y value, so it is vertical. Multiplying inside, \(f(3x)\), changes which x gives each y, so it is horizontal, and it squeezes by \(\frac{1}{3}\) rather than stretching by 3.

## Related

- [Inverse functions](https://duckyhelper.com/learn/algebra-2/inverse-functions/)
- [Completing the square](https://duckyhelper.com/learn/algebra-2/completing-the-square/)
- [Functions, function notation, domain and range](https://duckyhelper.com/learn/algebra-1/functions/)
- [Functions and function notation on the SAT](https://duckyhelper.com/learn/sat-math/functions/)
- [Algebra 2 study guides](https://duckyhelper.com/learn/algebra-2/)

## 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?"

## Get DuckyHelper

Free to start. The web app works in any browser, Chromebooks included; the Mac app can also draw on your real screen. [Try it free in your browser](https://app.duckyhelper.com/?utm_source=duckyhelper.com&utm_medium=learn) or [Get the Mac app](https://duckyhelper.com/download/)
