Composite and inverse functions

A level Maths (Edexcel) · Edexcel 9MA0 · P2.8 · Pure mathematics › Algebra and functions

3 exam-style questions plus unlimited generated ones on this topic, at up to four difficulty levels, with full mark schemes. Notes and Full packs are open to everyone. Practice needs a free account.

Or take a quick quiz: 11 questions on this subtopic in A level Maths (Edexcel), marked as you tap.

Revision notes

Functions, their domain and range, composite functions such as \(fg(x)\) (which means \(f(g(x))\)) and inverse functions and their graphs. Questions usually have several parts: find the range, find or solve a composite, find \(f^{-1}(x)\) and state its domain. They are often worth 7 to 10 marks in total.

Key facts

  • \(fg(x) = f(g(x))\): do \(g\) first
  • \(f^2(x) = ff(x)\)
  • \(ff^{-1}(x) = f^{-1}f(x) = x\)
  • Domain of \(f^{-1}\) = range of \(f\)
  • Range of \(f^{-1}\) = domain of \(f\)
  • \(y = f^{-1}(x)\) is the reflection of \(y = f(x)\) in \(y = x\)
  • An inverse exists only if \(f\) is one-to-one
  • \(x \in \mathbb{R}\) means \(x\) can be any real number

Notes

Functions, domain and range

diagram
  • A function maps each input in its domain to exactly one output. The set of outputs is the range.
  • One-to-one: each output comes from exactly one input. Many-to-one: some outputs come from more than one input, e.g. \(f(x) = x^2\), \(x \in \mathbb{R}\)
  • Find the range from a sketch: \(f(x) = (x - 2)^2 - 3\), \(x \in \mathbb{R}\), has range \(f(x) \ge -3\)
  • xyO(2, −3)−3range f(x) ≥ −3
    Read the range off the y-axis: the curve takes every value from −3 upwards.
  • Write the range in terms of \(f(x)\) (or \(y\)), not \(x\). Exclude from a domain any values that would mean dividing by zero or square rooting a negative.

Composite functions

  • \(fg(x)\) means \(f(g(x))\): apply \(g\) first, then \(f\). The function nearest \(x\) acts first.
  • Example: \(f(x) = 2x + 1\) and \(g(x) = x^2\) give \(fg(x) = 2x^2 + 1\) but \(gf(x) = (2x + 1)^2\). Usually \(fg \ne gf\)
  • \(f^2(x)\) means \(ff(x)\), not \([f(x)]^2\)
  • \(fg\) can only be formed if the range of \(g\) lies within the domain of \(f\)
  • The range of \(fg\) comes from applying \(f\) to the range of \(g\), not to every real number: e.g. \(g(x) = x^2\), \(f(x) = 2x + 1\) gives \(fg(x) \ge 1\) Grade A or above only

Inverse functions

diagram
  • \(f^{-1}\) undoes \(f\): if \(f(a) = b\) then \(f^{-1}(b) = a\), and \(ff^{-1}(x) = f^{-1}f(x) = x\)
  • Only one-to-one functions have an inverse.
  • Method: let \(y = f(x)\), rearrange to make \(x\) the subject, then replace \(y\) by \(x\)
  • Example: \(f(x) = \sqrt{x - 2}\), \(x \ge 2\), has range \(f(x) \ge 0\). From \(y = \sqrt{x - 2}\), \(x = y^2 + 2\), so \(f^{-1}(x) = x^2 + 2\), \(x \ge 0\)
  • The domain of \(f^{-1}\) is the range of \(f\), and the range of \(f^{-1}\) is the domain of \(f\)
  • The graph of \(y = f^{-1}(x)\) is the reflection of \(y = f(x)\) in the line \(y = x\)
  • xyOy = x(2, 0)(0, 2)y = f(x)y = f⁻¹(x)
    f(x) = √(x − 2) and f⁻¹(x) = x² + 2, x ≥ 0: each is the mirror image of the other in y = x.

How to answer each type of question

M = method mark, A = answer mark, B = a mark on its own.

Find the range of a function

2 marksGrade C
  1. Complete the square or sketch the graph over the given domain.
  2. Find the least (or greatest) value.
  3. Write the range using \(f(x)\)

Example. The function \(f\) is defined by \(f(x) = x^2 - 6x + 11\), \(x \in \mathbb{R}\). Find the range of \(f\)

Show the model answerHide the model answer
\(f(x) = (x - 3)^2 + 2\)
(M1)
\(f(x) \ge 2\)
(A1)

Evaluate and solve composite functions

5 marksGrade B
  1. For a number: work from the inside out.
  2. For an expression: substitute the inner function into the outer one.
  3. Set the composite equal to the value and solve, checking the answer is in the domain.

