Let $G$ be a finite group such that $x^2 = e$ for each $x \in G$. I know already that $G$ is abelian and that the order of $G$ is $|G| = 2^n$ for some $n \geq 0$. Now I wish to show that $$G \cong \mathbb{Z}_2 \times ... \times \mathbb{Z}_2$$ where there are $n$ factors (we define the direct product of zero groups as the trivial group $\{e\}$).
So far I have the following partial proof:
Using the fact that $|G| = 2^n$, we prove by induction on $n$. When $n = 0$ we have $|G| = 2^0 = 1$, hence $G \cong \{e\}$, which we said above is isomorphic to the direct product of zero copies of $\mathbb{Z}_2$.
Now suppose for some $n \geq 1$ that the statement holds for all $k$ with $0 \leq k \leq n - 1$. We wish to prove the statement for $n$.
Since $n \geq 1$, the order of $G$ is $|G| = 2^n \geq 2$, hence $G$ is nontrivial. Therefore there is an element $x \in G$ such that $x \neq e$. The element $x$ generates a $2$ element subgroup $H_1 = \langle x \rangle$ which is isomorphic to $\mathbb{Z}_2$. Given any coset $xH_1 \in G/H_1$, we have $$(xH_1)^2 = (x^2)H_1 = eH_1$$ (Why? Or is this false?). Therefore we may apply the inductive hypothesis, i.e., $$G/H_1 \cong (\mathbb{Z}_2)^{n-1}$$ where $(\mathbb{Z}_2)^{n-1}$ is the direct product of $n-1$ copies of $\mathbb{Z}_2$.
What remains to be shown is that there is a subgroup $H_2$ of $G$ isomorphic to $G/H_1$, and that $H_1 \cap H_2 = \{e\}$ and $H_1 \cdot H_2 = G$. If we can show this then $G \cong H_1 \times H_2$ since both $H_1$ and $H_2$ are normal in the abelian group $G$. Then we may just substitute our isomorphic values of $H_1$ and $H_2$ to get the result.