Prove that $\dim \ker (A-I_{n}) = \frac{1}{d} \sum\limits_{i= 1}^{d}\mbox{Tr} \left(A^{i}\right)$ 
Let $A \in M_{n}(\mathbb{C})$ be a matrix such that $A^{d} = I_{n}$ for some positive integer $d$. Prove that $$\dim \ker (A-I_{n}) = \frac{1}{d} \sum\limits_{i= 1}^{d}\mbox{Tr} \left(A^{i}\right)$$


My Attempt: $A$ is diagonalizable as minimal polynomial of $A$ is product of distinct linear factor. I think diagonalizability of $A$ can help to prove this identity. Can anyone help me for further approach?
 A: For no particular reason, an approach without eigenvalues:
Denote $B = \frac 1{d}\sum_{i=1}^d A^i$. Because $A^d = I$, we note that for any $i,$ we have
$$
\{A^{i+j}:j=1,\dots,d\} = \{A^{j}:j=1,\dots,d\}.
$$
Thus, we find
$$
B^2 = \frac 1{d^2} \sum_{i=1}^d\left(\sum_{j=1}^d A^{i+j}\right) = \frac 1{d^2} \sum_{i=1}^d dB = B.
$$
Thus, $B$ is a projection, so we have $\operatorname{tr}(B) = \operatorname{rank}(B)$.
From the fact that $(A - I)B = 0$, deduce that the image of $B$ is a subset of $\ker(A - I)$. So, $\operatorname{rank}(B) \leq \dim \ker (A-I)$.
On the other hand, we can verify that for every $y \in \ker(A - I)$, we have $Ay = y$ and thus $By = y$. Thus, for every $y \in \ker(A - I)$, $Bx = y$ has $x = y$ as a solution, which is to say that $y$ is in the image of $B$. Thus, $\operatorname{rank}(B) \geq \dim \ker (A-I)$.
Thus, we have $\operatorname{tr}(B) = \operatorname{rank}(B) = \dim \ker (A-I)$, which is what we wanted.
A: Let $\{\lambda_j\}_{j=1}^n$ be the eigenvalues of $A$ with multiplicity.
Since $A^d = I$, we must have that each $\lambda_j^d = 1$.
Hence, we have that
$$
\frac{1}{d}\sum_{i=1}^d \mathrm{Tr}(A^i)
= \frac{1}{d}\sum_{i=1}^d \sum_{j=1}^n \lambda_j^i
= \sum_{j=1}^n \frac{\lambda_j}{d}\sum_{i=0}^{d-1} \lambda_j^i. 
$$
But now, if $\lambda_j \neq 1$, then
$$
\sum_{i=0}^{d-1} \lambda_j^i
= \frac{1 - \lambda_j^{d}}{1 - \lambda_j}
= 0
$$
since $\lambda_j^d = 1$. On the other hand, if $\lambda_j = 1$, then $\sum_{i=0}^{d-1}\lambda_j = d$.
In either case, we can write
$$
\frac{\lambda_j}{d} \sum_{i=0}^{d-1} \lambda_j^i
= \mathbf{1}_{\lambda_j = 1},
$$
and so
$$
\frac{1}{d}\sum_{i=1}^d \mathrm{Tr}(A^i)
= \sum_{j=1}^n \frac{\lambda_j}{d}\sum_{i=0}^{d-1} \lambda_j^i
= \#\{j : \lambda_j = 1\}.
$$
But also, the eigenvalues of $A - I$ are $\{\lambda_j - 1\}_{j=1}^n$, and so
$$
\dim \ker (A  - I)
= \#\{j : \lambda_j - 1 = 0\}
= \#\{j : \lambda_j = 1\}
= \frac{1}{d}\sum_{i=1}^d \mathrm{Tr}(A^i).
$$
A: OP's minimal polynomial argument implies that, up to similarity, we may write
$A=\begin{bmatrix} I_{n-r}  &\mathbf 0 \\  \mathbf 0 & B \end{bmatrix}$
where $\text{rank}(I_{n}-A) = r$ so $\dim \ker (I_{n}-A)= n-r$ and $\dim \ker (I_{r}-B)=0$.
Combined with the fact that computing $\frac{1}{d}\sum_{k=0}^{d-1}\text{trace}\big(I_{n-r}^k\big)=n-r$ it suffices to show that $\frac{1}{d}\sum_{k=0}^{d-1}\text{trace}\big(B^k\big)=0$.
$S:= \sum_{k=0}^{d-1}A^k$
multiply each side by $\big(I_{r}-B\big)$
$\big(I_{r}-B\big)S = \sum_{k=0}^{d-1}\big(I_{r}-B\big) B^k=\big(\sum_{k=0}^{d-1}B^k\big)-\big(\sum_{k=1}^{d}B^k\big)=\mathbf 0$
$\implies \frac{1}{d}S = \mathbf 0$
since $\big(I_{r}-B\big)$ is invertible.  Taking the trace of each side gives the result.
