WhatsApp us
IB DP Maths29 Nov 2026

IB Maths Composite and Inverse Functions: Order, Domains and Finding f⁻¹(x) (AA SL and HL)

How to build composite functions in the right order, find an inverse function algebraically, restrict a domain so an inverse exists, and work out the domain of a composite. Four original worked examples, the y = x shortcut, common slips and a self-check.

IB Maths Composite and Inverse Functions: Order, Domains and Finding f⁻¹(x) (AA SL and HL)

(f ∘ g)(x) means f(g(x)): apply g first, then f. An inverse function f⁻¹ undoes f, so f⁻¹(f(x)) = x, and its graph is the reflection of y = f(x) in the line y = x. A function has an inverse only if it is one-to-one, which is why questions so often ask you to restrict the domain first.

Those three sentences answer most definition questions. The marks, though, are in the details: the order of composition, the domain and range of each new function, and setting out the inverse algebra so a slip is visible. This guide covers all of these with original worked examples.

Where this sits in the course

Composite functions, the identity function and finding inverses are part of the SL functions content of IB Maths Analysis and Approaches, so they are examined at SL and HL. The IB guide gives the functions topic 21 hours at SL and 32 at HL. HL adds further ideas built on the same foundation, such as self-inverse functions.

These questions appear on both papers. On Paper 1, which has no calculator, expect algebraic inverses and exact values. On Paper 2, the GDC helps you sketch f and f⁻¹ and find where they meet, but you still need the algebra. Students who keep mixing up the order of composition often improve fastest with IB Maths AA SL tutors at Maths Bodhi, because the error is easy to spot when someone watches the working.

The notation card

NotationMeaningWatch out for
(f ∘ g)(x) = f(g(x))Do g, then fRead right to left
f⁻¹(x)The function that reverses fNot 1/f(x)
Domain of f⁻¹= range of fAlways state it
Range of f⁻¹= domain of fComes free once you know f
f(f⁻¹(x)) = f⁻¹(f(x)) = xComposing with the inverse gives the identityA quick check of your answer

The second row causes real confusion. f⁻¹(x) is an inverse function, while [f(x)]⁻¹ = 1/f(x) is a reciprocal. They are almost never the same.

Worked example 1: order matters

Let f(x) = 2x + 3 and g(x) = x² − 1.

(a) Find (f ∘ g)(x) and (g ∘ f)(x).

(f ∘ g)(x) = f(x² − 1) = 2(x² − 1) + 3 = 2x² + 1.

(g ∘ f)(x) = g(2x + 3) = (2x + 3)² − 1 = 4x² + 12x + 8.

(b) Evaluate both at x = 2.

(f ∘ g)(2) = 2(4) + 1 = 9. (g ∘ f)(2) = 16 + 24 + 8 = 48.

Different answers: composition is not commutative. For a single value you can also work from the inside out: g(2) = 3, then f(3) = 9.

(c) A function h satisfies (f ∘ h)(x) = 6x − 1. Find h(x).

f(h(x)) = 2h(x) + 3 = 6x − 1, so 2h(x) = 6x − 4 and h(x) = 3x − 2.

Part (c) is a reversed question: you know the outer function and the result, and you solve for the inner one.

Worked example 2: finding an inverse algebraically

Find the inverse of f(x) = (3x − 1)/(x + 2), x ≠ −2, and state its domain.

Step 1. Write y = (3x − 1)/(x + 2).

Step 2. Rearrange for x. Multiply out: y(x + 2) = 3x − 1, so xy + 2y = 3x − 1.

Collect the x terms on one side: xy − 3x = −1 − 2y, so x(y − 3) = −(1 + 2y).

x = (1 + 2y)/(3 − y).

Step 3. Swap the letters: f⁻¹(x) = (2x + 1)/(3 − x).

Domain of f⁻¹: x ≠ 3. This matches the range of f, because y = 3 is the horizontal asymptote of f, a value the function never reaches.

Check: f⁻¹(1) = 3/2, and f(3/2) = (4.5 − 1)/(3.5) = 1. Composing gets you back where you started.

The key move is collecting every x term on one side before factorising. Our guide to rational functions and their asymptotes shows why the asymptotes of f and f⁻¹ swap.

Worked example 3: restricting the domain

Let f(x) = (x − 2)² + 1.

(a) Explain why f has no inverse on the real numbers.

f is not one-to-one: for example f(1) = f(3) = 2. Two inputs give the same output, so the "undo" would not know which to return.

(b) Find the largest domain of the form x ≥ k on which f has an inverse.

