Functions are commonly known as rules that take inputs and produce outputs. An i**nverse function** does exactly the reverse, undoing what the original function does. How can you tell if two functions are inverses?

### Finding Inverses of Functions

A function is written as \begin{align*}f(x)\end{align*} and its inverse is written as \begin{align*}f^{-1} (x)\end{align*}. A common misconception is to see the -1 and interpret it as an exponent and write \begin{align*}\frac{1}{f(x)}\end{align*}, but this is not correct. Instead, \begin{align*}f^{-1} (x)\end{align*} should be viewed as a new function from the range of \begin{align*}f(x)\end{align*} back to the domain.

It is important to see the cycle that starts with \begin{align*}x\end{align*}, becomes \begin{align*}y\end{align*} and then goes back to \begin{align*}x\end{align*}. In order for two functions to truly be inverses of each other, this cycle must hold algebraically.

\begin{align*}f(f^{-1} (x) )=x\end{align*} and \begin{align*}f^{-1} (f(x) )=x\end{align*}

When given a function there are two steps to take to find its inverse. In the original function, first switch the variables \begin{align*}x\end{align*} and \begin{align*}y\end{align*}. Next, solve the function for \begin{align*}y\end{align*}. This will give you the inverse function. After finding the inverse, it is important to check both directions of compositions to make sure that together the function and its inverse produce the value \begin{align*}x\end{align*}. In other words, verify that \begin{align*}f(f^{-1} (x) )=x\end{align*} and \begin{align*}f^{-1} (f(x) )=x\end{align*}.

Graphically, inverses are reflections across the line \begin{align*}y=x\end{align*}. Below you see inverses \begin{align*}y =e^x\end{align*} and \begin{align*}y= \ln x\end{align*}. Notice how the \begin{align*}(x, y)\end{align*} coordinates in one graph become \begin{align*}(y, x)\end{align*} coordinates in the other graph.

In order to decide whether an inverse function is also actually a function you can use the vertical line test on the inverse function like usual. You can also use the horizontal line test on the original function. The horizontal line test is exactly like the vertical line test except the lines simply travel horizontally.

### Examples

#### Example 1

Earlier, you were asked how you can tell that two functions are inverses. You can tell that two functions are inverses if each undoes the other, always leaving the original \begin{align*}x\end{align*}.

#### Example 2

Find the inverse, then verify the inverse algebraically. \begin{align*}f(x)=y=(x+1)^2+4\end{align*}

To find the inverse, switch \begin{align*}x\end{align*} and \begin{align*}y\end{align*} then solve for \begin{align*}y\end{align*}.

\begin{align*}x&=(y+1)^2+4\\ x-4&=(y+1)^2\\ \pm \sqrt{x-4}&=y+1\\ -1 \pm \sqrt{x-4}&=y=f^{-1} (x)\end{align*}

To verify algebraically, you must show \begin{align*}x= f(f^{-1} (x) )=f^{-1} (f(x) )\end{align*}:

\begin{align*}f(f^{-1} (x) ) & = f\left(-1 \pm \sqrt{x-4} ~ \right) \\ & = \big( (-1 \pm \sqrt{x-4} ~ )+1 \big)^2+4 \\ & = \left( \pm \sqrt{x-4} ~ \right)^2+4 \\ & = x-4+4 = x\end{align*}

\begin{align*}f^{-1} \big( f(x) \big) & = f^{-1} \big( (x+1)^2+4 \big) \\ & =-1 \pm \sqrt{ \big( (x+1)^2+4 \big) - 4} \\ & =-1 \pm \sqrt{(x+1)^2} \\ & =-1+x+1=x\end{align*}

As you can see from the graph, the \begin{align*}\pm\end{align*} causes the inverse to be a relation instead of a function. This can be observed in the graph because the original function does not pass the horizontal line test and the inverse does not pass the vertical line test.

#### Example 3

Find the inverse of the function and then verify that \begin{align*}x= f(f^{-1} (x) )=f^{-1} (f(x) )\end{align*}.

\begin{align*}f(x)=y=\frac{x+1}{x-1}\end{align*}

Sometimes it is quite challenging to switch \begin{align*}x\end{align*} and \begin{align*}y\end{align*} and then solve for \begin{align*}y\end{align*}. You must be careful with your algebra.

