๐Ÿ” Composite and Inverse Functions

A Level Maths Year 2 ยท Algebra and Functions

Level 3 · Ages 17–18

← Back to topic overview
1 Mappings and Functions
A mapping is any rule that sends inputs to outputs. A function is a mapping in which every input has exactly one output. On a graph: every vertical line meets a function's graph at most once.
Type of mappingMeaningExampleFunction?
One-oneEach output comes from exactly one input$y = 2x + 1$,  $y = x^3$Yes
Many-oneSome outputs come from more than one input$y = x^2$ ($2$ and $-2$ both give $4$)Yes
One-manySome inputs have more than one output$y = \pm\sqrt{x}$No
Many-manyBoth of the above$x^2 + y^2 = 4$No
Notation
$\mathrm{f}(x) = x^2 + 1,\; x \in \mathbb{R}$   or   $\mathrm{f} : x \mapsto x^2 + 1,\; x \in \mathbb{R}$
Horizontal line test. A function is one-one if every horizontal line meets its graph at most once. This is the test that decides whether an inverse exists.
2 Domain and Range
The domain is the set of allowed inputs, and is part of the definition of the function. The range is the set of outputs that actually occur. Write the range in terms of $\mathrm{f}(x)$ (or $y$), not $x$.
Values you cannot use. You cannot divide by zero, and you cannot take the square root (or logarithm) of a negative number. These are what usually restrict a domain.
Worked Example 1 โ€” Range of a quadratic

Find the range of $\mathrm{f}(x) = x^2 - 4x + 1$, $x \in \mathbb{R}$.

โ‘ Complete the square: $\mathrm{f}(x) = (x - 2)^2 - 3$.
โ‘ก$(x - 2)^2 \geqslant 0$, with minimum $0$ when $x = 2$.
โ‘ขRange: $\mathrm{f}(x) \geqslant -3$.
Worked Example 2 โ€” A restricted domain

Find the range of $\mathrm{g}(x) = 2x + 1$, $-1 \leqslant x \leqslant 3$, and of $\mathrm{h}(x) = x^2$, $-1 \leqslant x \leqslant 3$.

โ‘ $\mathrm{g}$ is increasing, so its range runs from $\mathrm{g}(-1) = -1$ to $\mathrm{g}(3) = 7$: $\;-1 \leqslant \mathrm{g}(x) \leqslant 7$.
โ‘ก$\mathrm{h}$ is not monotonic on this interval: it falls to $0$ at $x = 0$ then rises to $9$.
โ‘ขRange of $\mathrm{h}$: $0 \leqslant \mathrm{h}(x) \leqslant 9$ โ€” not $1 \leqslant \mathrm{h}(x) \leqslant 9$.
Never find a range by substituting only the end-points. Sketch the graph over the domain and look for turning points inside it.
Worked Example 3 โ€” Domains from the formula

State the largest possible domain, and the corresponding range, of (a) $\mathrm{p}(x) = \dfrac{1}{x - 2}$   (b) $\mathrm{q}(x) = \sqrt{x + 3}$.

โ‘ (a) Cannot divide by zero: domain $x \in \mathbb{R},\, x \neq 2$. The fraction can be any value except $0$: range $\mathrm{p}(x) \neq 0$.
โ‘ก(b) Need $x + 3 \geqslant 0$: domain $x \geqslant -3$. The square root is never negative: range $\mathrm{q}(x) \geqslant 0$.
3 Composite Functions
Composite function
$\mathrm{fg}(x) = \mathrm{f}\big(\mathrm{g}(x)\big)$  โ€”  apply $\mathrm{g}$ first, then $\mathrm{f}$
Read from the right. $\mathrm{fg}(x)$ means "do $\mathrm{g}$, then $\mathrm{f}$". In general $\mathrm{fg}(x) \neq \mathrm{gf}(x)$. And $\mathrm{f}^2(x)$ means $\mathrm{ff}(x)$, not $\big(\mathrm{f}(x)\big)^2$.
Worked Example 4 โ€” Order matters

