Inverse Function
An inverse function is a function that undoes the effect of another function. If a function transforms a value a into an output b, its inverse function takes that value b and maps it back to the original input a. The inverse of a function f is denoted as f−1 (read as "f inverse").
For example, consider the function \(f(x) = 2x,\) which takes any real number \(x\) and multiplies it by two. Its inverse function must perform the opposite operation, namely dividing by two: \(f^{-1}(x) = \frac{x}{2}.\) If we evaluate the original function at \(x = 3,\) we get \(f(3) = 6;\) when we plug that result into the inverse, we recover the starting value: \(f^{-1}(6) = \frac{6}{2} = 3.\)
It is important to note that the superscript −1 in \(f^{-1}(x)\) denotes an inverse function and is not an algebraic exponent. Therefore, \(f^{-1}(x)\) is not equivalent to the multiplicative inverse (or reciprocal) \(\frac{1}{f(x)}.\)
Table of Contents
When Does a Function Have an Inverse?
Not all functions have an inverse. For a function to have an inverse, it must be bijective—that is, it must be both one-to-one (injective) and onto (surjective) at the same time. This guarantees that every element in the codomain comes from a unique element in the domain and that no elements are left unassigned.
Let us examine the quadratic function \(f(x) = x^2\) with domain \(\mathbb{R}\) and codomain \(\mathbb{R}.\) Evaluating at \(x = 2,\) we obtain \(f(2) = 4,\) but for \(x = -2\) we also get \(f(-2) = 4.\) Because two distinct values in the domain share the same output, a supposed inverse would have to return two different results when given \(4,\) which violates the definition of a function. Moreover, the negative numbers in the codomain are not the output of any real number, so this function does not have an inverse over all of \(\mathbb{R}\) because it is neither one-to-one nor onto.
On the other hand, consider the linear function \(g(x) = 2x + 1\) with domain \(\mathbb{R}\) and codomain \(\mathbb{R}.\) For \(x = 5,\) its output is \(g(5) = 11,\) and there is no other real number that produces this same result. Since each input produces a distinct output (it is one-to-one) and every real number in the codomain is reached by some value of \(x\) (it is onto), the function \(g\) is bijective and does have an inverse.
The Horizontal Line Test
From a graphical perspective, the existence of an inverse (once the codomain is matched to the range) can be verified using lines parallel to the horizontal axis. Because each output must correspond to a single input value, no horizontal line can intersect the curve at more than one point.
Horizontal Line Test: A function is one-to-one if and only if every horizontal line intersects its graph at most once (that is, at one point or not at all).
If any horizontal line crosses the graph two or more times, different values in the domain share the same output, and the function does not have an inverse without first restricting its domain. Let us visually compare what happens with \(f(x) = x^2\) and \(g(x) = x^3:\)
Strict Monotonicity Criterion
Recall that a function \(f\) is strictly increasing when for every pair \(x_1 < x_2\) in its domain we have \(f(x_1) < f(x_2),\) and it is strictly decreasing when \(x_1 < x_2\) implies \(f(x_1) > f(x_2).\)
Theorem: If a function \(f\) is strictly increasing or strictly decreasing across its entire domain, then it is one-to-one and has an inverse (taking its range as the codomain).
This happens because, when choosing two distinct numbers \(x_1 \neq x_2,\) one must be smaller than the other; if the function always increases or always decreases, its outputs can never repeat (\(f(x_1) \neq f(x_2)\)). For example, in \(g(x) = x^3,\) if \(x_1 < x_2\) then \(x_1^3 < x_2^3,\) which analytically confirms that it is strictly increasing on all of \(\mathbb{R}\) and has an inverse.
This criterion also holds if strict monotonicity occurs only on a subset or interval \(I\) of the domain, in which case the function has an inverse when restricted to that interval. Furthermore, it is a sufficient but not necessary condition: there exist non-monotonic functions that are still bijective and have an inverse, such as the function defined on all of \(\mathbb{R}\) by \(f(x) = \frac{1}{x}\) for \(x \neq 0\) and \(f(0) = 0.\)
Formal Definition and Properties of Inverse Functions
Once the bijectivity condition is established, we can formally state what an inverse function is and how the input and output sets of both functions are related.
In the formal definition, the codomain \(B\) is specified, though in many calculus textbooks we directly encounter the word range. Both terms are valid when the function is invertible: requiring \(f\) to be bijective means in particular that it is onto (surjective), which ensures its range coincides completely with its codomain.

