# Product of all elements in finite nonabelian group

Let $G$ be a finite group. By indexing $G = \{g_1,\ldots,g_n\}$ arbitrarily, we can make sense of the product $$\prod_{i = 1}^n g_i.$$ If $G$ is abelian, the result is clearly the product of all elements of order 2, which is $1$ unless there is a unique element of order 2. If $G$ is not abelian, the ordering of the group (or, the product) matters, and there are at least two possible outcomes (just exchange two adjacent non-commuting elements). Can something be said in general about which outcomes are possible?

• Out of curiosity, must there always be two adjacent, non-commuting elements? Commented Sep 7, 2016 at 20:32
• @Arthur, if the group is non-abelian, then there is an ordering of the elements in which there are always two adjacent, non-commuting elements. Taking that ordering and the one with the elements exchanged gives two different ones. Commented Sep 7, 2016 at 20:33
• There are no more than $n$ outcomes, but there are $n!$ possible arrangements. Quite interesting. Commented Sep 7, 2016 at 20:35
• Ahh, yes, of course. I was rather thinking about a different question: can you find an ordering so that any two adjacent elements commute? It's possible for some groups (take $S_3\times \Bbb Z_n$ for some large $n$), but is it always possible? Commented Sep 7, 2016 at 20:38
• The related question Product of all elements in finite group has an answer (by Nicky Heckster) for this one, too. Commented Sep 7, 2016 at 20:59

In addition to all the answers, there is also a very neat answer to the general question What is the set of all different products of all the elements of a finite group $G$? So $G$ not necessarily abelian.
Well, if a $2$-Sylow subgroup of $G$ is trivial or non-cyclic, then this set equals the commutator subgroup $G'$.
If a $2$-Sylow subgroup of $G$ is cyclic, then this set is the coset $xG'$ of the commutator subgroup, with $x$ the unique involution of a $2$-Sylow subgroup.