Example. The functions \(f\) and \(g\) are defined by
\(f(x) = 3x - 2\), \(x \in \mathbb{R}\)
\(g(x) = \dfrac{4}{x + 1}\), \(x \gt -1\)
(a) Find \(fg(3)\).
(b) Solve \(gf(x) = 2\)

Show the model answerHide the model answer
(a) \(g(3) = 1\)
(M1)
\(fg(3) = f(1) = 1\)
(A1)
(b)\[\begin{aligned}[b]gf(x) &= \frac{4}{3x - 2 + 1} \\ &= \frac{4}{3x - 1}\end{aligned}\]
(M1)
\(\dfrac{4}{3x - 1} = 2\), so \(3x - 1 = 2\)
(M1)
\(x = 1\)
(A1)

Find an inverse function and its domain

3 marksGrade B
  1. Write \(y = f(x)\) and multiply out any fraction.
  2. Collect the \(x\) terms on one side and factorise to make \(x\) the subject.
  3. Write \(f^{-1}(x)\), and give its domain as the range of \(f\)

Example. The function \(h\) is defined by \(h(x) = \dfrac{2x + 3}{x - 1}\), \(x \gt 1\).
(a) Find \(h^{-1}(x)\).
(b) State the domain of \(h^{-1}\)

Show the model answerHide the model answer
(a) \(y(x - 1) = 2x + 3\), so \(xy - 2x = y + 3\) and \(x(y - 2) = y + 3\)
(M1)
\(h^{-1}(x) = \dfrac{x + 3}{x - 2}\)
(A1)
(b) \(h(x) = 2 + \dfrac{5}{x - 1} \gt 2\) for \(x \gt 1\), so the domain of \(h^{-1}\) is \(x \gt 2\)
(B1)

Explain why a function has no inverse

2 marksGrade B
  1. Show the function is many-to-one, e.g. two inputs with the same output.
  2. To make it one-to-one, restrict the domain to one side of the turning point.

Example. The function \(g\) is defined by \(g(x) = (x + 1)^2 - 4\), \(x \in \mathbb{R}\).
(a) Explain why \(g\) does not have an inverse.
(b) The domain of \(g\) is changed to \(x \ge k\) so that \(g\) has an inverse. State the least possible value of \(k\)

Show the model answerHide the model answer
(a) \(g\) is many-to-one, e.g. \(g(-3) = g(1) = 0\), so it has no inverse.
(B1)
(b) \(k = -1\) (the \(x\)-coordinate of the turning point)
(B1)

Don’t lose marks

  • Doing composite functions in the wrong order: \(fg\) means \(g\) first.
  • Writing the range in terms of \(x\), e.g. '\(x \ge 2\)' instead of '\(f(x) \ge 2\)'.
  • Confusing \(f^{-1}(x)\) with \(\dfrac{1}{f(x)}\)
  • Giving the domain of \(f\) as the domain of \(f^{-1}\) instead of the range of \(f\)
  • Using \(\gt\) when a minimum value is actually reached, so the range needs \(\ge\)

More tips

Memory tricks

  • Read \(fg(x)\) from right to left: the function nearest \(x\) acts first.
  • Check an inverse with a number: \(f^{-1}(f(a))\) should give back \(a\)
  • Sketch first for range questions: turning points and asymptotes give the limits.
  • Reflection in \(y = x\) swaps coordinates: \((a, b)\) on \(f\) becomes \((b, a)\) on \(f^{-1}\)

Exam technique

  • Use the correct notation: \(f(x) \ge 2\) for a range, \(x \in \mathbb{R}\) for all real numbers, \(f^{-1}(x) = \ldots\) for an inverse.
  • In multi-part function questions, a range found in an early part is often the domain you need later.
  • When sketching \(f\) and \(f^{-1}\), draw the line \(y = x\) and label where each graph meets the axes.

What each grade needs

What you need to be able to do, from the first marks up to the top grade.

  1. Grade E
    Evaluate a composite function at a number\(fg(3)\) means find \(g(3)\) first, then put the answer into \(f\)
  2. Grade D
    Find a composite function algebraicallyReplace \(x\) in \(f\) with the whole expression for \(g(x)\): \(fg(x) = f(g(x))\)
  3. Grade D
    Find the inverse of a functionWrite \(y = f(x)\), rearrange to make \(x\) the subject, then write the result in terms of \(x\)
  4. Grade C
    State the range of a functionUse a sketch over the given domain; write the range in terms of \(f(x)\), e.g. \(f(x) \ge 2\)
  5. Grade C
    Sketch a function and its inverseThe graph of \(y = f^{-1}(x)\) is the reflection of \(y = f(x)\) in the line \(y = x\)
  6. Grade B
    State the domain and range of an inverseThe domain of \(f^{-1}\) is the range of \(f\); the range of \(f^{-1}\) is the domain of \(f\)
  7. Grade B
    Solve equations involving composite functionsForm \(fg(x)\) algebraically, set it equal to the value and solve.
  8. Grade A
    Restrict domains and find ranges of compositesRestrict a many-to-one function to one side of its turning point so it has an inverse; find the range of \(fg\) by applying \(f\) to the range of \(g\)

