Groups where all elements are order 3

The standard example is the Heisenberg group. Consider the group of all matrices of the form $$\left(\begin{array}{ccc} 1 & x & y\\ 0 & 1 & z\\ 0 & 0 & 1 \end{array}\right),$$ where $x,y,z\in\mathbb{Z}/3\mathbb{Z}$. It is not hard to verify that this is a group, that every one of its 27 elements is of exponent $3$, and that it is not abelian. Replacing $\mathbb{Z}/3\mathbb{Z}$ with $\mathbb{Z}/p\mathbb{Z}$ for odd prime $p$ shows that a similar result cannot hold for any prime other than $p=2$.

This is an example of smallest possible order: a finite group in which every element is of exponent $3$ must have order $3^n$ for some $n$ (a consequence of Cauchy's Theorem), and every group of order $3^2$ is abelian.

There is another nonabelian group of order $27$, but in that group there is an element of order $9$: $$\langle a,b\mid a^9 = b^3 = 1, ba = a^4b\rangle.$$


No, it isn't true, but if you're beginning with this stuff perhaps you won't fully understand the example: the semidirect product of a non-cyclic group of order $9$ by a group of order $3$ has all its non-unit elements of order 3...

You can read here http://groupprops.subwiki.org/wiki/Prime-cube_order_group:U(3,3) an exposition about this one as a group of unitriangular matrices.