Let \(G\) be a group such that \(x^2 = 1\) for every \(x \in G\). We show that \(G\) is abelian.
(Note that technically the title is incorrect as the identity obviously does not have order 2.)
Let \(x\) and \(y\) be any two elements of \(G\). We show that \(xy = yx\).
By hypothesis, \((xy)^2 = 1\).
\(\implies xyxy = 1\)
\(\implies xyxyy = y\)
\(\implies xyx = y \quad (\because y^2 = 1)\)
\(\implies xyxx = yx\)
\(\implies xy = yx. \quad \blacksquare\)