Math: How to Find the Inverse of a Function

• Author:
• Updated date:

I hold both a bachelor's and a master's degree in applied mathematics.

The inverse function of a function f is mostly denoted as f-1. A function f has an input variable x and gives then an output f(x). The inverse of a function f does exactly the opposite. Instead it uses as input f(x) and then as output it gives the x that when you would fill it in in f will give you f(x). To be more clear:

If f(x) = y then f-1(y) = x. So the output of the inverse is indeed the value that you should fill in in f to get y. So f(f-1(x)) = x.

Not every function has an inverse. A function that does have an inverse is called invertible. Only if f is bijective an inverse of f will exist. But what does this mean?

Bijective

The easy explanation of a function that is bijective is a function that is both injective and surjective. However, for most of you this will not make it any clearer.

A function is injective if there are no two inputs that map to the same output. Or said differently: every output is reached by at most one input.

An example of a function that is not injective is f(x) = x2 if we take as domain all real numbers. If we fill in -2 and 2 both give the same output, namely 4. So x2 is not injective and therefore also not bijective and hence it won't have an inverse.

A function is surjective if every possible number in the range is reached, so in our case if every real number can be reached. So f(x)= x2 is also not surjective if you take as range all real numbers, since for example -2 cannot be reached since a square is always positive.

So while you might think that the inverse of f(x) = x2 would be f-1(y) = sqrt(y) this is only true when we treat f as a function from the nonnegative numbers to the nonnegative numbers, since only then it is a bijection.

This does show that the inverse of a function is unique, meaning that every function has only one inverse.

How to Calculate the Inverse Function

So we know the inverse function f-1(y) of a function f(x) must give as output the number we should input in f to get y back. Determining the inverse then can be done in four steps:

1. Decide if f is bijective. If not then no inverse exists.
2. If it is bijective, write f(x)=y
3. Rewrite this expression to x = g(y)
4. Conclude f-1(y) = g(y)

Examples of Inverse Functions

Let f(x) = 3x -2. Clearly, this function is bijective.

Now we say f(x) = y, then y = 3x-2.

This means y+2 = 3x and therefore x = (y+2)/3.

So f-1(y) = (y+2)/3

Now if we want to know the x for which f(x) = 7, we can fill in f-1(7) = (7+2)/3 = 3.

And indeed, if we fill in 3 in f(x) we get 3*3 -2 = 7.

We saw that x2 is not bijective, and therefore it is not invertible. x3 however is bijective and therefore we can for example determine the inverse of (x+3)3.

y = (x+3)3

3rd root(y) = x+3

x = 3rd root(y) -3

Contrary to the square root, the third root is a bijective function.

Another example that is a little bit more challenging is f(x) = e6x. Here e is the represents the exponential constant.

y = e6x

ln(y) = ln(e6x) = 6x

x = ln(y)/6

Here the ln is the natural logarithm. By definition of the logarithm it is the inverse function of the exponential. If we would have had 26x instead of e6x it would have worked exactly the same, except the logarithm would have had base two, instead of the natural logarithm, which has base e.

Another example uses goniometric functions, which in fact can appear a lot. If we want to calculate the angle in a right triangle we where we know the length of the opposite and adjacent side, let's say they are 5 and 6 respectively, then we can know that the tangent of the angle is 5/6.

So the angle then is the inverse of the tangent at 5/6. The inverse of the tangent we know as the arctangent. This inverse you probably have used before without even noticing that you used an inverse. Equivalently, the arcsine and arccosine are the inverses of the sine and cosine.

The Derivative of the Inverse Function

The derivative of the inverse function can of course be calculated using the normal approach to calculate the derivative, but it can often also be found using the derivative of the original function. If f is a differentiable function and f'(x) is not equal to zero anywhere on the domain, meaning it does not have any local minima or maxima, and f(x) = y then the derivative of the inverse can be found using the following formula:

f-1'(y) = 1/f'(x)

If you are not familiar with the derivative or with (local) minima and maxima I recommend reading my articles about these topics to get a better understanding of what this theorem actually says.

A Real World Example of an Inverse Function

The Celsius and Fahrenheit temperature scales provide a real world application of the inverse function. If we have a temperature in Fahrenheit we can subtract 32 and then multiply with 5/9 to get the temperature in Celsius. Or as a formula:

C = (F-32)*5/9

Now, if we have a temperature in Celsius we can use the inverse function to calculate the temperature in Fahrenheit. This function is:

F = 9/5*C +32

Summary

The inverse function is a function which outputs the number you should input in the original function to get the desired outcome. So if f(x) = y then f-1(y) = x.

The inverse can be determined by writing y = f(x) and then rewrite such that you get x = g(y). Then g is the inverse of f.

It has multiple applications, such as calculating angles and switching between temperature scales.

This content is accurate and true to the best of the author’s knowledge and is not meant to substitute for formal and individualized advice from a qualified professional.