Once we have functions we can chain them and, when they are bijective, reverse them. These two ideas — composition and inverse — are the practical payoff of one-one and onto.
Composition of functions
Given $f:A\to B$ and $g:B\to C$, the composite $g\circ f : A \to C$ is defined by
$$(g\circ f)(x) = g\big(f(x)\big).$$
You apply $f$ first, then feed the result into $g$. For the composite to make sense, the range of $f$ must sit inside the domain of $g$. Two key facts:
- Not commutative: in general $g\circ f \ne f\circ g$.
- Associative: $h\circ(g\circ f) = (h\circ g)\circ f$, so we can drop the brackets.
The identity function $I_A(x)=x$ acts as a "do nothing" map: $f\circ I_A = f = I_B \circ f$.
Invertible functions
A function $f:A\to B$ is invertible if there is a function $g:B\to A$ that undoes it:
$$g\circ f = I_A \quad\text{and}\quad f\circ g = I_B.$$
Such a $g$ is unique; we call it the inverse and write $f^{-1}$. The central theorem of this chapter:
$f$ is invertible $\iff$ $f$ is bijective (one-one and onto).
This is why we spent the previous page classifying functions: only a bijection can be inverted. Note $f^{-1}$ is the inverse function, not the reciprocal $1/f$.
Properties of the inverse
- $(f^{-1})^{-1} = f$ — inverting twice returns the original.
- $f^{-1}\big(f(x)\big)=x$ and $f\big(f^{-1}(y)\big)=y$.
- Reversal law: if $f$ and $g$ are bijections, then $(g\circ f)^{-1} = f^{-1}\circ g^{-1}$ ("socks and shoes": undo in reverse order).
Finding an inverse — the method
- Confirm $f$ is bijective (so the inverse exists).
- Write $y=f(x)$.
- Solve the equation for $x$ in terms of $y$.
- Swap symbols to express $f^{-1}(y)$ (or rename $y$ as $x$).