$\mathrm{f}(x) = x^2$ and $\mathrm{g}(x) = 3x - 1$, both with domain $\mathbb{R}$. Find $\mathrm{fg}(x)$ and $\mathrm{gf}(x)$, and show that $\mathrm{fg}(x) = \mathrm{gf}(x)$ has no real solutions.

โ‘ $\mathrm{fg}(x) = \mathrm{f}(3x - 1) = (3x - 1)^2 = 9x^2 - 6x + 1$
โ‘ก$\mathrm{gf}(x) = \mathrm{g}(x^2) = 3x^2 - 1$
โ‘ขSet equal: $9x^2 - 6x + 1 = 3x^2 - 1 \Rightarrow 6x^2 - 6x + 2 = 0 \Rightarrow 3x^2 - 3x + 1 = 0$.
โ‘ฃDiscriminant $= 9 - 12 = -3 < 0$, so there are no real solutions.
When does $\mathrm{fg}$ exist? The outputs of $\mathrm{g}$ are fed into $\mathrm{f}$, so the range of $\mathrm{g}$ must lie inside the domain of $\mathrm{f}$.
Worked Example 5 โ€” Domain and range of a composite

$\mathrm{f}(x) = \sqrt{x - 1}$, $x \geqslant 1$, and $\mathrm{g}(x) = x^2 + 1$, $x \in \mathbb{R}$. Explain why $\mathrm{fg}$ exists, simplify $\mathrm{fg}(x)$ and state its range.

โ‘ Range of $\mathrm{g}$ is $\mathrm{g}(x) \geqslant 1$, which is exactly the domain of $\mathrm{f}$. So $\mathrm{fg}$ exists for all real $x$.
โ‘ก$\mathrm{fg}(x) = \sqrt{(x^2 + 1) - 1} = \sqrt{x^2} = |x|$
โ‘ขRange: $\mathrm{fg}(x) \geqslant 0$.
$\sqrt{x^2} = |x|$, not $x$. For example $\sqrt{(-3)^2} = 3$.
4 Inverse Functions
The inverse $\mathrm{f}^{-1}$ undoes $\mathrm{f}$: if $\mathrm{f}(a) = b$ then $\mathrm{f}^{-1}(b) = a$. So $\mathrm{f}^{-1}\mathrm{f}(x) = x$ and $\mathrm{f}\mathrm{f}^{-1}(x) = x$. Only one-one functions have inverses โ€” a many-one function would need the inverse to send one input to two outputs.
Domain and range swap
Domain of $\mathrm{f}^{-1}$ = range of $\mathrm{f}$   ยท   Range of $\mathrm{f}^{-1}$ = domain of $\mathrm{f}$
  1. Write $y = \mathrm{f}(x)$.
  2. Rearrange to make $x$ the subject.
  3. Swap the letters: $\mathrm{f}^{-1}(x) = \ldots$, and state its domain (the range of $\mathrm{f}$).
Worked Example 6 โ€” Inverse of a rational function

$\mathrm{f}(x) = \dfrac{2x + 3}{x - 1}$, $x \neq 1$. Find $\mathrm{f}^{-1}(x)$ and state its domain.

โ‘ $y = \dfrac{2x + 3}{x - 1} \Rightarrow y(x - 1) = 2x + 3 \Rightarrow xy - y = 2x + 3$
โ‘กCollect $x$ terms: $xy - 2x = y + 3 \Rightarrow x(y - 2) = y + 3 \Rightarrow x = \dfrac{y + 3}{y - 2}$
โ‘ข$\mathrm{f}^{-1}(x) = \dfrac{x + 3}{x - 2}$,  $x \neq 2$.
Check: $\mathrm{f}(2) = \dfrac{7}{1} = 7$ and $\mathrm{f}^{-1}(7) = \dfrac{10}{5} = 2$ โœ“. The value $2$ is excluded from the domain of $\mathrm{f}^{-1}$ because $2$ is not in the range of $\mathrm{f}$.
Worked Example 7 โ€” Restricting the domain to make an inverse

