# The dimension of centralizer of a Matrix.

Let $A$ be a $n\times n$ matrix with characteristic polynomial $$(x-c_{1})^{{d}_{1}}(x-c_{2})^{{d}_{2}}...(x-c_{k})^{{d}_{k}}$$ where $c_{1},c_{2},...,c_{k}$ are distinct. Let $V$ be the space of $n\times n$ matrics $B$ such that $AB=BA$. How to find dimension of this vector space? Clearly it is easy to find dimension if the matrix $A$ is given diagonalizable but how to find dimension if matrix $A$ is not diagonalizable. I tried it by using Jordan canonical form but its very lengthy and only gives possible dimensions. Can some one suggest how to find by giving a particular matrix.

• There is no single answer given the information you have. There is one kind of extreme, which is when only matrices that can be written as a polynomial $p(A)$ commute with $A.$ This has small dimension, just $n.$ I collected a bunch of equivalent conditions in my answer at math.stackexchange.com/questions/92480/… The other extreme is the identity matrix, everything commutes with it, dimension $n^2,$ much, much larger. May 21, 2015 at 3:07
• It's not enough to know the characteristic polynomial. You really have to know the size of the Jordan blocks. May 21, 2015 at 3:09
• yes dimension is atleast n....but if it not diagonalizable then is there some othere technique to find dimension? May 21, 2015 at 3:10
• @WillJagy if the exact size of each block is known then we look dimension of commutators of each blocks and add?? May 21, 2015 at 3:15
• I think you can only do that if the blocks have different eigenvalues. Otherwise it's more complicated. May 21, 2015 at 3:17

I don't think there's an easy way to do this. I agree with the above comment that you should play with different matrices yourself. I'm adding this mostly so you have a reference. See: Nilpotent Orbits in Semisimple Lie Algebras by Collingwood, McGovern, Theorem 6.1.3. The statement is:

