If $\phi(g)=g^3$ is a homomorphism and $3 \nmid |G|$, $G$ is abelian.

As the title suggests. Let $G$ be a group, and suppose the function $\phi: G \to G$ with $\phi(g)=g^3$ for $g \in G$ is a homomorphism. Show that if $3 \nmid |G|$, $G$ must be abelian.

By considering $\ker(\phi)$ and Lagrange's Theorem, we have $\phi$ must be an isomorphism (right?), but I'm not really sure where to go after that.

This is a problem from Alperin and Bell, and it is not for homework.


Note that $(gh)^3=\varphi(gh)=\varphi(g)\varphi(h)=g^3h^3$. This implies $ghghgh=ggghhh$, and hence after cancelling, $hghg=gghh$, or $(hg)^2=g^2h^2$.

I claim that every element commutes with every square in $G$. Let $x\in G$ be arbitrary, and let $a^2\in G$ be an arbitrary square. Since $\varphi$ is an automorphism (here is where we used the fact that $3\nmid |G|$), $x=\varphi(y)=y^3$ for some $y$. Then $$ ay^3a^{-1}=(aya^{-1})^3=\varphi(aya^{-1})=a^3y^3a^{-3} $$ which implies $y^3=a^2y^3a^{-2}$, or $y^3a^2=a^2y^3$. That is, $xa^2=a^2x$, and completes the claim.

So in particular, $g^2h^2=h^2g^2$. So we get $hghg=(hg)^2=g^2h^2=h^2g^2=hhgg$. Cancelling yields $gh=hg$, so $G$ is abelian.