Skip to content
MathsGenie logo
Quick links
Open app

Course home

  1. A Level
  2. Maths AQA
  3. Revision guides

1.5.8 Composite and inverse functions (A-level only)

What you'll learn

  • How to combine two functions to form a composite function.
  • How to find and use an inverse function.
  • Why domains and ranges matter, especially when a function is not one-to-one.
  • How the graphs of a function and its inverse are related.

Function basics

A function is a rule that assigns exactly one output to each permitted input. If the function is called fff, then f(x)f(x)f(x) means the output produced when the input is xxx.

For example, if f(x)=3x−2f(x)=3x-2f(x)=3x−2, then f(5)=3(5)−2=13f(5)=3(5)-2=13f(5)=3(5)−2=13.

Definition

Domain and range

The domain of a function is the set of permitted input values. The range is the set of output values the function can produce.

The domain may be stated explicitly, such as x≥0x\geq 0x≥0, or implied by the formula. For example, the domain of f(x)=x−2f(x)=\sqrt{x-2}f(x)=x−2​ must satisfy x≥2x\geq 2x≥2.

Example

Finding a domain and range

Let f(x)=x−2+1f(x)=\sqrt{x-2}+1f(x)=x−2​+1.

  1. For the square root to be defined, its contents must be non-negative:
x−2≥0⇒x≥2. x-2\geq 0\Rightarrow x\geq 2. x−2≥0⇒x≥2.

Therefore, the domain is x≥2x\geq 2x≥2.

  1. Since x−2≥0\sqrt{x-2}\geq 0x−2​≥0, adding one gives
f(x)=x−2+1≥1. f(x)=\sqrt{x-2}+1\geq 1. f(x)=x−2​+1≥1.
  1. Every value greater than or equal to one can be produced, so the range is f(x)≥1f(x)\geq 1f(x)≥1.

Composite functions

A composite function is formed by applying one function and then applying another function to the result.

Definition

Composite function notation

The notation fg(x)fg(x)fg(x) means f(g(x))f(g(x))f(g(x)): apply ggg first, then apply fff. It may also be written as (f∘g)(x)(f\circ g)(x)(f∘g)(x).

The order is important. In general,

fg(x)≠gf(x). fg(x)\neq gf(x). fg(x)=gf(x).

Think of the function written closest to xxx as the one acting first.

Example

Finding composite functions

Let

f(x)=2x+3,g(x)=x2−1. f(x)=2x+3,\qquad g(x)=x^2-1. f(x)=2x+3,g(x)=x2−1.

Find fg(x)fg(x)fg(x) and gf(x)gf(x)gf(x).

  1. For fg(x)=f(g(x))fg(x)=f(g(x))fg(x)=f(g(x)), substitute the whole expression g(x)=x2−1g(x)=x^2-1g(x)=x2−1 in place of the input of fff:
fg(x)=2(x2−1)+3. fg(x)=2(x^2-1)+3. fg(x)=2(x2−1)+3.
  1. Simplify:
fg(x)=2x2+1. fg(x)=2x^2+1. fg(x)=2x2+1.
  1. For gf(x)=g(f(x))gf(x)=g(f(x))gf(x)=g(f(x)), substitute f(x)=2x+3f(x)=2x+3f(x)=2x+3 into ggg:
gf(x)=(2x+3)2−1. gf(x)=(2x+3)^2-1. gf(x)=(2x+3)2−1.
  1. Expand and simplify:
gf(x)=4x2+12x+8. gf(x)=4x^2+12x+8. gf(x)=4x2+12x+8.

The two composites are different, confirming that the order matters.

Common Mistake

Substituting only for one occurrence of x

When forming a composite, replace every occurrence of the input variable with the entire inner function. Use brackets before expanding.

Evaluating a composite at a particular input

You can find a numerical value by working from the inside out. It is often quicker to calculate the inner output first rather than finding a full algebraic expression.

Example

Evaluating a composite function

Let f(x)=1x+1f(x)=\frac{1}{x+1}f(x)=x+11​ and g(x)=3x−2g(x)=3x-2g(x)=3x−2. Find fg(4)fg(4)fg(4).

  1. Apply the inner function first:
