Originally Posted by

**dwsmith** Prove that if G is a finite p-group, then its center is non-trivial.

Use this fact to prove if $\displaystyle |G|=p^2$, then G is abelian.

For the first part, I have:

So $\displaystyle |G|=p^{\alpha}m$. By the class equation, $\displaystyle |G|=|Z(G)|+\sum_{i=0}^r|G:C_G(g_i)|$.

Since $\displaystyle p| \ |G|$, $\displaystyle p|\left(|Z(G)|+\sum_{i=0}^r|G:C_G(g_i)|\right)$

So $\displaystyle p| \ |Z(G)|$ and $\displaystyle p| \ \sum_{i=0}^r|G:C_G(g_i)|$.

Since p is prime, $\displaystyle |Z(G)|\neq 1$. Therefore, $\displaystyle Z(G)\neq\{e\}$

So how do I use that to prove the next part?