= Solution
{c}
Let $|G|=p^2$. The allowed <center of a group> theorem gives $|Z(G)|>1$. By <Lagrange's theorem> its order is $p$ or $p^2$. In the first case $G/Z(G)$ has order $p$ and is a <cyclic group>. A <cyclic quotient by the center> forces $G$ to be <Abelian>: if $G/Z(G)=\langle gZ(G)\rangle$, write arbitrary elements as $g^az,g^bw$ with $z,w\in Z(G)$, and commute them directly. Hence in every case
$$
\boxed{|G|=p^2\ \Longrightarrow\ G\text{ is abelian}.}
$$
For two examples at prime-cube order, take the <dihedral group> of a square, $\langle r,s\mid r^4=s^2=1,\ srs=r^{-1}\rangle$, and the <quaternion group> $Q_8=\{\pm1,\pm i,\pm j,\pm k\}$. Both have order $8=2^3$. They are nonabelian because $sr\ne rs$ and $ij=k\ne-k=ji$, respectively. They are distinct examples even up to <group isomorphism>: the <dihedral group> has five elements of order two and the <quaternion group> has only one. The request asks for two examples; it does not require the prime to be arbitrary.
Back to article page