g(4)=3(4)−2=10. g(4)=3(4)-2=10. g(4)=3(4)−2=10.
  1. Use this result as the input to fff:
fg(4)=f(10)=110+1. fg(4)=f(10)=\frac{1}{10+1}. fg(4)=f(10)=10+11​.
  1. Therefore,
fg(4)=111. fg(4)=\frac{1}{11}. fg(4)=111​.

Domains of composite functions

For fg(x)fg(x)fg(x) to be defined:

  • xxx must belong to the domain of ggg.
  • The output g(x)g(x)g(x) must belong to the domain of fff.
Example

Finding the domain of a composite

Let f(x)=xf(x)=\sqrt{x}f(x)=x​ and g(x)=2x−6g(x)=2x-6g(x)=2x−6. Find fg(x)fg(x)fg(x) and its domain.

  1. Substitute g(x)g(x)g(x) into fff:
fg(x)=2x−6. fg(x)=\sqrt{2x-6}. fg(x)=2x−6​.
  1. The expression inside the square root must be non-negative:
2x−6≥0. 2x-6\geq 0. 2x−6≥0.
  1. Solving gives x≥3x\geq 3x≥3, so the domain of fgfgfg is x≥3x\geq 3x≥3.

Inverse functions

An inverse function reverses the effect of the original function. The inverse of fff is written f−1f^{-1}f−1.

Definition

Inverse function

If fff maps an input xxx to an output yyy, then f−1f^{-1}f−1 maps that output yyy back to the original input xxx.

For example, if f(x)=3x+5f(x)=3x+5f(x)=3x+5, the function multiplies by three and then adds five. Its inverse must subtract five and then divide by three.

Key Idea

Function and inverse undo each other

Where both composites are defined,

f−1f(x)=xandff−1(x)=x. f^{-1}f(x)=x\qquad\text{and}\qquad ff^{-1}(x)=x. f−1f(x)=xandff−1(x)=x.

Be careful: f−1(x)f^{-1}(x)f−1(x) does not mean 1f(x)\frac{1}{f(x)}f(x)1​. The reciprocal and the inverse function are different ideas.

Finding an inverse algebraically

To find an inverse:

  1. Write y=f(x)y=f(x)y=f(x).
  2. Rearrange the equation to make xxx the subject.
  3. Swap the labels xxx and yyy, then write the result as f−1(x)f^{-1}(x)f−1(x).
Example

Finding an inverse function

Find the inverse of f(x)=2x−35f(x)=\frac{2x-3}{5}f(x)=52x−3​.

  1. Begin with
y=2x−35. y=\frac{2x-3}{5}. y=52x−3​.
  1. Rearrange to make xxx the subject:
5y=2x−3, 5y=2x-3, 5y=2x−3, 2x=5y+3, 2x=5y+3, 2x=5y+3, x=5y+32. x=\frac{5y+3}{2}. x=25y+3​.
  1. Exchange the input and output labels:
f−1(x)=5x+32. f^{-1}(x)=\frac{5x+3}{2}. f−1(x)=25x+3​.
  1. Check by composing the functions:
f−1f(x)=5(2x−35)+32=x. f^{-1}f(x)=\frac{5\left(\frac{2x-3}{5}\right)+3}{2}=x. f−1f(x)=25(52x−3​)+3​=x.
Common Mistake

Treating the inverse as a reciprocal

The notation f−1(x)f^{-1}(x)f−1(x) means the inverse function, not 1f(x)\frac{1}{f(x)}f(x)1​. For example, the inverse of f(x)=2xf(x)=2xf(x)=2x is x2\frac{x}{2}2x​, whereas its reciprocal is 12x\frac{1}{2x}2x1​.

When does an inverse exist?

A function has an inverse function only if it is one-to-one.

Definition

One-to-one function

A function is one-to-one if different permitted inputs always produce different outputs. Equivalently, each value in the range comes from exactly one input.

On a graph, a one-to-one function passes the horizontal line test: every horizontal line meets the graph at most once.

For example, f(x)=x2f(x)=x^2f(x)=x2 on the domain of all real numbers is not one-to-one because f(2)=f(−2)=4f(2)=f(-2)=4f(2)=f(−2)=4. Therefore, it does not have an inverse function on that full domain.

