Classification of groups of order p squared (source code)

= Classification of groups of order p squared
{title2=$|G|=p^2\ \Longrightarrow\ G\cong C_{p^2}\text{ or }C_p\times C_p$}

The <nontrivial center of a finite p-group> theorem implies that the <center of a group> of order $p^2$ has order $p$ or $p^2$. If it has order $p$, the quotient by the center has prime order and is cyclic; a <cyclic quotient by the center> forces the whole <group> to be abelian, contradicting the assumed size of its center. Thus the <group> is abelian. An element of order $p^2$ makes it cyclic. Otherwise choose $a\ne1$ and $b\notin\langle a\rangle$; their order-$p$ <cyclic subgroups> intersect trivially and generate the <direct product of groups> $C_p\times C_p$. The two possibilities are nonisomorphic because only the cyclic one has an element of order $p^2$.