It follows from this definition that the roles of the input and output sets are completely reversed between a function and its inverse:
\(\text{Domain of } f^{-1} = \text{Range of } f \quad\) and \(\quad \text{Range of } f^{-1} = \text{Domain of } f\)
Likewise, when composing a function with its inverse in either order, their effects cancel each other out and we recover the starting value. These identities are known as the cancellation equations:
\(f^{-1}(f(x)) = x~\) for all \(x\) in the domain of \(f\)
\(f(f^{-1}(x)) = x~\) for all \(x\) in the range of \(f\)
These equations provide the analytical method to verify whether two given functions \(f\) and \(g\) are inverses of each other: we simply compute both compositions and check that both return \(x\) on their respective domains. It is important to verify both equalities, as satisfying only one is not sufficient if the domains do not match.
For example, let us verify that \(f(x) = 2x\) and \(g(x) = \frac{x}{2}\) are inverses by computing both compositions:
$$g(f(x)) = g(2x) = \dfrac{2x}{2} = x$$
$$f(g(x)) = f\left(\dfrac{x}{2}\right) = 2\left(\dfrac{x}{2}\right) = x$$
In contrast, if we take \(f(x) = x^2\) on all of \(\mathbb{R}\) and \(g(x) = \sqrt{x},\) we see that \(f(g(x)) = (\sqrt{x})^2 = x\) for \(x \ge 0,\) but evaluating the other composition yields \(g(f(x)) = \sqrt{x^2} = |x|,\) which is not equal to \(x\) when \(x < 0,\) confirming that they are not inverses without restricting the domain.
Below, we summarize the main properties of inverse functions:
- A function has an inverse if and only if it is bijective, and its inverse function is also bijective.
- If a function is strictly increasing or strictly decreasing across its entire domain, then it is one-to-one and has an inverse (taking its range as the codomain).
- The domain of the inverse function equals the range of the original function, and its range equals the original domain.
- The composition of a function with its inverse in either order yields the identity function: \(f^{-1}(f(x)) = x\) and \(f(f^{-1}(x)) = x.\)
- The inverse of an inverse function returns the original function—that is, \((f^{-1})^{-1} = f.\)
- The graphs of \(f\) and \(f^{-1}\) are symmetric with respect to the line \(y = x,\) and their intercepts with the coordinate axes are swapped.
Graph of a Function and Its Inverse
In the Cartesian plane, the graph of a function \(f\) and that of its inverse \(f^{-1}\) are symmetric with respect to the line \(y = x\). This means we can obtain one curve from the other by reflecting it like a mirror across this diagonal line.
This geometric property comes directly from the definition of an inverse function: since \(f(a) = b\) is equivalent to \(f^{-1}(b) = a,\) every point \((a, b)\) that lies on the graph of \(f\) has a corresponding point \((b, a)\) on the graph of \(f^{-1}.\) Swapping the \(x\)- and \(y\)-coordinates means the line segment joining both points is perpendicularly bisected by the line \(y = x.\)
As a direct consequence of this coordinate swap, the axis intercepts are also reversed: if the graph of \(f\) crosses the y-axis at \((0, b),\) the graph of \(f^{-1}\) will cross the x-axis at \((b, 0);\) similarly, an \(x\)-intercept \((a, 0)\) of \(f\) becomes the \(y\)-intercept \((0, a)\) of \(f^{-1}.\)
How to Restrict a Function to Have an Inverse
When a function is not bijective because it fails to be one-to-one, onto, or both, we can modify its input and output sets through restrictions. In this way, we obtain a new function that does have an inverse.
In practice, achieving the one-to-one property is usually the more delicate step, as it requires trimming input values, whereas adjusting for the onto property is straightforward once the range is known.
Restricting the Domain
To make a function one-to-one, we select a subset of its original domain on which it does not repeat outputs (that is, where it passes the Horizontal Line Test). By convention, we look for the least restrictive domain that guarantees the one-to-one property while keeping the original range intact.
Let us return to the quadratic function \(f(x) = x^2\) with domain \(\mathbb{R}\) and range \([0, \infty).\) If we restrict its domain to the non-negative real numbers \([0, \infty),\) we make it strictly increasing and one-to-one, preserving the exact same range \([0, \infty).\)
By contrast, an overly aggressive restriction would alter the range of the function. For instance, if we restricted the domain of \(f(x) = x^2\) to the interval \([1, 5],\) the function would still be one-to-one, but since \(1 \le x \le 5\) implies \(1 \le x^2 \le 25,\) its range would shrink to \([1, 25],\) leaving out values that the original function reached.
Restricting the Codomain
To make the function onto, we simply shrink its initial codomain so that it is equal to its range, discarding any elements in the target set that were not outputs of any domain value.
Continuing with the previous example, the quadratic function \(f(x) = x^2\) is usually initially defined with codomain \(\mathbb{R},\) where negative numbers remain unassigned. By restricting both the domain and the codomain to \([0, \infty),\) our function \(f\) with domain \([0, \infty)\) and codomain \([0, \infty)\) becomes both one-to-one and onto (bijective), having \(f^{-1}(x) = \sqrt{x}\) as its inverse.
How to Find the Inverse of a Function
Starting from a bijective function (either on its natural domain or after appropriately restricting it) and knowing its domain and range, we can find the algebraic expression of its inverse in three steps:
- Write \(y = f(x).\)
- Solve this equation for \(x\) in terms of \(y.\)
- Swap the variables \(x\) and \(y\) to express the inverse as \(y = f^{-1}(x),\) keeping in mind that the domain of \(f^{-1}\) must match the range of \(f.\)
Example
Find the inverse function of \(f(x) = 2x + 1.\)
Because this is a linear function with a nonzero slope, it is bijective on all of \(\mathbb{R},\) with domain \(\mathbb{R}\) and range \(\mathbb{R}.\) As a first step, we replace \(f(x)\) with \(y:\)
$$y = 2x + 1$$
Next, we solve for \(x\) in terms of \(y.\) To do this, we subtract \(1\) from both sides and divide the result by \(2:\)
$$y - 1 = 2x$$
$$x = \dfrac{y - 1}{2}$$
Finally, we swap \(x\) and \(y\) and write the resulting equation using inverse function notation:
$$f^{-1}(x) = \dfrac{x - 1}{2}$$
Since the range of the original function is all of \(\mathbb{R},\) the domain of its inverse is also \(\mathbb{R},\) with no restrictions needed. We can verify that the result is correct using the cancellation equation:
$$f^{-1}(f(x)) = f^{-1}(2x + 1) = \dfrac{(2x + 1) - 1}{2} = \dfrac{2x}{2} = x$$
Note: There exist bijective functions whose variable \(x\) cannot be isolated using elementary algebraic operations (for example, \(f(x) = x^3 + x + 3\)). In such cases, it is not possible to write an explicit formula for \(f^{-1}(x),\) but we can still evaluate the inverse at a specific point \(b\) by directly solving the equation \(f(x) = b.\) Thus, to find \(f^{-1}(5)\) we set up \(x^3 + x + 3 = 5,\) whose only real solution is \(x = 1,\) so \(f^{-1}(5) = 1.\)
Examples of Inverse Functions
Below, we apply the procedure above to different families of elementary functions to find their inverse expressions, analyze their domains and ranges, and examine their graphical behavior.
Linear Functions
Every non-constant linear function \(f(x) = mx + b,\) with \(m, b \in \mathbb{R}\) and \(m \neq 0,\) is bijective on all of \(\mathbb{R}\) and its inverse function is given by:
$$f^{-1}(x) = \dfrac{x - b}{m}$$
Constant functions of the form \(f(x) = b\) do not have an inverse because they assign the same output to every real number.
Example
Find the inverse function of \(f(x) = -3x - 4.\)
Since this is a linear function with slope \(m = -3 \neq 0,\) its domain is \(\mathbb{R}\) and its range is \(\mathbb{R}.\) We write \(y = -3x - 4\) and solve for \(x:\)
$$y + 4 = -3x \implies x = -\dfrac{y + 4}{3}$$
Swapping \(x\) and \(y,\) we obtain the inverse function with domain \(\mathbb{R}:\)
$$f^{-1}(x) = -\dfrac{x + 4}{3}$$
Quadratic Functions
As we saw earlier, a quadratic function is not one-to-one on all of \(\mathbb{R},\) so it lacks an inverse on its natural domain. However, if we restrict its domain to a single branch starting from its vertex, the function becomes bijective and has an inverse.
Example
Find the inverse function of \(f(x) = x^2 + 1\) restricted to the domain \([0, \infty).\)
On this interval, the function is strictly increasing and its range is \([1, \infty).\) We start from \(y = x^2 + 1\) and solve for \(x:\)
$$y - 1 = x^2 \implies x = \pm\sqrt{y - 1}$$
Because the original domain requires \(x \ge 0,\) we select only the positive square root (\(x = \sqrt{y - 1}\)). Swapping the variables yields the square root function with domain \([1, \infty):\)
$$f^{-1}(x) = \sqrt{x - 1}$$
Note: If we restrict the domain to the non-positive numbers \((-\infty, 0],\) we must keep the negative root when solving so that the range of the inverse matches the original domain. In that case, the inverse of \(f(x) = x^2 + 1\) with \(x \le 0\) is \(f^{-1}(x) = -\sqrt{x - 1}.\)
Cubic Functions
Cubic functions of the form \(f(x) = ax^3 + d\) (with \(a \neq 0\)) are strictly monotonic on all of \(\mathbb{R},\) so they always have an inverse. If quadratic or linear terms are added, the curve may exhibit local maxima and minima, losing its one-to-one property.
Example
Find the inverse function of \(f(x) = 2x^3 + 1.\)
This function has domain \(\mathbb{R}\) and range \(\mathbb{R}.\) We write \(y = 2x^3 + 1\) and solve for \(x\) by taking the cube root:
$$y - 1 = 2x^3 \implies x^3 = \dfrac{y - 1}{2} \implies x = \sqrt[3]{\dfrac{y - 1}{2}}$$
Swapping \(x\) and \(y,\) we obtain the inverse function defined on all of \(\mathbb{R}:\)
$$f^{-1}(x) = \sqrt[3]{\dfrac{x - 1}{2}}$$
Radical Functions
Radical functions are those in which the independent variable appears under a radical sign. To find their inverse, we pay close attention to the index of the root: odd-index roots maintain all real numbers as their domain, whereas even-index roots restrict both their domain and range.
Example 1
Determine the inverse function of \(f(x) = \sqrt[3]{1 + 2x}.\)
Because this is an odd-index root, its domain is \(\mathbb{R}\) and its range is \(\mathbb{R}.\) We set \(y = \sqrt[3]{1 + 2x}\) and cube both sides to solve for \(x:\)
$$y^3 = 1 + 2x \implies y^3 - 1 = 2x \implies x = \dfrac{y^3 - 1}{2}$$
Swapping the variables gives the inverse with domain \(\mathbb{R}:\)
$$f^{-1}(x) = \dfrac{x^3 - 1}{2}$$
Example 2
Find the inverse function of \(g(x) = \sqrt{x - 3}.\)
The natural domain of \(g\) is \([3, \infty)\) and its range is \([0, \infty).\) We start from \(y = \sqrt{x - 3}\) and square both sides to solve for \(x:\)
$$y^2 = x - 3 \implies x = y^2 + 3$$
Swapping \(x\) and \(y\) produces the expression \(g^{-1}(x) = x^2 + 3.\) However, the formula \(x^2 + 3\) on its own would have all of \(\mathbb{R}\) as its domain, which violates the property that the domain of \(g^{-1}\) must equal the range of \(g.\) Therefore, we must explicitly state the restriction \([0, \infty):\)
$$g^{-1}(x) = x^2 + 3 \quad \text{for } x \ge 0$$

