# For non-diagonalizable matrices, the dimension of centralizer can be different from $\sum\limits_{j=1}^k d_j^2$

It is known that if a square matrix $$A$$ is diagonalizable the the subspace $$C(A)=\{X\in M_{n,n}; AX=XA\}$$ has the dimension $$\sum\limits_{j=1}^k d_j^2$$, where $$d_j$$ denotes the geometric multiplicity of the $$j$$-th eigenvalue. There are several posts on this site related to this fact.1

I suppose that this is no longer true if we do not assume that $$A$$ is diagonalizable. What are some counterexamples showing that this is no longer true?

My motivation for asking this is that there are questions about commuting matrices and specifically about this claim for diagonalizable matrices are posted on this site quite often. So it might be useful to have somewhere on this site a counterexample showing that this is no longer true after omitting this condition.

I have also posted in an answer a counterexample which seems relatively simple to me. Naturally, it is still interesting if somebody can provide other answers with different approaches or other useful insights.

If $$A$$ consists of a single Jordan block of size $$n\times n$$, i.e., $$A=J= \begin{pmatrix} \lambda & 1 & \ldots & \ldots & 0 \\ 0 & \lambda & 1 & & \vdots \\ \vdots & & \ddots & \ddots & 0 \\ \vdots & & & \lambda & 1 \\ 0 & \ldots & \ldots & 0 & \lambda \\ \end{pmatrix},$$ then we can write it as $$J=\lambda I+N$$ where $$N=\begin{pmatrix} 0 & 1 & \ldots & \ldots & 0 \\ 0 & 0 & 1 & & \vdots \\ \vdots & & \ddots & \ddots & 0 \\ \vdots & & & 0 & 1 \\ 0 & \ldots & \ldots & 0 & 0 \\ \end{pmatrix}.$$ It is clear that $$(\lambda I+N)X=X(\lambda I+N)$$ is equivalent to $$XN=NX$$.

And it is also easy to see that $$N$$ commutes with $$I,N,N^2,\dots,N^{n-1}$$. These matrices are linearly independent. (Just notice that each of them has ones only on one diagonal, and it is a different diagonal for each power.)

So the dimension of the subspace $$C(A)$$ is at least $$n$$. (In fact, we could show that it is exactly $$n$$, but this is not really needed to find a counterexample.)

On the other hand, $$J$$ has only one eigenvalue which has geometric multiplicity equal to one. So in this case we get $$\sum\limits_{j=1}^k d_j^2=1$$.

To summarize:

• $$\dim C(A)\ge n$$ (in fact, $$\dim C(A)=n$$)
• $$\sum\limits_{j=1}^k d_j^2=1$$
• $$\dim C(A)\ne \sum\limits_{j=1}^k d_j^2$$
• This all checks out. More generally, we will have $\dim C(A) \geq n$ if and only if the matrix $A$ is non-derogatory, i.e. if and only if the Jordan form of $A$ has one Jordan block for each eigenvalue. Jun 23 '19 at 13:29
• More generally, I believe that the result for a matrix with one eigenvalue $\lambda$ will be as follows: if $d_k$ denotes the number of Jordan blocks with size $k$, then $\dim C(A) = \sum_k k\cdot d_k^2$ Jun 23 '19 at 13:34
• That first comment should say "we will have $\dim C(A) = n$". We will always $\dim C(A) \geq n$. Jun 23 '19 at 13:35
• @Omnomnomnom Actually, I think that for $d_1=d_2=1$ I get $\dim C(A)=5$. I left a few comments in my chatroom. Jun 23 '19 at 19:52