# Transformations of graphs of functions

> IB Mathematics: Analysis and Approaches SL · Functions
> Source: https://www.owlsprep.com/study/ib-math-aa-sl-u2-transformations-of-graphs-of-functions/

This subtopic explains how shifts, stretches, and reflections of function graphs correspond to algebraic changes to a function's equation. You will learn to apply transformations to sketch graphs and find equations of transformed functions, a core exam skill.

**Prerequisites:** [Function notation and basic graphing](https://www.owlsprep.com/study/ib-math-aa-sl-u2-introduction-to-functions/); Graphs of common functions (quadratic, exponential, trigonometric)

## Learning objectives

- Identify the effect of single transformations on function graphs
- Combine multiple transformations of function graphs correctly
- Find the equation of a transformed function from an original graph
- Sketch transformed graphs given the original function

## Vertical Transformations

**Vertical Transformation** — Algebraic changes outside the function $f(x)$ modify the output $y$-value, resulting in transformation parallel to the $y$-axis.

*Notation:* Original function $y = f(x)$

*Example:* $y = 2f(x)$, $y = f(x) + 3$, $y = -f(x)$

All vertical transformations behave intuitively, matching the sign of the change. Adding a constant shifts the graph up, subtracting shifts it down. Multiplying by a constant greater than 1 stretches vertically, between 0 and 1 compresses vertically. Multiplying by $-1$ reflects over the $x$-axis.

**Worked example:** Original function is $f(x) = x^2$. Write the equation and describe the transformation for $y = 3f(x) - 2$.

1. 1. Identify transformations: the coefficient 3 outside $f(x)$ is a vertical stretch, the $-2$ is a vertical shift.
2. 2. Apply the vertical stretch by scale factor 3 parallel to the $y$-axis:
3. $$y = 3x^2$$
4. 3. Subtract 2 to apply the shift down 2 units:
5. $$y = 3x^2 - 2$$
6. Final result: original parabola stretched vertically by factor 3, then shifted down 2 units.

> **Exam tip:** Changes outside the $f(\cdot)$ bracket always affect the $y$-coordinate (vertical direction).

## Horizontal Transformations

**Horizontal Transformation** — Algebraic changes inside the function argument modify the input $x$-value, resulting in transformation parallel to the $x$-axis, opposite in direction to the sign.

*Notation:* Original function $y = f(x)$

*Example:* $y = f(2x)$, $y = f(x + 3)$, $y = f(-x)$

Horizontal transformations are counter-intuitive: adding a positive constant to $x$ shifts the graph left, subtracting shifts it right. Multiplying $x$ by a constant greater than 1 compresses horizontally by the reciprocal of the constant, between 0 and 1 stretches horizontally. Multiplying by $-1$ reflects over the $y$-axis.

> **tip**
>
> The easy rule to remember: *Inside is opposite, outside is same* for direction of shifts.

**Worked example:** Original function is $f(x) = \sin x$. Describe the transformation from $f(x)$ to $g(x) = \sin(2x - \frac{\pi}{3})$.

1. 1. Factorize the expression inside the sine function to isolate transformations of $x$:
2. $$2x - \frac{\pi}{3} = 2\left(x - \frac{\pi}{6}\right)$$
3. 2. Identify the two transformations: factor 2 inside gives horizontal compression, $-\frac{\pi}{6}$ gives a horizontal shift.
4. 3. First transformation: horizontal compression by scale factor $\frac{1}{2}$ parallel to the $x$-axis.
5. 4. Second transformation: horizontal shift to the right by $\frac{\pi}{6}$ units.

## Reflections

Reflections flip a graph over an axis, and are one of the simplest transformation types. There are two core reflections you need to know for IB exams:

- Reflection over the $x$-axis: $y = -f(x)$, flips the sign of all $y$-values, every point $(a,b)$ becomes $(a,-b)$
- Reflection over the $y$-axis: $y = f(-x)$, flips the sign of all $x$-values, every point $(a,b)$ becomes $(-a,b)$

**Worked example:** The point $(2, -3)$ lies on the graph of $y = f(x)$. Find the coordinates of the transformed point after reflection over the $y$-axis.

1. Reflection over the $y$-axis means the new function is $y = f(-x)$.
2. To get the original output $y$, set $-x = 2$, so $x = -2$.
3. The $y$-value stays unchanged, so $y = -3$.
4. Final transformed point is $(-2, -3)$.

## Combining Multiple Transformations

When applying more than one transformation, the order of application changes the final result. Follow this simple rule: always apply stretches and reflections first, then shifts. For transformations inside the function, factor the argument to correctly identify the order and size of each transformation.

> **mnemonic**
>
> Outside In, Stretch Shift: do everything outside the bracket after everything inside, do stretches/reflections before shifts for any axis.

**Worked example:** Starting from $y = x^2$, write the equation of the graph after: vertical stretch by factor 2, reflection over the $x$-axis, shift up 1 unit, shift left 3 units.

1. 1. Start with the original function, define $f(x) = x^2$.
2. 2. Apply vertical stretch by factor 2: $y = 2f(x) = 2x^2$.
3. 3. Apply reflection over $x$-axis: multiply by $-1$: $y = -2x^2$.
4. 4. Apply shift up 1 unit: add 1 outside the function: $y = -2x^2 + 1$.
5. 5. Apply shift left 3 units: replace $x$ with $(x + 3)$: $y = -2(x + 3)^2 + 1$.
6. If you shifted first then stretched, you get the incorrect result $y = -2(x+3)^2 + 2$, which has the wrong vertical shift.

**Check your understanding**

Check your understanding of order:

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

   - Shift left 1, stretch vertically by 2, shift down 3
   - Stretch vertically by 2, shift left 1, shift down 3
   - Shift down 3, shift left 1, stretch vertically by 2

   *Answer:* Stretch vertically by 2, shift left 1, shift down 3

   *Why:* Correct! The rule is: stretches/reflections first, then shifts, work from inside out, so horizontal shift before vertical transformations outside the bracket.

## Common pitfalls

- **Wrong:** Shifting $f(x)$ right by 2 units to get $f(x + 2)$
  - Why it fails: Horizontal shifts are opposite to the sign of the change inside the bracket.
  - Correct: Shifting right by 2 units gives $f(x - 2)$.
- **Wrong:** Writing $f(2x - 6)$ as $f(2(x - 6))$ and shifting right 6 units
  - Why it fails: You must factor out the coefficient of x to find the correct shift size.
  - Correct: Factor to get $f(2(x - 3))$, so the shift is right 3 units.
- **Wrong:** Applying vertical shift before vertical stretch, getting $y = 2f(x) + 6$ for 'stretch by 2, shift up 3'
  - Why it fails: Stretches must always be applied before shifts to avoid scaling the shift.
  - Correct: Apply stretch first: $y = 2f(x)$, then add shift: $y = 2f(x) + 3$.
- **Wrong:** Confusing reflections: writing $y = f(-x)$ for reflection over the x-axis
  - Why it fails: Negative sign outside affects y (x-axis reflection), negative inside affects x (y-axis reflection).
  - Correct: Reflection over x-axis is $y = -f(x)$, reflection over y-axis is $y = f(-x)$.
- **Wrong:** Calling $y = f(2x)$ a horizontal stretch by factor 2
  - Why it fails: The coefficient of x is the reciprocal of the horizontal scale factor.
  - Correct: $y = f(2x)$ is a horizontal compression by factor $\frac{1}{2}$; $y = f(\frac{x}{2})$ is a stretch by factor 2.

## Cheatsheet

| Transformation | Algebraic Form | Effect |
| --- | --- | --- |
| Vertical shift up $k$ | $y = f(x) + k$ | $(a,b) \to (a, b+k)$ |
| Vertical shift down $k$ | $y = f(x) - k$ | $(a,b) \to (a, b-k)$ |
| Horizontal shift left $k$ | $y = f(x + k)$ | $(a,b) \to (a-k, b)$ |
| Horizontal shift right $k$ | $y = f(x - k)$ | $(a,b) \to (a+k, b)$ |
| Vertical stretch by $k$ | $y = kf(x)$ | All $y$-values $\times k$ |
| Horizontal stretch by $k$ | $y = f(\frac{x}{k})$ | All $x$-values $\times k$ |
| Reflect over x-axis | $y = -f(x)$ | Flip over x-axis |
| Reflect over y-axis | $y = f(-x)$ | Flip over y-axis |

## What's next

Mastering transformations of graphs is a foundational skill you will use across the entire IB AA SL course. You will apply it when working with composite and inverse functions, writing quadratic functions in vertex form, and graphing transformed trigonometric functions. It also makes sketching unfamiliar functions for calculus problems much faster, and helps you interpret how changing parameters changes a function's behavior. This topic builds directly on core function concepts, and leads into more advanced graphing skills you will need for exam questions across both papers.

- [Composite and Inverse Functions](https://www.owlsprep.com/study/ib-math-aa-sl-u2-composite-and-inverse-functions/)
- [Linear functions and their graphs](https://www.owlsprep.com/study/ib-math-aa-sl-u2-linear-functions-and-their-graphs/)
- [Quadratic functions, roots and discriminant](https://www.owlsprep.com/study/ib-math-aa-sl-u2-quadratic-functions-roots-and-discriminant/)

---

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-aa-sl-u2-transformations-of-graphs-of-functions/
