Finite abelian $2$-group 
If $G$ is a finite abelian group such that $o(x)=2$ for all $x \neq e$ and $|G|=2^n$ for some $n\in\mathbb N$, prove that $G \cong \mathbb{Z}_2\times\cdots\times\mathbb{Z}_2$ ($n$ factors).

Any help is appreciated. I asked this question before and was suggested to try induction but I haven't been able to write down the inductive proof properly. If anybody can help that will be really nice. Thanks!
 A: If you write $G$ in additive notation, it's fairly easy to check that you can make it into a vector space over the field $\mathbb{F}_2$ with two elements, where
$$
0g=0,\quad 1g=g
$$
Then, take a basis of $G$ as vector space: then $G$ becomes the direct sum of $n$ copies of $\mathbb{F}_2$, which, with respect to addition is none else than $\mathbb{Z}/2\mathbb{Z}$.
This can be of course generalizable to abelian groups $G$ such that $x^p=e$ for any $x\in G$, where $p$ is prime.
A: The proposition is true for $n=1$. For $n\geq 2$, take $g_1 \in G$ and let $G_1=\langle g_1\rangle$. For $i=2,\dots, n$ take $g_i \in G \text{ \ } G_{i-1}$ where $G_{i-1}=\langle g_1,\dots,g_{i-1}\rangle$. By the induction hypothesis (or directly), for $i < n, G_i \cong \mathbb{Z}_2^i$. In particular $G_{n-1} \cong \mathbb{Z}_2^{n-1}$. 
By construction $g_n \in G\text{ \ }G_{n-1}$, so $\langle g_n \rangle \cap G_{n-1}=\{e\}$, they are both normal since $G$ is abelian and every element in $G$ can be written as a product of elements from $\langle g_n\rangle$ and $G_{n-1}$. (You can see this by noting that the left cosets of $G_{n-1}$ are $G_{n-1}$ and $g_nG_{n-1}$ and partition the set.) Thus $G \cong \langle g_n \rangle \times G_{n-1} \cong \mathbb{Z}_2\times\mathbb{Z}_2^{n-1}\cong\mathbb{Z}_2^n$ as required.
This is a rather brute force approach, but there's only one idea behind it i.e. "keep pulling out $\mathbb{Z}_2$ until there's nothing left". The solution is much simpler if you know about modules (a generalisation of vector spaces) or by treating it as a linear algebra problem (as egreg does below), but there's nothing wrong with this elementary approach.
