# Constructing the group multiplication table for $|G| = 6$ [duplicate]

All groups of order 6 are isomorphic to either $S_3$ or $\mathbb{Z}_6$.

Without knowing that, I was trying to derive how many structurally distinct groups of order 6 exists by constructing the multiplication tables.

And I came upon the following statement on this question:

Having all non-identity elements have order 2, means the group is abelian.

Is this trivial? Could I know that before trying to build the table?

## marked as duplicate by Matthew Towers, Community♦Sep 16 '16 at 14:52

It's not very hard to show : if every element $x$ in a group is such that $x^2=e$, then for any $a,b$ $$a(ba)b=(ab)(ab)=ee=(aa)(bb)=a(ab)b,$$ and simplyfying $a$ and $b$ on the sides gives $ba=ab$.