A-level Mathematics

2.10 Composite and inverse functions — Learn

Prerequisites: substituting into an expression; rearranging a formula; solving a modulus equation from 2.9; the graph of y=xy = x.

By the end of this section you can: use function notation and state a domain and a range; form a composite function and explain why order matters; decide whether a function has an inverse; and find an inverse by rearranging, including after restricting the domain.

1. Function language

A function is a rule that turns each allowed input into exactly one output. The set of allowed inputs is the domain, and the set of outputs is the range.

f(x)=2x+3f(x) = 2x + 3

has the whole real line as its domain and the whole real line as its range.

A function is one-to-one when different inputs always give different outputs. Only a one-to-one function can be reversed, because the reverse rule must give a single answer for each output.

2. Composite functions

A composite function applies one function and then another. The notation f(g(x))f(g(x)), often written fg(x)fg(x), means "apply gg first, then ff".

Example 1. Given f(x)=3x+1f(x) = 3x + 1 and g(x)=x2g(x) = x^2, find f(g(x))f(g(x)) and g(f(x))g(f(x)).

Substitute g(x)g(x) into ff:

f(g(x))=3(x2)+1=3x2+1.f(g(x)) = 3\left(x^2\right) + 1 = 3x^2 + 1.

Substitute f(x)f(x) into gg:

g(f(x))=(3x+1)2=9x2+6x+1.g(f(x)) = (3x + 1)^2 = 9x^2 + 6x + 1.

The two answers are different, so f(g(x))f(g(x)) and g(f(x))g(f(x)) are not the same. The order of the functions matters. Work from the inside out.

The domain of a composite is the set of inputs allowed by the first function applied, and then by the second. If g(x)=xg(x) = \sqrt{x} and f(x)=x−3f(x) = x - 3, then f(g(x))=x−3f(g(x)) = \sqrt{x} - 3 needs x≥0x \geq 0.

3. Inverse functions

The inverse function f−1f^{-1} undoes ff. If ff sends aa to bb, then f−1f^{-1} sends bb back to aa. Composing a function with its inverse returns the input:

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

To find an inverse, write y=f(x)y = f(x), make xx the subject, then swap the letters.

Example 2. Find the inverse of f(x)=3x−2f(x) = 3x - 2.

Write y=3x−2y = 3x - 2. Add 22:

y+2=3x.y + 2 = 3x.

Divide by 33:

x=y+23.x = \frac{y + 2}{3}.

Swap the letters to name the inverse as a function of xx:

f−1(x)=x+23.f^{-1}(x) = \frac{x + 2}{3}.

Check: f−1(f(x))=(3x−2)+23=3x3=xf^{-1}(f(x)) = \frac{(3x - 2) + 2}{3} = \frac{3x}{3} = x.

Example 3. Find the inverse of f(x)=x+1x−2f(x) = \dfrac{x + 1}{x - 2}, where x≠2x \neq 2.

Write y=x+1x−2y = \frac{x + 1}{x - 2} and multiply both sides by x−2x - 2:

y(x−2)=x+1.y(x - 2) = x + 1.

Expand and collect the xx terms on one side:

yx−2y=x+1,yx−x=2y+1,x(y−1)=2y+1.yx - 2y = x + 1, \qquad yx - x = 2y + 1, \qquad x(y - 1) = 2y + 1.

Divide by y−1y - 1:

x=2y+1y−1.x = \frac{2y + 1}{y - 1}.

Swap the letters:

f−1(x)=2x+1x−1,x≠1.f^{-1}(x) = \frac{2x + 1}{x - 1}, \qquad x \neq 1.

4. The graph of an inverse

The graph of y=f−1(x)y = f^{-1}(x) is the graph of y=f(x)y = f(x) reflected in the line y=xy = x. The reflection swaps the two coordinates, which is exactly what reversing a function does. The domain of f−1f^{-1} is the range of ff, and the range of f−1f^{-1} is the domain of ff.

Example 4. The function f(x)=x2f(x) = x^2 has domain x≥0x \geq 0. Find its inverse.

Write y=x2y = x^2. Then x=±yx = \pm\sqrt{y}. The domain x≥0x \geq 0 selects the positive root, so x=yx = \sqrt{y}. Swap the letters:

f−1(x)=x,x≥0.f^{-1}(x) = \sqrt{x}, \qquad x \geq 0.

Without the restriction, f(x)=x2f(x) = x^2 has no inverse: f(2)=f(−2)=4f(2) = f(-2) = 4, so the reverse rule would not know whether to return 22 or −2-2.

Watch out. Two errors appear again and again.

Treating fgfg as a product. fg(x)fg(x) means f(g(x))f(g(x)), not f(x)×g(x)f(x) \times g(x).

Assuming every function has an inverse. A function must be one-to-one. f(x)=x2f(x) = x^2 is not, so restrict its domain; a function such as f(x)=x3f(x) = x^3 is one-to-one already.

Re-check: after finding an inverse, compose both ways. Both compositions must give xx on the allowed domain.

5. Try it: reflecting a graph in y=xy = x

Predict first. The figure draws the line y=f(x)y = f(x) and its reflection in the line y=xy = x. Before you touch the sliders, choose a point on the line, read its two coordinates, and predict the coordinates of its image. Write the prediction down.

Test. Move the slider for the position of PP along the graph, and watch the image. Then change the gradient and the intercept of ff, and watch both lines move together.

Explain. Write two sentences saying why the image of the point (p,q)(p, q) is (q,p)(q, p), and why the reflected graph is the graph of the inverse function.

Progress check

Return to the chapter problem. The height of the arch at a distance xx from the centre is

h(x)=4−x24,−4≤x≤4.h(x) = 4 - \frac{x^2}{4}, \qquad -4 \leq x \leq 4.
  1. State the domain and the range of hh.
  2. Show that hh is not one-to-one by comparing h(2)h(2) and h(−2)h(-2).
  3. Restrict the domain to 0≤x≤40 \leq x \leq 4 and find the inverse function h−1h^{-1}.
  4. Use the inverse to find the distance from the centre at which the arch is 3.23.2 m high. Compare your answer with the interval you found in 2.6.

You should now be able to

Settings

Colour scheme

Applies to every book you read here.

Reading theme

Applies to every book you read here.