6.2: Inverses
- Page ID
- 178853
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\(\newcommand{\longvect}{\overrightarrow}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)
Sometimes two functions can be perfectly matched in a way such that their compositions cancel each other out completely. We say the functions \(f(x)\) and \(g(x)\) are inverses if:
\((f\circ g)(x)=x\) and \((g\circ f)(x)=x\)
If this is the case, say that \(g(x)=f^{-1}(x)\) (called "\(f\) inverse").
(Keep in mind this is not \(\left[ f(x) \right]^{-1}\) which would be \(\displaystyle{ \frac{1}{f(x)}}\), the reciprocal of \(f\) )
It is very easy to check if two functions are inverses: just compose them!
For each pair of functions \(f(x)\) and \(g(x)\), determine if they are inverses or not.
(a) \(f(x)=3x+1\) and \(g(x)=\displaystyle{\frac{1}{3}x-\frac{1}{3}}\)
(b) \(f(x)=\displaystyle{\frac{x+5}{x}}\) and \(g(x)=\displaystyle{\frac{x}{x+5}}\)
(c) \(f(x)=x^2\) and \(g(x)=\sqrt{x} \)
Solution
(a) \(\displaystyle{ (f\circ g)(x)=f(g(x))=f\left( \frac{1}{3}x-\frac{1}{3}\right)=3\left(\frac{1}{3}x-\frac{1}{3}\right)+1=x-1+1=x }\)
\(\displaystyle{ (g\circ f)(x)=g(f(x))=g\left( 3x+1\right)=\frac{1}{3}\left(3x+1\right)-\frac{1}{3}=x+\frac{1}{3}-\frac{1}{3}=x }\)
So \((f\circ g)(x)=x\) and \((g\circ f)(x)=x\) both hold, meaning these are inverse functions
(b) \(\displaystyle{ (f\circ g)(x)=f(g(x))=f\left( \frac{x}{x+5} \right)=\frac{ \left(\frac{x}{x+5}\right)+5}{\left( \frac{x}{x+5} \right)}= \frac{6x+25}{x}\ne x }\)
\(\displaystyle{ (g\circ f)(x)=g(f(x))=g\left( \frac{x+5}{x}\right)=\frac{\left( \frac{x+5}{x}\right) }{\left(\frac{x+5}{x}\right)+5}=\frac{x+5}{6x+5}\ne x }\)
These are clearly not inverses since neither of \((f\circ g)(x)=x\) and \((g\circ f)(x)=x\) hold.
(c) \(\displaystyle{ (f\circ g)(x)=f(g(x))=f\left( \sqrt{x} \right)= \left(\sqrt{x}\right)^2= x }\)
\(\displaystyle{ (g\circ f)(x)=g(f(x))=g\left( x^2\right)=\sqrt{x^2}=|x|\ne x }\)
Even though \((f\circ g)(x)=x\), since \((g\circ f)(x)\ne x\) these are not inverse functions.
Remember \(f\circ g \ne g\circ f\) usually, so you always have to check both compositions!
While checking if two functions are inverses is straightforward, sometimes you need to find the inverse of a given function (and guessing isn't a strong strategy).
To do this, we start with \(y=f(x)\), then apply \(f^{-1}(x)\) to both sides giving:
\(f^{-1}\left(y\right) =f^{-1}\left( f(x)\right) \longrightarrow f^{-1}(y)=x\)
That means that the inverse function \(f^{-1}\) switches the jobs of \(x\) and \(y\).
Given a function \(y=f(x)\), to find \(f^{-1}(x)\) we just switch \(x\) and \(y\) (and then solve for \(y\))
Find the inverse of each function below.
(a) \(f(x)=5x^3+2\)
(b) \(g(x)=\displaystyle{\frac{x+3}{2x-7}}\)
Solution
(a) First we switch all the x and y terms: \(y=5x^3+2 \longrightarrow x=5y^3+2\)
Then solve for \(y\):
\(x-2=5y^3\)
\( \displaystyle{ \frac{x-2}{5}=y^3}\)
\( \displaystyle{ y=\sqrt[3]{\frac{x-2}{5}}} \)
Therefore we have \(f^{-1}(x)=\displaystyle{\sqrt[3]{\frac{x-2}{5}}}\)
(b) We switch all the x and y terms: \(y=\displaystyle{\frac{x+3}{2x-7}} \longrightarrow x=\displaystyle{\frac{y+3}{2y-7}}\)
Then solve for \(y\):
\(x(2y-7)=y+3\)
\(2xy-7x=y+3\)
\( 2xy-y=7x+3 \)
\((2x-1)y=7x+3\)
\(\displaystyle{ y=\frac{7x+3}{2x-1}}\)
Therefore we have \(f^{-1}(x)=\displaystyle{g^{-1}(x)=\frac{7x+3}{2x-1}}\)
For \(f(x)=x^2\), we know \(f^{-1}(x)\ne \sqrt{x}\) so what is it's inverse?
Look at the graph for \(y=f(x)\) and then \(f(y)=x\):

The graph of \(x=y^2\) is not a function! That means that there is no \(f^{-1}(x)\) for this particular choice of \(f(x)=x^2\). Not all functions will have an inverse, because just like we see above, it is possible that switching the jobs of \(x\) and \(y\) will lead to a relationship that is not a well-defined function.
In order for the inverse of \(f(x)\) to exist, it must pass the vertical line test after you switch \(x\) and \(y\). As you can see though, each vertical line on \(x=y^2\) corresponds to a horizontal line on \(y=x^2\):

On the left we have two different \(x\) values that give the same output, which means the graph on the right will have two different \(y\) values for the same \(x\). Instead of forcing us to draw the second picture and use the vertical line test, we can instead just check to see if any horizontal lines intersect the original graph \(y=f(x)\) more than once. We call this the horizontal line test.
Functions with graphs that pass the horizontal line test are called one-to-one functions.
(These are the functions that can have an inverse function.)
Since \(f(x)=x^2\) does not pass the horizontal line test, it does not have an inverse. However, we can get around that by simply restricting the domain of \(f(x)\) until it becomes one-to-one:

It is worth noting that for \(x=y^2\) and \(y\ge 0\), we can square root both sides and get \(y=\sqrt{x}\)
Remember we saw when \(f(x)=x^2\) and \(g(x)=\sqrt{x}\), we had \((f\circ g)(x)=x\) and \((g\circ f)(x)=|x|\), but when \(x\ge 0\) the absolute value of \(x\) is the same as just \(x\) itself!
This is not the only way to restrict the domain of \(f(x)=x^2\) to make a one-to-one function, we could also have used domain \(D=(-\infty,0]\):

Here we see that the inverse function simplifies to \(f^{-1}(x)=-\sqrt{x}\) instead.
This further drives home the point that a function's domain is an important part of its identity! Changing it may change what the inverse of \(f\) looks like, or if it even exists at all.
Find the inverse of \(h(x)=x^2-2x\) for \(x\in (-\infty,1]\)
Solution
Switching \(x\) and \(y\): \(y=x^2-2x\) with \(x\le 1\) becomes \(x=y^2-2y\) with \(y\le 1\)
Now we move everything to one side and use the quadratic formula for \(y\)
\(y^2-y-x=0 \longrightarrow y=\displaystyle{\frac{-(-1)\pm \sqrt{(-1)^2-4\cdot 1\cdot (-x)}}{2\cdot 1}}\)
\(=\displaystyle{\frac{2\pm \sqrt{4+4x}}{2}=\frac{2}{2}\pm \frac{2\sqrt{1+x}}{2}=1\pm \sqrt{1+x}}\)
since \(y\le 1\) we should pick the \(-\) from the \(\pm\)
So \(h^{-1}(x)=1-\sqrt{1+x}\)


