James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout
IB Diploma › Maths AI HL › Functions › Composite & inverse functions

Composite & inverse functions

A composite function applies one function and then another, like converting euros to dollars and then dollars to yen. An inverse function undoes a function, like converting back. In AI HL you build both from contexts, restrict domains so an inverse exists, and solve problems with the GDC.

AHL 2.7HL onlyPaper 1Paper 2GDC allowed≈ 45 min to work through
Before you start: function notation, domain and range (Functions & graphing with technology).

1What you need to know

Tick these off as you go. By the end of the page you should be able to do all of them without notes.

  • Find and interpret composite functions (f∘g)(x)=f(g(x)) in contextAHL 2.7
  • Find the inverse of a function, including by interchanging x and yAHL 2.7
  • Know that (f∘f−1)(x)=x and that the graph of f−1 is the reflection of f in y=xAHL 2.7
  • Restrict the domain of a function so that its inverse existsAHL 2.7
  • State the domain and range of composite and inverse functionsAHL 2.7

2Notes & worked examples

Each idea is followed by a worked example. Try the question yourself first, then reveal the solution one step at a time.

The big idea

A function is a machine: an input goes in, one output comes out. A composite function joins two machines: the output of the first becomes the input of the second. An inverse runs a machine backwards, from output to input. It only works if each output came from exactly one input (the function is one-to-one).

2.1 Composite functions

Composite function Not in booklet: learn it
(f∘g)(x)=f(g(x))

Apply g first, then f. In general f∘g≠g∘f.

Worked example 1Paper 1
Let f(x)=2x+3 and g(x)=x2. Find (f∘g)(x), (g∘f)(x) and (f∘g)(−2).
(f∘g)(x)=f(x2)=2x2+3
(g∘f)(x)=g(2x+3)=(2x+3)2
(f∘g)(−2)=2(4)+3=11
Work from the inside out: g(−2)=4, then f(4)=11.
Worked example 2Paper 2
A taxi travels at an average speed of 0.6 km per minute. The fare for a journey of d km is C(d)=2.5+1.2d euros. Find a function for the fare after t minutes and the fare for a 25-minute journey.
Distance after t minutes: d(t)=0.6t
(C∘d)(t)=2.5+1.2(0.6t)=2.5+0.72t
The output of d (km) is the input of C.
(C∘d)(25)=2.5+18= €20.50

2.2 Inverse functions

To find f−1: write y=f(x), interchange x and y, then make y the subject. The domain of f−1 is the range of f, and the range of f−1 is the domain of f.

Inverse function In formula booklet
(f∘f−1)(x)=(f−1∘f)(x)=x

The graph of y=f−1(x) is the reflection of y=f(x) in the line y=x.

Worked example 3Paper 1
Find the inverse of f(x)=3x−12.
x=3y−12
2x=3y−1⇒y=2x+13
f−1(x)=2x+13

2.3 Restricting the domain

A function such as x2 is not one-to-one (both 3 and −3 give 9), so it has no inverse on all of ℝ. Restrict the domain to one side of the turning point and it becomes one-to-one.

Worked example 4Paper 1
Let f(x)=x2−4x+1, for x≥2. Find f−1(x) and state its domain.
Complete the square: f(x)=(x−2)2−3, so the range of f is f(x)≥−3.
The vertex is at (2,−3), exactly where the domain starts.
x=(y−2)2−3⇒(y−2)2=x+3⇒y=2+x+3
f−1(x)=2+x+3, domain x≥−3
Take the positive root because the range of f−1 must be y≥2.
Worked example 5Paper 2
Let f(x)=0.1x3+1. Use your GDC to solve f(x)=f−1(x).
For an increasing function, the graphs of f and f−1 meet on the line y=x, so solve 0.1x3+1=x.
Reflection in y = x leaves points on that line where they are.
x=−3.58, x=1.15, x=2.42
Worked example 6 (faded)Paper 1
Given f(x)=5x−7, find f−1(8).
Solve 5x−7=8.
f−1(8)= 3  ← you work this out
On your TI-Nspire Calculator tricks →

Define functions on the TI-Nspire so you can compose them: in a Calculator page type define f(x)=2x+3 and define g(x)=x^2, then f(g(−2)). To graph an inverse, enter f in a Graphs page and use menu → Actions → Reflection in the line y=x, or graph x=f(y) with menu → Graph Entry/Edit → Relation. To evaluate f−1(k) numerically, solve f(x)=k with nSolve.

3Explore it

Pick a function and move the point along it. Its reflection in y = x is on the inverse. When the function turns back on itself, the reflection fails the vertical line test: restrict the domain.

