3.5 Inverse of a function

Definition 3.17. Functions \(f\) and \(g\) are inverses of each other if \[(f\circ g)(x)=x\quad \text {and}\quad (g\circ f)(x)=x\] for all \(x\) in the appropriate domains. The inverse of \(f\) is written \(f^{-1}\).

The inverse undoes what the function does: put a number in, apply \(f\), apply \(f^{-1}\), and you are back where you started.

Note 3.18. \(f^{-1}\) does not mean \(\frac {1}{f}\). The superscript \(-1\) here means “inverse function”, not “reciprocal”.

Only a one-to-one function has an inverse. If two different inputs shared an output, the reverse rule would not know which to return, and so would not be a function.

Remark 3.19. Since the inverse reverses every arrow, the domain and range swap over: \[\text {domain of } f^{-1}=\text {range of } f,\qquad \text {range of } f^{-1}=\text {domain of } f.\]

Example 3.20. Show that \(f(x)=\frac {x-3}{2}\) and \(g(x)=2x+3\) are inverses of each other.

Solution. Both composites must come out as \(x\); checking only one is not enough in general. \[(f\circ g)(x)=f(2x+3)=\frac {(2x+3)-3}{2}=\frac {2x}{2}=x\] \[(g\circ f)(x)=g\!\left (\frac {x-3}{2}\right )=2\!\left (\frac {x-3}{2}\right )+3=(x-3)+3=x.\] Both give \(x\), so \(f\) and \(g\) are inverses.

3.5.1 Finding an inverse

The method is always the same three steps: write \(y=f(x)\), make \(x\) the subject, then swap the letters.

Example 3.21. Find the inverse of \(f(x)=\frac {3x+1}{x-2}\), and state its domain.

Solution. Step 1. Write \(y\) for the output: \[y=\frac {3x+1}{x-2}.\]

Step 2. Make \(x\) the subject. Clear the fraction first: \[y(x-2)=3x+1\quad \implies \quad xy-2y=3x+1.\] Gather every term containing \(x\) on one side and everything else on the other: \[xy-3x=2y+1\quad \implies \quad x(y-3)=2y+1\] \[\implies \quad x=\frac {2y+1}{y-3}.\]

Step 3. Swap \(x\) and \(y\), since the inverse takes the old outputs as its inputs: \[f^{-1}(x)=\frac {2x+1}{x-3}.\]

Domain. The inverse is undefined where its denominator vanishes, so \(x\neq 3\); its domain is \(\mathbb {R}\setminus \{3\}\). Notice that \(3\) is precisely the value \(f\) can never output — as \(x\) grows, \(\frac {3x+1}{x-2}\) approaches \(3\) without reaching it. The range of \(f\) and the domain of \(f^{-1}\) agree, as they must.

Check. \[f\big (f^{-1}(x)\big ) =\frac {3\left (\frac {2x+1}{x-3}\right )+1}{\left (\frac {2x+1}{x-3}\right )-2} =\frac {\frac {6x+3+x-3}{x-3}}{\frac {2x+1-2x+6}{x-3}} =\frac {7x}{7}=x. \]

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.