Let $A$ be a nilpotent matrix, i.e. eigenvalues are all zero. Its Jordan normal form is given by a partition of $n$, say $d_1 + \cdots + d_k$. Then, one has that the dimension of the centralizer is $$\sum s_i^2$$ where $s_i = |\{j \mid d_j \geq i\}|$. You can generalize this formula now to a general matrix $A$ in Jordan normal form (the blocks with different eigenvalues don't interact -- you can check quickly if you think of $A$ as acting by column/row operations), to get $$\sum_\lambda \sum_i s_{i, \lambda}^2$$ where $\lambda$ ranges over all eigenvalues (generalized) and $s_{i, \lambda}$ as above.

Edit for experts: Okay, so, the way I would do this in general, is for a nilpotent element $x$, find $h$ such that $[h, x] = 2x$. One can do this separately for each Jordan block; if $x$ is a Jordan block, then $h = diag(k, k-2, k-4, \ldots, 4-k, 2-k, -k)$. One can complete this to an $\mathfrak{sl}_2$ triple by taking $y = x^t$, i.e. $(x, y, h)$ is a copy of $\mathfrak{sl}_2$. Then, we can decompose $\mathfrak{g}$ into into eigenspaces for $ad(h)$, and note that in fact these are eigenspaces for various $\mathfrak{sl}_2$-representations, and the highest weights are killed by $x$ (i.e. in the centralizers). So, we want to count representations, which one can do with some combinatorics (yielding the above formula) or just directly. For example, in the above (or below) answer, $h = diag(1,-1,1,-1)$, and one has $$\left(\begin{array}{cccc}0&2&0&2\\-2&0&-2&0\\0&2&0&2\\-2&0&-2&0\end{array}\right)$$ where the number is the $h$-weight of that eigenspace. We count 4 weight 2 eigenspaces, 4 weight -2 eigenspaces, and 8 weight 0 eigenspaces, giving us a total of $4 + (8-4) = 8$ representations. Explicitly, one has the decomposition $\mathfrak{g} = V(2)^{\oplus 4} \oplus V(0)^{\oplus 4}$ as $\mathfrak{sl}_2$ representations.

• its solves atleast some particular cases... May 21, 2015 at 3:35
• If I'm not mistaken I think this gives all cases May 21, 2015 at 3:44
• Are s_j related to something like "transpose" diagram ? Oct 3, 2021 at 11:22

And, in case you were wondering, here's the case for two Jordan blocks of sizes $3$ and $2$. The centralizer of $$\left[ \begin {array}{ccccc} \lambda&1&0&0&0\\0&\lambda&1&0&0 \\ 0&0&\lambda&0&0\\ 0&0&0&\lambda&1 \\ 0&0&0&0&\lambda\end {array} \right]$$ consists of matrices of the form $$\left[ \begin {array}{ccccc} b_{{3,3}}&b_{{2,3}}&b_{{1,3}}&b_{{2,5}}& b_{{1,5}}\\ 0&b_{{3,3}}&b_{{2,3}}&0&b_{{2,5}} \\ 0&0&b_{{3,3}}&0&0\\0&b_{{5,3}} &b_{{4,3}}&b_{{5,5}}&b_{{4,5}}\\0&0&b_{{5,3}}&0&b_{ {5,5}}\end {array} \right]$$ More generally, if you have Jordan blocks with the same eigenvalue for indices $i, \ldots, j$ and $k, \ldots, l$, for a matrix in the centralizer the block formed by rows $i,\ldots, j$ and columns $k, \ldots, l$ will be "upper triangular" (i.e. $0$ for $row - column > \min(i-k, j-l)$) and constant on diagonals. The dimension for this block is then $\min(l-k+1,j-i+1)$, and you have to add this up for all blocks.

• Very nice ! Is possible to somehow emphasize in that b_{5,3} is doubled and b_{2,5} also ? May be by color at the matrix - making them red ? and by saying explicitly ? Oct 3, 2021 at 11:26
• Also if it would be possible to add 4+3 example that would be nice ! In case we have three blocks with the same eigenvalue - structure would be more complicated ? Oct 3, 2021 at 11:29

Here is an example with two Jordan blocks that have the same eigenvalue. If we had only a single Jordan block, the dimension resulting would be exactly $4,$ but this comes out a little bigger.

$$\left( \begin{array}{rr|rr} 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ \hline 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \end{array} \right) \left( \begin{array}{rrrr} a & b & c & d \\ e & f & g & h \\ i & j & k & l \\ m & n & o & p \end{array} \right) = \left( \begin{array}{rrrr} e & f & g & h \\ 0 & 0 & 0 & 0 \\ m & n & o & p \\ 0 & 0 & 0 & 0 \end{array} \right)$$

$$\left( \begin{array}{rrrr} a & b & c & d \\ e & f & g & h \\ i & j & k & l \\ m & n & o & p \end{array} \right) \left( \begin{array}{rr|rr} 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ \hline 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \end{array} \right) = \left( \begin{array}{rrrr} 0 & a & 0 & c \\ 0 & e & 0 & g \\ 0 & i & 0 & k \\ 0 & m & 0 & o \end{array} \right)$$

At first glance, I get eight linear equations required for equality, $$e,g,m,o = 0, \; a=f, c=h, i=n,k=p.$$

Out of $16,$ what is left is dimension $8.$

$$\left( \begin{array}{rr|rr} a & b & c & d \\ 0 & a & 0 & c \\ \hline i & j & k & l \\ 0 & i & 0 & k \end{array} \right)$$ Dimension $8$ for four little 2 by 2 Jordan blocks scattered about.

• OK WE CAN TRY THIS FOR EACH BLOCK... May 21, 2015 at 3:30
• There's a typo. The last column of the second equation on the right hand side should be $c, g, k, o$, and the dimension is 8 (throw out $l = 0$ ) May 21, 2015 at 3:43
• Also, this shows you can't just find the centralizers for each block and then add dimensions. Note that the upper $2 \times 2$ matrix is not forced to be zero by the equations. So it's more complicated. May 21, 2015 at 3:46
• @user148177, yes, i went through it again, had a letter wrong, this is much better. I try to get the students to experiment; with matrices, if the problem says $n$ by $n,$ see what happens with $2$ by $2$ or $3$ by $3.$ Usually they just don't. I did $4$ by $4$ here because I wanted very clear distinct Jordan blocks with the little 1's off diagonal. May 21, 2015 at 3:51
• @WillJagy Yeah my second comment is mostly in reply to a comment to the question where the asker suggested just computing centralizers of the blocks and adding dimensions, which I think is wrong in general. Anyway, the only way I know how to nicely understand this stuff in general uses some $\mathfrak{sl}_2$ representation theory, which I think is maybe a little beyond the scope here... May 21, 2015 at 3:54