A finite $p$-group cannot be simple unless it has order $p$

Suppose $|G|=p^n$ for $n>1$. Recall the Class Equation: $$ |G|= |Z(G)| + \sum_{g_1,\ldots,g_r} |G \colon C_G(g_i)|, $$ where $Z(G)$ is the center of $G$, $C_G(g_i)$ is the centralizer of $g_i$, and $g_1,\ldots,g_r$ are representatives for the distinct conjugacy classes of $G$ with more than one element (for otherwise it is in the center). The centralizer of $g_i$, $C_G(g_i)$, is a subgroup of $G$ so that by Lagrange's Theorem its order must divide $|G|$.

Since $|G|=p^n$, $|C_G(g_i)|=p^k$ for some $k<n$ (it cannot be that $k=n$ for then $C_G(g_i)=G$ and then $g_i \in Z(G)$). Then $|G \colon C_G(g_i)|= \frac{|G|}{|C_G(g_i)|}=p^{n-k}$. Now we have $|G| - \sum\limits_{i = 1}^r |G \colon C_G(g_i)| = |Z(G)|$. Since $p$ divides the left side, we must have $p \mid |Z(G)|$. In particular, $Z(G)$ is non-trivial. But $Z(G)$ is always a normal subgroup so that $G$ cannot be simple.

Note in the case of $n=1$, then $G$ must be isomorphic to $\mathbb{Z}/p\mathbb{Z}$, which is simple.


I believe there is a small problem with the final part of the solution provided by mathematics2x2life. The main part does include proving that $Z(G)$ is non-trivial. It is also true that $Z(G)$ is always a normal subgroup. However, one should also explicitly mention the case where $Z(G)=G$, in which the fact that $Z(G)$ is a normal subgroup doesn't help us. In that case, $G$ would be Abelian, and there is a separate theorem stating that every simple Abelian group is isomorphic to $\mathbb{Z}_p$ for some prime $p$.