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

We check  (i) visually both with the graph and the Mapping Diagram.
Which do you find more convincing visually?