4Common mistakes & exam tips

Common mistakes

  • Applying the functions in the wrong order: in f∘g, apply g first.
  • Writing f−1(x)=1f(x). The inverse undoes f; it is not the reciprocal.
  • Forgetting to restrict the domain, or choosing the wrong sign of a square root.
  • Giving the domain of f−1 as the domain of f instead of the range of f.
  • In context, mixing up units: the output of the first function must match the input of the second.

Exam tips

  • Say in words what a composite function means in context, such as "the fare after t minutes".
  • Check an inverse by composing: f(f−1(x)) should simplify to x.
  • Sketch f, f−1 and y=x together: they should be symmetric.
  • "Find f−1(k)" only needs the value: solve f(x)=k instead of finding the whole inverse.

5Practice

Fluency questions build the basics. Problem-solving questions make you think about which method to use.

FluencyP1
f(x)=x−4, g(x)=3x2. Find (g∘f)(x).
3(x−4)2
FluencyP2
Find the inverse of f(x)=7−2x.
f−1(x)=7−x2
FluencyP3
f(x)=x−1, x≥1. Find f−1(x) and its domain.
f−1(x)=x2+1, x≥0
FluencyP4
f(x)=ex. Write down f−1(x).
lnx, x>0
Problem solvingP5
Temperature in °F is F(C)=1.8C+32. Find F−1 and interpret it.
F−1(x)=x−321.8: it converts °F back to °C.
Problem solvingP6
f(x)=20x+1+3, x≥0. Find the range of f and f−1(x).
Range 3<f(x)≤23. f−1(x)=20x−3−1, for 3<x≤23.

6Exam-style questions

Original questions in the style of the IB Maths AI HL exam, with full markschemes. Your GDC is allowed throughout: use it, but write down what you entered and what it gave you. Give yourself about 1 minute per mark.

Question 1Paper 1[6 marks]

One euro can be exchanged for 1.08 US dollars, and one US dollar can be exchanged for 151.2 Japanese yen. A bank charges a fixed fee of 5 euros before changing money. The number of dollars received for x euros is d(x)=1.08(x−5), and the number of yen received for y dollars is j(y)=151.2y.

  • (a)Find (j∘d)(x) and interpret it in context.[3]
  • (b)Find the number of euros needed to receive 50 000 yen.[3]
(a)
j(1.08(x−5))(M1)
163.296(x−5)A1
the number of yen received for x eurosR1
(b)
163.296(x−5)=50000(M1)
x−5=306.19(A1)
€311.19A1
Question 2Paper 1[6 marks]

Let f(x)=x2−4x+1, for x≥2.

  • (a)Find the range of f.[2]
  • (b)Find f−1(x).[3]
  • (c)Find f−1(6).[1]
(a)
f(x)=(x−2)2−3 or vertex (2,−3)(M1)
f(x)≥−3A1
(b)
x=(y−2)2−3M1
y−2=x+3(A1)
f−1(x)=2+x+3A1
(c)
5A1
Question 3Paper 2[8 marks]

The number of visitors to a museum on a day with h hours of rain is V(h)=1200−80h, for 0≤h≤12. The museum’s takings, in euros, when n people visit are T(n)=9.5n−1500.

  • (a)Find (T∘V)(h).[2]
  • (b)Find the takings on a day with 4.5 hours of rain.[1]
  • (c)Find V−1(h) and interpret V−1(900) in context.[3]
  • (d)Find the number of hours of rain for which the museum’s takings are €6000.[2]
(a)
9.5(1200−80h)−1500(M1)
9900−760hA1
(b)
€6480A1
(c)
V−1(h)=1200−h80A1
V−1(900)=3.75A1
900 visitors corresponds to 3.75 hours of rainR1
(d)
9900−760h=6000(M1)
5.13 hoursA1

7Check yourself

Six quick questions, marked instantly. Aim for 6/6 before moving on. Fractions like 3/2 are accepted.

8Past-paper practice

Once you are scoring well above, try these real IB Maths AI HL questions on this topic. Your school or teacher will have the papers.

PaperQuestionFocusDifficulty
May 2021 · TZ2 · Paper 1Q2Range and inverse of a rational function★☆☆
Nov 2021 · Paper 1Q3Inverse of a function in context (a tin can)★★☆
May 2025 · TZ2 · Paper 1Q10A function on a finite domain, composite and inverse values★☆☆
Spotted a mistake on this page?Tell me and I'll fix it. The button opens an email with this page already named, or write to jamesashtonmaths@gmail.com.
Report a mistake