100. Commutative diagrams
$F\colon A \to B$ and $G\colon B \to C$ can be illustrated by this diagram:

If the two ways of evaluating functions along paths from $A$ to $C$ in this diagram give the same result, then, by definition of composition, $H = G \circ F$.
100.1 Definition: commutative diagram
A diagram with the property that any two paths between the same two nodes compose to give the same function is called a commutative diagram.
100.1.1 Example To say that the following diagram commutes is to say that $H \circ F = K \circ G$; in other words, that for all $a \in A$, $H\bigl(F(a)\bigr) = K\bigl(G(a)\bigr)$.
$$\begin{CD} A @>F>> B \\ @VGVV @VVHV \\ C @>>K> D \end{CD} \tag{100.2}$$
100.1.2 Remarks
a) Commutative diagrams exhibit more of the data involved in a statement such as “$H \circ F = K \circ G$” than the statement itself shows (in particular it shows what the domains and codomains are), and moreover they exhibit it in a geometric way which is easily grasped.
b) Warning: The concept of commutativity of diagrams and the idea of the commutative law for operations such as addition are distinct and not very closely related ideas, in spite of their similar names.
100.1.3 Example Example 98.2.3 on page 141 says that for any function $F$, this diagram commutes:

100.1.4 Example Theorem 98.2 says that if both triangles in this diagram commute,

then the whole diagram commutes. Thus the associative law for for functional composition becomes a statement that commutative triangles can be pasted together in a certain way.
100.1.5 Exercise Draw commutative diagrams expressing these facts:
a) The square of the square root of a nonnegative real number is the number itself.
b) The positive square root of the square of a real number is the absolute value of the number. (Answer on page 248.)
100.1.6 Exercise Draw commutative diagrams which express each of the following facts. No one arrow should be labeled with a composite of two functions — draw a separate arrow for each function.
a) Addition, as a binary operation on $\mathrm{Z}$, is commutative.
b) Addition as in (a) is associative.
100.1.7 Exercise Prove that if $F\colon A \to A$ is an idempotent function, then there is a set $B$ and functions $G\colon A \to B$ and $H\colon B \to A$ such that both the following diagrams commute:

100.1.8 Exercise (hard) Let $\beta$ be defined as in Problem 94.1.11, page 137. Let $F\colon A' \to A$ and $G\colon B' \to B$. Let
$$H\colon \mathrm{Rel}(A,B) \to \mathrm{Rel}(A',B')$$
be the function which takes $\alpha$ to the relation $\alpha'$ defined by $a'\alpha' b' \Leftrightarrow F(a')\alpha G(b')$. Let
$$K\colon (\mathcal{P}B)^{A} \to (\mathcal{P}B')^{A'}$$
be the function which takes $r\colon A \to \mathcal{P}B$ to the function $r'\colon A' \to \mathcal{P}B'$ defined by
$$r'(a') = G^{-1}(r(F(a')))$$
Show that the following diagram commutes.
$$\begin{CD} \mathrm{Rel}(A,B) @>\beta>> (\mathcal{P}B)^{A} \\ @VHVV @VVKV \\ \mathrm{Rel}(A',B') @>>\beta> (\mathcal{P}B')^{A'} \end{CD} \tag{100.5}$$
Pages 144–146 of the book (PDF).