$\mathrm{f}(x) = x^2 - 4x + 1$, $x \geqslant 2$. Find $\mathrm{f}^{-1}(x)$, stating its domain and range.

โ‘ $\mathrm{f}(x) = (x - 2)^2 - 3$. On $x \geqslant 2$ this is increasing, so it is one-one. Range: $\mathrm{f}(x) \geqslant -3$.
โ‘ก$y = (x - 2)^2 - 3 \Rightarrow (x - 2)^2 = y + 3 \Rightarrow x - 2 = \sqrt{y + 3}$  (positive root, as $x \geqslant 2$)
โ‘ข$\mathrm{f}^{-1}(x) = 2 + \sqrt{x + 3}$, domain $x \geqslant -3$, range $\mathrm{f}^{-1}(x) \geqslant 2$.
On all of $\mathbb{R}$, $x^2 - 4x + 1$ is many-one and has no inverse. Restricting to one side of the vertex is the standard fix.
5 The Graph of an Inverse
Swapping $x$ and $y$ swaps every point $(a, b)$ to $(b, a)$. So the graph of $y = \mathrm{f}^{-1}(x)$ is the reflection of $y = \mathrm{f}(x)$ in the line $y = x$.
-2 -1 1 2 3 4 -2 -1 1 2 3 4 x y (2, 2) (0, โˆ’2) (โˆ’2, 0) y = f(x) y = fโปยน(x) y = x
Worked Example 8 โ€” Where a function meets its inverse

$\mathrm{f}(x) = x^2 - 2$, $x \geqslant 0$. Find $\mathrm{f}^{-1}(x)$ and the point where $y = \mathrm{f}(x)$ meets $y = \mathrm{f}^{-1}(x)$.

โ‘ Range of $\mathrm{f}$: $\mathrm{f}(x) \geqslant -2$. Then $x = \sqrt{y + 2}$, so $\mathrm{f}^{-1}(x) = \sqrt{x + 2}$, $x \geqslant -2$.
โ‘ก$\mathrm{f}$ is increasing, so the graphs meet on the mirror line $y = x$. Solve $\mathrm{f}(x) = x$.
โ‘ข$x^2 - 2 = x \Rightarrow x^2 - x - 2 = 0 \Rightarrow (x - 2)(x + 1) = 0$.
โ‘ฃ$x \geqslant 0$, so $x = 2$. The graphs meet at $(2, 2)$, as in the diagram.
Solving $\mathrm{f}(x) = x$ instead of $\mathrm{f}(x) = \mathrm{f}^{-1}(x)$ is safe for increasing functions. A decreasing function can meet its inverse off the line $y = x$ โ€” for example $\mathrm{f}(x) = -x^3$.
Self-inverse functions. If $\mathrm{f}^{-1} = \mathrm{f}$, the graph is symmetric in $y = x$ and $\mathrm{ff}(x) = x$. Examples: $\mathrm{f}(x) = \dfrac{1}{x}$, $\;\mathrm{f}(x) = 5 - x$, $\;\mathrm{f}(x) = \dfrac{x + 3}{x - 1}$.
6 Quick Reference

Function

Every input has exactly one output.

One-one

Passes the horizontal line test.

Range

Sketch over the domain; check turning points.

$\mathrm{fg}(x)$

$\mathrm{f}(\mathrm{g}(x))$: do $\mathrm{g}$ first.

$\mathrm{fg}$ exists

Range of $\mathrm{g}$ $\subseteq$ domain of $\mathrm{f}$.

Inverse exists

Only if $\mathrm{f}$ is one-one.

Finding $\mathrm{f}^{-1}$

$y = \mathrm{f}(x)$, make $x$ the subject, swap.

Swap

Domain of $\mathrm{f}^{-1}$ = range of $\mathrm{f}$.

Graph

Reflect in $y = x$.

7 Practice Questions
Question 1

