9.3 One-to-One and Inverse Functions
SL 2.2 SL 2.5
- what a one-to-one function is, and the horizontal line test
- the idea that an inverse function \(f^{-1}\) reverses (undoes) \(f\)
- that only one-to-one functions have inverses, and that the domain of \(f^{-1}\) is the range of \(f\)
- how to find \(f^{-1}(x)\), and how to check it with \(f\big(f^{-1}(x)\big) = x\)
- that the graph of \(y = f^{-1}(x)\) is the reflection of \(y = f(x)\) in the line \(y = x\)
One-to-one functions
Look at two functions on small sets.
- \(f : x \mapsto x + 3\), with domain \(\{1, 2, 3\}\): \(\;1 \mapsto 4,\; 2 \mapsto 5,\; 3 \mapsto 6\). Every output comes from only one input.
- \(g : x \mapsto x^2 - 1\), with domain \(\{-2, 0, 2\}\): \(\;-2 \mapsto 3,\; 0 \mapsto -1,\; 2 \mapsto 3\). The output \(3\) comes from two inputs, \(-2\) and \(2\).
We say \(f\) is one-to-one, but \(g\) is not. (One-to-one functions are also called injective.)
One-to-one function Not in the formula booklet
A function \(f\) with domain \(D\) is one-to-one if each value \(y\) in the range comes from only one \(x \in D\).
Equivalently: if \(f(a) = f(b)\), then \(a = b\).
- \(D\): the domain of \(f\)
- \(a\): a value in \(D\)
- \(b\): another value in \(D\)
On a graph, an output \(y = b\) is a horizontal line. This gives a second test (Figure 1).
- Left: \(y = 2^x - 1\), \(x \in \mathbb{R}\). Every horizontal line meets the curve at most once. It is one-to-one.
- Right: \(y = 4 - x^2\), \(x \in \mathbb{R}\). The line \(y = 2\) meets the curve at \(x = -\sqrt{2}\) and \(x = \sqrt{2}\). It is not one-to-one.
Horizontal line test Not in the formula booklet
A function is one-to-one if and only if every horizontal line meets its graph at most once.
(Vertical line test: is it a function? Horizontal line test: is the function one-to-one?)
Example 1 Decide whether each function is one-to-one.
(a) \(f : x \mapsto (x - 2)^2,\; x \in \mathbb{R}\)
(b) \(h : x \mapsto (x - 2)^2,\; x \geq 2\)
(a) Both \(x = 0\) and \(x = 4\) give the output \(4\). The horizontal line \(y = 4\) meets the parabola twice. \(f\) is not one-to-one.
(b) Now we only keep the right half of the parabola, which is always increasing. Every horizontal line meets it at most once, so \(h\) is one-to-one.
Example 2 Each arrow diagram in Figure 2 goes from \(X = \{a, b, c\}\) to \(Y = \{p, q, r\}\). For each one, say whether it is not a function, a function that is not one-to-one, or a one-to-one function.
A: each input has one arrow, and each output receives at most one arrow: one-to-one function.
B: each input has one arrow, but \(p\) receives two (from \(a\) and \(b\)): function, not one-to-one.
C: \(a\) has two arrows: not a function.
D: \(b\) has no arrow: not a function from \(X\).
Inverse functions
Let \(f\) have domain \(A = \{1, 2, 3\}\) with \(f(1) = 5\), \(f(2) = 7\), \(f(3) = 9\) (so the rule is \(f(x) = 2x + 3\)). If we reverse every arrow, we get a new function from \(\{5, 7, 9\}\) back to \(\{1, 2, 3\}\):
\[ f^{-1}(5) = 1, \qquad f^{-1}(7) = 2, \qquad f^{-1}(9) = 3 . \]
This is the inverse function \(f^{-1}\). It undoes \(f\): \(f\) means “double, then add \(3\)”, so \(f^{-1}\) means “subtract \(3\), then halve”.
What if \(f\) is not one-to-one? Let \(g(1) = 2\), \(g(2) = 4\), \(g(3) = 10\), \(g(4) = 2\). Reversing the arrows sends \(2\) to both \(1\) and \(4\). That is not a function, so \(g\) has no inverse.
Inverse function Not in the formula booklet
If \(f\) is one-to-one, it has an inverse function \(f^{-1}\), with
\[ f^{-1}(y) = x \iff f(x) = y . \]
- domain of \(f^{-1}\) = range of \(f\), \(\qquad\) range of \(f^{-1}\) = domain of \(f\)
- \(f\big(f^{-1}(x)\big) = x\) and \(f^{-1}\big(f(x)\big) = x\) (each one undoes the other)
A useful idea: solving \(f(x) = 10\) is the same as finding \(f^{-1}(10)\).
The \(-1\) in \(f^{-1}\) is not a power. The reciprocal \(\dfrac{1}{f(x)}\) can be written \(\big[f(x)\big]^{-1}\), which is different.
Finding the inverse of a function
Method: finding \(f^{-1}(x)\)
- Write \(y = f(x)\).
- Make \(x\) the subject: \(x = \ldots\) (in terms of \(y\)).
- Swap the letters: \(f^{-1}(x) = \ldots\)
- State the domain of \(f^{-1}\): it is the range of \(f\).
Example 3 Find the inverse of each function.
(a) \(f(x) = 3x - 4\), \(\;x \in \mathbb{R}\)
(b) \(g(x) = \dfrac{2x + 1}{x - 3}\), \(\;x \neq 3\)
(a) \(y = 3x - 4 \Rightarrow x = \dfrac{y + 4}{3}\). So \(f^{-1}(x) = \dfrac{x + 4}{3}\), \(\;x \in \mathbb{R}\).
Check: \(f\big(f^{-1}(x)\big) = 3 \cdot \dfrac{x + 4}{3} - 4 = x\) ✓.
(b) \(y = \dfrac{2x + 1}{x - 3} \Rightarrow y(x - 3) = 2x + 1 \Rightarrow xy - 3y = 2x + 1\).
Collect the \(x\) terms: \(xy - 2x = 3y + 1 \Rightarrow x(y - 2) = 3y + 1 \Rightarrow x = \dfrac{3y + 1}{y - 2}\).
\[ g^{-1}(x) = \frac{3x + 1}{x - 2}, \qquad x \neq 2 . \]
(The range of \(g\) is all reals except \(2\), because \(y = 2\) is the horizontal asymptote of \(g\).)
Example 4 Let \(f(x) = \mathrm{e}^{x} + 5\), \(x \in \mathbb{R}\). Find \(f^{-1}(x)\) and its domain. Hence solve \(f(x) = 12\).
\(y = \mathrm{e}^{x} + 5 \Rightarrow \mathrm{e}^{x} = y - 5 \Rightarrow x = \ln(y - 5)\).
\(f^{-1}(x) = \ln(x - 5)\). The range of \(f\) is \(f(x) > 5\), so the domain of \(f^{-1}\) is \(x > 5\).
\(f(x) = 12 \iff x = f^{-1}(12) = \ln 7\).
AHL A function that is not one-to-one (for example \(f(x) = x^2\)) can be given an inverse by restricting its domain: see 9.5.
Graphing inverse functions
Let \(f(x) = 2x + 3\). Its inverse is \(f^{-1}(x) = \dfrac{x - 3}{2}\). Both are drawn in Figure 3.
The point \((0, 3)\) is on \(y = f(x)\), and \((3, 0)\) is on \(y = f^{-1}(x)\). The point \((-1.5, 0)\) is on \(f\), and \((0, -1.5)\) is on \(f^{-1}\). Swapping \(x\) and \(y\) is a reflection in the line \(y = x\). Here the two lines meet on \(y = x\), at \((-3, -3)\).
Graph of \(y = f^{-1}(x)\) Not in the formula booklet
The graph of \(y = f^{-1}(x)\) is the reflection of the graph of \(y = f(x)\) in the line \(y = x\).
| On \(y = f(x)\) | On \(y = f^{-1}(x)\) |
|---|---|
| the point \((a, b)\) | the point \((b, a)\) |
| a vertical asymptote \(x = k\) | a horizontal asymptote \(y = k\) |
| a horizontal asymptote \(y = k\) | a vertical asymptote \(x = k\) |
| domain \(D\), range \(R\) | domain \(R\), range \(D\) |
| an intersection with \(y = x\) | the same point (it is on both graphs) |
- \((a, b)\): any point on the graph of \(y = f(x)\)
- \(k\): a constant
- \(D\): the domain of \(f\)
- \(R\): the range of \(f\)
Be careful: the graphs of \(f\) and \(f^{-1}\) can also meet at points that are not on \(y = x\) (this can happen when \(f\) is decreasing). For an increasing function, any meeting point is on \(y = x\), so you can solve \(f(x) = x\) instead of \(f(x) = f^{-1}(x)\).
Example 5 The graph of \(y = f(x)\), where \(f(x) = \log_2(x + 4)\), \(x > -4\), is shown. On the same diagram, sketch the graph of \(y = f^{-1}(x)\). Label any asymptotes and the points where the graph meets the axes.
Reflect everything in \(y = x\):
- the vertical asymptote \(x = -4\) becomes the horizontal asymptote \(y = -4\);
- the \(x\)-intercept \((-3, 0)\) becomes the \(y\)-intercept \((0, -3)\);
- the \(y\)-intercept \((0, 2)\) becomes the \(x\)-intercept \((2, 0)\).
(Algebraically, \(f^{-1}(x) = 2^x - 4\), and indeed \(2^0 - 4 = -3\) and \(2^2 - 4 = 0\).)
Common errors
| ✗ Wrong | ✓ Right | Why |
|---|---|---|
| \(f^{-1}(x) = \dfrac{1}{f(x)}\) | \(f^{-1}\) undoes \(f\) | The \(-1\) is not a power. |
| \(f^{-1}(x) = -2 \pm \sqrt{x + 3}\) | Choose one sign from the domain of \(f\) | An inverse function must give one output. |
| Reflecting in the \(x\)-axis or \(y\)-axis | Reflect in the line \(y = x\) | Inputs and outputs are swapped. |
| “\(f\) and \(f^{-1}\) only meet on \(y = x\)” | True for increasing \(f\) only | Decreasing functions can meet their inverse elsewhere. |
Exercises
1 Which of these functions are one-to-one? Give a reason.
(a) \(f(x) = 5 - 3x\), \(x \in \mathbb{R}\)
(b) \(g(x) = x^2 + 1\), \(x \in \mathbb{R}\)
(c) \(h(x) = x^3\), \(x \in \mathbb{R}\)
(d) \(k(x) = |x|\), \(x \geq 0\)
(a) Yes: a straight line with non-zero gradient passes every horizontal line once.
(b) No: \(g(-1) = g(1) = 2\).
(c) Yes: \(x^3\) is always increasing.
(d) Yes: on \(x \geq 0\), \(|x| = x\), which is increasing.
2 Find \(f^{-1}(x)\) for \(f(x) = \dfrac{5x - 2}{4}\), \(x \in \mathbb{R}\), and check that \(f\big(f^{-1}(x)\big) = x\).
\(y = \dfrac{5x - 2}{4} \Rightarrow 4y = 5x - 2 \Rightarrow x = \dfrac{4y + 2}{5}\). \(\;f^{-1}(x) = \dfrac{4x + 2}{5}\).
Check: \(f\left(\dfrac{4x + 2}{5}\right) = \dfrac{(4x + 2) - 2}{4} = x\) ✓.
3 Let \(f(x) = 7 - 2x\). Without finding \(f^{-1}(x)\), find \(f^{-1}(15)\).
\(f^{-1}(15)\) is the \(x\) with \(f(x) = 15\): \(\;7 - 2x = 15 \Rightarrow x = -4\). So \(f^{-1}(15) = -4\).
4 Find the inverse of \(g(x) = \dfrac{x + 4}{x - 1}\), \(x \neq 1\), and state its domain.
\(y(x - 1) = x + 4 \Rightarrow xy - x = y + 4 \Rightarrow x(y - 1) = y + 4 \Rightarrow x = \dfrac{y + 4}{y - 1}\).
\(g^{-1}(x) = \dfrac{x + 4}{x - 1}\), \(x \neq 1\). (Here \(g^{-1} = g\): see Section 9.5.)
5 Let \(h(x) = \ln(2x - 1)\), \(x > \dfrac{1}{2}\). Find \(h^{-1}(x)\) and state its domain and range.
\(y = \ln(2x - 1) \Rightarrow 2x - 1 = \mathrm{e}^{y} \Rightarrow x = \dfrac{\mathrm{e}^{y} + 1}{2}\).
\(h^{-1}(x) = \dfrac{\mathrm{e}^{x} + 1}{2}\). Domain \(x \in \mathbb{R}\) (the range of \(h\)); range \(h^{-1}(x) > \dfrac{1}{2}\) (the domain of \(h\)).
6 Let \(f(x) = 4 - \sqrt{x + 1}\), \(x \geq -1\). Find \(f^{-1}(x)\) and its domain.
Range of \(f\): \(\sqrt{x + 1} \geq 0\), so \(f(x) \leq 4\).
\(y = 4 - \sqrt{x + 1} \Rightarrow \sqrt{x + 1} = 4 - y \Rightarrow x = (4 - y)^2 - 1\).
\(f^{-1}(x) = (4 - x)^2 - 1\), \(\;x \leq 4\).
7 Let \(f(x) = 5 - 2x\). Find \(f^{-1}(x)\), and check that \(f\big(f^{-1}(x)\big) = x\).
\(y = 5 - 2x \Rightarrow 2x = 5 - y \Rightarrow x = \dfrac{5 - y}{2}\). So \(f^{-1}(x) = \dfrac{5 - x}{2}\).
Check: \(f\big(f^{-1}(x)\big) = 5 - 2 \times \dfrac{5 - x}{2} = 5 - (5 - x) = x\) ✓
8 Let \(f(x) = \dfrac{2x + 1}{x - 3}\), \(x \neq 3\). Find \(f^{-1}(x)\) and state its domain.
\(y(x - 3) = 2x + 1 \Rightarrow xy - 3y = 2x + 1 \Rightarrow x(y - 2) = 3y + 1 \Rightarrow x = \dfrac{3y + 1}{y - 2}\).
\(f^{-1}(x) = \dfrac{3x + 1}{x - 2}\), \(\;x \neq 2\) (the range of \(f\) is \(y \neq 2\)).
9 The graph of \(y = f(x)\) has a vertical asymptote \(x = 1\), a horizontal asymptote \(y = -2\), and meets the axes at \((0, 4)\) and \((3, 0)\). Write down the asymptotes and axis intercepts of the graph of \(y = f^{-1}(x)\).
Swap \(x\) and \(y\): horizontal asymptote \(y = 1\), vertical asymptote \(x = -2\), intercepts \((4, 0)\) and \((0, 3)\).
10 Let \(f(x) = 3x - 4\).
(a) Find \(f^{-1}(x)\).
(b) Find the coordinates of the point where the graphs of \(f\) and \(f^{-1}\) meet.
(a) \(y = 3x - 4 \Rightarrow x = \dfrac{y + 4}{3}\), so \(f^{-1}(x) = \dfrac{x + 4}{3}\).
(b) \(f\) is increasing, so the graphs meet on \(y = x\). Solve \(3x - 4 = x\): \(x = 2\). The point is \((2, 2)\). (Check: \(f^{-1}(2) = \dfrac{6}{3} = 2\) ✓)