Find the range for $AX-XA$ I don't know how to prove the following and need help.

Let $M_{n\times n}$ be the vector space of matrices over $\mathbb{C}$. Let $A\in M_{n\times n}$ be fixed matrices, and $X\in M_{n\times n}$ be variable matrix. Define the linear transformation $T$ on $M_{n\times n}$ by $T(X)=AX-XA$. Prove that the range of $T$ is at most $n^2-n$.

My idea is to use Kronecker Product to convert $AX-XA$ to a vector form equation like $\overline{A}{y}$ but got stuck on how to proceed. 
 A: The kernel of $T$ is precisely the vector subspace of matrices that commute with $A$. By a change of basis, we may assume that $A$ is in Jordan normal form. For each Jordan block of size $m$, we are going to produce $m$ linearly independent matrices that commute with $A$.
First suppose the entirely matrix $A$ is one single Jordan block, i.e.
$$
A = \begin{bmatrix}
    \lambda & 1 & 0 & \dots  & 0 \\
    0 & \lambda & 1 & \dots  & 0 \\
    \vdots & \vdots & \vdots & \ddots & \vdots \\
    0 & 0 & 0 & \dots  & \lambda
\end{bmatrix}
$$
Then $Id,A,A^2,\ldots,A^{n-1}$ are linearly independent and commute with $A$. Now if $A$ has multiple blocks, then for each Jordan block of size $m$, set $B$ to be the matrix with that Jordan block and is zero everywhere else. Then we can see that the first $m$ powers of $B$ all commute with $A$.
A: Define Kronecker Product for $A∈M_{n×m},B∈M_{p×q}$ as
$$
A\otimes B=\pmatrix{a_{11}B\cdots a_{1m}B\\ \vdots \hspace{15 mm} \vdots \\ a_{n1}B \cdots a_{nm}B}
$$
Then $A\otimes B\in M_{np×mq}$. First we prove the following lemmas.

Lemma $1$:  $\hspace{5 mm}$ The linear transformation matrix of $T(X)=AXB$ ($A∈M_{n×m},X\in M_{m\times p},B∈M_{p×q}$) reduces to
  $$
T_X=(A\otimes B^T)y\tag{1}
$$
  Or
  $$
T_X=(B^T\otimes A)y\tag{2}
$$
  where $y=\pmatrix{x_1\\\vdots \\x_p}$, $x_i$ are rows of $X$ in $(1)$ or columns of $X$ in $(2)$. $C\in M_{nq\times mp},y\in M_{mp\times 1}.$

Proof: Let $E_{ij}=(\delta_{ij})_{s\times t}\space (\delta_{ij}=1$ if $s=i,t=j$ and $\delta_{ij}=0$ if $s\ne i,t\ne j$) be basis of $M_{m\times p}$, and $X=(x_{ij})_{m\times p}$. Then
$$
X=\sum\limits_{i=1}^m\sum\limits_{j=1}^px_{ij}E_{ij}
$$
\begin{align}
T(X)&=AXB=\sum\limits_{i=1}^m\sum\limits_{j=1}^px_{ij}AE_{ij}B
\\
&=\sum\limits_{i=1}^m\sum\limits_{j=1}^px_{ij}\alpha_i\beta_j^T\hspace{5 mm}\text{$\alpha_i$ is the $i^{th}$ column of $A$, $\beta_j^T$ is the $j^{th}$ row of $B$.}
\\
&=\sum\limits_{i=1}^m\sum\limits_{j=1}^px_{ij}\left(\sum\limits_{k=1}^n\sum\limits_{l=1}^qa_{ki}b_{jl}E_{kl}\right)
\\
&=\sum\limits_{k=1}^n\sum\limits_{l=1}^q\left(\sum\limits_{i=1}^m\sum\limits_{j=1}^px_{ij}a_{ki}b_{jl}\right)E_{kl}
\end{align}
So if we put rows of $X$ one by one into a vector $y$, and fix $i$ and let $j$ run form $1$ to $p$, we have $a_{ki}$ times $B^T$ match $i^{th}$ row of $X$. So $(1)$ is proved.
Next if we put columns of $X$ one by one into a vector $y$, and fix $j$ and let $i$ run form $1$ to $m$, we have $b_{jl}$ times $A$ match $j^{th}$ column of $X$. So $(2)$ is proved.