Classify each mapping (from $\mathbb{R}$) as one-one, many-one, or not a function:  (a) $y = x^3$  (b) $y = x^4$  (c) $y^2 = x$.

โ–ถ Show solution

(a) One-one: each output comes from one input.

(b) Many-one: e.g. $x = 1$ and $x = -1$ both give $1$.

(c) Not a function: $x = 4$ gives $y = 2$ and $y = -2$ (one-many); and negative $x$ give no output at all.

Question 2

Find the range of $\mathrm{f}(x) = 3 - 2x$, $-2 \leqslant x \leqslant 4$.

โ–ถ Show solution

$\mathrm{f}$ is decreasing: $\mathrm{f}(-2) = 7$ and $\mathrm{f}(4) = -5$.

Range: $-5 \leqslant \mathrm{f}(x) \leqslant 7$.

Question 3

Find the range of $\mathrm{f}(x) = x^2 + 6x + 5$, $x \in \mathbb{R}$.

โ–ถ Show solution

$\mathrm{f}(x) = (x + 3)^2 - 4$, minimum $-4$ at $x = -3$.

Range: $\mathrm{f}(x) \geqslant -4$.

Question 4

$\mathrm{f}(x) = 2x - 1$ and $\mathrm{g}(x) = x^2 + 3$, $x \in \mathbb{R}$. Find (a) $\mathrm{fg}(2)$  (b) $\mathrm{gf}(x)$  (c) the values of $x$ for which $\mathrm{gf}(x) = 7$.

โ–ถ Show solution

(a) $\mathrm{g}(2) = 7$, so $\mathrm{fg}(2) = \mathrm{f}(7) = 13$.

(b) $\mathrm{gf}(x) = (2x - 1)^2 + 3 = 4x^2 - 4x + 4$.

(c) $4x^2 - 4x + 4 = 7 \Rightarrow 4x^2 - 4x - 3 = 0 \Rightarrow (2x - 3)(2x + 1) = 0$, so $x = \tfrac32$ or $x = -\tfrac12$.

Question 5

Find $\mathrm{f}^{-1}(x)$ for $\mathrm{f}(x) = \dfrac{3x - 2}{5}$, $x \in \mathbb{R}$.

โ–ถ Show solution

$y = \dfrac{3x - 2}{5} \Rightarrow 5y = 3x - 2 \Rightarrow x = \dfrac{5y + 2}{3}$

$\mathrm{f}^{-1}(x) = \dfrac{5x + 2}{3}$, $x \in \mathbb{R}$.

Question 6

$\mathrm{f}(x) = \dfrac{4}{x - 3}$, $x \neq 3$. Find $\mathrm{f}^{-1}(x)$ and state its domain and range.

โ–ถ Show solution

$y = \dfrac{4}{x - 3} \Rightarrow x - 3 = \dfrac{4}{y} \Rightarrow x = 3 + \dfrac{4}{y}$

$\mathrm{f}^{-1}(x) = 3 + \dfrac{4}{x}$.

The range of $\mathrm{f}$ is all reals except $0$, so the domain of $\mathrm{f}^{-1}$ is $x \neq 0$, and its range is $\mathrm{f}^{-1}(x) \neq 3$.

Question 7

Explain why $\mathrm{f}(x) = x^2 - 4$, $x \in \mathbb{R}$, has no inverse. Find the smallest value of $k$ for which $\mathrm{g}(x) = x^2 - 4$, $x \geqslant k$, has an inverse, and find $\mathrm{g}^{-1}(x)$ for that $k$.

โ–ถ Show solution

$\mathrm{f}$ is many-one: e.g. $\mathrm{f}(2) = \mathrm{f}(-2) = 0$. Only one-one functions have inverses.

The vertex is at $x = 0$; the function is one-one on $x \geqslant 0$, and on no larger interval of the form $x \geqslant k$. So $k = 0$.

Range of $\mathrm{g}$: $\mathrm{g}(x) \geqslant -4$. $\;y = x^2 - 4 \Rightarrow x = \sqrt{y + 4}$.

