TITLE: Product of all elements in finite nonabelian group
QUESTION [8 upvotes]: 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?

REPLY [3 votes]: 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. See also J. Dénes and P. Hermann, `On the product of all elements in a finite group', Ann. Discrete Math. 15 (1982) 105-109. The theorem connects to the theory of Latin Squares and so-called complete maps.