The number of commuting pairs of elements in finite group G is equal to the product $k(G)\*|G|$ (see [MO271757](https://mathoverflow.net/a/271757/10446) ) where $k(G)$ is the number of conjugacy classes. Thus it is is divisible by $|G|$ (the number of elements of $G$). 
That divisibility also follows from a theorem by L. Solomon, stated below.


**Question 0:** It seems that the number of commuting $m$-tuples $c\_m(G)$ is also divisible by $|G|$ for any $m$; is this correct? It appears to follow from a result cited in [Klyachko, Mkrtchyan](https://arxiv.org/abs/1205.2824) (details below).


**Question 1:** Does the ratio $c\_m(G)/|G|$ have some group theoretic interpretation for $m>2$? (When $m=2$, this is the number of conjugacy classes).


If the group is abelian, then obviously $c\_m(G) = |G|^m$, so it is divisible by a very high power of $|G|$. 


**Question 2:** Is there any improvement possible for this type of divisibility by $|G|$ for nilpotent or $p$-groups ? 


Remark: Any improvement cannot contradict the analogues of the [5/8
bound](https://mathoverflow.net/q/91685/10446) for general $m$: $c\_{m+1}(G) \leq \frac{3 \cdot 2^m - 1}{2^{2m+1}} |G|^{m+1}$ by Lescot (see [MO108392](https://mathoverflow.net/a/108392/10446)). 




---


**Reminder** 
Let me state theorems cited in [Klyachko & Mkrtchyan 2012](https://arxiv.org/abs/1205.2824) (found in [MO98639](https://mathoverflow.net/q/98639/10446)), and apply it to our situation.


* *Solomon theorem [1969].* In any group, the number of solutions to a system of coefficient-free equations is divisible
by the order of this group if the number of equations is less than the number of unknowns.
* *Application* Consider the equation $xy=yx$ in a group---one equation, two unknowns---thus the number of solutions should be divisible by the order of the group. Hence the number of commuting pairs is divisible by the order of group.


Note that we cannot apply that theorem for the number of commuting triples, $m$-tuples, since the number of equations exceeds the number of unknowns.
So one needs a refinement, and that seemed to be known:


* *Gordon,Rodriguez-Villegas theorem [arXiv:1105.6066](https://arxiv.org/abs/1105.6066)*. In any group, the number of solutions of a system of coefficient free
equations is divisible by the order of this group if the rank of the matrix composed of exponent sums of $i$th
unknown in $j$th equation is less than the number of unknowns.


(It is presented like this by [Klyachko & Mkrtchyan 2012](https://arxiv.org/abs/1205.2824), it is not immediately clear (to me) how to extract this formulation from the original paper). 


* **Application** Consider equations defining commuting $m$-tuples: $x\_ix\_jx\_i^{-1}x\_j^{-1} = 1$. The sums the of exponents is ZERO! Thus the rank of the matrix is zero and hence the theorem ensures that the number of solutions is divisible by order of $G$.


I hope that this correct, and that an expert can confirm it.




---


**Motivation**


I hope (see [MO271752](https://mathoverflow.net/q/271752/10446)) that there should be a nice generating function,
 $$ \sum\_{n\geq 0} \frac{|\mathrm {
commuting~} m\mathrm{-tuples~ in~ GL}(n,F\_q)|}{|GL(n,F\_q)|} x^n = ??? $$


This is similar to the known,
 $$ \sum\_{n\geq 0} \frac{|\mathrm {
commuting~} \mathrm{pairs~ in~ GL}(n,F\_q)|}{|GL(n,F\_q)|} x^n = \prod\_{j\geq 1}
 \frac{1-x^j}{1-qx^j} $$


which would imply divisibility results at least for 
$GL(n,F\_q)$ (and some other groups too), so it is 
nice to have support for such a belief. 
About *other groups,* it would be quite interesting for me to know especially
about the group $UT(n,q)$ (unitriangular matrices over a finite field)---
by what power of $q$ the numbers $c\_m(G)$
are divisible.



The number of commuting m-tuples is divisible by order of group: Improvements?
The answer to questions 0 and 1 is yes. Here is a generalization.



> 
> **Claim:** Let $\pi$ be a finitely generated group and $G$ be a finite group. Then
> 
> 
> $$\frac{|\text{Hom}(\pi \times \mathbb{Z}, G)|}{|G|}$$
> 
> 
> is equal to the number of conjugacy classes of homomorphisms $\pi \to G$.
> 
> 
> 


We get an answer to questions 0 and 1 by setting $\pi = \mathbb{Z}^n$: $\frac{c\_{n+1}(G)}{|G|}$ is equal to the number of conjugacy classes of homomorphisms $\mathbb{Z}^n \to G$.


A proof can be given along the lines of [this blog post](https://qchu.wordpress.com/2015/11/25/conjugacy-classes-of-finite-index-subgroups/). The idea is to consider the mapping groupoid $X = [B \pi, BG]$ of homomorphisms $\pi \to G$, then to take its "loop groupoid"


$$LX = [B \mathbb{Z}, X] \cong [B(\pi \times \mathbb{Z}), BG].$$


It's an easy computation to verify that the [groupoid cardinality](https://qchu.wordpress.com/2012/11/08/groupoid-cardinality/) of a loop groupoid $LX$ is equal to the number of connected components (isomorphism classes) of $X$. On the other hand, $LX$ is the quotient groupoid obtained from the conjugation action of $G$ on $\text{Hom}(\pi \times \mathbb{Z}, G)$, and hence its groupoid cardinality is also the above expression.




---


**Edit:** It is maybe worth pointing out the following connection to TQFT, which makes the above proof somewhat more natural than just using Burnside's lemma. In short, in $n$-dimensions the (untwisted) Dijkgraaf-Witten TQFT $Z\_G$ with finite gauge group $G$ assigns to


* a closed $n$-manifold $X$ the number $\frac{\text{Hom}(\pi\_1(X), G)|}{|G|}$ (the "volume" of the "moduli space" of $G$-bundles on $X$), and to
* a closed $(n-1)$-manifold $X$ the vector space of functions on the set of isomorphism classes of $G$-bundles on $X$.


It's a general feature of any TQFT that if $X$ is $(n-1)$-dimensional, then


$$Z(X \times S^1) = \dim Z(X).$$


Applying this to Dijkgraaf-Witten theory recovers a special case of the above result for $\pi = \pi\_1(X)$. In particular the original desired result about $\pi = \mathbb{Z}^n$ can be seen as coming from Dijkgraaf-Witten theory as applied to tori.


