# If a group satisfies $x^3=1$ for all $x$, is it necessarily abelian?

I know that any group satisfying $x^2=1$ for all $x$ is abelian. Is the same true if $x^3=1$? I don't think it is, but I can't find a basic counterexample.

-
In short, no; the result does not hold for any $n$ other than $n=1$ and $n=2$. –  Arturo Magidin May 21 '12 at 5:02
It is however true if there are no elements of order 3! –  user641 May 21 '12 at 14:03
@Steve D: You mean, if $x^3=1$ for all $x$ and $G$ has no elements of order $3$? Well... it's a rather singular situation, don't you think? (-: –  Arturo Magidin May 21 '12 at 16:31
@ArturoMagidin: hahaha, it's funny that what I wrote is still, somehow, correct. I was thinking of $(xy)^3=x^3y^3$. –  user641 May 21 '12 at 19:09

For any odd prime $p$, there is a nonabelian group $H_p$ of order $p^3$ and such that $x^p = 1$ for all $x \in H_p$: the Heisenberg group modulo p.
Added: As Dylan Moreland points out, this expository note of Keith Conrad gives a very nice discussion of the groups of order $p^3$, including the Heisenberg groups $H_p$.