Finite groups where $x^2 = e$ has order $2^n$ 
Prove that a finite group $G$, where $x^2 = e$ $\forall x \in G$, has order $2^n$ for some $n \in \mathbb{N}$.

I already know that every group with this property is abelian, but I don't see the relationship between being abelian and having order $2^n$.
I'm not sure where to start on how to prove this, because I don't understand why there can't be a group of order $6$ for example.
 A: All you need is Cauchy's theorem:  if $p$ is prime and $p|o(G)$ then there exists an element of order $p$ in your group. $x^2=e$ for all $x$ says everything has order at most 2,   so no other prime can be a divisor of the order of $G$ (or we would have an element of that order, which we don't).  Fundamental theorem of arithmatic then gets you that the order is $2^n$ for some $n\ge0$.  (Technically the trivial group does meet this critera)
A: Here's a completely different proof. As you said, such a group is always abelian. Then $G$ becomes a vector space over the field with two elements $\mathbb{F}_2 = \{0,1\}$, by setting $0 \cdot x = e$ and $1 \cdot x = x$ (verify that this defines a vector space, in particular $e = 0 \cdot x = (1+1) \cdot x = x^2$ is satisfied).
Since $G$ is finite, it is obviously finitely generated (as a vector space over $\mathbb{F}_2$), and it's a standard fact of linear algebra that a finitely generated vector space has a basis. Let $\{g_1, \dots, g_n\}$ be such a basis for $G$. Then the map $\{0,1\}^n \to G$, $(\lambda_1, \dots, \lambda_n) \mapsto \sum \lambda_i g_i$ is a bijection (by the definition of a basis), and thus $G$ has the same cardinality as $\{0,1\}^n$, that is $|G| = 2^n$.
A: This is a slightly different method. 
If $G$ is trivial, the statement trivially holds. 
Let $G$ be a non trivial group and  suppose $|G| = p_1 ^{n_1} \cdots p_k ^{n_k}$ be the primary decomposition of $|G|$.  Let $H \in Syl_{p_i}(G)$.  Every element of $H$ is either trivial or has order 2 by assumption. Pick a non trivial element $x \in H$   Then $|x| =2$ divides $p_{i} ^{n_i}$ and since $p_i$ is prime, must divide $p_i$.  Thus $p_i = 2$ for every $i$ and the result follows. 
A: Let $|G|<\infty$. Since $a^2 = e$ for all $a \in G$ then $a = a^{-1}$. Now let $x,y \in G$. We have: $$\begin{align} e &= x^2y^2  \\ &= x(xy)y \\ \implies xy &= x^{-1}y^{-1}\\ &= (yx)^{-1} \\ &= yx\end{align}$$ which establishes that $G$ is abelian. Can you take it from here? As for the other question you posed, can you come up with any groups of order 6? Now can you come with any groups of order 6 that do not contain elements of order $3$ or order $6$?
