Every element of a group has order $2$. Why, intuitively, is it abelian?

I think it is a special case of a general case which is;

Lemma :if $f:G\to G$ by $f(x)=x^{-1}$ is a homomorphism if and only if $G$ is abelian.

Now think that you have this lemma and you are looking for a case which can happen. The most natural idea is setting; $x=x^{-1}$ for all $x$ i.e $x^2=e$ then $f$ becomes identity map which is a homomorphism so we should have an abelian group.

Now, you can ask that what is the intuation of the lemma ? It is also natural since every element has uniqe inverse then the map is a bijection and it is natural to ask when this bijection is a homomorphism.


I think of it like this: If $a,b$ are in the group, then $ab$ is in the group and of order 2 by assumption... but this means

$$ (ab)^2=abab=e \implies ab=ba $$


I'm not exactly sure what you're looking for in an intuitive explanation, so I'll just explain how I look at it. Hopefully it will be helpful for you as well.

The statement that every element has order 2 is equivalent to the statement that every element is its own inverse. If you are comfortable with inverses being unique, then commutativity is simply the observation that $abba$ is the identity for any $a$ and $b$ in the group, because it shows that $ba$ is the inverse of $ab$. Does this make it any more clear?

Edit: Mesel's answer inspired me to think on this a little more. In any group you have a composition operation and inverses. So we can take two elements of the group $a$ and $b$ (with inverses $a^{-1}$ and $b^{-1}$) and combine them to get $ab$. A natural question to ask is what the inverse of this new element $ab$ is, in terms of the four elements we started with. It's not hard to see that it is $b^{-1}a^{-1}$.

Now we have this interesting relation $(ab)^{-1}=b^{-1}a^{-1}$ in which the elements are flipped. This suggests that there might be some connection between inversion and commutativity. The lemma that mesel mentioned describes that connection precisely (and as a bonus is easy to prove).