# Inverse Functions

### Relating a Function with Its Inverse

Two functions $f$ and $g$ are inverse functions if $f(g(x)) = g(f(x)) = x$. To determine the rule for an inverse function, write as $y=f(x)$, reverse $x$ and $y$, and then solve for $y$. The domain of $f$ is the range of $g$, and vice versa.

If the result of switching the inputs and outputs of a function is also a function, it is called the inverse function. The composition of a function and its inverse is the identity function.

The inverse of the function $f(x)$ is written as $f^{-1}(x)$. This is read "$f$ inverse of $x$." This notation does not mean the same thing as:
$(f(x))^{-1}=\frac{1}{f(x)}$
The inverse of a function is defined only if the function is one-to-one.
$(f \circ f^{-1})(x)=(f^{-1} \circ f)(x)=x$
To identify the inverse of a function that is given as a rule, mapping, or graph, switch the inputs and outputs, or swap $x$ and $y$.
Step-By-Step Example
Identifying the Inverse of a Linear Function
Determine the inverse of:
$f(x)=8x+5$
Step 1
Write $f(x)$ as $y$.
$y=8x+5$
Step 2
Switch the positions of $x$ and $y$.
$x=8y+5$
Step 3
Solve for $y$.
\begin{aligned}x&=8y+5\\x-5&=8y+5-5\\x-5&=8y\\\frac{x-5}{8}&=y\end{aligned}
Step 4
Replace $y$ with $f^{-1}(x)$.
$f^{-1}(x)=\frac{x-5}{8}$
Solution
The inverse of the function is:
$f^{-1}(x)=\frac{x-5}{8}$
Check that the composition of the function and its inverse is the identity by using the function:
$f^{-1}(f(x))=x$
Calculate:
\begin{aligned}f^{-1}(f(x))&=f^{-1}(8x+5)\\&=\frac{(8x+5)-5}{8}\\&=\frac{8x}{8}\\&=x\end{aligned}

Step-By-Step Example
Identifying the Inverse of a Radical Function
Determine the inverse of the radical function:
$f(x)=\sqrt {4x+6}$
Step 1
Write $f(x)$ as $y$.
$y=\sqrt {4x+6}$
Step 2
Switch the positions of $x$ and $y$.
$x=\sqrt {4y+6}$
Step 3
Solve for $y$.
\begin{aligned}x&=\sqrt{4y+6}\\(x)^2&=(\sqrt{4y+6})^2\\x^2&=4y+6\\x^2-6&=4y+6-6\\x^2-6&=4y\\\frac{x^2-6}{4}&=y\end{aligned}
Step 4
Replace $y$ with $f^{-1}(x)$.
$f^{-1}(x)=\frac{x^2-6}{4}$
Solution
The inverse of the radical function is:
$f^{-1}(x)=\frac{x^2-6}{4}$
Check that composition of the function and its inverse is the identity by checking that:
$f^{-1}(f(x))=x$
Calculate:
\begin{aligned} f^{-1}(f(x))&=f^{-1}(\sqrt{4x+6})\\&=\frac{(\sqrt{4x+6})^2-6}{4}\\&=\frac{4x+6-6}{4}\\&=\frac{4x}{4}\\&=x\end{aligned}

### Graphs of Inverse Functions

