Inverse function

In mathematics, the inverse of a function ƒ is a function which "reverses" ƒ. That is, if the function ƒ maps x to y:
then the inverse function ƒ–1 maps y back to x:
Not every function has an inverse—those that do are called invertible.
Note on functions
From the most general point of view, a function is a mapping that sends each element of a set X (called the domain) to a uniquely determined element of a set Y (sometimes called the codomain). The notation
- ƒ: X → Y
means "ƒ is a function from the set X to the set Y."
Definition

If ƒ: X → Y, then the inverse of ƒ, written ƒ–1: Y → X, is the function defined by the following rule:
- Example
- If ƒ: {1, 2, 3, 4} → {7, 8, 9, 10} is the function defined by
ƒ(1) = 8, ƒ(2) = 10, ƒ(3) = 9, ƒ(4) = 7,
- then the inverse of ƒ is the function ƒ–1: {7, 8, 9, 10} → {1, 2, 3, 4} defined by
ƒ–1(7) = 4, ƒ–1(8) = 1, ƒ–1(9) = 3, ƒ–1(10) = 2.
- Example
- Let R be the set of all real numbers, and let ƒ: R → R be the function defined by the rule
- Then the inverse of ƒ is defined by the rule
There is a symmetry between a function and its inverse: if g is equal to the inverse of ƒ, then ƒ is equal to the inverse of g. That is, the inverse of the inverse of ƒ is the original function ƒ.
Only a function that is both one-to-one and onto (i.e. a bijective function) possesses an inverse, though any one-to-one function has an inverse defined on its range. A function that has an inverse is called invertible.
- Example
- The function ƒ: R → R defined by
- is not invertible, since it is not one-to-one. For example ƒ(–3) = ƒ(3) = 9, so the value of ƒ–1(9) is not uniquely determined. The square root function is a partial inverse to ƒ (see partial inverses below).
Inverses and composition
Characterization
If ƒ: X → Y is invertible, then
These two statements are equivalent to the definition of inverses given above. They can be interpreted as statements about the compositions of ƒ and ƒ–1. Specifically,
where idX and idY are the identity functions on the sets X and Y.
These identities are related to the origin of the notation ƒ–1. If r is a nonzero real number, the multiplicative inverse of r is the reciprocal 1 / r = r –1. The multiplicative inverse satisfies the following identity:
The composition of two functions can be regarded as a kind of multiplication—indeed, many books use the notation ƒg for the composition of the functions ƒ and g. From this point of view, the inverse function is akin to a multiplicative inverse, which leads to the notation ƒ–1 for the inverse of ƒ.
Inverse of a composition

The inverse of a composition of functions is given by the formula
Notice that the order of ƒ and g have been reversed—to undo g followed by ƒ, we must first undo ƒ and then undo g.
For example, let ƒ(x) = x + 5, and let g(x) = 3x. Then the composition ƒ o g is the function that first multiplies by three and then adds five:
To reverse this process, we must first subtract five, and then divide by three:
This is the composition (g–1 o ƒ–1) (y).
Inverses in calculus
Single-variable calculus is primarily concerned with functions that map real numbers to real numbers. Such functions are often defined through formulas, such as:
A function ƒ from the real numbers to the real numbers possesses an inverse as long as it is one-to-one, i.e. as long as the graph of the function passes the horizontal line test. The domain of the inverse ƒ–1 is the same as the range of the orginal function ƒ.
The following table shows several standard functions and their inverses:
Function ƒ(x) | Inverse ƒ–1(y) | Notes |
---|---|---|
x + a | y – a | |
a – x | a – y | |
mx | y / m | m ≠ 0 |
mx + b | (y – b) / m | m ≠ 0 |
1 / x | 1 / y | x, y ≠ 0 |
x2 | x, y ≥ 0 only, in general | |
x3 | no restriction on x and y | |
xp | x1/p (i.e. ) | x, y ≥ 0 in general, p ≠ 0 |
ax2 + bx + c | follows from the quadratic formula,
two branches (corresponding to the plus and minus) | |
ex | ln y | y ≥ 0 |
ax | loga y | y ≥ 0 and a > 0 |
trigonometric functions | inverse trigonometric functions | various restrictions (see table below) |
Formula for the inverse
A formula for ƒ–1 can be found by solving the equation y = ƒ(x) for the variable x. For example, if ƒ is the function
the we must solve the equation y = (2x + 8)3 for x:
Thus the inverse function ƒ–1 is given by the formula
Sometimes the inverse of a function cannot be expressed by a formula. For example, if ƒ is the function
then ƒ is one-to-one, and therefore possesses an inverse function ƒ–1. There is no simple formula for this inverse, since the equation y = x + sin x cannot be solved algebraically for x.
Graph of the inverse

