Read an introductory example

Consider a function $y=f(x)$. If a value of $x$ is given, we just need to substitute it in the formula of $f$ to obtain the corresponding value of $y$. For example if $f(x)=x^{3}$, and $x=2$ is given, the corresponding value of $y$ is 8. Now suppose we want to know at which $x$, the value of $f$ is $27$. To answer this question, we need to solve $x^{3}=27$ for $x$. If we take the cube root of both sides, we have $x=\sqrt[3]{27}=3$. In general, for every $y$, there exists a number $x$ for which $y=f(x)$, and that $x$ is given by
\[
x=\sqrt[3]{y}.
\] This equation defines $x$ as a function of $y$. If we denote this function by $g$, then
\[
g(y)=\sqrt[3]{y}.
\] The function $g$ is called the inverse of $f$ because it undoes the effect of $f$:
\[
g(f(x))=g(x^{3})=\sqrt[3]{x^{3}}=x\qquad\text{and}\qquad f(g(y))=f(\sqrt[3]{y})=(\sqrt[3]{y})^{3}=y.
\]


The Inverse of a Function

Consider a general function $f$ with domain $A$ and range $B$. For every $y$ in $B$, there is at least one number $x$ in $A$ such that $y=f(x)$. If $f$ is one-to-one, there is exactly one $x$ in $A$ such that $y=f(x)$. Because $x$ is unique, we can define a function $g$ from $B$ to $A$ as follows:
\[
x=g(y)\qquad\Leftrightarrow\qquad y=f(x).
\] As in Figure 1, the function $g$ reverses the correspondence given by $f$ and is called the inverse of $f$ and the process of obtaining $g$ from $f$ is called inversion.

The process of inversion can be applied to any one-to-one function. If $f$ is one-to-one, we often denote its inverse function by $f^{-1}$. The symbol $f^{-1}$ is read “$f$ inverse.”

  • Note that the “$-1$” in the symbol $f^{-1}$ denotes an inverse and not an exponent. In other words $f^{-1}(y)$ is NOT the same as $1/[f(y)]$. The reciprocal $1/[f(y)]$ is denoted by $[f(y)]^{-1}$.
    \[
    f^{-1}(y)\neq\frac{1}{f(y)}
    \]
Figure 1:The function and its inverse undo the effects of each other.

 

Definition 1: Suppose $f$ is a one-to-one function on a domain $A$ with range $B$. The inverse function $f^{-1}$ is
defined as follows:
\[
x=f^{-1}(y)\qquad\text{means}\qquad y=f(x)
\] for every $y$ in $B$.

Domains and Ranges of Inverse Functions

From the above definition, it is clear that the range and domain of $f$ and $f^{-1}$ simply switch!

