A finite group containing only elements of order 1 or 2 must have even order Suppose $G$ is a finite group in which every element has order $2$ or $1$, and that $G$ contains some element different from the identity element. How can I explain that the order of $G$ must be even?
 A: Let $a\in G$, $a\ne e$, and consider the sets $\{x,ax\}$ with $x\in G$. Every since $a\ne e$, all these sets have exactly two elements. Moreover, any two of these sets are either equal or disjoint (check!). Hence $G$ is the union of a number of disjoint subsets of size $2$ and so has an even number of elements.
This is a proof of Lagrange's theorem for the subgroup $\{e,a\}$ generated by $a$. It can be easily generalized for $a$ having higher order, to conclude that the order of $a$ divides the order of $G$.
All this can be written in a nicer language by considering the orbits of the map $x \mapsto ax$, as in this question.
A: Here is another answer that perhaps is more in the spirit of the original question. At least, it uses the full hypothesis.
If $x^2=e$ for all $x \in G$, then $G$ is abelian.
This means that $G$ can be seen as a vector space over $\mathbb F_2$.
Since $G$ is finite, it has finite dimension over over $\mathbb F_2$.
This means that the order of $G$ is a power of $2$.

We can avoid using linear algebra.
Consider the subsets $B$ of $G$ such that every element of $G$ is a product of elements in $B$. Take the smallest such $B = \{ b_1, b_2, \dots, b_n\}$. Since $G$ is abelian, $G$ is the set of products $b_1^{e_1} b_2^{e_2} \cdots b_n^{e_n}$, where $e_i \in \{0,1\}$. Therefore, $G$ has $2^n$ elements.
