Group of Order Prime Squared is Abelian

Theorem
A group whose order is the square of a prime is abelian.

Proof
Let $G$ be a group of order $p^2$, where $p$ is prime.

Let $Z \left({G}\right)$ be the center of $G$.

By Center of Group is Subgroup, $Z \left({G}\right)$ is a subgroup of $G$.

By Lagrange's Theorem:
 * $\left\vert{Z \left({G}\right)}\right\vert \mathrel \backslash \left\vert{G}\right\vert$

It follows that $\left\vert{Z \left({G}\right)}\right\vert = 1, p$ or $p^2$.

By Center of Group of Prime Power Order is Non-Trivial:
 * $\left\vert{Z \left({G}\right)}\right\vert \ne 1$

Suppose $\left\vert{Z \left({G}\right)}\right\vert = p$.

Then:

So $G / Z \left({G}\right)$ is non-trivial, and of prime order.

From Prime Group is Cyclic, $G / Z \left({G}\right)$ is a cyclic group.

But by Quotient of Group by Center Cyclic implies Abelian, that cannot be the case.

Therefore $\left\vert{Z \left({G}\right)}\right\vert = p^2$ and therefore $Z \left({G}\right) = G$.

Therefore $G$ is abelian.