Inverse Functions

The inverse of a function undoes what the function does: it maps each output back to the original input. Inverse functions exist precisely when a function is one-to-one, and their graphs are reflections of each other across the line $y = x$.

Quick Reference

Concept Formula / Rule
Definition $x = f^{-1}(y) \Leftrightarrow y = f(x)$
Domain/range swap $\operatorname{Dom}(f) = \operatorname{Rng}(f^{-1})$; $\operatorname{Rng}(f) = \operatorname{Dom}(f^{-1})$
Cancellation equations $f^{-1}(f(x)) = x$ and $f(f^{-1}(x)) = x$
When an inverse exists If and only if $f$ is one-to-one
Graph reflection Graph of $f^{-1}$ is the reflection of graph of $f$ across $y = x$
Warning $f^{-1}(y) \neq \frac{1}{f(y)}$

The Idea of Inversion

Consider $f(x) = x^3$. Given $x = 2$, we get $f(2) = 8$. Now suppose we are told that $f(x) = 27$ and asked to find $x$. We solve $x^3 = 27$, giving $x = \sqrt[3]{27} = 3$.

In general, for any $y$ in the range of $f$, the value of $x$ satisfying $y = f(x)$ is given by $x = \sqrt[3]{y}$. This defines $x$ as a function of $y$, which we call $g(y) = \sqrt[3]{y}$. The function $g$ is the inverse of $f$, since it undoes the effect of $f$:

$g(f(x)) = \sqrt[3]{x^3} = x \qquad \text{and} \qquad f(g(y)) = \left(\sqrt[3]{y}\right)^3 = y.$

Definition

Suppose $f$ is a one-to-one function with domain $A$ and range $B$. The inverse function $f^{-1}$ is defined by

$x = f^{-1}(y) \quad \text{means} \quad y = f(x)$

for every $y$ in $B$.

Diagram showing the relationship between a function f and its inverse g, reversing the mapping between x and y.
The function $f$ and its inverse $f^{-1}$ undo the effects of each other.

The domain and range of $f$ and $f^{-1}$ simply swap:

$\operatorname{Dom}(f) = \operatorname{Rng}(f^{-1}), \qquad \operatorname{Rng}(f) = \operatorname{Dom}(f^{-1}).$

Important notation warning: The $-1$ in $f^{-1}$ denotes an inverse function, not an exponent. In particular, $f^{-1}(y) \neq \dfrac{1}{f(y)}$.

Given that $f$ has an inverse and $f(1) = 3$, $f(2) = -4$, and $f(5) = -1$, find $f^{-1}(3)$, $f^{-1}(-4)$, and $f^{-1}(-1)$.

Solution By the definition of inverse function: $f^{-1}(3) = 1 \quad \text{because } f(1) = 3,$ $f^{-1}(-4) = 2 \quad \text{because } f(2) = -4,$ $f^{-1}(-1) = 5 \quad \text{because } f(5) = -1.$
Arrow diagram showing specific points mapping from domain to range via f.
Arrow diagram for $f$: maps 1 to 3, 2 to −4, 5 to −1.
Arrow diagram showing specific points mapping from range to domain via f⁻¹.
Arrow diagram for $f^{-1}$: the mapping is exactly reversed.

Verifying an Inverse Function

Let $f$ be a one-to-one function with domain $A$ and range $B$, and let $g$ be a function with domain $B$ and range $A$. Then $g = f^{-1}$ if and only if both of the following hold:

$g(f(x)) = x \quad \text{for every } x \in A,$$f(g(y)) = y \quad \text{for every } y \in B.$
Proof Suppose $g = f^{-1}$. By definition, $x = g(y) \Leftrightarrow y = f(x)$. Substituting $f(x)$ for $y$ gives $x = g(f(x))$. Substituting $g(y)$ for $x$ gives $y = f(g(y))$. Both conditions follow. Conversely, suppose (1) and (2) hold. If $x = g(y)$, then by (2), $f(g(y)) = y$, i.e., $f(x) = y$. If $y = f(x)$, then by (1), $g(f(x)) = x$, i.e., $g(y) = x$. So $x = g(y) \Leftrightarrow y = f(x)$, which is the definition of $g = f^{-1}$.

Writing the independent variable of $f^{-1}$ as $x$ (rather than $y$), the cancellation equations become:

$f^{-1}(f(x)) = x \quad \text{for every } x \text{ in the domain of } f,$$f(f^{-1}(x)) = x \quad \text{for every } x \text{ in the domain of } f^{-1}.$

A function has an inverse function if and only if it is one-to-one. Equivalently, every increasing or decreasing (monotonic) function has an inverse function.

Verify that $f(x) = 5x^3 + 2$ and $g(x) = \sqrt[3]{\dfrac{x-2}{5}}$ are inverses of each other.

Solution Both functions have domain $\mathbb{R}$. We verify both cancellation equations: $f(g(x)) = f\!\left(\sqrt[3]{\frac{x-2}{5}}\right) = 5\left(\sqrt[3]{\frac{x-2}{5}}\right)^3 + 2 = 5 \cdot \frac{x-2}{5} + 2 = x. \checkmark$ $g(f(x)) = g(5x^3 + 2) = \sqrt[3]{\frac{(5x^3 + 2) - 2}{5}} = \sqrt[3]{\frac{5x^3}{5}} = \sqrt[3]{x^3} = x. \checkmark$

Determine if each function has an inverse. (a) $f(x) = x^3 + 1$. (b) $h(x) = x^3 - x$.