Rational Functions
Among rational functions, linear rational functions of the form \(f(x) = \dfrac{ax + b}{cx + d}\) (with \(ad - bc \neq 0\) and \(c \neq 0\)) are always one-to-one and have an inverse when the value that makes the denominator zero is excluded from their domain.
Example
Find the inverse function of \(f(x) = \dfrac{1}{x + 2}.\)
Its domain is \(\mathbb{R} \setminus \{-2\}\) and its range is \(\mathbb{R} \setminus \{0\}.\) We write \(y = \dfrac{1}{x + 2}\) and solve for \(x:\)
$$y(x + 2) = 1 \implies x + 2 = \dfrac{1}{y} \implies x = \dfrac{1}{y} - 2$$
Swapping \(x\) and \(y,\) we obtain the inverse function with domain \(\mathbb{R} \setminus \{0\}:\)
$$f^{-1}(x) = \dfrac{1}{x} - 2$$
Exponential and Logarithmic Functions
Exponential and logarithmic functions are inverses of each other. An exponential function \(f(x) = a^x,\) with base \(a > 0\) and \(a \neq 1,\) has domain \(\mathbb{R}\) and range \((0, \infty);\) its inverse function is the logarithm with the same base \(f^{-1}(x) = \log_a(x),\) with domain \((0, \infty)\) and range \(\mathbb{R}.\)
- The natural exponential function \(f(x) = e^x\) is the inverse of the natural logarithmic function \(f^{-1}(x) = \ln(x).\)
- The base-10 exponential function \(f(x) = 10^x\) is the inverse of the common logarithmic function \(f^{-1}(x) = \log(x).\)
We can verify this relationship by solving for \(x\) in \(y = a^x\) using the definition of a logarithm (\(x = \log_a(y)\)) and swapping the variables to arrive at \(f^{-1}(x) = \log_a(x).\)

