[proofplan]
The proof is a direct unpacking of the definitions. If $G$ is abelian, then every element of $G$ commutes with every element of $G$, so every element lies in the centre; the reverse inclusion $Z(G) \subset G$ is built into the definition. Conversely, if $Z(G)=G$, then arbitrary elements of $G$ commute because the first one lies in the centre, and this is exactly the definition of an [abelian group](/page/Abelian%20Group).
[/proofplan]
custom_env
admin
[step:Show that an abelian group is equal to its centre]Assume that $G$ is abelian. By definition, $gx = xg$ for every $g \in G$ and every $x \in G$. Fix an arbitrary element $g \in G$. The displayed identity holds for every $x \in G$, so $g \in Z(G)$ by the definition of the centre. Hence $G \subset Z(G)$.
By definition, $Z(G) = \{z \in G : zx = xz \text{ for every } x \in G\}$, so every element of $Z(G)$ is an element of $G$. Therefore $Z(G) \subset G$. The two inclusions give $Z(G)=G$.[/step]
custom_env
admin
[guided]Assume that $G$ is abelian. The definition of abelian says that every ordered pair of elements of $G$ commutes: $gx = xg$ for every $g \in G$ and every $x \in G$.
To prove $G \subset Z(G)$, take an arbitrary element $g \in G$. Since $G$ is abelian, this fixed element $g$ commutes with every element $x \in G$. But the centre $Z(G)$ is precisely the set of elements of $G$ that commute with every element of $G$. Therefore $g \in Z(G)$. Since $g \in G$ was arbitrary, we have $G \subset Z(G)$.
The opposite inclusion does not use abelianness. From the definition $Z(G) = \{z \in G : zx = xz \text{ for every } x \in G\}$, membership in $Z(G)$ already includes membership in $G$. Hence $Z(G) \subset G$. Combining $G \subset Z(G)$ and $Z(G) \subset G$ gives $Z(G)=G$ by equality of sets.[/guided]
custom_env
admin
[step:Use equality with the centre to prove commutativity]
Assume that $Z(G)=G$. Let $a,b \in G$ be arbitrary. Since $Z(G)=G$ and $a \in G$, we have $a \in Z(G)$. By the definition of $Z(G)$, the element $a$ commutes with every element of $G$. In particular, since $b \in G$, we have $ab = ba$. Because $a,b \in G$ were arbitrary, every pair of elements of $G$ commutes. Hence $G$ is abelian.
[/step]