Lemma $2$:  $\hspace{5 mm}$ Let $A,B,C,D∈M_{n×n}$. Then
  $$
(A\otimes B)(C\otimes D)=(AC)\otimes (BD)
$$

Prove: 
\begin{align}
(A\otimes B)(C\otimes D)&=\pmatrix{a_{11}B\cdots a_{1n}B\\ \vdots \hspace{15 mm} \vdots \\ a_{n1}B \cdots a_{nn}B}\pmatrix{c_{11}D\cdots c_{1n}D\\ \vdots \hspace{15 mm} \vdots \\ c_{n1}D \cdots c_{nn}D}
\\
&=\left(\sum\limits_{k=1}^na_{ik}c_{kj}BD\right)_{ij}
\\
&=(AC)\otimes (BD)
\end{align}
Now suppose $J_A$ be the Jordan Canonical Form matrix and $P$ be invertible. 
Then $P^{-1}AP=J_A$. 
Also since $A$ and $A^T$ have same characteristic and minimum polynomials, $A$ and $A^T$ are similar. So there is an invertible matrix $Q$ such that $Q^{-1}A^TQ=J_A$.
The transformation marix of $AX−XA$ by $(1)$ is 
$$T_X=A\otimes I-I\otimes A^T$$
So there is 
\begin{align}
(P\otimes Q)^{-1}T_X(P\otimes Q)&=(P^{-1}\otimes Q^{-1})T_X(P\otimes Q)
\\
&=(P^{-1}\otimes Q^{-1})(A\otimes I-I\otimes A^T)(P\otimes Q)
\\
&=(P^{-1}\otimes Q^{-1})(A\otimes I)(P\otimes Q)-(P^{-1}\otimes Q^{-1})(I\otimes A^T)(P\otimes Q)
\\
&=(P^{-1}AP\otimes I)-(I\otimes Q^{-1}A^TQ)
\\
&=(J_A\otimes I)-(I\otimes J_A)
\end{align}
Suppose $A$ has $l$ distinct eigenvalues that $\sum\limits_{k=1}^l m_{\lambda_k}=n$, where $m_{\lambda_k}$ is the multiplicity of $\lambda_k$. Then 
$$
J_A = \pmatrix{J_{\lambda_1}\\&\ddots \\&& J_{\lambda_l}}
$$
And
$$
(J_A\otimes I)-(I\otimes J_A)=\pmatrix{\lambda_1I-J_A \hspace{5 mm} I &0 \hspace{10 mm}\cdots \hspace{10 mm}\cdots \hspace{10 mm}0
\\ \hspace{5 mm}\ddots\\ \hspace{10 mm}\lambda_1I-J_A&0 \hspace{10 mm}\cdots \hspace{10 mm}\cdots \hspace{10 mm}0\\ \hspace{20 mm}\ddots\\ &\lambda_lI-J_A \hspace{5 mm} I\hspace{7 mm}\cdots \hspace{7 mm}0
\\ &\hspace{5 mm}\ddots\\ &\hspace{30 mm}\lambda_lI-J_A}
$$
Now consider the last block $\lambda_iI-J_A$ in $J_{\lambda_i}\otimes I-I\otimes J_{\lambda_i}$ that does not have $I$ to its right. In it assume
$$
J_{\lambda_i}=\pmatrix{\lambda_i \hspace{5 mm}1\\\ddots \\& \lambda_i \hspace{5 mm}1 \\& \hspace{10 mm}\lambda_i }
$$
And
$$
\lambda_iI_{m_{\lambda_i}}-J_{\lambda_i}=\pmatrix{0 \hspace{5 mm}-1\\\ddots \\& 0 \hspace{5 mm}-1 \\& \hspace{10 mm}0 }
$$
Then the last row in $\lambda_iI_{m_{\lambda_i}}-J_{\lambda_i}$ is $0$. Now add rest of rows with $-1$ to above block of $I$. This creates $m_{\lambda_i}-1$ rows of $0$ in above $I$, which will create at least one row of $0$ because the block next to the left of $I$ is also $\lambda_iI-J_A$ in which its $\lambda_iI_{m_{\lambda_i}}-J_{\lambda_i}$ has at least one row of $0$. 
So there is at least one row of $0$ in each of $\lambda_iI-J_A$ block and total $n$ rows of $0$ in $(J_A\otimes I)-(I\otimes J_A)$. Thus the rank of $T_X$ is at most $n^2-n$.
