= Solution
For a nontrivial <finite p-group> $G$ of order $p^m$ with $m\ge1$, partition into <conjugacy classes>. A noncentral class has size $[G:C_G(x)]$, a positive power of $p$ larger than one by <Lagrange's theorem>. The <class equation> therefore says
$$
|G|=|Z(G)|+\sum_{\text{noncentral classes}}[G:C_G(x)],\qquad |Z(G)|\equiv0\pmod p.
$$
The <center of a group> contains the identity, so \b[$|Z(G)|\ge p$], proving its nontriviality. The positive-exponent qualification matters: the one-element <group> has no nonidentity central element.
If $|G|=p^2$, its <center of a group> has order $p$ or $p^2$. In the first case, the <quotient group> $G/Z(G)$ has prime order and is cyclic. Whenever a central <quotient group> is cyclic, writing all elements as $g^iz$ with $z$ central shows that they commute: $(g^iz)(g^jw)=g^{i+j}zw=(g^jw)(g^iz)$. Thus that case would already make $G$ <Abelian> and its <center of a group> all of $G$, a contradiction. Hence \b[every <group> of order $p^2$ is <Abelian>].
If there is an element of order $p^2$, it is a <generator of a group> for $G$, giving $C_{p^2}$. Otherwise every nonidentity element has order $p$. Pick $a\ne1$ and $b\notin\langle a\rangle$. Their <cyclic subgroups> have trivial intersection, and they commute; the $p^2$ distinct products $a^ib^j$ exhaust $G$. Hence the <classification of groups of order p squared> is
$$
\boxed{G\cong C_{p^2}\quad\text{or}\quad G\cong C_p\times C_p.}
$$
Both <groups> exist and are nonisomorphic, since only the first has an element of order $p^2$.
Back to article page