Proving a finite group is isomorphic to $(\Bbb Z/2)^n$ My exercise is the folowing : 
let $G$ be a groupe such that for all $x  \in G, x^2=e $.


*

*Show that $G$ is abelian. 

*If $G$ is finite, show that there exists $n$ such that $g$ is isomorphic to $(\Bbb Z/2)^n$.


I already have prove that $G$ is abelian, but I'm blocking on the second question. I think I am supposed to find an application $\phi$ such that $\phi : (\Bbb Z/2)^n \rightarrow G $ and prove that this application is bijectiv but I can't find such an application.
Can you help me find such an application ? 
 A: USING LINEAR ALGEBRA: I will show that it satisfies the axioms of $\Bbb Z/2$-vector space. Addition: $$x+y=xy$$ Scalar multiplication: $$\lambda \cdot x= \begin{cases} x & \lambda=1 \\ e & \lambda=0\end{cases}$$
Check that all axioms are satisfied, so that $G$ is a (finite dimensional) vector space over $\Bbb Z/2$. This is equivalent on showing that it is isomorphic to some $(\Bbb Z/2)^n$.
Where is $x^2=e$ involved? In proving distributivity:
$$e= 0\cdot x = (1+1) \cdot x = 1 \cdot x + 1 \cdot x = x + x = x^2$$
A: You can show that the group is abelian just by playing around with what you have.
$(xy)(yx)=xy^2x=xex=x^2=e$ tells us that $yx$ is the inverse of $xy$. But $(xy)^2=e$ as well so $xy$ is also an inverse of $xy$. Since inverses are unique, $xy=yx$. 
As @Alex Wertheim says, if you know the strcutre theorem of abelian groups you can say that $G$ is a direct product of cyclic groups. But we know $x^2=e$ for any $x$ so in this, case it is a direct product of the cyclic-2 group $C_2\cong \mathbb{Z}/2\mathbb{Z}$
If you haven't seen that result you can still prove it but I assume that you know the following result. (Because you know what a direct product is.)
Let $H$, $K$ be subgroups of $G$. If 


*

*$H$ and $K$ commute, 

*every element of $G$ can be written as $hk$ for some $h\in H$ and $k\in K$,

*$H\cap K=\{e\}$
then, $G\cong HK$
The first condition is clearly satisfied for any pair of subgroups. You then proceed by induction by taking an arbitrary element $x_1\in G$, considering its subgroup $<x_1>\cong \mathbb{Z}/2\mathbb{Z}\cong C_2$, then if $<x_1>$ is not the whole of $G$, there is another element $x_2$ and then proceed by induction. (i.e. If $<x_1>\times <x_2>\times ...<x_n>$ is not the whole of $G$ there is another element $x_{n+1}$ in $G$ and now consider $<x_1>\times <x_2>\times ...<x_n>\times<x_{n+1}>$. Obviously has to eventually terminate as $G$ is a finite group.)
