Often, you need to ‘undo’ what a function did.
For example:
 ‘add
[beautiful math coming... please be patient]$2$’ is undone by ‘subtract
[beautiful math coming... please be patient]$2$’ in the following sense:
if you start with any number, add
[beautiful math coming... please be patient]$2$, then subtract
[beautiful math coming... please be patient]$2$, you return to the original number
 ‘cube’ is undone by ‘take the cube root’
 ‘multiply by $3$’ is undone by ‘divide by $3$’
Not all functions can be ‘undone’.
To ‘undo’ means to go from an
output back to the
input
it came from—this only works if the output came from only one place!
That is, in order to ‘undo’ a function, it must satisfy the following
equivalent conditions:
 every output must have exactly one corresponding input
 the graph of the function must pass the horizontal line test
 the function must be onetoone
When it exists, the ‘undoing’ function is given a special name—it
is called the inverse function.
This web exercise makes these ideas precise.
Undoing a OnetoOne Function
If $\,f\,$ is
onetoone,
then there exists a unique function $\,f^{1}\,$ (read as ‘$\,f\,$ inverse’)
that ‘undoes’ what $\,f\,$ does, as the diagram below illustrates:
 start with $\,x\,$
 let $\,f\,$ act on $\,x\,$, giving $\,f(x)\,$
 rename $\,f(x)\,$ as $\,y\,$
 let $\,f^{1}\,$ act on $\,y\,$, giving $\,f^{1}(y)\,$
Since this returns us to where we started, $\,f^{1}(y) = x\,$.
There are two mathematical sentences that emerge in this diagram:
$f(x) = y$

$f^{1}(y) = x$ 
‘$\,f\,$ takes $\,x\,$ to $\,y\,$’ 
‘$\,f^{1}\,$ takes $\,y\,$ to $\,x\,$’ 
These two sentences are equivalent—they are
true at the same time, and false at the same time.
This defines the relationship between a function and its inverse:
if one function does something, the other undoes it!
More precisely, the equivalence of these two sentences gives all the following information:
 if $\,f\,$ takes $\,x\,$ to $\,y\,$, then $\,f^{1}\,$ takes $\,y\,$ back to $\,x\,$
 if $\,f\,$ doesn't take $\,x\,$ to $\,y\,$, then $\,f^{1}\,$ doesn't take $\,y\,$ to $\,x\,$
 if $\,f^{1}\,$ takes $\,y\,$ to $\,x\,$, then $\,f\,$ takes $\,x\,$ back to $\,y\,$
 if $\,f^{1}\,$ doesn't take $\,y\,$ to $\,x\,$, then $\,f\,$ doesn't take $\,x\,$ to $\,y\,$
Getting the sentences $\,y = f(x)\,$ and $\,f{\,}^{1}(y) = x\,$ from each other
going from $\,y = f(x)\,$ to $\,f{\,}^{1}(y) = x\,$ :
let $\,f^{1}\,$ act on both sides

going from $\,f{\,}^{1}(y) = x\,$ to $\,y = f(x)\,$ :
let $\,f\,$ act on both sides

Start with the equation:

$y = f(x)$ 
Start with the equation: 
$f^{1}(y) = x$ 
Let $\,f^{1}\,$ act on both sides: 
$f^{1}(y) = f^{1}\bigl(f(x)\bigr)$ 
Let $\,f\,$ act on both sides: 
$f\bigl(f^{1}(y)\bigr) = f(x)$ 
Since $\,f\,$ and $\,f^{1}\,$ ‘undo’ each other,
they ‘cancel out’
(this is made precise in the next section) 
$f^{1}(y) = \underbrace{f^{1}\bigl(f(x)\bigr)}_{= x}$ 
Since $\,f\,$ and $\,f^{1}\,$ ‘undo’ each other,
they ‘cancel out’
(this is made precise in the next section) 
$\underbrace{f\bigl(f^{1}(y)\bigr)}_{= y} = f(x)$ 
This leaves us with: 
$f^{1}(y) = x$ 
This leaves us with: 
$y = f(x)$ 
Caution! $\,f{\,}^{1}\,$ does NOT mean $\,\frac{1}{f}\,$!
There is some unfortunate notation used for inverse functions, which can lend itself to confusion if you're not careful.
You know from properties of exponents that $\,x^{1}\,$ denotes the multiplicative inverse of $\,x\,$. That is, $\,x^{1} = \frac{1}{x}\,$.
However, when $\,f\,$ is a (onetoone) function, then $\,f^{1}\,$ does NOT mean $\,\frac{1}{f}\,$!
Instead, $\,f^{1}\,$ is just notation for the inverse of $\,f\,$—the unique function that ‘undoes’ what $\,f\,$ does.
Be careful about this!
EXAMPLE
Let $\,f(x) = x^3\,$.
Answer the following questions:
 Is $\,f\,$ onetoone? Give a reason to support your answer.
Solution: Yes. The graph of the cubing function passes the horizontal line test.
 Does $\,f\,$ have an inverse? Give a reason to support your answer.
Solution: Yes. Every onetoone function has an inverse.
 Give a formula for $\,f^{1}(x)\,$.
Solution: The cube root function undoes the cubing function: $\,f^{1}(x) = \root 3\of{x}$
 Specialize the equivalent sentences $\,y = f(x)\,$ and $\,f^{1}(y) = x\,$ to the given functions.
Solution:
 $\,y = f(x)\,$ becomes $\,y = x^3\,$
 $f^{1}(y) = x\,$ becomes $\root 3\of{y} = x$
Thus, $\,y = x^3\,$ is equivalent to $\,\root 3\of{y} = x\,$.
Master the ideas from this section
by practicing the exercise at the bottom of this page.
When you're done practicing, move on to:
properties of inverse functions