Let $G$ be a finite abelian group. Let $w$ be the product of all the elements in $G$. Prove that $w^2 = 1$. The Statement of the Problem:
Let $G$ be a finite abelian group. Let $w$ be the product of all the elements in $G$. Prove that $w^2 = 1$.
Where I Am:
Well, I know that the commutator subgroup of $G$, call it $G'$, is simply the identity element, i.e. $1$. But, can I conclude from this that $\forall g \in G, g=g^{-1}$, i.e., $\forall g \in G, g^2 = gg^{-1} = 1$, which is our desired result? That just seems... strange. But, it kind of makes sense. After all, each element in $G$ has an associated inverse element (because it's a group), and because it's abelian, we can always position an element next to its inverse, i.e.
$$ w^2 = (g_1g_1^{-1}g_2g_2^{-1}g_3g_3^{-1}\cdot \cdot \cdot g_ng_n^{-1})^2 = (1\cdot 1\cdot 1\cdot \cdot \cdot 1)^2=1.$$
Is that all there is to it? Actually, looking at it now, I don't even need to mention the commutator subgroup, do I...
 A: Consider the following "proof" that $w = 1$. See if you can patch it up to reach to conclusion that $w^{2} = 1$ instead.
We partition the non-identity elements of $G$ into two sets, which we call $S = \{g_{1}, g_{2}, \dots\}$ and $S' = \{g_{1}^{-1}, g_{2}^{-1}, \dots\}$.
We do this by iteratively building up the two sets. We start with each set empty, and at each step pick an element $g$ from those not in either of $S$ or $S'$. We put $g$ in $S$, and $g^{-1}$ in $S'$.
Then we can write out the product $w$ in a convenient way.
\begin{equation*}
w = \prod_{g \in G}g = 1 \cdot \left(\prod_{i}g_{i}\right) \left(\prod_{i}g_{i}^{-1}\right) = \prod_{i}g_{i}g_{i}^{-1} = \prod_{i}1 = 1
\end{equation*}
Note that we used that $G$ is abelian going from $(\prod g_{i})(\prod g_{i}^{-1})$ to $\prod g_{i}g_{i}^{-1}$. Thus we get $w = 1$.
Hint: Are $S$ and $S'$ disjoint?
A: $w = g_1...g_r$, where $g_1,..., g_r$ are the elements of $G$ of order $2$ (all other elements can be paired with their inverses, or in the case of $e$, can be removed), then $w^2= g_1^2...g_r^2= e^r = e$.
A: Yes, your argument is essentially the way to go and the derived subgroup is indeed irrelevant. To make the proof more formal, you can do as follows.
The map $g\mapsto g^{-1}$ is bijective on $G$. Writing $G=\{g_1,g_2,\dots,g_n\}$ and
$$
w=g_1g_2\dots g_n
$$
we have
$$
w^{-1}=(g_1g_2\dots g_n)^{-1}=\color{red}{g_n^{-1}\dots g_2^{-1}g_1^{-1}}
=g_1g_2\dots g_n=w
$$
because the term painted red is again the list of all elements of $G$, just possibly in a different order, but commutativity of multiplication allows to reorder them.
A: Let $G$ be finite group and let $I =\{g \in G \mid g^2 = 1 \}$. For notational purposes, write $I = \{ i_{1}, i_{2}, \dots, i_{k} \}$ and $G \smallsetminus I = \{g_{1}, g_{2}, \dots , g_{l} \}$ Then since $G$ is abelian we have that 
\begin{eqnarray*}
w^2 & = & \left( \prod_{i \in I} i^2 \right) \left( \prod_{g \in G \smallsetminus I} g^2 \right) \\
& = & [i_{1}^2i_{2}^2 \cdots i_{k}^2][g_{1}^2g_{2}^2 \cdots g_{l}^2].
\end{eqnarray*}
Now, since $i_{j}^2 = 1$ for all $i_{j} \in I$ by definition, the left product is simply equal to $\text{id}_{G}$. For the second product, since each $g_{i} \in G \smallsetminus I$ is not self inverse by definition and $G$ is abelian, we may pair up each element with its inverse to give the identity. Hence we have that $w^2 = 1$. 
A: List the elements of G as {$g_1, ...., g_n$} for each $g_i$ there is precisely one element $g_i^{-1}$ so that $g_i^{-1}g_i = 1$.  It is possible that $g_i = g_i^{-1}$ or it is possible $g_i^{-1} = g_j$ for some other j.  It doesn't matter.
The set of all inverses {$g_1^{-1}.... g_n^{-1}$} is the same set as {$g_1, ...., g_n$} as each inverse is also in the G and there is a 1-1 correspondence between elements and their specific inverses.
As G is abelian $w^2$ = $\prod g_i$ x $\prod g_1^{-1}$ = $\prod (g_i^{-1}*g_i) = \prod 1 = 1$.