The vertex is at (2, 1). To the right of it the function only increases, so k = 2.

(c) Find f⁻¹(x) for f with domain x ≥ 2.

y = (x − 2)² + 1, so (x − 2)² = y − 1 and x − 2 = ±√(y − 1).

Since x ≥ 2, take the positive root: x = 2 + √(y − 1).

f⁻¹(x) = 2 + √(x − 1), with domain x ≥ 1 (the range of the restricted f).

Choosing the sign of the root from the domain, and saying why, is a reasoning step that markschemes look for. With the domain x ≤ 2 instead, the inverse would be 2 − √(x − 1).

Worked example 4: the domain of a composite

Let f(x) = ln x, x > 0, and g(x) = x² − 9, x ∈ ℝ.

(a) Find (f ∘ g)(x) and its largest possible domain.

(f ∘ g)(x) = ln(x² − 9). The logarithm needs a positive input, so x² − 9 > 0, giving x < −3 or x > 3.

(b) Explain why (f ∘ g)(2) does not exist.

g(2) = −5, which is outside the domain of f. The output of the inner function must lie in the domain of the outer one.

This idea, that the range of g must fit inside the domain of f, is the test behind every "is f ∘ g defined?" question. The logarithm and exponential are each other's inverses, so ln and e^x appear in these questions often; our exponentials and logarithms guide covers the rules you need for the algebra.

Where f and f⁻¹ meet

If f is increasing, the graphs of y = f(x) and y = f⁻¹(x) can only meet on the line y = x. So instead of solving f(x) = f⁻¹(x), which is often messy, solve f(x) = x.

Example: f(x) = x² − 2 for x ≥ 0, which is increasing. Solve x² − 2 = x: x² − x − 2 = 0, so (x − 2)(x + 1) = 0. Reject x = −1 (outside the domain). The graphs meet at (2, 2). Check with f⁻¹(x) = √(x + 2): f⁻¹(2) = √4 = 2.

Use this shortcut only when f is increasing. A decreasing function can meet its inverse away from y = x, so in that case solve f(x) = f⁻¹(x) directly.

Mistakes our tutors see

  1. Composing in the wrong order: working out f first in f(g(x)).
  2. Treating f⁻¹(x) as 1/f(x).
  3. Forgetting the domain of the inverse, or giving the domain of f instead of its range.
  4. Keeping both ± roots when the domain allows only one.
  5. Not swapping x and y at the end, so the answer is written in terms of y.
  6. Ignoring where the inner function's output goes, so a composite is "evaluated" at a point where it does not exist.

Exam technique

  • Write the inside first: for (f ∘ g)(5), find g(5) on its own line.
  • Check every inverse by composing it with f at one easy value.
  • State domains in words or set notation, for example "x ≥ 1" or "x ∈ ℝ, x ≠ 3".
  • Sketch f and its reflection in y = x when a question mixes graphs and inverses; on Paper 2 the GDC makes this quick.
  • For timed mixed practice, see our plan for working through IB maths questions topic by topic.

Self-check

  1. Find the inverse of f(x) = e^(x − 1), and state its domain.
  2. Show that q(x) = x/(x − 1), x ≠ 1, satisfies q(q(x)) = x.
  3. f(x) = √(x + 3) and g(x) = x². Find (f ∘ g)(−1).
  4. f(x) = 5 − 3x. Find f⁻¹(x) and f⁻¹(2).

Answers.

1: y = e^(x − 1) gives x − 1 = ln y, so f⁻¹(x) = 1 + ln x, with domain x > 0.

2: q(q(x)) = [x/(x − 1)] ÷ [x/(x − 1) − 1] = [x/(x − 1)] ÷ [1/(x − 1)] = x. So q is its own inverse; HL calls this a self-inverse function.

3: g(−1) = 1, then f(1) = √4 = 2.

4: y = 5 − 3x gives x = (5 − y)/3, so f⁻¹(x) = (5 − x)/3, and f⁻¹(2) = 1.

Where this leads next

Composite functions are the reason the chain rule exists: differentiating f(g(x)) gives f′(g(x)) × g′(x), worked through in our guide to chain, product and quotient rule differentiation. Inverse functions with restricted domains return in trigonometry, where HL students meet arcsin, arccos and arctan; see the sibling post on solving trig equations in a given interval. For transformations, odd and even functions and the rest of the unit, read AA functions and transformations.

How Maths Bodhi helps

Our tutors teach functions as machines with inputs and outputs, so domain and range questions become a matter of tracking where each value goes. For support with this unit in any course, see our functions tutoring. Families who prefer the senior tutor can ask for the senior AA SL tutor, Ajay Vatsyayan.