Solution (a) We show $f$ is one-to-one. If $f(x_1) = f(x_2)$: $x_1^3 + 1 = x_2^3 + 1 \implies x_1^3 = x_2^3 \implies x_1 = x_2.$ So $f$ is one-to-one and has an inverse. The graph of $f$ is an upward shift of $y = x^3$ and passes the horizontal line test.
Graph of y = x³ + 1 which is one-to-one.
$f(x) = x^3 + 1$ passes the horizontal line test.
(b) Note that $h(x) = x(x^2 - 1)$, so $h(-1) = h(0) = h(1) = 0$. Three distinct inputs give the same output, so $h$ is not one-to-one and has no inverse.
Graph of y = x³ - x which is not one-to-one.
$h(x) = x^3 - x$ fails the horizontal line test.

How to Find the Inverse Function

Steps to find $f^{-1}$:

  1. Write down the equation $y = f(x)$.
  2. Solve for $x$ in terms of $y$: $x = g(y)$.
  3. The formula $f^{-1}(y) = g(y)$ defines the inverse, with $y$ restricted to the range of $f$.
  4. If you prefer, replace every $y$ with $x$ to write $f^{-1}(x) = g(x)$.

Given $f(x) = 2x^5 + 3$, find its inverse function.

Solution Set $y = f(x)$ and solve for $x$: $2x^5 + 3 = y \implies 2x^5 = y - 3 \implies x^5 = \frac{y-3}{2} \implies x = \left(\frac{y-3}{2}\right)^{1/5}.$ Therefore $f^{-1}(x) = \left(\dfrac{x-3}{2}\right)^{1/5}$.

Given $g(x) = 2x - 1$, find $g^{-1}$.

Solution Set $y = 2x - 1$ and solve: $x = \dfrac{y+1}{2}$. Replacing $y$ with $x$: $g^{-1}(x) = \frac{x+1}{2}.$ Verification: $g(g^{-1}(x)) = 2 \cdot \dfrac{x+1}{2} - 1 = x$. ✓

Given $h(x) = \sqrt{2x+3}$, find $h^{-1}$.

Solution Set $y = \sqrt{2x+3}$ and solve: $y^2 = 2x+3$, so $x = \dfrac{y^2-3}{2}$. The range of $h$ is $[0, \infty)$, so: $h^{-1}(x) = \frac{x^2 - 3}{2}, \qquad x \geq 0.$

Given $u(x) = x^2 + 1$ with domain $x \leq 0$, find $u^{-1}$.

Solution Set $y = x^2 + 1$ and solve: $x = \pm\sqrt{y-1}$. Since $x \leq 0$, we choose $x = -\sqrt{y-1}$. The range is $[1, \infty)$: $u^{-1}(x) = -\sqrt{x-1}, \qquad x \geq 1.$

Graph of the Inverse Function

If $(a, b)$ is a point on the graph of $f$, then $(b, a)$ is on the graph of $f^{-1}$. The point $(b, a)$ is the reflection of $(a, b)$ across the line $y = x$.

The graphs of a function and its inverse are reflections of one another across the line $y = x$.

Graph of the polynomial function f(x)=2x⁵ + 3 and its inverse reflected across the line y = x.
(a) $f(x) = 2x^5 + 3$ and $f^{-1}(x) = \left(\dfrac{x-3}{2}\right)^{1/5}$, reflected across $y = x$.
Graph of the linear function g(x) = 2x - 1 and its inverse reflected across the line y = x.
(b) $g(x) = 2x - 1$ and $g^{-1}(x) = \dfrac{x+1}{2}$, reflected across $y = x$.
Graph of the function h(x)=√(2x+3) and its inverse reflected across the line y = x.
(c) $h(x) = \sqrt{2x+3}$ and $h^{-1}(x) = \dfrac{1}{2}(x^2 - 3)$, $x \geq 0$, reflected across $y = x$.

Given the graph of $f(x)$ below, sketch the graph of $f^{-1}(x)$.

Graph of a function with specific points labeled (2, 4), (3, 2), (4, 1), and (5, 0.5).
Graph of $f$ with points $(2,4)$, $(3,2)$, $(4,1)$, $(5, 0.5)$ labeled.
Solution Reflect across $y = x$ by swapping coordinates: $(2,4) \to (4,2)$, $(3,2) \to (2,3)$, $(4,1) \to (1,4)$, $(5, 0.5) \to (0.5, 5)$.
Solution graph showing the original function and its inverse plotted with reflected points.
The graphs of $f$ and $f^{-1}$ are reflections of one another across $y = x$.

Frequently Asked Questions

Is $f^{-1}(x)$ the same as $1/f(x)$? No. The notation $f^{-1}$ denotes the inverse function, not the reciprocal. For example, if $f(x) = 2x + 1$, then $f^{-1}(x) = (x-1)/2$, which is very different from $1/(2x+1)$.

Does every function have an inverse? No. A function has an inverse if and only if it is one-to-one. For instance, $f(x) = x^2$ does not have an inverse on all of $\mathbb{R}$ because $f(2) = f(-2) = 4$.

What does it mean that $f$ and $f^{-1}$ are inverses of each other? The relationship is symmetric: if $g = f^{-1}$, then $g^{-1} = f$. In other words, $f$ and $f^{-1}$ undo each other in both directions.

Why does the graph of f⁻¹ look like a reflection of f across y = x? Because the roles of $x$ and $y$ are swapped: $(a, b)$ is on the graph of $f$ exactly when $(b, a)$ is on the graph of $f^{-1}$. Swapping coordinates geometrically corresponds to reflecting across the diagonal line $y = x$.

How does restricting the domain allow us to define an inverse? If a function is not one-to-one on its full domain, we can select a subdomain on which it is one-to-one. For example, $u(x) = x^2 + 1$ restricted to $x \leq 0$ is strictly decreasing and hence one-to-one, so it has an inverse on that restricted domain.