In mathematics, the inverse function of a function (also called the inverse of) is a function that undoes the operation of . The inverse of exists if and only if is bijective, and if it exists, is denoted by
f-1.
For a function
f\colonX\toY
f-1\colonY\toX
y\inY
x\inX
As an example, consider the real-valued function of a real variable given by . One can think of as the function which multiplies its input by 5 then subtracts 7 from the result. To undo this, one adds 7 to the input, then divides the result by 5. Therefore, the inverse of is the function
f-1\colon\R\to\R
f-1(y)=
y+7 | |
5 |
.
Let be a function whose domain is the set, and whose codomain is the set . Then is invertible if there exists a function from to such that
g(f(x))=x
x\inX
f(g(y))=y
y\inY
If is invertible, then there is exactly one function satisfying this property. The function is called the inverse of, and is usually denoted as, a notation introduced by John Frederick William Herschel in 1813.
The function is invertible if and only if it is bijective. This is because the condition
g(f(x))=x
x\inX
f(g(y))=y
y\inY
The inverse function to can be explicitly described as the function
f-1(y)=(theuniqueelementx\inXsuchthatf(x)=y)
See also: Inverse element.
Recall that if is an invertible function with domain and codomain, then
f-1\left(f(x)\right)=x
x\inX
f\left(f-1(y)\right)=y
y\inY
Using the composition of functions, this statement can be rewritten to the following equations between functions:
f-1\circf=\operatorname{id}X
f\circf-1=\operatorname{id}Y,
where is the identity function on the set ; that is, the function that leaves its argument unchanged. In category theory, this statement is used as the definition of an inverse morphism.
Considering function composition helps to understand the notation . Repeatedly composing a function with itself is called iteration. If is applied times, starting with the value, then this is written as ; so, etc. Since, composing and yields, "undoing" the effect of one application of .
While the notation might be misunderstood, certainly denotes the multiplicative inverse of and has nothing to do with the inverse function of . The notation
f\langle
In keeping with the general notation, some English authors use expressions like to denote the inverse of the sine function applied to (actually a partial inverse; see below). Other authors feel that this may be confused with the notation for the multiplicative inverse of, which can be denoted as . To avoid any confusion, an inverse trigonometric function is often indicated by the prefix "arc" (for Latin Latin: arcus). For instance, the inverse of the sine function is typically called the arcsine function, written as . Similarly, the inverse of a hyperbolic function is indicated by the prefix "ar" (for Latin Latin: ārea). For instance, the inverse of the hyperbolic sine function is typically written as . The expressions like can still be useful to distinguish the multivalued inverse from the partial inverse:
\sin-1(x)=\{(-1)n\arcsin(x)+\pin:n\inZ\}
The function given by is not injective because
(-x)2=x2
x\in\R
If the domain of the function is restricted to the nonnegative reals, that is, we take the function
f\colon[0,infty)\to[0,infty); x\mapstox2
x\mapsto\sqrtx
The following table shows several standard functions and their inverses:
Function | Inverse | Notes | |
---|---|---|---|
(i.e.) | (i.e.) | ||
\sqrt[p]y | if is even; integer | ||
and | |||
and | |||
trigonometric functions | inverse trigonometric functions | various restrictions (see table below) | |
hyperbolic functions | inverse hyperbolic functions | various restrictions |
Many functions given by algebraic formulas possess a formula for their inverse. This is because the inverse
f-1
f\colon\R\to\R
f-1(y)=(theuniqueelementx\in\Rsuchthatf(x)=y)
This allows one to easily determine inverses of many functions that are given by algebraic formulas. For example, if is the function
f(x)=(2x+8)3
then to determine
f-1(y)
\begin{align} y&=(2x+8)3\\ \sqrt[3]{y}&=2x+8\\ \sqrt[3]{y}-8&=2x\\ \dfrac{\sqrt[3]{y}-8}{2}&=x. \end{align}
Thus the inverse function is given by the formula
f-1(y)=
\sqrt[3]{y | |
- |
8}2.
Sometimes, the inverse of a function cannot be expressed by a closed-form formula. For example, if is the function
f(x)=x-\sinx,
then is a bijection, and therefore possesses an inverse function . The formula for this inverse has an expression as an infinite sum:
f-1(y)
infty | |
= \sum | |
n=1 |
yn/3 | |
n! |
\lim\left(
dn-1 | |
d\thetan-1 |
\left(
\theta | |
\sqrt[3]{\theta-\sin(\theta) |
}\right)n \right).
Since a function is a special type of binary relation, many of the properties of an inverse function correspond to properties of converse relations.
If an inverse function exists for a given function, then it is unique. This follows since the inverse function must be the converse relation, which is completely determined by .
There is a symmetry between a function and its inverse. Specifically, if is an invertible function with domain and codomain, then its inverse has domain and image, and the inverse of is the original function . In symbols, for functions and,
f-1\circf=\operatorname{id}X
f\circf-1=\operatorname{id}Y.
This statement is a consequence of the implication that for to be invertible it must be bijective. The involutory nature of the inverse can be concisely expressed by
\left(f-1\right)-1=f.
The inverse of a composition of functions is given by
(g\circf)-1=f-1\circg-1.
For example, let and let . Then the composition is the function that first multiplies by three and then adds five,
(g\circf)(x)=3x+5.
To reverse this process, we must first subtract five, and then divide by three,
(g\circf)-1(x)=\tfrac13(x-5).
This is the composition.
If is a set, then the identity function on is its own inverse:
-1 | |
{\operatorname{id} | |
X} |
=\operatorname{id}X.
More generally, a function is equal to its own inverse, if and only if the composition is equal to . Such a function is called an involution.
If is invertible, then the graph of the function
y=f-1(x)
is the same as the graph of the equation
x=f(y).
This is identical to the equation that defines the graph of, except that the roles of and have been reversed. Thus the graph of can be obtained from the graph of by switching the positions of the and axes. This is equivalent to reflecting the graph across the line.
The inverse function theorem states that a continuous function is invertible on its range (image) if and only if it is either strictly increasing or decreasing (with no local maxima or minima). For example, the function
f(x)=x3+x
is invertible, since the derivative is always positive.
If the function is differentiable on an interval and for each, then the inverse is differentiable on . If, the derivative of the inverse is given by the inverse function theorem,
\left(f-1\right)\prime(y)=
1 | |
f'\left(x\right) |
.
Using Leibniz's notation the formula above can be written as
dx | |
dy |
=
1 | |
dy/dx |
.
This result follows from the chain rule (see the article on inverse functions and differentiation).
The inverse function theorem can be generalized to functions of several variables. Specifically, a continuously differentiable multivariable function is invertible in a neighborhood of a point as long as the Jacobian matrix of at is invertible. In this case, the Jacobian of at is the matrix inverse of the Jacobian of at .
\beginf^ (f(C)) = & f^\left(\tfrac95 C + 32 \right) = \tfrac59 \left((\tfrac95 C + 32) - 32 \right) = C, \\& \text C, \text \\[6pt]f\left(f^(F)\right) = & f\left(\tfrac59 (F - 32)\right) = \tfrac95 \left(\tfrac59 (F - 32)\right) + 32 = F, \\& \text F.\end
f(\text)&=2005, \quad & f(\text)&=2007, \quad & f(\text)&=2001 \\ f^(2005)&=\text, \quad & f^(2007)&=\text, \quad & f^(2001)&=\text\end
Even if a function is not one-to-one, it may be possible to define a partial inverse of by restricting the domain. For example, the function
f(x)=x2
is not one-to-one, since . However, the function becomes one-to-one if we restrict to the domain, in which case
f-1(y)=\sqrt{y}.
(If we instead restrict to the domain, then the inverse is the negative of the square root of .) Alternatively, there is no need to restrict the domain if we are content with the inverse being a multivalued function:
f-1(y)=\pm\sqrt{y}.
Sometimes, this multivalued inverse is called the full inverse of, and the portions (such as and −) are called branches. The most important branch of a multivalued function (e.g. the positive square root) is called the principal branch, and its value at is called the principal value of .
For a continuous function on the real line, one branch is required between each pair of local extrema. For example, the inverse of a cubic function with a local maximum and a local minimum has three branches (see the adjacent picture).
These considerations are particularly important for defining the inverses of trigonometric functions. For example, the sine function is not one-to-one, since
\sin(x+2\pi)=\sin(x)
for every real (and more generally for every integer). However, the sine is one-to-one on the interval, and the corresponding partial inverse is called the arcsine. This is considered the principal branch of the inverse sine, so the principal value of the inverse sine is always between − and . The following table describes the principal branch of each inverse trigonometric function:
function | Range of usual principal value |
---|---|
arcsin | |
arccos | |
arctan | |
arccot | |
arcsec | |
arccsc | |
Function composition on the left and on the right need not coincide. In general, the conditions
imply different properties of . For example, let denote the squaring map, such that for all in, and let denote the square root map, such that for all . Then for all in ; that is, is a right inverse to . However, is not a left inverse to, since, e.g., .
If, a left inverse for (or retraction of) is a function such that composing with from the left gives the identity function[4] That is, the function satisfies the rule
If, then .
The function must equal the inverse of on the image of, but may take any values for elements of not in the image.
A function with nonempty domain is injective if and only if it has a left inverse.[5] An elementary proof runs as follows:
If nonempty is injective, construct a left inverse as follows: for all, if is in the image of, then there exists such that . Let ; this definition is unique because is injective. Otherwise, let be an arbitrary element of .
For all, is in the image of . By construction,, the condition for a left inverse.
In classical mathematics, every injective function with a nonempty domain necessarily has a left inverse; however, this may fail in constructive mathematics. For instance, a left inverse of the inclusion of the two-element set in the reals violates indecomposability by giving a retraction of the real line to the set