Show that $a_1a_2 \cdots a_k$ has order $1$ or $2$. 
Let $G = \{a_1, \cdots , a_k \}$ be a finite abelian group.  Show that $a_1a_2 \cdots a_k$ has order $1$ or $2$.

So far I have done this:
I think that the product $a_1a_2 \cdots a_k$ will have order $1$ when none of the elements of $G$ is inverse of itself. since by reorganizing the elements in an adequate way we arrive at the identity. Otherwise, if for some $a_i$ in $G$ $a_i$ is inverse of itself, then the product will have order $2$. If so, how could you formalize this?
 A: Let $I$ be the subset of $G$ such that $a_i\in I$ implies that $a_i\neq a_i^{-1}$ and $J$ the subsets of $G$ such that $b_i\in J$ implies that $b_i=b_i^{-1}$. The product of elements of $G$ is the product $b_1...b_l$ of elements of $J$, we have $(b_1..b_l)^2=(b_1)^2..(b_l)^2=1$.
A: For any finite abelian group $G=:\{g_1,\dots,g_k\}$, there are $n\in \Bbb N$ and positive integers $l_1,\dots,l_n$ such that $G\cong \Bbb Z_{l_1}\times\dots\times \Bbb Z_{l_n}=:\{a_1,\dots,a_k\}$, with $k=\prod_{i=1}^nl_i$ (fundamental theorem of finite abelian groups). In additive notation, we get:
\begin{alignat}{1}
\sum_{i=1}^{k}a_i &\stackrel{\dagger}{=} \biggl(l_2\dots l_n\sum_{i=0}^{l_1-1}i,\space\space\dots,\space\space l_1\dots l_{n-1}\sum_{i=0}^{l_n-1}i\biggr) \\
&= \biggl(l_2\dots l_n\frac{(l_1-1)l_1}{2},\space\space\dots,\space\space l_1\dots l_{n-1}\frac{(l_n-1)l_n}{2}\biggr) \\
\tag 1
\end{alignat}
whence:
\begin{alignat}{1}
2\sum_{i=1}^{k}a_i &= \bigl(l_2\dots l_n(l_1-1)\color{red}{l_1},\space\space\dots,\space\space l_1\dots l_{n-1}(l_n-1)\color{red}{l_n}\bigr) \\
&= (0,\dots,0)
\tag 2
\end{alignat}
Therefore, the element $\sum_{i=1}^{k}a_i$ has order at most $2$, and so does its "isomorphic image" $\sum_{i=1}^{k}g_i$.

$\dagger$ See here.