\[\bbox[#F2F2F2,5px,border:2px solid black]{Dom(f) =Rng(f^{-1})}\] and
\[\bbox[#F2F2F2,5px,border:2px solid black]{Rng(f) =Dom(f^{-1})}\]

 

Example 1
Given the function $f$ has an inverse and $f(1)=3$, $f(2)=-4$, and $f(5)=-1$, find $f^{-1}(3),f^{-1}(-4)$, and $f^{-1}(-1)$.
Solution
From Definition 1 we have
\begin{align*}
f^{-1}(3) & =1\qquad\text{because }f(1)=3\\
f^{-1}(-4) & =2\qquad\text{because }f(2)=-4\\
f^{-1}(-1) & =5\qquad\text{because }f(5)=-1
\end{align*}
As we can see in the following arrow diagram, the effect of $f^{-1}$ simply undoes the effect of $f$.

(a) (b)
Figure 2

The following theorem can be used to verify that a function $g$ is the inverse of $f$.

Theorem 1: Let $f$ be a one-to-one function with domain $A$ and range $B$, and $g$ be a function with domain $B$ and range $A$. The function $g$ is the inverse function of $f$ (i.e. $g=f^{-1}$ ) if and only if the following conditions hold:

(1)   $g(f(x))=x$                 for every $x$ in $A = Dom(f)$

and

(2)   $f(g(y))=y$               for every $y$ in $B=Dom(g)$.

Click to Read the Proof

First, suppose $g=f^{-1}$; we are going to show that (1) and (2) are true. By the definition of an inverse function, we have
\[
x=g(y)\quad\Leftrightarrow\quad y=f(x)
\] for every $x$ in $A$ and every $y$ in $B$. If we substitute $f(x)$ for $y$ in $x=g(y)$ we obtain
\[
x=g(y)=g(f(x))\qquad\text{for every }x\text{ in }A.
\] Similarly, if we substitute $g(y)$ for $x$ in $y=f(x)$, we obtain
\[
y=f(x)=f(g(y))\qquad\text{for every }y\text{ in }B.
\] Thereby we proved that if $g=f^{-1}$ both (1) and (2) are true.

Conversely, suppose $g$ is a function for which both (1) and (2) are true, then we have to show $x=g(y)$ implies $y=f(x)$ and $y=f(x)$ implies $x=g(y)$.

If $x=g(y)$, because (2) is true, $f\big(\underbrace{g(y)}_{=x}\big)=y$;
that is $f(x)=y$. This shows that
\[
x=g(y)\implies y=f(x)
\] Next suppose $y=f(x)$. Because (1) is true, $g\big(\underbrace{f(x)}_{=y}\big)=x$; that is $g(y)=x$. This shows that
\[
y=f(x)\implies x=g(y).
\] Thereby we proved that if (1) and (2) hold, then $x=g(y)\Leftrightarrow y=f(x)$,and the proof is complete.

Inverse of Inverse

The above theorem indicates that if $g$ is the inverse of $f$ then the inverse of $g$ is $f$. In other words the inverse of inverse of $f$ is $f$, or $f$ and $f^{-1}$ are inverses of each other.

\[ \bbox[#F2F2F2,5px,border:2px solid black]{\large \text{if } \ g=f^{-1}\ \text{ then }\  g^{-1}=f}\]

Changing the Independent Variable

Note that $y$ in $f^{-1}(y)$ simply represents an arbitrary number in the domain of the function $f^{-1}$. There is nothing special about $y$. Therefore, $y$ can be replaced by any letter that you like such as $u,z$, or even $x$! So, instead of $f^{-1}(y)$, we may write $f^{-1}(x)$. In this case the two conditions of the above theorem can be written as

$f^{-1}(f(x))=x$      for every $x$ in the domain of $f$

and

$f(f^{-1}(x))=x$       for every $x$ in the domain of $f^{-1}$.

Example 2
Verify that
\[
f(x)=5x^{3}+2\qquad\text{and}\qquad g(x)=\sqrt[3]{\frac{x-2}{5}}
\] are inverses of each other.
Solution

The domain of $f$ and the domain of $g$ are both the entire set of real numbers $\mathbb{R}$. Thus to prove that they are inverse of each other, we have to show that for all $x$, we have $f(g(x))=x$ and $g(f(x))=x$:
\begin{align*}
f(g(x)) & =f\left(\sqrt[3]{\frac{x-2}{5}}\right)\\
& =5\left(\sqrt[3]{\frac{x-2}{5}}\right)^{3}+2\\
& =5\frac{x-2}{5}+2\\
& =x
\end{align*}
and
\begin{align*}
g(f(x)) & =g\left(5x^{3}+2\right)\\
& =\left(\sqrt[3]{\frac{(5x^{3}+2)-2}{5}}\right)^{3}\\
& =\left(\sqrt[3]{\frac{5x^{3}}{5}}\right)^{3}\\
& =\left(\sqrt[3]{x}\right)^{3}\\
& =x.
\end{align*}

When Does a Function Have an Inverse?

As explained at the beginning of this section, if a function $f$ is one-to-one, then it has an inverse function; otherwise, it does not. That is,

A function has an inverse function if an only if it is one-to-one 

In Section 2.15, we learned that every monotonic (= increasing or decreasing) function is one-to-one. Thus we can say:

  • Every increasing or decreasing function has an inverse function.

 

Example 3
Determine if each of the following functions has an inverse function.
(a) $f(x)=x^{3}+1$
(b) $h(x)=x^{3}-x$
Solution
(a) We know how $y=x^{3}$ looks like. So we can easily sketch the graph of $f(x)=x^{3}+1$ by shifting the graph of $y=x^{3}$ upward one unit. From Figure 3(a), it is clear that $f$ is a one-to-one function, so it has an inverse function. Alternatively, we can algebraically show that $f$ is one-to-one. To do so, we have to show that $f(x_{1})=f(x_{2})$ implies $x_{1}=x_{2}$
\begin{align*}
f(x_{1}) & =f(x_{2})\\
x_{1}^{3}+\cancel{1} & =x_{2}^{3}+\cancel{1}\\
x_{1}^{3} & =x_{2}^{3}\\
\sqrt[3]{x_{1}^{3}} & =\sqrt[3]{x_{2}^{3}} &{\small (\text{ take cube roots of both sides})}\\
x_{1} & =x_{2}
\end{align*}

(b) We note that $h(x)=x^{3}-x=x(x^{2}-1)$, and thus $h$ has three real roots $-1,0,$ and 1; that is,
\[
h(-1)=h(1)=h(0)=0.
\] Because the value of $h$ at three different values of $x$ is the same, $h$ is not a one-to-one function We may confirm the fact that $h$ is not one-to-one by sketching its graph using a computer or a graphing calculator. As it is clear from the Figure 3(b),the horizontal test is not passed, and hence $h$ is not one-to-one.Therefore, $h$ does not have an inverse function.

(a) Graph of $y=x^{3}+1 $ . The horizontal line test is passed. (b) Graph of $y=x^{3}-x $. The horizontal line test is not passed.

Figure 3

How to Find the Inverse Function

To find the inverse of a one-to-one function $y=f(x)$, we have to solve the equation $y=f(x)$ for $x$. Solving this equation for $x$ may not be easy if not impossible, but the fact that $f$ is one-to-one assures that there is a unique solution for $x$ in terms of $y$ provided that $y$ lies in the range of $f$. The process of inversion is more explained through the following examples.

Example 4
Given $f(x)=2x^{5}+3$, find its inverse function.
Solution
Let $y=f(x)$ and then solve for $x$ in terms of $y$ to find $x=f^{-1}(y)$
\begin{align*}
2x^5+3 & =y  &{\small (\text{let }y=f(x))}\\
2x^{5} & =y-3\\
x^{5} & =\frac{y-3}{2}\\
x & =\left(\frac{y-3}{2}\right)^{1/5} & {\small (\text{bring both sides to the power } 1/5)}
\end{align*}
Therefore, $f^{-1}(y)=\left(\frac{y-3}{2}\right)^{1/5}$. Note that $y$ must lie within the range of $f$. Because $f$ is a polynomial of an odd degree, its range is $(-\infty,\infty)$. Therefore, $y$ can be any number, and the domain of $f^{-1}$ is $(-\infty,\infty)$ or $\mathbb{R}$. 

Recall that $y$ in $f^{-1}(y)$ represents an arbitrary number in the domain of $f^{-1}$. That is, $f^{-1}(y)=\left(\frac{y-3}{2}\right)^{1/5}$ simply means that $f^{-1}$ transforms the input $y$ to the output $\left(\frac{y-3}{2}\right)^{1/5}$. So if you wish to denote the input variable by $x$ instead of  $y$ then just replace every “$y$” in $f^{-1}(y)$ with an “$x$.” That is,
\[
f^{-1}(x)=\left(\dfrac{x-3}{2}\right)^{1/5}.
\]

The steps of finding the inverse of a function can be summarized as

  1. Write down the equation $y=f(x)$.
  2. Solve the equation $y=f(x)$ for $x$ and express $x$ as a function of $y$: $x=g(y)$
  3. The equation $x=g(y)$ provides a formula for the inverse function $f^{-1}$; that is, $f^{-1}(y)=g(y)$ with $y$ as the independent variable. 
  4. If $y$ is acceptable as the independent variable for $f^{-1}$, you are finished. However, if you wish to denote the independent variable, as usual,  by $x$, simply replace every $y$ in the formula $f^{-1}(y)$ by $x$ to obtain a formula for $f^{-1}(x)$. Now as usual, we can show the output of $f^{-1}(x)$ by $y$ and write $y=f^{-1}(x)$. 
Example 5
Given $g(x)=2x-1$, find the inverse of $g$.
Solution
First let $y=g(x)$ and solve for $x$ in terms of $y$ to find $x=g^{-1}(y)$:
\begin{align*}
2x-1 & =y\\
x & =\frac{y+1}{2}.
\end{align*}
Therefore,
\[
x=g^{-1}(y)=(y+1)/2.
\] Again we note that $y$ must lie within the range of $g$. The graph of $g$ is a line which shows that its range is $(-\infty,\infty)$ and hence $y$ can be any real number.

We can show the input of $g^{-1}$ by “$x$” instead of “$y$”. That is,
\[
g^{-1}(x)=\frac{x+1}{2}.
\] We can easily verify that $g(g^{-1}(x))=x$ and $g^{-1}(g(x))=x$.

Example 6
Given $h(x)=\sqrt{2x+3}$, find the inverse of $h$.
Solution
Let $y=h(x)$ and solve for $x$ in terms of $y$ to find $x=h^{-1}(y)$:
\begin{align*}
\sqrt{2x+3} & =y\\
2x+3 & =y^{2}\\
x & =\frac{y^{2}-3}{2}
\end{align*}
Therefore, $h^{-1}(y)=(y^{2}-3)/2$. We note that $y$ must lie within the range of $h$. We know that the output of the square root is always nonnegative, and because $h(-3/2)=0$, the range of $h$ is $[0,\infty)$.
Therefore
\[
h^{-1}(y)=\frac{1}{2}(y^{2}-3),\qquad y\geq0.
\]

If we wish, we can replace “$y$” in $h^{-1}(y)$ with “$x$” and write:
\[
h^{-1}(x)=\frac{1}{2}(x^{2}-3),\qquad x\geq0.
\]

Example 7
Given $u(x)=x^{2}+1$ ($x\leq0$), find $u^{-1}$.
Solution
Let $y=u(x)$, solve this equation for $x$ in terms of $y$ to find $u^{-1}$:
\begin{align*}
x^{2}+1 & =y\\
x^{2} & =y-1
\end{align*}
Now there are two solutions for $x$, $x=\pm\sqrt{y-1}$. Because the domain of $u$ is restricted to $x\leq0$, we choose
\[
x=-\sqrt{y-1}.
\] Therefore, $u^{-1}(y)=-\sqrt{y-1}$. As we can see the range of $u$ is $[1,\infty)$ [simply plot the graph of $u$ to see that], and the domain of $u^{-1}$ is $[1,\infty)$. Again we can denote the independent variable of $u^{-1}$ by “$x$” instead of “$y$”. Thus
\[
u^{-1}(x)=-\sqrt{x-1}.
\] Note that if we do not restrict the domain of $u(x)=x^{2}+1$ to negative numbers (or positive numbers), its graph does not pass the horizontal test, which shows, in this case, the function would not be one-to-one and hence would not have an inverse function.

Graph of the Inverse Function

Let’s graph a number of functions we have seen in the examples of this section and their inverses.

(a) $ f(x)=2x^{5}+3 $ and$ f^{-1}(x)=\left(\dfrac{x-3}{2}\right)^{1/5} $  (b) $g(x)=2x-1$ and $ g^{-1}(x)=\frac{x+1}{2} $ (c) $h(x)=\sqrt{2x+3} $ and $ h^{-1}(x)=\frac{1}{2}(x^{2}-3),x\geq0$

Figure 4

In these figures, the graphs of each function and its inverse appear to be mirror images of each other with respect to the bisector of the first and third quadrants $y=x$. Those are not coincidences. If $(a,b)$ is a point on the graph of $f$, then $b=f(a)$. It follows from $b=f(a)$ that $a=f^{-1}(b)$, which means $(b,a)$ is on the graph of $f^{-1}$. A similar argument will verify that if $(b,a)$ is on the graph of $f^{-1}$, then $(a,b)$ will be on the graph of $f$. We get the point $(b,a)$ from $(a,b)$ by reflecting through the line $y=x$.

The graphs of a function and its inverse are the reflections of one another through the line $y=x$
  •  The line $y=x$ is the bisector of the first and third quadrants.
  • Here we have plotted the graph of $y=f^{-1}(x)$; that is, if the independent variable is laid off along the horizontal axis (= $x$-axis) and the dependent variable along the $y$-axis. But if we plot $x=f^{-1}(y)$; that is, if the independent variable is marked off along the vertical axis (=$y$-axis) and the dependent along the $x$-axis, then the graph of the inverse function $x=f^{-1}(y)$ coincides with the graph of $y=f(x)$.
Example 8
Given $f(x)$ is graphed in Figure 5, sketch the graph of $f^{-1}(x)$.

Figure 5

Solution
The graph of $f^{-1}$ will be obtained by reflecting the graph of $f$ across the line $y=x$. The reflection of the point $(a,b)$ across the line $y=x$ is the point $(b,a)$. Because $(2,4),(3,2),(4,1)$ and $(5,0.5)$ are on the graph of $f$, the points $(4,2),(2,3),(1,4)$, and $(0.5,5)$ are on graph of $f^{-1}$. The graph of $f^{-1}$ is depicted in Figure 6.

Figure 6 : The graph of $f $ (orange) and the graph of its inverse $ f^{-1} $ are reflections of one another across $y=x $.