✖

Inverse functions

An inverse function is a function that maps elements “the other way round” compared with the original function.

An introductory example

To start with, take the simple linear function f(x) = 2x. What do the values of this function look like? For example, for the first few natural numbers they look like this:

f(1)=2f(2)=4f(3)=6f(4)=8…

We can see that if we put a 2 into the function, we get a 4 back. What should the inverse function of this function do? It should work the other way round – we should put a 4 into it and the function should give us a 2. The inverse function, which we write as f−1, should map elements in the opposite direction, like this:

f−1(2)=1f−1(4)=2f−1(6)=3f−1(8)=4…

How do we arrange that? If the original function returned double the input x, then the inverse function should return half of the input x. If we put in 3, doubling gives 6. If we take half of 6, we get 3 back. The inverse function would then be written like this:

f−1(x)=x2

Definition

Now let’s define the inverse function properly. Take a function f with a domain and a range. From the definition of a function, for every element x of the domain there is an element y of the range such that f(x) = y.

The inverse function f−1 is then the function for which

f(x)=y⇔f−1(y)=x.

What does this definition tell us? If we put the input x into the function f and get the value y, then we must be able to put y into the inverse function and get the value x back.

Let’s illustrate it all with diagrams. The first diagram shows the original function f, which returns double the value it is given. The left circle represents the domain, the set from which we choose values of x. The right circle represents the range, the set of values that the output can take. The arrows show which input maps to which output. There should of course be infinitely many arrows – this is only a small part of the function.

Mapping of the original function

The next diagram shows the inverse function. The inverse function looks very similar. Above all, the direction of the arrows changes, and the domain and range change too – they swap places.

Mapping of the inverse function

We can see that the original function mapped from the domain to the range, but the inverse function maps the other way, from the range to the domain. So the domain of the original function equals the range of the inverse function, and the range of the original function equals the domain of the inverse function.

When an inverse function exists

First of all, an inverse function does not always exist, because of the basic property of a function. If we take two equal elements a = b of the domain, the function must always return the same result f(a) = f(b). Going back to the function that returned double the input, it must always be true that f(5) = 10. It can’t happen that the function returns, say, thirteen: f(5) = 13 – by definition, a function can’t do that.

Now let’s analyse the situation for, say, the quadratic function f(x) = x2. What does the function return if we put in x1 = 2 and x2 = −2? In both cases the function returns 4:

f(2)=4f(−2)=4

So far so good. But what would the inverse function look like? If we built an inverse function of this quadratic function, we would need both

f−1(4)=2f−1(4)=−2

and as we know, that is not possible. A function can’t return different results for the same input. So when does an inverse function exist? When the function never returns the same value for two different inputs. That is exactly the definition of a one-to-one function:

x1≠x2⇒f(x1)≠f(x2)

An inverse function of f exists if and only if f is one-to-one. (A function such as f(x) = x2, where two different inputs can give the same output, is called many-to-one.) Let’s use diagrams to show why an inverse function really can’t exist for a function that isn’t one-to-one. Using arrows, let’s draw part of the quadratic function f(x) = x2:

Mapping of the quadratic function f(x)=x^2

If we tried to reverse the arrows, we would get this diagram:

Mapping of an inverse function – such a mapping can’t exist

We get a diagram in which two arrows leave one point and go to different numbers in the other set. That doesn’t satisfy the definition of a function, so the inverse function can’t exist.

The graph

If you take the graph of a function and its inverse function exists, then the two graphs are reflections of each other in the line y = x, which is also the graph of the function f(x) = x.

The function y=2x and its inverse function y=x/2. The line y=x is shown in blue

Finding an inverse function

If you are given a function and asked to find its inverse function, you turn the function into an equation and make x the subject. So we rearrange the linear function f(x) = 2x from the beginning like this:

y=2x

We start with this. The aim is to express x in terms of y. Here it’s quick – just divide the equation by 2

y2=x

and x is on its own. The inverse function is therefore f−1(x)=x2. Another example:

f(x)=4x−7

We write it as an equation and make x the subject:

y=4x−7(+7)y+7=4x(÷4)y+74=x

The inverse function therefore looks like this:

f−1(x)=x+74

We can check it. Let’s work out the value of the original function at 3:

f(3)=4⋅3−7=12−7=5

If we found the inverse function correctly, putting in 5 should give us 3 back:

f−1(5)=5+74=124=3

Another example:

f(x)=x2+1

Make x the subject:

y=x2+1(−1)y−1=x2( )y−1=x2

Now we’ve got into an awkward situation. We can’t simply take the square root of x2 and get x – we have to use the modulus, that is:

x2=|x|

Substituting into the previous equation:

y−1=|x|

But this gives us two results, one positive and one negative:

x1=y−1x2=−y−1

So for one value of y we get two different values of x, except when the square root is zero. However, we can find an inverse function on a particular interval. Looking at the graph of the function:

Graph of the function f(x)=x^2+1

we see that an inverse function could exist on the interval [0, ∞). So we can take only the rearrangement for x1. We then get a function whose graph you can see in the diagram:

The inverse function on part of the domain only

So we can say that on this interval the inverse function exists, and it is

f−1(x)=x−1