Composite & Inverse Functions (AA HL)
Composite functions chain two functions together, feeding the output of one into the input of another. Inverse functions reverse a single function, undoing whatever it did. This topic covers building and evaluating composites in the correct order, finding an inverse algebraically, matching domains and ranges between a function and its inverse, and recognising the special case where a function is its own inverse.
What the syllabus says
This topic maps onto two points in the official IB Analysis & Approaches syllabus - one from the core content shared with SL, one HL-only extension.
| Code | Syllabus content |
|---|---|
| SL2.5 | Composite functions \((f\circ g)(x)=f(g(x))\). The identity function. Finding the inverse function \(f^{-1}(x)\), including the existence of an inverse for one-to-one functions. Link to the inverse function as a reflection in the line \(y=x\). |
| AHL2.14 | Odd and even functions, including periodic functions. Finding the inverse function \(f^{-1}(x)\), including domain restriction. Self-inverse functions. |
SL2.5 is core AA content examinable at both SL and HL; AHL2.14 (domain restriction and self-inverse functions) is HL-only.
Key terms
Five words worth knowing cold before you touch the formulas below - each with a worked example showing exactly what it means.
What is a composite function?
A composite function applies one function to the output of another. \((f\circ g)(x)=f(g(x))\) means "do \(g\) first, then \(f\)." Order matters - \((f\circ g)(x)\) is generally different from \((g\circ f)(x)\), so always compose in the order the notation gives, working from the inside out.
e.g. \(f(x)=2x+1,\ g(x)=x^2\): \((f\circ g)(3)=f(9)=19\).
What is an inverse function?
An inverse function \(f^{-1}\) reverses what \(f\) does: if \(f(a)=b\) then \(f^{-1}(b)=a\). Graphically, \(f^{-1}\) is the reflection of \(f\) in the line \(y=x\). An inverse only exists as a function when \(f\) is one-to-one, so every output comes from exactly one input.
e.g. \(f(x)=3x-4\Rightarrow f^{-1}(x)=\dfrac{x+4}{3}\); \(f(5)=11\), \(f^{-1}(11)=5\).
How do you find the domain of a composite function?
To compose \((f\circ g)(x)\), first find the range of \(g\), since that becomes the set of inputs going into \(f\). Then check that range fits inside \(f\)'s own domain - any \(x\)-value that would push \(g(x)\) outside \(f\)'s domain has to be excluded from the composite's domain.
e.g. \(f(x)=\dfrac1x\), \(g(x)=x-3\): \(x=3\) must be excluded, since \(g(3)=0\) is undefined in \(f\).
Why must a function be one-to-one to have an inverse?
If two different inputs give the same output, reversing the process is ambiguous - \(f^{-1}\) wouldn't know which input to return. The horizontal line test checks this on a graph: if any horizontal line crosses the graph more than once, \(f\) has no inverse function over that whole domain.
e.g. \(f(x)=x^2\) sends both \(2\) and \(-2\) to \(4\), so \(f^{-1}(4)\) isn't a single value unless the domain is restricted, e.g. to \(x\ge0\).
What does self-inverse mean?
A function is self-inverse if applying it twice returns the original input: \((f\circ f)(x)=x\) for every \(x\) in its domain. Graphically, a self-inverse function's graph is symmetric about the line \(y=x\). Functions of the form \(f(x)=\dfrac{ax+b}{cx-a}\) are commonly self-inverse.
e.g. \(f(x)=\dfrac1x\) is self-inverse: \(f(2)=0.5\), \(f(0.5)=2\).
Key formulas
This topic is mostly definitional rather than formula-driven - none of it appears on the formula booklet, so the definitions below need to be secure from memory.
Formula reference
None of these are printed in the official formula booklet - composite and inverse functions are examined as concepts and notation you're expected to know, not formulas you look up.
| Formula | Used for | Booklet? |
|---|---|---|
| \((f\circ g)(x) = f(g(x))\) | Composite function notation | Not in booklet |
| \((f^{-1}\circ f)(x) = (f\circ f^{-1})(x) = x\) | Definition of an inverse function | Not in booklet |
| Domain of \(f^{-1}\) = Range of \(f\) | Domain/range swap when inverting | Not in booklet |
| \(y=f^{-1}(x) \iff x=f(y)\) | Method for finding an inverse algebraically | Not in the formula booklet - prior knowledge |
Composite vs inverse
These two ideas share a superscript-like notation but do opposite jobs - this table keeps them straight.
| Feature | Composite \((f\circ g)(x)\) | Inverse \(f^{-1}(x)\) |
|---|---|---|
| What it does | Chains two different functions | Reverses a single function |
| How to find it | Substitute \(g(x)\) into every \(x\) in \(f\) | Swap \(x\) and \(y\) in \(y=f(x)\), solve for \(y\) |
| Order matters? | Yes - \(f\circ g \ne g\circ f\) in general | N/A - only one function involved |
| Requires? | Range of the inner function inside the outer function's domain | \(f\) must be one-to-one (or restricted to be) |
| Graph link | A new graph built from chained outputs | Reflection of \(y=f(x)\) in \(y=x\) |
Working with composite functions
Composing is a substitution exercise - the skill is doing it in the right order and simplifying carefully.
Substitute inside out
\[(f\circ g)(x) = f(g(x))\]
Work out \(g(x)\) first, then put that whole expression everywhere \(x\) appears in \(f\).
Not in the formula booklet - prior knowledgeOrder matters
\[f\circ g \ne g\circ f\ \text{(usually)}\]
Read the notation right to left: \((f\circ g)(x)\) means "\(g\) acts on \(x\) first."
Not in the formula booklet - prior knowledgeDomain restrictions
\[\text{range}(g)\subseteq \text{domain}(f)\]
Any \(x\) that sends \(g(x)\) outside \(f\)'s domain must be excluded from the composite.
Not in the formula booklet - prior knowledgeFinding an inverse function
The algebraic method for finding \(f^{-1}(x)\) is the same three-step process every time, regardless of how complicated \(f\) looks.
Swap and solve
\[y=f(x)\ \to\ x=f(y)\ \to\ y=\dots\]
Write \(y=f(x)\), swap \(x\) and \(y\), then rearrange to isolate the new \(y\).
Not in the formula booklet - prior knowledgeReflection in \(y=x\)
\[f^{-1}\text{'s graph} = \text{reflect } f \text{ in } y=x\]
Swapping \(x\) and \(y\) algebraically is the same move as reflecting the graph in the line \(y=x\).
Not in the formula booklet - prior knowledgeSelf-inverse functions
\[(f\circ f)(x)=x\]
If composing \(f\) with itself gives back \(x\), then \(f=f^{-1}\) and the graph is symmetric about \(y=x\).
Not in the formula booklet - prior knowledgeWorked examples
Two full exam-style questions, marked exactly like the real thing. Try each one yourself before checking the worked solution.
Let \(f(x)=x+4\) and \(g(x)=x^2\).
(a) Find \((g\circ f)(x)\).
(b) Find \((f\circ g)(x)\).
(c) Find \((g\circ f)(1)\).
(d) Find \((f\circ g)(1)\).
Worked solution
(a) \(g(f(x))=(x+4)^2.\) A1
(b) \(f(g(x))=x^2+4.\) A1
(c) \((1+4)^2=25.\) A1
(d) \(f(g(1))=f(1)=5.\) A1
\(f(x)=e^{x}+2,\ x\in\mathbb R.\)
(a) State the range of \(f.\)
(b) Find \(f^{-1}(x)\) and its domain.
Worked solution
(a) \(e^x>0\) for all real \(x\), so \(f(x)\) R1
\(=e^x+2>2.\) Range \((2,\infty).\) A1
(b) Set \(y=e^x+2\Rightarrow e^x=y-2.\) M1
\(\Rightarrow x=\ln(y-2).\) A1
Hence \(f^{-1}(x)=\ln(x-2),\quad x>2,\) A1
the domain being the range of \(f.\) A1
Common mistakes
The four slip-ups that account for most of the marks lost on this topic - worth reading before you start practising, not just after you get one wrong.
- Composing in the wrong order. \((f\circ g)(x)\) means "\(g\) first, then \(f\)" - working it out the other way round gives a completely different expression from \((g\circ f)(x)\).
- Writing \(f^{-1}(x)\) as \(\dfrac{1}{f(x)}\). The \(-1\) in \(f^{-1}\) is inverse-function notation, not a power - it never means "reciprocal of \(f\)".
- Forgetting to restrict the domain before inverting. A many-to-one function like \(f(x)=x^2\) has no inverse over its full domain; you must restrict to \(x\ge0\) (or \(x\le0\)) first.
- Stating the inverse but not its domain. The domain of \(f^{-1}\) equals the range of \(f\), not the domain of \(f\) - this is worth its own mark and is easy to skip.
Using your GDC
There's no dedicated calculator menu for composing or inverting functions - the two guides normally indexed for this topic (inverse normal probabilities, matrix equation-solving) don't actually apply here. Your GDC is best used to verify an inverse or composite you've already found algebraically.
A quick way to catch an algebra slip before you commit to an answer, on any calculator model.
- To check \((f\circ g)(x)\): store a value of \(x\), evaluate \(g(x)\) first, then feed that result into \(f(\ )\) - this substitution method works identically on every model.
- To spot-check a claimed inverse: evaluate \(f\) at a chosen \(x\), then evaluate your \(f^{-1}\) at that output - you should get back your original \(x\).
- Use the graphing screen to plot \(y=f(x)\), \(y=f^{-1}(x)\) and \(y=x\) together - a correct inverse looks like a mirror image of \(f\) across that line.
Tip: There's no shortcut button for "find the inverse" - use your GDC to verify an inverse you've derived by hand, not to generate one from scratch.
See the full GDC guide for more calculator models and topics.
Ready to practise properly?
Composite & inverse functions questions, marked instantly like the real exam.
Quick answers
The questions students on this topic ask most often.
What's the difference between a composite function and an inverse function?
A composite function chains two different functions together - \((f\circ g)(x)\) applies \(g\) first, then \(f\). An inverse function reverses a single function so that \(f^{-1}(f(x)) = x\). They use similar-looking notation but do very different jobs.
Why is \((f\circ g)(x)\) usually different from \((g\circ f)(x)\)?
Because composition applies the functions in a specific order, and most functions don't commute. Changing the order changes which function's rule acts on the raw input first, so you generally get a different resulting expression.
Does every function have an inverse?
No - only one-to-one functions have an inverse that is itself a function. A many-to-one function like \(f(x) = x^2\) needs its domain restricted (e.g. to \(x \ge 0\)) before an inverse can be defined.
How do I find the domain of \(f^{-1}(x)\)?
The domain of \(f^{-1}\) always equals the range of \(f\). Work out the range of the original function first, then that becomes the domain you state for the inverse.
Sub-topics
Composite & Inverse Functions broken down into its individual skills, each with its own focused page.
Related topics
More Functions topics from the same AA HL syllabus unit, in case you want to keep going.