top of page
Landing%2520Page_edited_edited.jpg

Composite and Inverse Functions

Online Maths Courses

Quick Links

A composite function fg(x) means f(g(x)): apply g first, then f, and in general fg(x) is not the same as gf(x). An inverse function f⁻¹ undoes f, and exists only when f is one-to-one. To find it, write y = f(x), rearrange to make x the subject, then swap the letters. The range of f becomes the domain of f⁻¹, and the graph of f⁻¹ is the reflection of f in y = x.

Key facts for composite and inverse functions

  • fg(x) = f(g(x)): apply g first, then f
  • ff⁻¹(x) = f⁻¹f(x) = x
  • Domain of f⁻¹ = range of f, and range of f⁻¹ = domain of f
  • y = f⁻¹(x) is the reflection of y = f(x) in the line y = x

What is a composite function?

fg(x) means feed x into g, then feed the result into f. The function written nearest to x acts first. Order matters: with f(x) = eˣ and g(x) = 2x − 1, fg(x) = e^(2x − 1) but gf(x) = 2eˣ − 1.


Composites with eˣ and ln x often simplify, because e^(ln u) = u and ln(e^u) = u. With rational functions, a composite can produce an improper fraction that you then simplify by division.


Solving composite equations

To solve fg(x) = k, form the composite first, then solve the resulting equation. With exponentials and logarithms, undo each layer using ln or e. With rational functions you may reach a quadratic, so do not lose the second solution.


The classic slip is applying the functions the wrong way round. Substitute the inner function first, then apply the outer one.


How do you find an inverse function?

Write y = f(x) and rearrange to make x the subject. Then swap x and y to write f⁻¹(x). Exponentials invert to logarithms and logarithms to exponentials, while rational functions need careful rearranging: collect the y terms on one side and factorise y out.


Graphically, the inverse is the reflection of the original curve in the line y = x.


When does an inverse exist?

Only a one-to-one function has an inverse, meaning each output comes from exactly one input. A function like x² is not one-to-one over all real numbers, so it needs its domain restricting (for example to x ≥ 0) before it has an inverse.


Domain and range of inverses and composites

The range of f becomes the domain of f⁻¹, and the domain of f becomes its range. For a composite fg, the domain is restricted by g's own domain and by what f will accept as an input. For example, if the outer function contains ln, whatever g produces must be positive.


Self-inverse functions

A function is self-inverse if ff(x) = x, so that f⁻¹ = f. Its graph is symmetric about y = x. To test for this, work out ff(x) fully and simplify; if it collapses to x, the function is its own inverse.

Worked examples

Example 1. Given f(x) = eˣ and g(x) = 2x − 1, find fg(x) and gf(x).

  1. fg(x) = f(2x − 1) = e^(2x − 1).
  2. gf(x) = g(eˣ) = 2eˣ − 1.
  3. These are different, so the order matters.

Answer: fg(x) = e^(2x − 1) and gf(x) = 2eˣ − 1.

Marks: B1 for fg, B1 for gf.


Example 2. Given f(x) = eˣ and g(x) = x − 2, solve fg(x) = 5.

  1. fg(x) = e^(x − 2).
  2. e^(x − 2) = 5, so x − 2 = ln 5.
  3. x = 2 + ln 5.

Answer: x = 2 + ln 5.

Marks: M1 for x − 2 = ln 5, A1 for x = 2 + ln 5.


Example 3. Find the inverse of f(x) = eˣ + 2.

  1. Write y = eˣ + 2, so eˣ = y − 2.
  2. x = ln(y − 2).
  3. Swap the letters: f⁻¹(x) = ln(x − 2).

Answer: f⁻¹(x) = ln(x − 2).

Marks: M1 for eˣ = y − 2, A1 for ln(x − 2).


Example 4. For f(x) = eˣ + 1, with domain all real x, state the domain of f⁻¹.

  1. eˣ > 0, so the range of f is f(x) > 1.
  2. The domain of f⁻¹ is the range of f.

Answer: x > 1.

Marks: M1 for the range of f, A1 for the domain of f⁻¹.


Example 5. Show that f(x) = 1/x is self-inverse.

  1. ff(x) = f(1/x) = 1 / (1/x).
  2. 1 / (1/x) = x.
  3. So ff(x) = x, which means f⁻¹ = f.

Marks: M1 for forming ff(x), A1 for showing it equals x.

Common mistakes

  • Applying the functions in the wrong order. In fg(x), g acts first. Write f(g(x)) to keep the order clear.
  • Confusing f⁻¹(x) with 1/f(x). The inverse function undoes f; it is not the reciprocal.
  • Forgetting to swap x and y. After making x the subject, rewrite the answer as f⁻¹(x) in terms of x.
  • Giving the wrong domain for the inverse. The domain of f⁻¹ is the range of f, not the domain of f.
  • Finding an inverse of a function that is not one-to-one. Restrict the domain first so that each output comes from one input.

How composite and inverse functions are examined

Composite and inverse functions are examined on WMA13, the Pure 3 paper of Edexcel International A-Level, and in second-year Pure for Edexcel A-Level (9MA0). Typical tasks:

  • find fg(x) or gf(x) and simplify it
  • solve an equation such as fg(x) = k
  • find f⁻¹(x) and state its domain
  • explain why an inverse exists, or why a function is one-to-one on a given domain


Full questions with mark schemes are in the Pure 3 functions and graphs exam questions. The worksheet on functions and graphs adds further practice, as does the A-Level algebra revision engine.


This builds on domain and range, and the same ideas define inverse trig functions.

Frequently asked questions

Is fg(x) the same as gf(x)?

Usually not. fg(x) applies g first and gf(x) applies f first, so they give different results except in special cases.


How do you find the inverse of a function?

Write y = f(x), rearrange to make x the subject, then swap x and y to get f⁻¹(x).


Why does an inverse need a one-to-one function?

An inverse must send each output back to a single input. If two inputs give the same output, the inverse would not know which one to return.

bottom of page