TITLE: Number of path-connected components of the set of all $m$-th roots of the identity matrix
QUESTION [7 upvotes]: Let $m$ be a fixed natural number
Let $X$ be the subset of $M_n( \Bbb C)$ defined by :
$X=\{A:A^m=I_n\}$ 
count the number of arc connected components of $X$
Except to note that the eigenvalues of the matrices of $X$ are the $n$-th roots of the unit, I do not advance in the enumeration

REPLY [3 votes]: Nice question! Let $\mathcal{P}$ be the set of path-connected components of $X$ and let 
$$A = \left \{ (k_0, \dots, k_{m-1}) \, \big| \, \sum_{i=0}^{m-1} k_i = n, k_i \geq 0, k_i \in \mathbb{Z} \right \}. $$ 
We will define a bijection $\varphi \colon A \rightarrow \mathcal{P}$ and this will show that $|\mathcal{P}| = |A| = { m + n - 1 \choose n }$. 
Fix a primitive $m$-th root of unity $\omega$. Given $k = (k_0,\dots,k_{m-1})$ in $A$, fix some arbitrary matrix $A 
\in X$ whose characteristic polynomial is $p_A(z) = \prod_{i=0}^{m-1} (z - \omega^i)^{k_i}$ and let $\varphi(k)$ be the path-component of $A$ in $X$. Concretely, $A$ can be taken to be a diagonal matrix.

Let us show that $\varphi(k)$ is well-defined in the sense that our definition of $\varphi(k)$ doesn't depend on the specific matrix $A \in X$ for which $p_A(z) = \prod_{i=0}^{m-1} (z - \omega^i)^{k_i}$. Note that any $A \in X$ is diagonalizable (the minimal polynomial divides $x^m - 1$ and so has distinct roots) which implies that any two matrices in $X$ which have the same characteristic polynomial must be similar. Now, $\operatorname{GL}_n(\mathbb{C})$ is path-connected and the map $P \mapsto P^{-1} A P \in X$ is continuous and so any two matrices $A,B \in X$ which have the same characteristic polynomial can be connected by a path in $X$.
The preceding argument also shows that $\varphi$ is onto. Given $A \in X$ with $p_A(z) = \prod_{i=0}^{m-1} (z - \omega^i)^{k_i}$, the path component of $A$ in $X$ is $\varphi(k)$.
Finally, let us show that $\varphi$ is one-to-one. We need to show that if $A,B \in X$ can be connected by a path $\alpha \colon [0,1] \rightarrow X$ with $\alpha(0) = A$ and $\alpha(1) = B$ then $p_A(z) = p_B(z)$. Given $0 \leq i \leq m - 1$, fix a contour $C_i$ in $\mathbb{C}$ that doesn't pass through any of the $(\omega^j)_{j=0}^{m-1}$, has winding number one around $\omega^i$ and winding number zero around $\omega^j$ for $j \neq i$. Consider the function
$$ t \mapsto \frac{1}{2\pi i} \oint_{C_i} \frac{p_{\alpha(t)}'(z)}{p_{\alpha(t)}(z)} \, dz \in \mathbb{Z}. $$
Since the roots of $p_{\alpha(t)}(z)$ must be $m$-th roots of unity, we see by the argument principle that this expression gives us the multiplicity of the root $\omega^i$ of $p_{\alpha(t)}$. The integrand is a continuous function of $t$ and so does the function. By connectedness, we see that it must be constant and so the multiplicity of $\omega^i$ in $p_{\alpha(0)}(z) = p_A(z)$ is identical to the multiplicity of $\omega^i$ in $p_{\alpha(1)}(z) = p_B(z)$ for all $0 \leq i \leq m - 1$. Thus, $p_A(z) = p_B(z)$.


If you want to avoid the argument principle, you can also show step $(3)$ much more directly by writing
$$ p_{\alpha(t)}(z) = z^n + c_{n-1}(t)z^{n-1} + \dots + c_1(t)z + c_0(t) $$
where $c_i(t)$ is the coefficient of $z^i$ in $p_{\alpha(t)}(z)$. One can readily seen that $c_i(t)$ are continuous. Since $\alpha(t) \in X$ for all $t \in [0,1]$ and matrices in $X$ have finitely many possible characteristic polynomials, this implies that the map
$$ t \mapsto (c_{n-1}(t), \dots, c_1(t), c_0(t)) \in \mathbb{C}^n $$
is continuous and has finite image. Hence, it must be constant and $p_{\alpha(0)}(z) = p_{\alpha(1)}(z)$.

Finally, let me describe the answer above in a slightly different language. Consider the map $\pi \colon X \rightarrow \mathbb{C}_{\leq n}[z]$ given by $\pi(A) = p_A$ and topologize $\mathbb{C}_{\leq n}[z]$ as $\mathbb{C}^{n+1}$. The map $\pi$ is continuous and has finite image. The group $\operatorname{GL}_n(\mathbb{C})$ acts transitively on each fiber and so each fiber is connected. Hence, the connected components of $X$ are in bijection with $\pi(X)$ and $|\pi(X)| = |A|$.