Sample questions

Written for this site in the style of Edexcel exam questions. They are not taken from real past papers.

Question 1Easy8 marks
The functions \(\mathrm{f}\) and \(\mathrm{g}\) are defined by
\(\mathrm{f}(x) = 2x - 2, \quad x \in \mathbb{R}\)
\(\mathrm{g}(x) = \frac{6}{x - 1}, \quad x \in \mathbb{R}, \ x \ne 1\)
(a) Find \(\mathrm{fg}(3)\).
[2]
(b) Find \(\mathrm{gf}(x)\), giving your answer in its simplest form.
[2]
(c) Find \(\mathrm{f}^{-1}(x)\).
[2]
(d) Solve the equation \(\mathrm{f}(x) = \mathrm{f}^{-1}(x)\)
[2]
Show the answer and mark scheme
(a) Answer: \(\mathrm{fg}(3) = 4\)
  • M1 for finding \(\mathrm{g}(3) = 3\) and substituting into \(\mathrm{f}\)
  • A1 for \(4\)

Worked solution: \(\mathrm{g}(3) = 3\), so \(\mathrm{fg}(3) = \mathrm{f}(3) = 2 \times 3 - 2 = 4\).

(b) Answer: \(\mathrm{gf}(x) = \frac{6}{2x - 3}\)
  • M1 for substituting \(\mathrm{f}(x)\) into \(\mathrm{g}\): \(\frac{6}{(2x - 2) - 1}\)
  • A1 for \(\frac{6}{2x - 3}\)

Worked solution: \(\mathrm{gf}(x) = \mathrm{g}(2x - 2) = \frac{6}{(2x - 2) - 1} = \frac{6}{2x - 3}\)⁠.

(c) Answer: \(\mathrm{f}^{-1}(x) = \frac{x + 2}{2}\)
  • M1 for an attempt to make \(x\) the subject of \(y = 2x - 2\) (or to reverse the operations)
  • A1 for \(\mathrm{f}^{-1}(x) = \frac{x + 2}{2}\) oe

Worked solution: Let \(y = 2x - 2\). Then \(x = \frac{y + 2}{2}\), so \(\mathrm{f}^{-1}(x) = \frac{x + 2}{2}\), \(x \in \mathbb{R}\).

(d) Answer: \(x = 2\)
  • M1 for \(2x - 2 = \frac{x + 2}{2}\) (or \(\mathrm{f}(x) = x\)) and an attempt to solve
  • A1 for \(x = 2\)

Worked solution: \(2x - 2 = \frac{x + 2}{2}\) gives \(4x - 4 = x + 2\), so \(3x = 6\) and \(x = 2\).
(Since \(\mathrm{f}\) is linear, this is also the solution of \(\mathrm{f}(x) = x\).)

Question 2Medium8 marks
In this question you must show all stages of your working.
Solutions relying entirely on calculator technology are not acceptable.

The function \(\mathrm{f}\) is defined by
\(\mathrm{f}(x) = \frac{5x - 1}{x + 1}, \quad x \gt -1\)
(a) Show that \(\mathrm{f}(x) = 5 - \frac{6}{x + 1}\)
[2]
(b) Find the range of \(\mathrm{f}\).
[2]
(c) Find \(\mathrm{f}^{-1}(x)\), stating its domain.
[4]
Show the answer and mark scheme
(a) Answer: \(5x - 1 = 5(x + 1) - 6\)
  • M1 for writing the numerator as \(5(x + 1) - 6\) (or dividing)
  • A1* for the given result

Worked solution: \(5x - 1 = 5(x + 1) - 6\), so \(\mathrm{f}(x) = 5 - \frac{6}{x + 1}\).

(b) Answer: \(\mathrm{f}(x) \lt 5\)
  • M1 for using \(x + 1 \gt 0\) so that \(\frac{6}{x + 1}\) takes all positive values
  • A1 for \(\mathrm{f}(x) \lt 5\)

Worked solution: For \(x \gt -1\), \(x + 1 \gt 0\), so \(\frac{6}{x + 1}\) takes every positive value (tending to 0 as \(x\) increases). So \(\mathrm{f}(x)\) takes every value less than \(5\): the range is \(\mathrm{f}(x) \lt 5\).

