Any group of prime order p is isomorphic to the cyclic group Z p (a consequence of Lagrange's theorem). Any group of order p 2 is abelian, isomorphic to Z p 2 or ⁠ Z p × × Z p ⁠. But there exist nonabelian groups of order p 3 ; the dihedral group D 4 of order 2 3 above is an example.