$\mathrm{g}^{-1}(x) = \sqrt{x + 4}$, $x \geqslant -4$.

Question 8

$\mathrm{f}(x) = x^2 - 6x + 10$, $x \geqslant 3$. (a) State the range of $\mathrm{f}$.  (b) Find $\mathrm{f}^{-1}(x)$.  (c) Solve $\mathrm{f}(x) = \mathrm{f}^{-1}(x)$.

โ–ถ Show solution

(a) $\mathrm{f}(x) = (x - 3)^2 + 1$, so $\mathrm{f}(x) \geqslant 1$.

(b) $x - 3 = \sqrt{y - 1}$ (positive root since $x \geqslant 3$), so $\mathrm{f}^{-1}(x) = 3 + \sqrt{x - 1}$, $x \geqslant 1$.

(c) $\mathrm{f}$ is increasing on its domain, so the graphs meet on $y = x$: $x^2 - 6x + 10 = x \Rightarrow x^2 - 7x + 10 = 0 \Rightarrow (x - 2)(x - 5) = 0$.

$x \geqslant 3$, so $x = 5$. Check: $\mathrm{f}(5) = 25 - 30 + 10 = 5$ โœ“ and $\mathrm{f}^{-1}(5) = 3 + 2 = 5$ โœ“.

Question 9

$\mathrm{f}(x) = \dfrac{x + 3}{x - 1}$, $x \neq 1$. Show that $\mathrm{ff}(x) = x$, and hence write down $\mathrm{f}^{-1}(x)$.

โ–ถ Show solution

$\mathrm{ff}(x) = \dfrac{\dfrac{x+3}{x-1} + 3}{\dfrac{x+3}{x-1} - 1}$. Multiply top and bottom by $(x - 1)$:

$= \dfrac{(x + 3) + 3(x - 1)}{(x + 3) - (x - 1)} = \dfrac{4x}{4} = x$ โœ“

Since applying $\mathrm{f}$ twice returns $x$, $\mathrm{f}$ undoes itself: $\mathrm{f}^{-1}(x) = \dfrac{x + 3}{x - 1}$, $x \neq 1$.

Question 10

The function $\mathrm{f}(C) = 1.8C + 32$ converts a temperature in degrees Celsius to degrees Fahrenheit, and $\mathrm{g}(C) = C + 273.15$ converts Celsius to kelvin.

(a) Find $\mathrm{f}^{-1}$ and explain what it does.  (b) Find a single function that converts kelvin directly to Fahrenheit, writing it as a composite of $\mathrm{f}$ and $\mathrm{g}^{-1}$.  (c) Find the temperature that has the same numerical value in Celsius and Fahrenheit.  (d) Temperatures in kelvin cannot be negative. State the corresponding restriction on the domain of $\mathrm{f}$, and the range of $\mathrm{f}$ on this domain.

โ–ถ Show solution

(a) $F = 1.8C + 32 \Rightarrow C = \dfrac{F - 32}{1.8}$, so $\mathrm{f}^{-1}(F) = \dfrac{F - 32}{1.8}$. It converts Fahrenheit back to Celsius.

(b) $\mathrm{g}^{-1}(K) = K - 273.15$ converts kelvin to Celsius; then apply $\mathrm{f}$.

$\mathrm{fg}^{-1}(K) = 1.8(K - 273.15) + 32 = 1.8K - 491.67 + 32 = 1.8K - 459.67$.

(c) $\mathrm{f}(C) = C$: $1.8C + 32 = C \Rightarrow 0.8C = -32 \Rightarrow C = -40$. So $-40\,^\circ$C $= -40\,^\circ$F.

(d) $K \geqslant 0 \Rightarrow C + 273.15 \geqslant 0 \Rightarrow C \geqslant -273.15$.

$\mathrm{f}$ is increasing, so its range is $\mathrm{f}(C) \geqslant 1.8(-273.15) + 32 = -459.67$.

Composite and Inverse Functions · A Level Maths Year 2 · Created with MathJax