Inverse functions and existence conditions
Theory
The inverse of a function \(f\) reverses its rule, sending each output back to the input it came from, so that \(f\big(f^{-1}(x)\big)=x\). An inverse function exists only when \(f\) is one-to-one (it passes the horizontal-line test); its graph is the reflection of \(f\) in the line \(y=x\), with domain and range swapped. The rule is found by swapping \(x\) and \(y\) and solving for \(y\).
The inverse of a function \(f\), written \(f^{-1}\), undoes what \(f\) does: if \(f\) maps \(a\) to \(b\), then \(f^{-1}\) maps \(b\) back to \(a\). Applying one after the other returns the starting value, so \(f\big(f^{-1}(x)\big)=x\) and \(f^{-1}\big(f(x)\big)=x\). Because inputs and outputs are exchanged, the domain and range swap: \(\operatorname{dom}(f^{-1})=\operatorname{ran}(f)\) and \(\operatorname{ran}(f^{-1})=\operatorname{dom}(f)\).
An inverse function exists only if \(f\) is one-to-one — no two different inputs share the same output. Graphically this is the horizontal-line test: if every horizontal line meets the graph at most once, \(f\) is one-to-one and \(f^{-1}\) is itself a function. A many-to-one function, such as \(y=x^{2}\), fails the test, so it has no inverse function on its full domain.
When a function is many-to-one, we can restrict the domain to a piece on which it is one-to-one — for \(y=x^{2}\), taking \(x\ge 0\) gives a one-to-one branch with inverse \(y=\sqrt{x}\). The graph of \(f^{-1}\) is the reflection of \(f\) in the line \(y=x\): each point \((a,b)\) on \(f\) becomes \((b,a)\) on \(f^{-1}\).
Composing a function with its inverse returns the input — this is the defining property:
Reflecting in \(y=x\) swaps coordinates, and the domain and range exchange:
To find the rule, exchange \(x\) and \(y\) in \(y=f(x)\) and solve for \(y\):
How to find an inverse function
- Check it is one-to-one. Apply the horizontal-line test. If \(f\) is many-to-one, restrict the domain to a one-to-one piece before continuing.
- Write \(y=f(x)\). Replace \(f(x)\) with \(y\) so both variables are visible.
- Swap \(x\) and \(y\). This performs the reflection in \(y=x\); the equation becomes \(x=f(y)\).
- Solve for \(y\). Make \(y\) the subject; the result is \(f^{-1}(x)\).
- State the domain. Set \(\operatorname{dom}(f^{-1})=\operatorname{ran}(f)\) — the inverse only accepts values \(f\) actually outputs.
| \(y\) | \(=\) | \(2x-1\) |
| \(x\) | \(=\) | \(2y-1\) |
| \(x+1\) | \(=\) | \(2y\) |
| \(y\) | \(=\) | \(\dfrac{x+1}{2}\) |
| \(f\big(f^{-1}(x)\big)\) | \(=\) | \(2\!\left(\dfrac{x+1}{2}\right)-1\) |
| \(=\) | \(x\ \checkmark\) |
On \(\mathbb{R}\), \(f\) is many-to-one (e.g. \(f(2)=f(-2)=4\)), so a horizontal line can cut the graph twice. No inverse function exists there.
| \(y\) | \(=\) | \(x^{2},\ x\ge 0\) |
| \(x\) | \(=\) | \(y^{2}\) |
| \(y\) | \(=\) | \(\sqrt{x}\) |
\(\sqrt{x-1}\ge 0\), so \(f(x)\ge 2\); the range of \(f\) is \([2,\infty)\).
| \(y\) | \(=\) | \(\sqrt{x-1}+2\) |
| \(x\) | \(=\) | \(\sqrt{y-1}+2\) |
| \(x-2\) | \(=\) | \(\sqrt{y-1}\) |
| \((x-2)^{2}\) | \(=\) | \(y-1\) |
| \(y\) | \(=\) | \((x-2)^{2}+1\) |
| \(y\) | \(=\) | \(\dfrac{2x-3}{x+1}\) |
| \(x\) | \(=\) | \(\dfrac{2y-3}{y+1}\) |
| \(x(y+1)\) | \(=\) | \(2y-3\) |
| \(xy+x\) | \(=\) | \(2y-3\) |
| \(xy-2y\) | \(=\) | \(-3-x\) |
| \(y(x-2)\) | \(=\) | \(-(x+3)\) |
| \(y\) | \(=\) | \(\dfrac{x+3}{2-x}\) |
Common pitfalls
Frequently asked questions
What is an inverse function?
It reverses \(f\): if \(f\) maps \(a\) to \(b\), then \(f^{-1}\) maps \(b\) back to \(a\). Applying one after the other returns the start, so \(f\big(f^{-1}(x)\big)=x\) and \(f^{-1}\big(f(x)\big)=x\).
When does a function have an inverse function?
Exactly when it is one-to-one — no two inputs share an output. Use the horizontal-line test: if every horizontal line meets the graph at most once, an inverse function exists.
How do you find the rule of an inverse function?
Write \(y=f(x)\), swap \(x\) and \(y\), then solve for \(y\). For \(f(x)=2x-1\) this gives \(x=2y-1\), so \(f^{-1}(x)=\dfrac{x+1}{2}\).
How is the graph of the inverse related to the graph of f?
\(f^{-1}\) is the reflection of \(f\) in the line \(y=x\). Each point \((a,b)\) on \(f\) becomes \((b,a)\) on \(f^{-1}\), so the graphs are mirror images across that line.
Why do you sometimes restrict the domain?
A many-to-one function such as \(f(x)=x^{2}\) fails the horizontal-line test and has no inverse function. Restricting the domain, e.g. to \(x\ge 0\), keeps a one-to-one piece that does have an inverse.
Is f inverse the same as one over f?
No. \(f^{-1}\) is the inverse function, not the reciprocal. The \(-1\) is not an index, so \(f^{-1}(x)\) is generally different from \(\dfrac{1}{f(x)}\).