A problem on nilpotent matrix and commutator Let $A$ be a $n\times n$ nilpotent matrix, that is, for some $m\geq 1$, $A^m=0$. Suppose $\operatorname{rank}(A)=n-1$, and define a map from $M_n(\mathbb{C})$ (the complex matrices) to itself by $\phi(C)=AC-CA$. Then how can I compute the eigenvalues of $\phi$, and what is the dimension of the space $\operatorname{im}\phi=\{\phi(J); J\in M_n(\mathbb{C}) \}$.
 A: An elementary way to do this is to first observe that $\dim(\ker(A))=1$ by rank-nullity, so that for any $k\in\Bbb N$ one has $\dim(\ker(A^{k+1}))\leq1+ \dim(\ker(A^k))$ (the dimension of $\ker(A^k)$ cannot rise by more than$~1$ at each step) by rank-nullity applied to the restriction of $A$ to $\ker(A^{k+1})$; then $\dim(\ker(A^{n-1}))\leq n-1$, so there is a vector $v$ with $A^{n-1}\cdot v\neq 0$. The sequence of vectors $v,A\cdot v,A^2\cdot v,\ldots,A^{n-1}\cdot v$ is a basis, and on this basis the linear operator for $A$ has matrix
$$
  N=\begin{pmatrix}
0&0&\ldots&0&0\\
1&0&\ldots&0&0\\
0&1&\ldots&0&0\\
\vdots&\vdots&\ddots&\vdots&\vdots\\
0&0&\ldots&1&0\\
\end{pmatrix},
$$
and it suffices to give a proof for the particular case $A=N$.
For this case the action of $\phi$ on elementary matrices is given by
$$
\phi_N(E_{i,j})=[i<n]E_{i+1,j}-[j>1]E_{i,j-1}
$$
(the Iverson brackets suppress the terms that would be off the grid). So with $V_d$ the subspace of $M_n(\Bbb C)$ spanned by all $E_{i,j}$ with $j-i=d$, for $-n<d<n$, one has $\phi(V_d)\subseteq V_{d-1}$ for all $d>-n+1$, and $\phi(V_{-n+1})=0$; it follows that $\phi$ is nilpotent and has $0$ as unique eigenvalue. The subspaces $V_d$ define a direct sum decomposition of $M_n(\Bbb C)$, and it can be checked that $\phi(V_{d+1})=V_d$ for $-n<d<0$ while for $0\leq d<n-1$ the subspace $\phi(V_{d+1})\subset V_d$ is the one defined by the sum of all entries being$~0$, so it is of codimension$~1$. All told, the rank of$~\phi$ is $\sum_{d<0}\dim(V_d)+\sum_{0\leq d<n}(\dim(V_d)-1)=n^2-n$.
A: Suppose $\lambda$ be an eigen value of $\phi$ so $\phi (C)=\lambda C$
so $AC-CA=\lambda C\Rightarrow AC=C(A-(-\lambda) I)\Rightarrow\det A\times \det C=\det C\times\det (A-(-\lambda)I)\Rightarrow\det A=\det (A-(-\lambda)I)$ assuming  $C$ is invertible matrix, now as $A$ is nilpotent so $\det A=0$ so $\lambda =0$
A: Since $A$ is nilpotent, there is a smallest positive integer $m$ with $A^m =0$. The first thing to argue is that $\phi$ is also nilpotent. This is reasonably intutitive. By induction, one can check that
$$\phi^k(C) = \sum_{r=0}^k (-1)^r \binom{k}{r} A^{k-r} C A^r$$
In particular,
\begin{align*}
\phi^{2m-2}(C) = (-1)^{m-1} \binom{ 2m-2}{m-1} A^{m-1} C A^{m-1} && \text{ and } && \phi^{2m-1}(C)= 0
\end{align*}
Since $A^{m-1} \neq 0$, there is an $x \in \mathbb{C}^n$ with $A^{m-1} x \neq 0$. Choosing $C$ so that $C(A^{m-1}x) = x$ then gives $\phi^{2m-2}(C) \neq 0$.  We conclude that $\phi$ is nilpotent, and $2m-1$ is the smallest postive integer $k$ such that $\phi^k = 0$. Then, from the general claim: a nilpotent transformation $T$ has $0$ as it's only eigenvalue, we get:

Zero is the only eigenvalue of $\phi$.

For the second part, I claim that

$\dim(\operatorname{im}(\phi)) = n^2 - n$.

I tried and failed to come up with an elegant approach for this. One way to proceed is to use the Jordan canonical form. We have enough information about $A$ to know its Jordan normal form $J = SAS^{-1}$ consists of a single Jordan block with eigenvalue $0$. Now, we want $\phi$ to be similar to $C \mapsto JC  + CJ$. This holds. A similarity is given by $\psi(C) = SCS^{-1}$ whose inverse is $\psi^{-1}(C) = S^{-1} C S$. Indeed
$$ \psi(\phi(\psi^{-1}(C)) = S( AS^{-1} C S - S^{-1} C SA)S^{-1} = JC + CJ.$$
Since $J$ is given explicitly, the problem is reduced to a computation.