The graphs of inverse functions are reflections of each other across the line $y = x$.
The inverse of a function given as a set of ordered pairs is obtained by switching the $x$- and $y$-coordinates.
$f(x) = \left \{ (-4,3),(2,6),(8,-4),(4,7),(-8,1)\right \}$
$f^{-1}(x) = \left \{(3,-4),(6,2),(-4,8),(7,4),(1,-8) \right \}$
When the $x$- and $y$-coordinates of a function are switched, the graph is reflected (flipped) across the line $y=x$. So the graph of an inverse function is the reflection (mirror image) of the function across the line $y=x$.
Step-By-Step Example
Graphing the Inverse of a Function
Identify the inverse of the given function:
$f(x)=6-2x$
Then graph both the given function and its inverse.
Step 1
Replace $f(x)$ with $y$.
$y=6-2x$
Step 2
Switch the positions of $x$ and $y$.
$x=6-2y$
Step 3
Solve for $y$.
\begin{aligned}x&=6-2y\\x+2y-x&=6-2y+2y-x\\2y&=6-x\\y&=3-\frac{x}{2}\end{aligned}
Step 4
Replace $y$ with $f^{-1}(x)$.
$f^{-1}(x)=3-\frac{x}{2}$
Solution
The inverse is:
$f^{-1}(x)=3-\frac{x}{2}$
Graph both functions. The graph of $f^{-1}(x)$ is the reflection of the graph of $f(x)$ across the line $y=x$.

### Restricting the Domain

If the inverse of a function is not a function, the domain of the function can be restricted to values that produce a function for the inverse.

The inverse of a function is defined only if the function is one-to-one. One way to test whether a function is one-to-one is the horizontal line test. If the function does not pass the horizontal line test, then the inverse of the function is not a function.

Analyzing the graph of a function can help determine restrictions on the domain that will make the function one-to-one.

### Horizontal and Vertical Line Test

Descriptions Examples
The function $f(x)=x^2$ is a function, but it does not pass the horizontal line test, so it is not one-to-one. This means the inverse of the function $f(x)=x^2$ is not a function.
The graph of the inverse of $f(x)=x^2$ is a reflection of $f(x)$ over the line $y=x$.

To identify the equation of the inverse, replace $f(x)$ with $y$, and then switch the positions of $x$ and $y$.
$y=x^2\ \rightarrow\ x=y^2$
The graph of the inverse does not pass the vertical line test, so it is not a function.
If the domain of the function $f(x)=x^2$ is restricted to $x \geq 0$, the function passes the horizontal line test, so it is one-to-one.
When the domain of $f(x)=x^2$ is restricted to $x \geq 0$, the graph of the inverse passes the vertical line test, so it is a function.

To identify the rule for the function, solve the inverse $x=y^2$ for $y$.
\begin{aligned}x&=y^2\\\pm\sqrt{x}&=\sqrt{y^2}\\\pm\sqrt{x}&=y\end{aligned}
Since the domain of the original function was restricted to positive values of $x$, the inverse function is only the positive square root, $\sqrt{x}=y$. Replace $y$ with $f^{-1}(x)$.
$f^{-1}(x)=\sqrt{x}$

A vertical line test can help determine whether or not a graph is a graph of a function. A horizontal line test can help identify whether or not the graph of a function is one-to-one. Restricting the domain of a graph of a function ensures that the inverse will be unique.

Step-By-Step Example
Restricting the Domain of a Function
Identify a restriction on the domain of the function so that it has an inverse:
$f(x)=\left ( x-3 \right )^{2}+2$
Then determine that inverse.
Step 1
Graph the function.
Step 2

Restrict the domain so that the new function is one-to-one.

Limit the $x$-values used so that each $y$-value appears only once.
So $f(x)$ is one-to-one for $x \geq3$.
Step 3
Replace $f(x)$ with $y$.
$y=\left ( x-3 \right )^{2}+2$
Step 4
Switch the positions of $x$ and $y$.
$x=\left ( y-3 \right )^{2}+2$
Step 5
Solve for $y$.
\begin{aligned}x&=\left ( y-3 \right)^{2}+2\\x-2&=\left ( y-3 \right )^{2}+2-2 \\x-2&=\left ( y-3 \right)^{2}\\\sqrt{x-2}&=\sqrt{\left ( y-3 \right)^{2}}\\\sqrt{x-2}&=y-3\\\sqrt{x-2}+3&=y-3+3\\\sqrt{x-2}+3&=y\end{aligned}
Solution

Replace $y$ with $f^{-1}(x)$, and include the domain.

For $x \geq3$, the inverse is:
$f^{-1}(x)=\sqrt{x-2}+3$