# Transformations of graphs

> IB Mathematics: Applications and Interpretation HL · IB AI HL
> Source: https://www.owlsprep.com/study/ib-math-ai-hl-u2-transformations-of-graphs/

This subtopic covers single and combined transformations of function graphs, including translations, reflections, stretches and compressions. You will learn to write transformed equations and map key points between graphs.

**Prerequisites:** [Basic function notation and graphing](https://www.owlsprep.com/study/ib-math-ai-hl-u2-introduction-to-functions/)

## Learning objectives

- Identify the effect of each transformation on key graph features
- Write equations for graphs after single/combined transformations
- Map key points between original and transformed graphs
- Apply transformations to model real-world functions

## Translations of Graphs

**Translation** — A rigid transformation that shifts all points on the graph by the same distance in a fixed direction. It does not change the shape, size or orientation of the graph.

*Notation:* Vertical: $y = f(x) + k$, Horizontal: $y = f(x - h)$

*Example:* Shifting a parabola 2 units left and 3 units up

**Worked example:** Given $f(x) = x^2$, write the equation of $f(x)$ translated 3 units up and 2 units to the left. State the coordinates of the new vertex.

1. Recall the horizontal translation rule: shifting 2 units left means replacing $x$ with $x + 2$:
2. $$f(x+2) = (x+2)^2$$
3. A vertical translation 3 units up adds +3 outside the function:
4. Final equation is $y = f(x+2) + 3$:
5. $$y = (x+2)^2 + 3$$
6. Original vertex is $(0,0)$. Shifting left 2 and up 3 gives new vertex:
7. $$(-2, 3)$$

> **tip**
>
> Horizontal translations always go opposite the sign: $f(x + a)$ shifts left by $a$, $f(x - a)$ shifts right by $a$.

> **Exam tip:** Always confirm the direction of horizontal translations, they are the most common mistake on exam questions.

## Reflections of Graphs

**Reflection** — A transformation that flips a graph across a given line of reflection, producing a mirror image of the original graph.

*Notation:* Over x-axis: $y = -f(x)$, Over y-axis: $y = f(-x)$

**Worked example:** The original function $g(x) = e^x$ has a y-intercept at $(0,1)$ and horizontal asymptote $y=0$. Find the new intercept and asymptote after reflection over the x-axis.

1. Reflection over the x-axis multiplies all function values by -1, so the new function is:
2. $$y = -g(x) = -e^x$$
3. Substitute $x=0$ to find the new y-intercept:
4. $$y = -e^0 = -1$$
5. The asymptote $y=0$ remains unchanged because $-0 = 0$.
6. Final answer: intercept at $(0,-1)$, asymptote $y=0$

> **Exam tip:** Label which axis you are reflecting over to avoid mixing up the transformation rule.

## Stretches and Compressions

**Stretch / Compression** — A non-rigid transformation that resizes a graph proportionally along the x or y axis, changing the distance between points but not the overall shape.

*Notation:* Vertical stretch by $a$: $y = a f(x)$, Horizontal stretch by $b$: $y = f(\frac{x}{b})$

> **Memory Hook**
>
> Changes outside $f()$ affect y (vertical direction), changes inside $f()$ affect x (horizontal direction), and all changes inside are opposite the sign you expect.

**Worked example:** Given $h(x) = \sin x$, which has amplitude 1 and period $2\pi$, find the equation after a vertical stretch by factor 3 and a horizontal compression by factor 2. State the new amplitude and period.

1. Vertical stretch by factor 3 multiplies the entire function by 3:
2. $$y = 3 h(x)$$
3. A horizontal compression by factor 2 is equivalent to a horizontal stretch by $\frac{1}{2}$, so replace $x$ with $\frac{x}{1/2} = 2x$:
4. $$y = 3 \sin(2x)$$
5. New amplitude = 3 × original amplitude = 3, new period = original period × 1/2 = $\pi$

## Combined Transformations

When multiple transformations are applied, **order matters**. We always apply all transformations inside $f(x)$ (horizontal transformations) first, then stretches/compressions, then transformations outside $f(x)$ (vertical transformations), following the standard order of operations.

**Worked example:** Starting from $f(x) = x^2$, write the equation after shifting 1 unit right, stretching vertically by factor 2, then shifting 4 units down.

1. Step 1: Shift 1 unit right (inside $f(x)$ first): replace $x$ with $x-1$:
2. $$f(x-1) = (x-1)^2$$
3. Step 2: Stretch vertically by factor 2 (multiply by 2):
4. $$2(x-1)^2$$
5. Step 3: Shift 4 units down (vertical transformation last): subtract 4:
6. $$y = 2(x-1)^2 - 4$$
7. If we had done the shift before the stretch, we would get the incorrect result $y = 2(x-1)^2 - 8$.

**Check your understanding**

Test your understanding of order for combined transformations

1. What is the correct order of transformations to get $y = 3f(2x + 4) + 1$ from $y = f(x)$?

   - A. Shift left 4, horizontal stretch by $\frac{1}{2}$, vertical stretch by 3, shift up 1
   - B. Shift right 4, horizontal stretch by 2, vertical stretch by 3, shift up 1
   - C. Horizontal stretch by $\frac{1}{2}$, shift left 2, vertical stretch by 3, shift up 1

   *Why:* Correct! First factor out the coefficient of $x$ inside $f$: $y = 3f\left(2(x+2)\right) + 1$, so we handle the stretch first, then the shift.

> **Exam tip:** Always factor out the coefficient of $x$ inside $f(x)$ before identifying the horizontal shift, this will save you from common mistakes.

## Common pitfalls

- **Wrong:** Interpret $f(x + 3)$ as a shift 3 units right
  - Why it fails: Changes inside $f(x)$ are opposite the sign
  - Correct: $f(x + 3)$ shifts the graph 3 units left
- **Wrong:** Call $y = f(2x)$ a horizontal stretch by factor 2
  - Why it fails: Stretch rules are swapped for horizontal transformations
  - Correct: $y = f(2x)$ is a horizontal compression by factor 2 (stretch by $\frac{1}{2}$)
- **Wrong:** Apply vertical transformations before horizontal transformations
  - Why it fails: Order of operations requires handling inside the function first
  - Correct: Always apply all transformations inside $f(x)$ before transformations outside $f(x)$
- **Wrong:** Forget to scale all y-values for a vertical stretch, only scaling the leading term
  - Why it fails: Every point on the graph is stretched vertically, not just the curve shape
  - Correct: Multiply all y-coordinates, including intercepts, by the vertical stretch factor
- **Wrong:** Mix up reflection rules: $y = -f(x)$ is reflection over y-axis
  - Why it fails: Confusion between which coordinate is changed
  - Correct: $y = -f(x)$ flips the sign of y, so it is reflection over the x-axis

## Cheatsheet

| Transformation | Notation | Effect on $(x,y)$ |
| --- | --- | --- |
| $k$ units up vertical translation | $y = f(x) + k | $(x,y) \to (x, y+k)$ |
| $h$ units right horizontal translation | $y = f(x-h)$ | $(x,y) \to (x+h, y)$ |
| $h$ units left horizontal translation | $y = f(x+h)$ | $(x,y) \to (x-h, y)$ |
| Reflection over x-axis | $y = -f(x)$ | $(x,y) \to (x, -y)$ |
| Reflection over y-axis | $y = f(-x)$ | $(x,y) \to (-x, y)$ |
| Vertical stretch by factor $a$ | $y = a f(x)$ | $(x,y) \to (x, ay)$ |
| Horizontal stretch by factor $b$ | $y = f(x/b)$ | $(x,y) \to (bx, y)$ |

## What's next

Transformations of graphs are a foundational tool for all function work in IB AI HL. You will use them constantly when working with trigonometric, exponential and logarithmic models for real-world data, when sketching graphs for optimisation, and when solving inverse function problems. Mastery of transformations will save you time on both paper 1 and paper 2 exam questions, and is essential for internal assessment modelling tasks.

- [Quadratic functions: roots, vertices, inequalities](https://www.owlsprep.com/study/ib-math-ai-hl-u2-quadratic-functions-roots-vertices-inequalities/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-ai-hl-u2-transformations-of-graphs/
