Viewing an abelian group using cayley diagram I cannot understand this way of viewing whether a group is abelian using cayley's diagram: (from Visual group theory book)

What I can't understand is that while checking being abelian we check $ab=ba$ for any $a,b \in G$, but from diagram we see being abelian means that first $a$ being applied on an element and then $b$ being applied on another element (this element being reached through arrow $a$) is equal to vice-versa procedure as seen in diagram.
Can anyone explain mathematically how it shows being abelian?
 A: Recall that "applying $a$" means moving from the start node along a red arrow, and similarly for $b$. So applying first $a$, then $b$ (i.e. computing $ba$) means moving along the red arrow, then along the blue arrow, while applying first $b$, then $a$ (computing $ab$) means moving along the blue arrow, then along the red arrow. So in the left-hand diagram, you end up in different places, while in the right-hand diagram you end up in the same place.
If you think of the operations as being symmetries of some object, what this means is that the object will be in different configurations if its symmetry group has the Cayley diagram on the left.
A: Maybe a simpler way to see the connection between being abelian via $ab=ba$ and the Cayley graph is the following:
If you want to check that $ab=ba$ (where $a,b$ are generators of your group), you could multiply by $a^{-1}$ and then by $b^{-1}$ from the right. This transforms your equation into:
$aba^{-1}b^{-1}=1$ (which is also known as the commutator of $a,b$ being trivial $=1$).
Now what that means in the Cayley graph is that from any vertex if you follow the path corresponding to $aba^{-1}b^{-1}$ (i.e. following the red arrow $a$, then the blue arrow $b$ then the red arrow but in the opposite direction (as this is $a^{-1}$) and finally the blue arrow in opposite direction), you have to terminate at the same vertext you started from.
This also works for more general elements, e.g. if you have $x$ and $y$ arbitrary elements of your group, then you can check $xy=yx$ via the equivalent condition of $xyx^{-1}y^{-1}=1$. Now $x$ and $y$ correspond to following certain paths in the Cayley graph ($x,y$ are a product of generators and their inverses) and the commutator is trivial if and only if the path closes up at the same starting vertex.
A: I want to explain a slightly more "visual" reason for these squares. The general idea is "$\mathbb{Z}\times\mathbb{Z}$ is made up of squares, and you are seeing the images of these squares in your Cayley graph".
Fact 1: Homomorphisms and Cayley graphs: Suppose $G$ is generated by a set $S=\{s_i:i\in I\}$. Then a surjective homomorphism
$$
\begin{align*}
\phi: G&\rightarrow H\\
s_i&\mapsto t_i
\end{align*}
$$
induces a map of Cayley graphs $\Gamma(G, S)\rightarrow\Gamma(H, T)$, where edges are send to edges, vertices are sent to vertices, and if $p=(e_1, \ldots, e_n)$ is an arbitrary path in $\Gamma(G, S)$ then it is mapped to some path $q=(f_1, \ldots, f_n)$ (possibly empty) in $\Gamma(H, T)$.
The induced map of graphs is simply taking the vertices labelled by elements of a given coset $gN$ and making them all equal (where $N=\ker\phi)$. Edges are then dealt with in the obvious way. For example, the Cayley graph of the infinite cyclic group $\Gamma(\mathbb{Z}, 1)$ is simply the number line, while the Cayley graph of a finite cyclic group $\Gamma(\mathbb{Z}_n, 1)$ is a loop obtained by collapsing the vertices with label $nk$, $k\in\mathbb{Z}$, to the element $0$ (and then dealing with edges in the obvious way).
There is nothing mysterious about this map: The map of groups $\phi$ is just a map of sets, which clearly induces maps on the edges and vertices, while the fact that the map $\phi$ is a homomorphism means that paths are preserved, as paths correspond to words in the generators. It is a good exercise to prove this map of graphs exists.
Fact 2: Pairs of generators: Suppose your abelian group $A$ is generated by the elements $a_1, \ldots, a_n$, and $n>1$. Then the Cayley graph $\Gamma_2=\Gamma(\langle a_1, a_2\rangle, \{a_1, a_2\})$ embeds into $\Gamma(A, \{a_1, \ldots, a_n\})$, with the identity vertex of $\Gamma_2$ being mapped to any given vertex of $\Gamma(A, \{a_1, \ldots, a_n\})$ (why?).
The point: If $A$ is an abelian group, then any pair of generators, $a_1, a_2$ say, at any vertex $v$ give you a square $a_1a_2a_1^{-1}a_2^{-1}$ because their Cayley graph $\Gamma_2$ embeds into that of $A$ based at the vertex $v$, as pointed out by Fact 2, while $\Gamma_2$ is an image of the Cayley graph of $\mathbb{Z}\times\mathbb{Z}$. As the Cayley graph of $\mathbb{Z}\times\mathbb{Z}$ is precisely made up of squares, by Fact 1, its image $\Gamma_2$ must also consist of such squares.
(Note: Fact 2 is sort of pointless, in the sense that $A$ is the image of some free abelian group $\mathbb{Z}\times\cdots\times\mathbb{Z}$ and the Cayley graph of this free abelian group is also made up of such squares. However, it is harder to visualize these squares when the rank of the free abelian group is greater than two (certainly when it is greater than three!).)