(c) Answer: \(\mathrm{f}^{-1}(x) = \frac{-x - 1}{x - 5}, \quad x \lt 5\)
  • M1 for \(y = \frac{5x - 1}{x + 1}\) and multiplying through by \((x + 1)\)
  • M1 for collecting the \(x\) terms and factorising
  • A1 for \(\mathrm{f}^{-1}(x) = \frac{-x - 1}{x - 5}\) oe
  • B1ft for the domain \(x \lt 5\) (their range of \(\mathrm{f}\))

Worked solution: Let \(y = \frac{5x - 1}{x + 1}\): \(y(x + 1) = 5x - 1\), so \(x(y - 5) = -y - 1\) and \(x = \frac{-y - 1}{y - 5}\).
So \(\mathrm{f}^{-1}(x) = \frac{-x - 1}{x - 5}\), with domain equal to the range of \(\mathrm{f}\): \(x \lt 5\).

Question 3Hard9 marks
The functions \(\mathrm{f}\) and \(\mathrm{g}\) are defined by
\(\mathrm{f}(x) = 3 + 2\mathrm{e}^{-x}, \quad x \in \mathbb{R}\)
\(\mathrm{g}(x) = \ln(x - 1), \quad x \gt 1\)
(a) State the range of \(\mathrm{f}\).
[1]
(b) Find \(\mathrm{f}^{-1}(x)\), stating its domain.
[3]
(c) Show that \(\mathrm{fg}(x) = \frac{3x - 1}{x - 1}\).
[3]
(d) Solve the equation \(\mathrm{fg}(x) = 7\).
[2]
Show the answer and mark scheme
(a) Answer: \(\mathrm{f}(x) \gt 3\)
  • B1 for \(\mathrm{f}(x) \gt 3\) (accept \(y \gt 3\))

Worked solution: \(\mathrm{e}^{-x}\) takes every positive value, so \(2\mathrm{e}^{-x} \gt 0\) and \(\mathrm{f}(x) \gt 3\).

(b) Answer: \(\mathrm{f}^{-1}(x) = \ln\left(\frac{2}{x - 3}\right), \quad x \gt 3\)
  • M1 for making \(\mathrm{e}^{-x}\) (or \(\mathrm{e}^{-y}\)) the subject: \(\mathrm{e}^{-x} = \frac{y - 3}{2}\)
  • A1 for \(\mathrm{f}^{-1}(x) = -\ln\left(\frac{x - 3}{2}\right)\) or \(\ln\left(\frac{2}{x - 3}\right)\) oe
  • B1ft for the domain \(x \gt 3\)

Worked solution: Let \(y = 3 + 2\mathrm{e}^{-x}\). Then \(\mathrm{e}^{-x} = \frac{y - 3}{2}\), so \(-x = \ln\left(\frac{y - 3}{2}\right)\) and \(x = \ln\left(\frac{2}{y - 3}\right)\).
So \(\mathrm{f}^{-1}(x) = \ln\left(\frac{2}{x - 3}\right)\), with domain \(x \gt 3\) (the range of \(\mathrm{f}\)).

(c) Answer: \(\mathrm{fg}(x) = 3 + 2\mathrm{e}^{-\ln(x - 1)} = 3 + \frac{2}{x - 1} = \frac{3x - 1}{x - 1}\)
  • M1 for \(\mathrm{fg}(x) = 3 + 2\mathrm{e}^{-\ln(x - 1)}\)
  • M1 for using \(\mathrm{e}^{-\ln(x - 1)} = \frac{1}{x - 1}\)
  • A1* for combining into a single fraction to obtain \(\frac{3x - 1}{x - 1}\)

Worked solution: \(\mathrm{fg}(x) = 3 + 2\mathrm{e}^{-\ln(x - 1)} = 3 + 2\mathrm{e}^{\ln\left(\frac{1}{x - 1}\right)} = 3 + \frac{2}{x - 1} = \frac{3(x - 1) + 2}{x - 1} = \frac{3x - 1}{x - 1}\)⁠.

(d) Answer: \(x = \frac{3}{2}\)
  • M1 for \(\frac{3x - 1}{x - 1} = 7\) (or \(\frac{2}{x - 1} = 4\)) and an attempt to solve
  • A1 for \(x = \frac{3}{2}\)

Worked solution: \(3 + \frac{2}{x - 1} = 7\) gives \(\frac{2}{x - 1} = 4\), so \(x - 1 = \frac{1}{2}\) and \(x = \frac{3}{2}\), which is in the domain \(x \gt 1\).

More in Algebra and functions

Stuck? Get 1-to-1 help.

Chhetri Academy tutors GCSE and A level Maths and Science online, with a free 30-minute trial lesson.