Functions · AA SL & HL
Composite and inverse functions
Apply functions in the right order, track domains, and reverse a one-to-one function without losing restrictions.
Course focus: AA SL & HL: shared methods are taught first. Sections labelled HL extension go beyond SL requirements.
Before you start: Function notation, algebra and solving equations.
Build it from the beginning
A function takes an input and produces an output. Combining functions means feeding one output into the next rule. Reversing a function means recovering the original input, which is possible only when the output identifies one permitted input.
A first walkthrough
For \(f(x)=2x+1\) and \(g(x)=x^2\), compare the orders at \(x=3\).
- First \(g(3)=9\), then \(f(9)=19\).
- In the other order, \(f(3)=7\), then \(g(7)=49\).
- Thus \(f(g(3))=19\) but \(g(f(3))=49\); order matters.
The foundations behind the method
Understand what the symbols mean
A function assigns one output to each input in its domain. A composition feeds one function's output into another, so order matters. An inverse reverses that assignment and is a function only when outputs identify unique inputs. Restricting a domain can turn a many-to-one rule into a one-to-one function.
How the ideas connect
To find a composite domain, first require x to lie in the inner function's domain, then require its output to lie in the outer function's domain. To find an inverse, exchange input and output roles and solve, retaining the original restrictions. Domain and range swap under inversion.
Start with the idea
Build your understanding
A composition is a chain of operations; an inverse reverses a valid input-output pairing. Draw the input travelling through the first rule and into the second. This exposes domain restrictions that a simplified final expression can hide.
Order of operations
In \(f\circ g\), the input enters g first. Different orders generally produce different expressions and different valid inputs.
One-to-one requirement
A function can have an inverse function only when each output identifies one input. Restricting a domain can make a previously many-to-one rule invertible.
Compare the approaches
Choose by the information in the question, rather than the formula you recognise first.
Composite domain
When it helpsRequire the first output to belong to the second domain.
Check before using itA cancelled factor does not restore an excluded original input.
Inverse domain
When it helpsUse the original range as the inverse’s domain.
Check before using itChoose the branch required by the original input restriction.
Your method plan
- Write the operation chain in the correct order.
- Track the valid inputs at each stage.
- For an inverse, exchange inputs and outputs and preserve the range restriction.
Learn the methods
Learn step by step
1. Inputs and outputs
f(x) means the output of f for input x; it is not multiplication. A composite f∘g applies g first and then f. The output of the inner function must be in the domain of the outer one. Write the intermediate expression before simplifying so the order is clear.
A composite is an ordered journey
Composition
Why this formula works
Composition means sending the inner output to the outer input. Replacing x in f’s rule by g(x) captures that two-stage process; changing the order usually changes the result.
\((f\circ g)(x)=f(g(x))\).
Quick example
If \(f(x)=x+2\) and \(g(x)=3x\), then \(f(g(1))=5\) but \(g(f(1))=9\).
Worked example: Order matters
Let \(f(x)=2x+1\) and \(g(x)=x^{2}\). Find f(g(x)) and g(f(x)).
- For f∘g, first square x: \(f(x^{2})=2x^{2}+1\).
- For g∘f, first form \(2x+1\): \(g(2x+1)=(2x+1)^{2}\).
- These are generally different. Composition is not commutative.
2. What an inverse does
An inverse reverses a function: \(f^{-1}(f(x))=x\) on the appropriate domain. It exists as a function only if f is one-to-one on the domain chosen. A parabola on all real x is not one-to-one; restricting to one side of the vertex makes it invertible.
Inverse domains
Why this formula works
An inverse accepts the original outputs and returns the original inputs. Therefore its input set is the original range, and its output set is the original domain. A one-to-one restriction prevents two competing outputs.
\(\operatorname{dom}(f^{-1})=\operatorname{range}(f)\) \(\operatorname{range}(f^{-1})=\operatorname{dom}(f)\).
Quick example
If \(f(x)=x^{2}\) is restricted to \(x\ge 0\), its range is \(y\ge 0\) and its inverse is \(\sqrt{x}\) on \(x\ge 0\), not ±\(\sqrt{x}\).
3. Find an inverse
Write \(y=f(x)\), solve for x in terms of y, then interchange variable names. The inverse’s domain is the original range, and its range is the original domain. When solving a square, the original domain tells you which root sign to choose.
Worked example: A restricted quadratic inverse
Find the inverse of \(f(x)=(x-2)^{2}+1\) for \(x\ge 2\).
- Its range is \(y\ge 1\). Solve \(y-1=(x-2)^{2}\).
- Because \(x-2\ge 0\), choose \(x=2+\sqrt{y-1}\), not the negative branch.
- Thus \(f^{-1}(x)=2+\sqrt{x-1}\), with \(x\ge 1\) and range \(y\ge 2\).
4. Graph and notation
The inverse graph is the reflection of the original graph in \(y=x\). The notation \(f^{-1}(x)\) is an inverse function, not \(\frac{1}{f}(x)\). Check a proposed inverse by composing it with f and verifying the domain conditions.
Inverse check
Why this formula works
Applying an operation and its inverse must restore the starting value, but only on their legitimate domains. These compositions test both the algebra and the chosen branch.
\(f^{-1}(f(x))=x\) and \(f(f^{-1}(y))=y\), on their valid domains.
Quick example
For \(f(x)=2x-3\) and \(f^{-1}(x)=\frac{x+3}{2}\), \(f^{-1}(f(x))=(2x-3+3)/2=x\).
5. Test functions and distinguish domain, range and codomain
A function must assign exactly one output to every allowed input. Different inputs may share an output, so the vertical-line test establishes “function” while the horizontal-line test concerns one-to-one behaviour. The domain is the allowed input set; the range is the set actually attained. A declared codomain is a permitted output set and can be larger than the range. An inverse defined on the whole codomain needs both one-to-one behaviour and every codomain value to be reached; otherwise restrict it to the range.
Test functions and distinguish domain, range and codomain
Why this formula works
An inverse must reverse an assignment uniquely. If two inputs share one output, reversing creates two competing outputs. If a declared output is never reached, there is no original input for the inverse to return.
For \(f:A\to B\), range(f)⊆B. An inverse function on B requires f to be one-to-one and onto B.
Quick example
\(f(x)=x^{2}\) on all real numbers is a function but not one-to-one. Restricting to \(x\ge 0\) and outputs \(y\ge 0\) gives the inverse \(\sqrt{x}\).
Worked example: A relation and its inverse
Consider the relation {(1,2),(2,4),(3,4)}. Is it a function, and does its inverse relation define a function?
- Each original input has one output, so the relation is a function.
- The output 4 is shared by inputs 2 and 3, so the function is not one-to-one.
- The inverse relation contains \((4,2)\) and \((4,3)\); its input 4 would have two outputs. Therefore it is not a function.
6. Calculate a composite domain before simplifying
Both stages of a composition must be defined. First require x to lie in the inner domain, then require its output to lie in the outer domain. A square root permits zero, a log requires strict positivity and a denominator excludes zero. Simplification may hide a restriction, so return to the original two-stage rules. State the final domain as an intersection of all the required conditions.
Calculate a composite domain before simplifying
Why this formula works
For f(g(x)), g must first produce a real allowed output; f must then accept it. This is a condition on the actual intermediate value, not on the two original input domains separately.
\(\operatorname{dom}(f\circ g)=\{x\in\operatorname{dom}g:g(x)\in\operatorname{dom}f\}\).
Quick example
If \(f(u)=\sqrt{u}\) and \(g(x)=x-5\), then \(f(g(x))=\sqrt{x-5}\) requires \(x\ge 5\).
Worked example: Different composition orders, different domains
Let \(f(x)=\frac{1}{x-1}\) and \(g(x)=\sqrt{x}\). Find f∘g and g∘f with their real domains.
- \(f(g(x))=\frac{1}{\sqrt{x}-1}\): require \(x\ge 0\) and \(\sqrt{x}\ne 1\), giving [0,∞) excluding 1.
- \(g(f(x))=\sqrt{\frac{1}{x-1}}\): the inner fraction needs \(x\ne 1\) and the root requires \(\frac{1}{x-1}\ge 0\).
- The latter is positive only for \(x>1\), so the second domain is (1,∞). The orders do not share the same domain.
7. Piecewise rules and endpoint ownership
A piecewise function selects its formula according to the input interval. Choose the branch before substituting. A boundary should be assigned unambiguously: open and closed endpoint symbols determine which rule owns it. A piecewise function may jump and still be a function, because uniqueness of output does not require continuity. To decide if it has an inverse, check whether different branches produce repeated outputs, not just whether each branch is individually one-to-one.
Piecewise rules and endpoint ownership
Why this formula works
The function definition promises one output for every allowed input. The branch conditions implement that promise. Overlapping conditions with conflicting boundary values violate it; gaps leave those inputs outside the domain unless another rule assigns them.
For \(f(x)=x+1\) if \(x<0\) and \(f(x)=x^2\) if \(x\ge 0\), the second branch owns \(x=0\).
Quick example
This f has \(f(-2)=-1\), \(f(0)=0\) and \(f(2)=4\). Its jump at zero does not give zero two outputs.
Worked example: Check invertibility across branches
For that piecewise f, explain why there is no inverse function on its full domain, then give an invertible restriction.
- \(f(-1)=0\) from the linear branch and \(f(0)=0\) from the quadratic branch.
- Two inputs give the same output, so reversing the full function would make inverse input 0 ambiguous.
- Restrict to \(x\ge 0\): the function becomes \(x^{2}\) with range \(y\ge 0\) and inverse \(\sqrt{x}\) on nonnegative inputs.
Quick formula reference
For revision once you understand the methods above. Check the conditions before using a formula.
Inverse domains
\(\operatorname{dom}(f^{-1})=\operatorname{range}(f)\); \(\operatorname{range}(f^{-1})=\operatorname{dom}(f)\).
Return to the explanation →Inverse check
\(f^{-1}(f(x))=x\) and \(f(f^{-1}(y))=y\), on their valid domains.
Return to the explanation →Test functions and distinguish domain, range and codomain
For \(f:A\to B\), range(f)⊆B. An inverse function on B requires f to be one-to-one and onto B.
Return to the explanation →Calculate a composite domain before simplifying
\(\operatorname{dom}(f\circ g)=\{x\in\operatorname{dom}g:g(x)\in\operatorname{dom}f\}\).
Return to the explanation →Piecewise rules and endpoint ownership
For \(f(x)=x+1\) if \(x<0\) and \(f(x)=x^2\) if \(x\ge 0\), the second branch owns \(x=0\).
Return to the explanation →Learn to diagnose an error
Spot the mistake
The statement below is incorrect. Identify the missing condition or reasoning before opening the explanation.
The inverse of \(f(x)=x^2\) on all real numbers is \(\sqrt{x}\).
Explain and repair the mistake
The original function is not one-to-one: 2 and -2 both give 4. Restrict to \(x\ge0\) to obtain inverse \(\sqrt{x}\); restricting to \(x\le0\) gives inverse \(-\sqrt{x}\).
Connect and apply
Put the ideas together
A more demanding application of this guide’s methods. This is a learning stage; any additional HL content is labelled separately.
One formula, two inverse branches
Find the inverse of \(f(x)=(x-1)^2+2\) when \(x\ge1\).
- The original range is \(y\ge2\). Write \(y-2=(x-1)^2\).
- The domain says \(x-1\ge0\), so take the nonnegative root: \(x=1+\sqrt{y-2}\).
- Thus \(f^{-1}(x)=1+\sqrt{x-2}\), with domain \(x\ge2\) and range \(y\ge1\).
- Using a plus-or-minus sign would give two outputs for many inputs. If the original domain were instead \(x\le1\), the inverse would use the negative branch.
Why does the inverse not have all real inputs?
Check your reasoning
Its inputs are outputs of the original function. The original cannot produce values below 2, so the inverse cannot accept them.
Common mistakes and how to avoid them
- Apply the rightmost function first.
- An inverse is not a reciprocal.
- Choose the root branch using the original domain.
Practise independently
Build confidence, then apply it
Try each question before opening its hint or solution. If a method is new, return to the walkthrough, then try again. These learning stages describe the practice sequence; additional HL content is labelled separately.
- 1
Build confidence
Find the inverse of \(f(x)=4x-3\).
Need a starting point?
Undo subtraction, then multiplication.
Show the worked solution
- Write \(y=4x-3\) and solve: \(x=(y+3)/4\).
- Therefore \(f^{-1}(x)=(x+3)/4\).
- 2
Apply and explain
Why does \(f(x)=x^2\) on all real inputs have no inverse function?
Need a starting point?
Compare inputs 2 and -2.
Show the worked solution
- Both produce the output 4.
- The output cannot identify one input. Restricting to \(x\ge0\) makes the inverse \(\sqrt{x}\) possible.
- 3
Check your understanding
If \(f(x)=2x+1\) and \(g(x)=x^2\), compare \(f(g(2))\) and \(g(f(2))\).
Show the worked solution
They are \(f(4)=9\) and \(g(5)=25\). Compositions cannot generally be reordered.
- 4
Use the method
Find the inverse of \(f(x)=3x-4\) on the real numbers.
Show the worked solution
From \(y=3x-4\), \(x=\frac{y+4}{3}\). Hence \(f^{-1}(x)=(x+4)/3\), with all real inputs.
- 5
Combine the skills
Test functions and distinguish domain, range and codomain
Does a circle \(x^{2}+y^{2}=9\) define y as a function of x on −\(3\le x\le 3\)?
Show the worked solution
No: most x-values correspond to two y-values. Choosing an upper or lower semicircle would define a function.
- 6
Combine the skills
Calculate a composite domain before simplifying
Find the domain of \(\ln (\sqrt{x-2})\).
Show the worked solution
The root requires \(x\ge 2\), but the log requires the root to be positive. Thus \(x>2\), excluding the root’s zero at 2.
- 7
Combine the skills
Piecewise rules and endpoint ownership
Why would defining \(x+1\) for \(x\le 0\) and \(x^{2}\) for \(x\ge 0\) be a problem at zero?
Show the worked solution
Both conditions include zero, but the first gives 1 and the second 0. The rule would assign two different outputs to the same input unless one boundary condition were changed.
Finished? Use the linked question bank below to practise selecting the method without a guide telling you which rule to use.
Using these methods in exam questions
AA Paper 1
No calculatorPractise the algebra and exact values by hand. Keep fractions, surds and multiples of π exact where required. Show the steps that justify the result.
AA Paper 2
GDC requiredUse graphing, numerical solving or statistical tools when appropriate. Write the setup before giving the output, and keep extra precision until the final answer.
For this topic: Label axes, intercepts and relevant asymptotes. For a numerical root, state the equation and search interval; a graph window that misses an intersection is not evidence that no solution exists.
Paper 3: build a connected argument
Both AA HL and AI HL Paper 3 contain two extended problem-solving questions. A question develops a theme, so keep useful earlier results, test small cases and explain any proposed general rule. A calculator pattern can suggest a result; your mathematical reasoning must support it.
- Identify what the first part establishes and record the conditions under which it holds.
- When a later part introduces a new definition or model, connect it to methods you already know rather than assuming a new formula must have been memorised.
- Check the conclusion against an earlier numerical case and explain its meaning or limitation.
For the first-assessment-2021 courses. IB assessment reference ↗
Combine the skills
These questions need more than one step. Check all cases and justify why your answers are valid.
Let \(f(x)=2+\sqrt{x-1}\) and \(g(x)=\frac{1}{x-3}\). Find the domain of f∘g, the inverse of f with its domain, and explain why reversing the composition can change its domain.
Show complete reasoning
\(f(g(x))=2+\sqrt{\frac{1}{x-3}-1}\). Require \(\frac{4-x}{x-3}\ge 0\) and \(x\ne 3\). A sign chart gives \(3<x\le 4\). For f, domain is \(x\ge 1\) and range is \(y\ge 2\), so \(f^{-1}(x)=(x-2)^{2}+1\) for \(x\ge 2\). Reversing the order requires \(f(x)-3\ne 0\) and \(x\ge 1\), giving \(x\ge 1\) with \(x\ne 2\); these are different conditions.
Find a specific method or formula
Now practise the method
If you opened this guide from a question, return to that tab and try the method without looking at the example. Your answer stays in the question tab.
Practise this subtopic →Want a broader practice session? Explore IB Maths AA SL practice questions →Explore IB Maths AA HL practice questions →Try free IB Maths exam-style questions and worked solutions →
Core-topic coverage checked against Haese Core Topics HL (2019), chapters 15. The explanations, diagrams and exercises here are original Arc material.
Original Arc Practice teaching notes for Maths AA. Core and HL sections are distinguished above. These notes follow the first-assessment-2021 course and are not an official IB publication or a complete syllabus checklist. IB course reference. Report a correction.