Trigonometric Functions
Because of their periodicity, trigonometric functions are not one-to-one on their natural domains. To define their inverses, we restrict the domain of each function to a principal interval where it is strictly monotonic and covers its entire range.
The following table summarizes the three main trigonometric functions along with their inverses, domains, and ranges (note that \(\arcsin(x),\) \(\arccos(x),\) and \(\arctan(x)\) are also commonly written as \(\sin^{-1}(x),\) \(\cos^{-1}(x),\) and \(\tan^{-1}(x)\)):
| Trigonometric Function | Inverse Function | Domain of Inverse | Range of Inverse |
|---|---|---|---|
| \(y = \sin(x)\) | \(y = \arcsin(x)\) | \([-1, 1]\) | \(\left[-\dfrac{\pi}{2}, \dfrac{\pi}{2}\right]\) |
| \(y = \cos(x)\) | \(y = \arccos(x)\) | \([-1, 1]\) | \([0, \pi]\) |
| \(y = \tan(x)\) | \(y = \arctan(x)\) | \((-\infty, \infty)\) | \(\left(-\dfrac{\pi}{2}, \dfrac{\pi}{2}\right)\) |
Below are the individual graphs of each of these three inverse trigonometric functions:
Piecewise Functions
A piecewise function has an inverse if and only if each of its pieces is one-to-one on its respective interval and the ranges of all pieces are disjoint (do not overlap). To find its inverse, we solve each piece separately and swap the domain of each piece with its range.
Example
Find the inverse function of the following piecewise linear function:
$$f(x) = \begin{cases} 2x & \text{if } x < 1 \\ x + 1 & \text{if } x \ge 1 \end{cases}$$
We analyze each piece separately to verify that their ranges do not overlap. In the first piece, for \(x < 1,\) the expression \(y = 2x\) is strictly increasing and takes values in the range \((-\infty, 2);\) solving for \(x\) gives \(x = \frac{y}{2}.\) In the second piece, for \(x \ge 1,\) the expression \(y = x + 1\) is also strictly increasing and takes values in the range \([2, \infty);\) solving for \(x\) yields \(x = y - 1.\)
Since both pieces are one-to-one and their ranges \((-\infty, 2)\) and \([2, \infty)\) are disjoint and cover all of \(\mathbb{R},\) the function is bijective. Swapping the variables and assigning each expression its new domain (the range of the corresponding piece), we obtain the inverse function:
$$f^{-1}(x) = \begin{cases} \dfrac{x}{2} & \text{if } x < 2 \\ x - 1 & \text{if } x \ge 2 \end{cases}$$
Did you find this useful? Rate it!
Leave a Reply











![Graph of the arcsine function y = arcsin(x) Graph of the inverse trigonometric function arcsine y = arcsin(x) on the domain [-1, 1] and range [-π/2, π/2]](https://es.flamath.com/wp-content/uploads/inversa-01-funcion-arcoseno-dominio-rango.png)
![Graph of the arccosine function y = arccos(x) Graph of the inverse trigonometric function arccosine y = arccos(x) on the domain [-1, 1] and range [0, π]](https://es.flamath.com/wp-content/uploads/inversa-02-funcion-arcocoseno-dominio-rango.png)

Related Articles