This article includes a lot of function composition. If you need a review on this subject, we recommend that you go here before reading this article.
Inverse functions, in the most general sense, are functions that "reverse" each other. For example, if a function takes $a$ to $b$, then the inverse must take $b$ to $a$.
Let's take functions $f$ and $g$ for example: $f(x)=\dfrac{x+1}{3}$ and $g(x)=3x-1$.
Notice how $f(5)=2$ and $g(2)=5$. [[β explanation 1]]
Here we see that when we apply $f$ followed by $g$, we get the original input back. Written as a composition, this is $g(f(5))=5$.
But for two functions to be inverses, we have to show that this happens for all possible inputs regardless of the order in which $f$ and $g$ are applied. This gives rise to the inverse composition rule.
##The inverse composition rule
These are the conditions for two functions $f$ and $g$ to be inverses:
-
$f(g(x))=x$ for all $x$ in the domain of $g$
-
$g(f(x))=x$ for all $x$ in the domain of $f$
This is because if $f$ and $g$ are inverses, composing $f$ and $g$ (in either order) creates the function that for every input returns that input. We call this function βthe identity function".
###Example 1: Functions $f$ and $g$ are inverses
Let's use the inverse composition rule to verify that $f$ and $g$ above are indeed inverse functions.
Recall that $f(x)=\dfrac{x+1}{3}$ and $g(x)=3x-1$.
Let's find $f(g(x))$ and $g(f(x))$.
| $f(g(x))$ | $\qquad \qquad g(f(x))$ |
|---|---|
| $\begin{align} f(\greenD{g(x)})&=\dfrac{\greenD{g(x)}+1}{3}\\&=\dfrac{\greenD{3x-1}+1}{3}\\&=\dfrac{3x}{3}\\&=x\\end{align}$ | $\qquad\qquad \begin{align}g(\purpleC{f(x)})&=3\left(\purpleC{f(x)}\right)-1\\&=3\left(\purpleC{\dfrac{x+1}{3}}\right)-1\\&=x+1-1\\&=x\\end{align}$ |
So we see that functions $f$ and $g$ are inverses because $f(g(x))=x$ and $g(f(x))=x$.
###Example 2: Functions $f$ and $g$ are not inverses
If $f(g(x))$ or $g(f(x))$ is not equal to $x$, then $f$ and $g$ cannot be inverses.
Let's try this for $f(x)=5x-7$ and $g(x)=\dfrac{x}{5}+7$.
| $f(g(x))$ | $\qquad g(f(x))$ |
|---|---|
| $\begin{align} f(\greenD{g(x)})&=5(\greenD{g(x)})-7\\&=5\left(\greenD{\dfrac{x}{5}+7}\right)-7\\&=x+35-7\\&=x+28\end{align}\qquad $ | $\qquad\begin{align} g(\purpleC{f(x)})&=\dfrac{\purpleC{f(x)}}{5}+7\\&=\dfrac{\purpleC{5x-7}}{5}+7\\&=x-\dfrac75+7\\&=x+\dfrac{28}{5}\\end{align}$ |
So functions $f$ and $g$ are not inverses because $f(g(x))\neq x$ and $g(f(x))\neq x$.
(Note here, that we could have concluded that $f$ and $g$ were not inverses after showing that $f(g(x))=x+28$.)
Check your understanding
In general, to check if $f$ and $g$ are inverse functions, we can compose them. If the result is $x$, the functions are inverses. Otherwise, they are not.
[[β graded-group 1]]
[[β explanation 1]]
[[β graded-group 1]]
[[β explanation 1]]
[[β graded-group 1]]
[[β explanation 1]]