If ƒ and ƒ–1 are inverses, then the graph of the function
is the same as the graph of the equation
This is identical to the equation y = ƒ(x) that defines the graph of ƒ, except that the roles of x and y have been reversed. Thus the graph of ƒ–1 can be obtained from the graph of ƒ by switching the positions of the x and y axes. This is equivalent to reflecting the graph across the line y = x.
Inverses and derivatives
A continuous function ƒ is one-to-one (and hence invertible) if and only if it is either increasing or decreasing (with no local maxima or minima). For example, the function
is invertible, since the derivative ƒ′(x) = 3x2 + 1 is always positive.
If the function ƒ is differentiable, then the inverse ƒ–1 will be differentiable as long as ƒ′(x) ≠ 0. The derivative of the inverse is given by the inverse function theorem:
If we set x = ƒ–1(y), then the formula above can be written
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 differentiable function ƒ: Rn → Rn is invertible in a neighborhood of a point p as long as the Jacobian matrix of ƒ at p is invertible. In this case, the Jacobian of ƒ–1 at ƒ(p) is the matrix inverse of the Jacobian of ƒ at p.
Generalizations
Partial inverses

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
is not one-to-one, since x2 = (–x)2. However, the function becomes one-to-one if we restrict to the domain x ≥ 0, in which case
(If we instead restrict to the domain x ≤ 0, then the inverse is the negative of the square root of x.) Alternatively, there is no need to restrict the domain if we are content with the inverse being a multivalued function:
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 principle branch, and its value at y is called the principle value of ƒ–1(y).
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 picture to the right).
These considerations are particularly important for defining the inverses of trigonometric functions. For example, the sine function is not one-to-one, since
for every real x (and more generally sin(x + 2) = sin(x) for every integer ). However, the sine is one-to-one on the interval [–/2, /2], and the corresponding partial inverse is called the arcsine. This is considered the principle branch of the inverse sine, so the principle value of the inverse sine is always between –/2 and /2. The following table describes the principle branch of each inverse trigonometric function:
function | Range of usual principal value |
---|---|
sin–1 | – ≤ sin–1(x) ≤ |
cos–1 | 0 ≤ cos–1(x) ≤ |
tan–1 | – < tan–1(x) < |
cot–1 | 0 < cot–1(x) < |
sec–1 | 0 < sec–1(x) < |
csc–1 | − ≤ csc–1(x) < |
Left and right inverses
If ƒ: X → Y, a left inverse for ƒ (or retraction of ƒ) is a function g: Y → X such that
That is, the function g satisfies the rule
Thus, g must equal the inverse of ƒ on the range of ƒ, but may take any values for elements of Y not in the range. A function ƒ has a left inverse if and only if it is one-to-one.
A right inverse for ƒ (or section of ƒ) is a function h: Y → X such that
That is, the function h satisfies the rule
Thus, h(y) may be any of the elements of x that map to y under ƒ. A function ƒ has a right inverse if and only if it is onto. (This statement is equivalent to the axiom of choice.)
Preimages
If ƒ: X → Y is any function (not necessarily invertible), the preimage (or inverse image) of an element y ∈ Y is the set of all elements of X that map to y:
The preimage of y can be thought of as the image of y under the (multivalued) full inverse of the function f.
Similarly, if S is any subset of Y, the preimage of S is the set of all elements of X that map to S:
The preimage of a single element y ∈ Y is sometimes called the fiber of y. When Y is the set of real numbers, it is common to refer to ƒ–1(y) as a level set.
See also
- Inverse trigonometric function
- Logarithm
- Inverse function theorem
- Inverse functions and differentiation
- Inverse relation
- Inverse element
References
- Stewart, James (2002), Calculus (5th ed.), Brooks Cole, ISBN 978-0534393397