Its domain can be restricted, for example to x≥0x\geq 0x≥0. On this restricted domain, it is one-to-one and has the inverse f−1(x)=xf^{-1}(x)=\sqrt{x}f−1(x)=x​.

Common Mistake

Choosing the correct square-root branch

When f(x)=x2f(x)=x^2f(x)=x2 is restricted to x≥0x\geq 0x≥0, its inverse is x\sqrt{x}x​. If it is restricted to x≤0x\leq 0x≤0, its inverse is −x-\sqrt{x}−x​.

Example

Restricting a quadratic to find its inverse

Let f(x)=(x−2)2+1f(x)=(x-2)^2+1f(x)=(x−2)2+1 with domain x≥2x\geq 2x≥2. Find f−1(x)f^{-1}(x)f−1(x).

  1. Write
y=(x−2)2+1. y=(x-2)^2+1. y=(x−2)2+1.
  1. Rearrange:
y−1=(x−2)2. y-1=(x-2)^2. y−1=(x−2)2.

Since the original domain has x≥2x\geq 2x≥2, choose the positive square root:

x−2=y−1. x-2=\sqrt{y-1}. x−2=y−1​.
  1. Make xxx the subject and exchange the labels:
f−1(x)=2+x−1. f^{-1}(x)=2+\sqrt{x-1}. f−1(x)=2+x−1​.
  1. The domain of the inverse is the range of the original function. Since f(x)≥1f(x)\geq 1f(x)≥1, the inverse has domain x≥1x\geq 1x≥1.

Domains and ranges of inverse functions

The domain and range exchange roles when a function is inverted.

Key Idea

Swapping domain and range

The domain of f−1f^{-1}f−1 is the range of fff, and the range of f−1f^{-1}f−1 is the domain of fff.

This happens because the inputs and outputs are reversed. It is especially important for square roots, logarithms and restricted quadratics.

Graphs of inverse functions

The graph of y=f−1(x)y=f^{-1}(x)y=f−1(x) is the reflection of the graph of y=f(x)y=f(x)y=f(x) in the line y=xy=xy=x.

This reflection exchanges the coordinates of every point. If (a,b)(a,b)(a,b) lies on y=f(x)y=f(x)y=f(x), then (b,a)(b,a)(b,a) lies on y=f−1(x)y=f^{-1}(x)y=f−1(x).

A function and its inverse reflected in the line y equals x

The graph of a function and its inverse may intersect. Any intersection on the line y=xy=xy=x can be found by solving

f(x)=x. f(x)=x. f(x)=x.
Tip

Checking an inverse graph

Before sketching, swap some easy coordinate pairs and reflect any endpoints or asymptotes in y=xy=xy=x. The original domain should become the inverse range.

Exam technique

In the exam

  1. Read composites from right to left: in fg(x)fg(x)fg(x), apply ggg first.
  2. Use brackets when substituting one function into another, and check the resulting domain.
  3. Before finding an inverse, check that the function is one-to-one or note the stated domain restriction.
  4. Verify an inverse using f−1f(x)=xf^{-1}f(x)=xf−1f(x)=x, and remember that the domain and range exchange.
  5. For an inverse graph, reflect coordinates in y=xy=xy=x rather than simply turning the page or changing signs.
Self review

Check yourself

  • If f(x)=x+4f(x)=x+4f(x)=x+4 and g(x)=x2g(x)=x^2g(x)=x2, can you find both fg(x)fg(x)fg(x) and gf(x)gf(x)gf(x)?
  • Why does f(x)=x2f(x)=x^2f(x)=x2 need a restricted domain before it can have an inverse?
  • What happens to the domain and range when a function is inverted?

How was this guide?

Teach Genie

Review 1.5.8 Composite and inverse functions (A-level only) by teaching Genie

Teach it back in your own words, spot gaps, and remember it better.

Start teaching
Genie and Baby Genie

1.5.8 Composite and inverse functions (A-level only) Revision Guide

  1. A Level
  2. /Maths
  3. /1.5.8 Composite and inverse functions (A-level only)