# Composite and inverse functions

> IB Mathematics Analysis and Approaches SL · Unit 2: Functions
> Source: https://www.owlsprep.com/study/ib-math-aa-sl-u2-composite-and-inverse-functions/

This sub-topic explains how to combine functions via composition and find inverses of one-to-one functions, including domain rules and graphical properties. These are core skills for nearly all function questions in IB AA SL exams.

**Prerequisites:** [Function notation, domain and range basics](https://www.owlsprep.com/study/ib-math-aa-sl-u2-introduction-to-functions/)

## Learning objectives

- Calculate the algebraic form of composite functions and state their domains
- Identify if a function is one-to-one and restrict domains to create invertible functions
- Find the inverse of a one-to-one function algebraically
- Describe the graphical relationship between a function and its inverse

## Composite Functions

**Composite Function** — A function where the output of $g(x)$ is used as the input for $f(x)$. Order matters, so $f \circ g \neq g \circ f$ in most cases.

*Notation:* f \circ g(x) = f(g(x))

*Example:* If $f(x) = x+2$ and $g(x) = x^2$, then $f(g(x)) = x^2 + 2$, while $g(f(x)) = (x+2)^2$

When finding the domain of a composite function, the domain is restricted by any restrictions on the inner function $g(x)$, and any restrictions on the outer function $f(x)$ that come from the output of $g(x)$.

**Worked example:** Given $f(x) = \sqrt{x+3}$ with domain $x \geq -3$, and $g(x) = 2x - 4$, find $f \circ g(x)$ and state its domain.

1. Substitute $g(x)$ into the input of $f$ to get the algebraic form:
2. $$f(g(x)) = f(2x - 4) = \sqrt{(2x - 4) + 3} = \sqrt{2x - 1}$$
3. Find the domain: $g(x)$ is linear so it has no domain restrictions. The expression inside the square root must be non-negative:
4. $$2x - 1 \geq 0 \implies x \geq \frac{1}{2}$$
5. Final result: $f \circ g(x) = \sqrt{2x - 1}$ with domain $x \geq \frac{1}{2}$

> **Exam tip:** Always check domain restrictions for composite functions: they are almost always worth one mark in exams, even if the question only asks for the function.

## Inverse Functions and One-to-One Condition

**One-to-One Function** — A function where every output corresponds to exactly one input. Graphically, a function is one-to-one if it passes the horizontal line test. Only one-to-one functions have inverse functions.

*Example:* $f(x) = 3x + 1$ is one-to-one; $f(x) = x^2$ is not one-to-one over all real numbers

If a function is not one-to-one over its natural domain, you can restrict the domain to create a one-to-one function that has an inverse. The range of the original function becomes the domain of the inverse function.

**Worked example:** Given $f(x) = x^2 - 6x$, $x \geq 3$, find $f^{-1}(x)$ and state its domain.

1. Start by writing $y = f(x)$, then swap $x$ and $y$ to prepare for the inverse:
2. $$x = y^2 - 6y$$
3. Complete the square to solve for $y$:
4. $$x = (y - 3)^2 - 9 \implies (y - 3)^2 = x + 9 \implies y - 3 = \pm \sqrt{x + 9}$$
5. The original domain is $x \geq 3$, so the range of $f(x)$ is $y \geq (3)^2 - 6(3) = -9$. This means the domain of $f^{-1}$ is $x \geq -9$, and since $y \geq 3$ for the inverse, we take the positive root:
6. $$y = 3 + \sqrt{x + 9}$$
7. Final result: $f^{-1}(x) = 3 + \sqrt{x + 9}$, domain $x \geq -9$

> **Exam tip:** Picking the correct sign after taking the square root for quadratic inverses is a common marking point, always reference the original domain to justify your choice.

## Graphical Relationship Between f and f⁻¹

Because finding an inverse swaps the $x$ and $y$ values of every point on the original function, the graph of $f^{-1}(x)$ is the reflection of the graph of $f(x)$ over the line $y = x$.

> **info**
>
> Any intersection between $f(x)$ and $f^{-1}(x)$ will always lie on the line $y = x$, unless $f(x)$ is symmetric about $y = x$ by definition.

**Worked example:** The graph of $f(x) = 2^{x+1}$ passes through $(0,2)$, has domain all real numbers, and has a horizontal asymptote at $y=0$. Sketch the key features of $f^{-1}(x)$.

1. Reflect all key features over $y=x$: the point $(0,2)$ on $f$ becomes $(2,0)$ on $f^{-1}$.
2. The horizontal asymptote $y=0$ on $f$ becomes a vertical asymptote $x=0$ (the y-axis) on $f^{-1}$.
3. The domain of $f$ becomes the range of $f^{-1}$, and the range of $f$ ($y>0$) becomes the domain of $f^{-1}$ ($x>0$).
4. Since $f$ is increasing, $f^{-1}$ is also increasing.

> **Exam tip:** If you are asked to sketch an inverse from a given graph of $f$, reflecting over $y=x$ is much faster than calculating the inverse algebraically.

## Common pitfalls

- **Wrong:** Reversing the order of composition, calculating $g(f(x))$ instead of $f(g(x))$ for $f \circ g$.
  - Why it fails: The notation is read left to right, leading many students to mix up which function is applied first.
  - Correct: Remember the inner function is closest to $x$: $f \circ g(x) = f(g(x))$, work from the inside out.
- **Wrong:** Confusing inverse function notation with reciprocal: assuming $f^{-1}(x) = \frac{1}{f(x)}$.
  - Why it fails: The $-1$ exponent looks like a reciprocal exponent, leading to this common mix-up.
  - Correct: Remember $f^{-1}$ is the inverse function that undoes $f$, while $(f(x))^{-1}$ is the reciprocal of $f(x)$.
- **Wrong:** Forgetting to state the domain of composite or inverse functions.
  - Why it fails: Students often focus only on finding the algebraic expression and overlook domain requirements that are marked separately.
  - Correct: Always add the domain to your final answer, even if the question does not explicitly ask for it.
- **Wrong:** Claiming a non-one-to-one function has an inverse without restricting the domain.
  - Why it fails: Many students forget the inverse only exists for one-to-one functions.
  - Correct: First check if the function passes the horizontal line test, and restrict the domain if necessary before finding the inverse.

## Cheatsheet

| Concept | Key Rule | Exam Note |
| --- | --- | --- |
| Composite $f \circ g$ | $f(g(x))$, inner function first | Order matters, always state domain |
| Domain of composite | Inner restrictions + outer restrictions | Worth 1 mark almost every time |
| Inverse exists if | Function is one-to-one (passes horizontal line test) | Restrict domain if needed |
| Find inverse algebraically | Swap $x$ and $y$, solve for $y$ | Pick correct sign for quadratics |
| Graph of inverse | Reflection of $f$ over $y=x$ | $(a,b) \to (b,a)$ on the inverse |

## What's next

Composite and inverse functions are foundational for nearly all后续 function topics in IB AA SL. The most direct application is with exponential and logarithmic functions, which are inverses of each other, so the skills you learned here will help you solve exponential and logarithmic equations later. You will also use inverse functions when working with cumulative distribution functions in the statistics unit, and domain restriction skills are critical for solving all types of functional equations that appear regularly in both paper 1 and paper 2.

- [Transformations of graphs of functions](https://www.owlsprep.com/study/ib-math-aa-sl-u2-transformations-of-graphs-of-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-composite-and-inverse-functions/
