Latest Tweets

Free math worksheets

Inverse function

What is inverse function?

First of all we should define inverse functions and explain their purpose. You must be aware  that only injectiv functions can have their inverse.

 Injectivity of a function

We say that a function f has an injectivity property or that it is injection if it is valit that:

{ a_1 \neq  a_2  \Longrightarrow  f(x_1) \neq f(x_2) }.

That means that the function is injection if it maps different numbers of its domain to different members of codomain. This property is equivalent to the following:

f(x_1)=f(x_2) \Longrightarrow x_1=x_2 .

Meaning: function is injection if the equality of function values implies the equality of arguments.

There exists a very simple way of finding out whether a certain function is injective or not. We’ll use a simple method called the horizontal test.

Horizontal test- injectivity criteria

Function f is injective if a line parallel through x- axis intersects its graph in one point at the most. 

We’ll show you how to use horizontal test on the following functions:

f(x)=|x|,  b(x)=\frac { 1 }{ x }


The horizontal test shows that if we can draw as any horizontal line and if that line intersect the graph with in just one point, the function will be injection.

Now we’ll simply draw few horizontal lines and see what happens.


We can notice that if we take function f(x)= |x| and draw horizontal lines through it, those lines intersect the function in two points. Every line we draw on a positive part of y- axis will intersect this function in two points. Thus that function f(x)=|x| is not an injection.

On the same way we can test function  b(x)=\frac { 1 }{ x }. This function will be injective because we can’t draw a horizontal line that will intersect this function in two points.

1_x line

The function can’t have inverse function if it is not an injection. Thus if function is an injection, then for a given y from the image of the function there exists unique x from the domain of the  function such that and it is valid that f(x)=y. This uniqueness is provided by the injective property, otherwise there would exist two numbers x_1 and x_2 that map into the same y which means that function f could not be an injection.

This means that we can find mapping g which maps y into x, g(y)=x. For that pair of mapping f and g it is valid that:

 y=f(x),    x=g(y) 

Or, written in another way:

g(f(x))=x,    f(g(y))=y.


Function g is an inverse function of a function f if it is valid that:

g(f(x))=x,  \forall x\in D_f

f(g(x))=x,  \forall x\in D_g,

then g=f^{-1}.

In the same way f is inverse function of a function g and g is the inverse function of a function f and is also valid that f=g^{-1}.

Because of that we say that functions f and g are mutually inverse.


g(f(x))=x, for every x∈D_f

f(g(x))=x, for every x∈D_g

can also be written as:

y=f(x) \leftrightarrow x=g(y), \forall x\in D_f, \forall x\in D_g

 If function f maps element x into element y, inverse function will map element y into element x.


For example, we can take function f(x)=x^{2}. This function defined like this doesn’t have an inverse function because it’s not injection.

The graph of this function is a parabola positioned mainly on the positive part of y -axis. Every line we draw parallel to the x– axis will intersect the graph in two points. But, if we limit the domain we can have injective domain.

We’ll observe functions f(x)=x^{2} and g(x)=\sqrt{x} defined on the interval [0,+\infty>. Those two functions are mutually inverse because for every positive number x it is valid that:

g(f(x))= g(x^{2})=\sqrt{x^{2}}=x


Finding inverse function

 y=f(x) \leftrightarrow x=f^{-1}(y) .

From the equation y=f(x) we have to clalculate the value of variable x in relation to variable y. If we could do that, we could get equation of inverse function.


Example 1. Find the inverse function of a function f(x)=5x+2.


First we’ll write this equation as if f(x)=y.


Now we’ll solve this equation with unknown x.


From here we get that:


After we got the rule of maping of an inverse function, its argument can be replaced with x, as it is common to do so:


Be careful!
Do not mistake notation for inverse function f^{-1}(x) for the negative power f(x)^{-1}. Those are two very different things!

If f(x)=5x+2:

f^{-1}(x)=\frac{x-2}{5}  but f(x)^{-1}=\frac{1}{5x+2}

Calculating Inverse function

Inverse function is found using the followin procedure:

  • Write y=f(x).
  • Solve the equation y=f(x) by the unknown x.
  • If there is an unique solution of that equation, then the function has an inverse function x=f^{-1}(x).
  • Switch the names of the unknowns x and y so you can get a notation y=f^{-1}(x)

Let’s try this procedure on different functions.


Example 2. Find the inverse function of a function f(x)=\frac{x-1}{x-3} , x≠3.

y=\frac{x-1}{x-3} /(x-3)




Example 3. Find the inverse function of a function f(x)=x^{2}+1, f: \mathbb{R}\rightarrow \mathbb{R} .

From the equation y=x^{2}+1 we get x^{2}=y-1.

From one value of variable y>=0 we get two possible values for variable xx=\pm \sqrt{y-1}.

Here is where you should sense that the inverse function of this function does not exist, because this function is not injection. To check that, we can take for example y=5 and two different values for x, according to this formula:

x_1 =\sqrt{5-1}=2, x_2=-\sqrt{5-1}=-2.

this means that f(x_1)=2^{2}+1=5 and f(x_2)=(-2)^{2}+1=5 \rightarrow this function is not an injection.

 Graph of an inverse function

Can we determine the graph of an inverse function of a function f if we know a graph of a function f?

We’ll start, again, from the basics: y=f(x) \leftrightarrow x=g(y) we can read the following:

Point (x, y) lies on a graph of function f if and only if point (y, x) lies on a graph of a function g.

Notice that points (x, y) and (y, x) are symmetrical according to the line y=x is the bisector of the first and third quadrant.

Graphs of a function f and its inverse function g are symmetrical according to the line y=x.

For example we’ll use the function from the first example: f(x)=5x+2, f^{-1}(x)=\frac{x-2}{5}.

Now, you can draw graphs of these two function and examine them.


From this drawing you can see that if you take any point (x, y) on a graph of a function f(x) point (y, x) will be symmetric to the line y=x and will lie on the graph of a function f^{-1}(x).


Example 4. Draw the graph of a function f(x)=x^{2}, x>0 and the graph of the function f^{-1}(x).