We start by recalling the key concept: The inverse of a function.

Definition INV Inverse Function

Now consider the linear function $f(x) = mx + b$.

When $m = 0$, the function $f$  has the same constant value $b$ for any $x$. So $f$ will have no inverse function.
Recall  from LF.ID: If $m >0$ then $f$ is an increasing function while if $m<0$ then $f$ is a decreasing function.
It is also apparent algebraically that if $m \ne 0$, that $f$ is a one to one and onto and therefore $f$ has an inverse function.
This is covered in most beginning and intermediate algebra courses.

In the next examples we use mapping diagrams to check that one linear function $g(x) = m_g x + b_g$ is the inverse of the given function $f$ by looking at the composition functions $(f \circ g)(x) = x$ and $(g \circ f)(x) = x$.

Example LF.INV.1 : Suppose $f(x) = -2x + 1$. Verify that $g(x) = -\frac {x-1} 2$ is the inverse function for $f$.

Inverses for $f_m(x) =m*x$ and  $f_{+b}(x)=x+b$  are quite simple: $f_{1/m}(x) =1/m*x$ and  $f_{-b}(x)=x-b$.

Example LF.INV.2 : (i) Suppose $f(x) = 3x$. Verify that $g(x) = \frac x 3$ is the inverse function for $f$.
ii)Suppose $f(x) = x +2$. Verify that $g(x) = x - 2$ is the inverse function for $f$.

Since all linear functions can be constructed using these simple linear functions with composition (Theorem LF.COMP), finding the algebraic expression for the inverse of $f$ can be interpreted visually by composing the inverses of  $f_m(x) =m*x$ and  $f_{+b}(x)=x+b$ in the reverse order ("socks and shoes").

Thus the inverse of $f(x) = mx +b$ is $g(x)= (f_{1/m}\circ f_{-b})(x) = \frac 1 m *(x-b) = \frac {x-b} m$.
Example LF.INV.3 : Suppose $f(x) = mx +b$. Verify that $g(x) =\frac {x-b} m$ is the inverse function for $f$.

You can use this next dynamic example to investigate visually whether a function $g$ is the inverse of $f$ with the mapping diagrams and the graph of $f$.

Example LF.DINV.0 Dynamic Visualization of The Inverse Function for Linear Functions: Graph and Mapping Diagrams