[Dummit, p 174 Q9]

Prove that if p is an odd prime and P is a group of order $\displaystyle p^{3}$ then the p th power map $\displaystyle x \mapsto x^{p}$ is a homomorphism of P into Z(P). If P is not cyclic, show that the kernel of p th power map has order $\displaystyle p^{2}$ or $\displaystyle p^{3}$. Is the squaring map a homomorphism in non abelian group of order 8? Where is the oddness of p needed in the above proof?