\begin{align*}x &= \frac{y+1}{y-1}\\ x(y-1)&=y+1\\ xy-x&=y+1\\ xy-y&=x+1\\ y(x-1)&=x+1\\ y&= \frac{x+1}{x-1}\end{align*}

This function turns out to be its own inverse. Since they are identical, you only need to show that \begin{align*}x= f(f^{-1} (x) )\end{align*}.

\begin{align*}f\left(\frac{x+1}{x-1}\right)=\frac{\left(\frac{x+1}{x-1}\right)+1}{\left(\frac{x+1}{x-1}\right)-1}=\frac{x+1+x-1}{x+1-(x-1)}=\frac{2x}{2}=x\end{align*}

#### Example 4

What is the inverse of \begin{align*}f(x)=y=\sin x\end{align*}?

The sine function does not pass the horizontal line test and so its true inverse is not a function.

However, if you restrict the domain to just the part of the \begin{align*}x\end{align*}-axis between \begin{align*}- \frac{\pi}{2}\end{align*} and \begin{align*}\frac{\pi}{2}\end{align*} then it will pass the horizontal line test and the inverse will be a function.

The inverse of the sine function is called the arcsine function, \begin{align*}f(x)=\sin^{-1}(x)\end{align*}, and is shown in black. It is truncated so that it only inverts a part of the whole sine wave. You will study periodic functions and their inverses in more detail later.

#### Example 5

Determine if \begin{align*}f(x)=\frac{3}{7}x-21\end{align*} and \begin{align*}g(x)=\frac{7}{3}x+21\end{align*} are inverses of one another.

Even though \begin{align*}f(x)=\frac{3}{7}x-21\end{align*} and \begin{align*}g(x)=\frac{7}{3}x+21\end{align*} have some inverted pieces, they are not inverses of each other. In order to show this, you must show that the composition does not simplify to \begin{align*}x\end{align*}.

\begin{align*}\frac{3}{7}\left(\frac{7}{3}x+21\right) -21=x+9-21=x-12 \ne x\end{align*}

### Review

Consider \begin{align*}f(x)=x^3\end{align*}.

1. Sketch \begin{align*}f(x)\end{align*} and \begin{align*}f^{-1}(x)\end{align*}.

2. Find \begin{align*}f^{-1}(x)\end{align*} algebraically. It is actually a function?

3. Verify algebraically that \begin{align*}f(x)\end{align*} and \begin{align*}f^{-1}(x)\end{align*} are inverses.

Consider \begin{align*}g(x)=\sqrt{x}\end{align*}.

4. Sketch \begin{align*}g(x)\end{align*} and \begin{align*}g^{-1}(x)\end{align*}.

5. Find \begin{align*}g^{-1}(x)\end{align*} algebraically. It is actually a function?

6. Verify algebraically that \begin{align*}g(x)\end{align*} and \begin{align*}g^{-1}(x)\end{align*} are inverses.

Consider \begin{align*}h(x)=|x|\end{align*}.

7. Sketch \begin{align*}h(x)\end{align*} and \begin{align*}h^{-1}(x)\end{align*}.

8. Find \begin{align*}h^{-1}(x)\end{align*} algebraically. It is actually a function?

9. Verify graphically that \begin{align*}h(x)\end{align*} and \begin{align*}h^{-1}(x)\end{align*} are inverses.

Consider \begin{align*}j(x)=2x-5\end{align*}.

10. Sketch \begin{align*}j(x)\end{align*} and \begin{align*}j^{-1}(x)\end{align*}.

11. Find \begin{align*}j^{-1}(x)\end{align*} algebraically. It is actually a function?

12. Verify algebraically that \begin{align*}j(x)\end{align*} and \begin{align*}j^{-1}(x)\end{align*} are inverses.

13. Use the horizontal line test to determine whether or not the inverse of \begin{align*}f(x)=x^3-2x^2+1\end{align*} is also a function.

14. Are \begin{align*}g(x)=\ln (x+1)\end{align*} and \begin{align*}h(x)=e^{x-1}\end{align*} inverses? Explain.

15. If you were given a table of values for a function, how could you create a table of values for the inverse of the function?

### Review (Answers)

To see the Review answers, open this PDF file and look for section 1.12.