James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout
A level Maths › Pure · Algebra & functions › Functions: composite & inverse

Functions: composite & inverse

What a function is, its domain and range, combining functions, and finding and graphing inverse functions.

Pure 2.8Year 2≈ 60 min to work through
Before you start: substitution and rearranging formulae. Shaky on these? See Before you start (GCSE skills check) › Rearranging.

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.

  • Use function notation f(x) and evaluate functionsY2
  • Find the domain and range of a functionY2
  • Find composite functions (f∘g)(x)=f(g(x))Y2
  • Find the inverse function f−1(x)Y2
  • Know that the graph of f−1 is the reflection of f in y=xY2
  • Know that (f∘f−1)(x)=x, and that the domain and range swapY2

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 rule that turns each input into exactly one output. You can chain functions together (composite functions) and reverse them (inverse functions), and the domain and range tell you which inputs and outputs are possible.

2.1 Domain and range

Think of a function as a machine. You put in a number, the machine follows its rule, and one number comes out. f(x)=2x+1 means "double the input, then add 1", so f(3)=7.

A function gives exactly one output for each input. The domain is the set of allowed inputs; the range is the set of outputs. Look out for square roots (the inside must be ≥0), fractions (the denominator cannot be 0) and logarithms (the inside must be >0).

Some inputs are not allowed because the rule breaks. You cannot divide by zero, and (for real numbers) you cannot take the square root of a negative number or the logarithm of zero or a negative number. These are the usual reasons for restricting the domain. On a graph, the domain is the spread of the graph across the x-axis, and the range is its spread up the y-axis.

Worked example 1No calculator
Find the domain and range of f(x)=x−3.
The inside must be non-negative: x−3≥0, so the domain is x≥3.
A square root is never negative: the range is f(x)≥0.

2.2 Composite functions

Composite
(f∘g)(x)=f(g(x))

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

f(g(x)) is read from the inside out: the output of g becomes the input of f. The order matters, and in general f(g(x)) and g(f(x)) are different. For example, "square then add 1" is not the same as "add 1 then square".

Worked example 2No calculator
f(x)=2x+1 and g(x)=x2. Find (f∘g)(x), (g∘f)(x) and (g∘f)(−1).
(f∘g)(x)=f(x2)=2x2+1
(g∘f)(x)=g(2x+1)=(2x+1)2
(g∘f)(−1)=(−1)2=1

2.3 Inverse functions

If f is "double, then add 1", its inverse reverses each step in the opposite order: "subtract 1, then halve". So f(3)=7 and f−1(7)=3. In general f−1(f(x))=x.

The inverse f−1 undoes f. To find it: write y=f(x), make x the subject, then swap x and y. The domain of f−1 is the range of f, and 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.

When does an inverse exist?

An inverse only exists if each output comes from just one input, so that you know which input to go back to. f(x)=x2 sends both 3 and −3 to 9, so it has no inverse unless the domain is restricted, for example to x≥0. This is a one-to-one function. On a graph, the graph of y=f−1(x) is the reflection of y=f(x) in the line y=x, because swapping x and y swaps the coordinates of every point.

Worked example 3No calculator
Find f−1(x) for f(x)=3x−12.
y=3x−12⇒2y=3x−1
x=2y+13
f−1(x)=2x+13
Worked example 4No calculator
f(x)=x2+2, x≥0. Find f−1(x) and its domain.
y=x2+2⇒x=y−2 (positive root, since x≥0)
f−1(x)=x−2
Domain of f−1: x≥2, the range of f.
Without the restriction x≥0, f would not have an inverse: it would not be one-to-one.
Worked example 5 (faded)No calculator
f(x)=5−2x. Find f−1(1).
f−1(1) is the input that gives 1: solve 5−2x=1, so x= 2  ← you work this out
On your Casio ClassWiz Calculator tricks →

To evaluate a composite such as f(g(3)), work from the inside: calculate g(3) first, then use Ans in f. The Table app with f(x) and g(x) is useful for checking an inverse: f(f−1(x)) should give back x.

3Explore it

Choose a function. Move the point P along it: its reflection in y=x lies on the inverse.

4Common mistakes & exam tips

Common mistakes

  • Doing a composite in the wrong order: f(g(x)) means g first.
  • Confusing f−1(x) with 1f(x).
  • Forgetting to swap x and y at the end when finding an inverse.
  • Giving the domain of f−1 as the domain of f: it is the range of f.

Exam tips

  • To find f−1(a) for a number a, you can solve f(x)=a instead of finding the whole inverse.
  • Points where f meets f−1 usually lie on y=x, so solve f(x)=x.
  • State domain restrictions with your inverse, e.g. f−1(x)=x−2, x≥2.

5Practice

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

FluencyP1
f(x)=x2−4. Find f(−3).
9−4=5
FluencyP2
State the domain of f(x)=1x−2.
x≠2
FluencyP3
f(x)=3x−2 and g(x)=x+5. Find f(g(x)).
3(x+5)−2=3x+13
FluencyP4
Find f−1(x) for f(x)=4x+7.
f−1(x)=x−74
Problem solvingP5
f(x)=2x+k and f(f(1))=11. Find k.
f(1)=2+k, so f(2+k)=2(2+k)+k=4+3k=11, giving k=73.
Problem solvingP6
f(x)=1x−1+2, x≠1. Find f−1(x) and state its domain.
y−2=1x−1⇒x=1+1y−2, so f−1(x)=1+1x−2, x≠2.

6Exam-style questions

Original exam-style questions with full markschemes. Edexcel papers allow a calculator throughout, but questions labelled “No calculator” practise exact working. Allow about 1.2 minutes per mark.

Question 1No calculator[6 marks]

f(x)=3x−5 and g(x)=x2+1.

  • (a)Find (g∘f)(2).[2]
  • (b)Find f−1(x).[2]
  • (c)Solve (f∘g)(x)=10.[2]
(a)
f(2)=1A1
g(1)=2A1
(b)
y=3x−5⇒x=y+53M1
f−1(x)=x+53A1
(c)
3(x2+1)−5=10M1
x=±2A1
Question 2No calculator[6 marks]

f(x)=x+4, x≥−4.

  • (a)Write down the range of f.[1]
  • (b)Find f−1(x).[2]
  • (c)Write down the domain of f−1.[1]
  • (d)The graphs of f and f−1 meet at one point. Find its x-coordinate.[2]
(a)
f(x)≥0A1
(b)
y2=x+4⇒x=y2−4M1
f−1(x)=x2−4A1
(c)
x≥0A1
(d)
Solve x+4=x, i.e. x2−x−4=0M1
x=1+172A1
Question 3Calculator[5 marks]

A liquid is heated. Its temperature in °C after t minutes is C(t)=20+5t. Temperatures convert to °F using F(C)=1.8C+32.

  • (a)Find (F∘C)(t).[2]
  • (b)Find the time when the temperature is 104 °F.[2]
  • (c)Find F−1(x).[1]
(a)
1.8(20+5t)+32M1
68+9tA1
(b)
68+9t=104M1
t=4 minutesA1
(c)
F−1(x)=x−321.8A1

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're scoring well above, try real Edexcel A level questions. Past papers and markschemes are on the Pearson website.

PaperQuestionFocusDifficulty
Specimen · Paper 2Q4Composite functions gf and fg with eˣ and ln x★☆☆
June 2024 · Paper 1Q8fg(2), an inverse, the range of gf and a parameter condition★★☆
June 2022 · Paper 2Q10Inverse of a rational function and the range of a composite★★☆
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