Home tuition is available in Gurgaon (Gurugram). Students elsewhere in India and abroad learn with us online. You can book a free demo class.

Written and checked by the Maths Bodhi team. Facts checked against official IB sources, November 2026.

Frequently asked questions

What does (f ∘ g)(x) mean in IB maths?
It means f(g(x)): apply g to x first, then apply f to the result. In general (f ∘ g)(x) and (g ∘ f)(x) are different.
How do you find the inverse of a function in IB maths?
Write y = f(x), rearrange to make x the subject, then swap x and y. State the domain of the inverse, which is the range of the original function.
Why do you need to restrict the domain to find an inverse?
A function has an inverse only if it is one-to-one. If two inputs give the same output, you restrict the domain, for example to one side of a vertex, so that each output comes from one input.
Is f⁻¹(x) the same as 1/f(x)?
No. f⁻¹(x) is the inverse function that undoes f, while 1/f(x) is the reciprocal of the output. For f(x) = 2x they are x/2 and 1/(2x).
How do I find the domain of a composite function?
Start with the domain of the inner function, then keep only the values whose output lies in the domain of the outer function.
IB maths composite functionsIB maths inverse functionsdomain and rangeIB maths AA SL functionsIB tutor Gurgaon

Related guides

Keep exploring this maths topic

IB DP Maths17 Nov 2026

IB Maths AA SL Asymptotes: Rational Functions, the Reciprocal Graph and Exponential and Log Asymptotes

How to find vertical and horizontal asymptotes in IB Maths AA SL, from y = 1/x to rational functions (ax + b)/(cx + d) and the asymptotes of exponential and log graphs. Four worked examples covering inverses, transformations and unknown constants, with the slips to avoid and a self-check.

IB maths AA SL asymptotesrational functions IBIB maths AA SL functionsgraph sketching IB

By Maths Bodhi Team

Read guide

IB DP Maths17 Nov 2026

IB Maths AA SL Topics and Syllabus: The Five Topics, Teaching Hours, What Each Paper Tests and a Tick-Off Checklist

Every IB Maths Analysis and Approaches SL topic for exams in 2027 and 2028, with the IB's suggested teaching hours, what Paper 1 and Paper 2 expect, a sub-topic checklist to tick, and what changes for students who start DP in August 2027.

IB maths AA SL topicsIB maths AA SL syllabusIB maths AA SL papersAA SL checklist

By Maths Bodhi Team

Read guide

IB DP Maths29 Nov 2026

IB Maths Optimisation Problems: A Five-Step Method and Four Worked Examples (AA SL and HL)

Optimisation questions in IB Maths AA turn a story into a function and ask for its largest or smallest value. A five-step method, four original worked examples (box, cylinder, closest point, endpoint maximum), how to justify the answer, and a self-check.

IB maths optimisationIB maths AA SL calculusmaximum and minimum problemsIB math optimization questions

By Maths Bodhi Team

Read guide

IB DP Maths29 Nov 2026

IB Maths Tangents, Normals and Stationary Points: Equations, Classification and Inflection (AA SL)

How to write the equation of a tangent or normal in IB Maths AA, find and classify stationary points, and tell a stationary point of inflection from a maximum or minimum. Four original worked examples, the usual slips and a self-check with answers.

IB maths tangent and normalstationary pointspoints of inflectionIB maths AA SL calculus

By Maths Bodhi Team

Read guide

IB DP Maths17 Nov 2026

IB Maths SL Geometry and Trigonometry: 3D Solids, Bearings, and the Sine and Cosine Rules (AA SL and AI SL)

The geometry and trigonometry that AA SL and AI SL share: 3D distance and solids, angles in pyramids, the sine and cosine rules, bearings and angles of elevation. Which parts belong to which course, four worked examples, the ambiguous case for AA, and a self-check set.

IB maths SL bearingssine rule and cosine rule IB3D geometry IB mathsIB maths AA SL and AI SL

By Maths Bodhi Team

Read guide

IB DP Maths10 Nov 2026

How to Improve Your IB Maths AA SL Grade from a 4 to a 6: A 12-Week Plan Built on the Syllabus Hours and Paper Weights

A practical plan for IB Maths Analysis and Approaches SL students stuck at a 4. Where the marks are, which topics to fix first using the IB's own teaching hours, how to treat Paper 1 (no calculator) and Paper 2 differently, and a week-by-week 12-week plan.

IB maths AA SLimprove IB maths gradeIB maths study planIB maths Paper 1 and Paper 2

By Maths Bodhi Team

Read guide