Nonabelian groups of order $p^3$ From a little reading, I know that for $p$ and odd prime, there are two nonabelian groups of order $p^3$, namely the semidirect product of $\mathbb{Z}/(p)\times\mathbb{Z}/(p)$ and $\mathbb{Z}/(p)$, and the semidirect product of $\mathbb{Z}/(p^2)$ and $\mathbb{Z}/(p)$. 
Is there some obvious reason that these groups are nonabelian?

Think about it this way, suppose that you have that $G=A\rtimes_\varphi B$ where $A,B$ are abelian. You then have a short exact sequence $0\to A\to G\xrightarrow{\gamma} B\to 0$ and a backmap $B\xrightarrow{\psi}G$ such that $\gamma\circ\psi=1_B$. If you assume that $G$ is abelian then the splitting lemma for $\mathbb{Z}$-modules tells you that the sequence $0\to A\to G\to B\to0$ splits and so $G\cong A\oplus B$. Thus, if $A\rtimes_\varphi B$ is abelian, then $A\rtimes_\varphi B\cong A\oplus B$. But, it's easy to check that this is the case if and only if $\varphi$ is trivial. So, non-trivial semidirect products induce non-abelian groups.
