# Dimension of centralizer of a diagonalizable matrix.

Let $A$ be a diagonalizable matrix of order $n$ over a field $\mathbb{F},$ with characteristic polynomial

$$(x-c_{1})^{d_{1}}(x-c_{2})^{d_{2}}\cdot\cdot\cdot(x-c_{k})^{d_{k}}$$ where $c_{1},c_{2},\cdot\cdot\cdot c_{k}$ are distinct eigenvalues of the matrix $A.$ Now there is a formula that the dimension of the vector space of all matrices $B$ such that $AB=BA$ is $$d_{1}^{2}+d_{2}^{2}+\cdot\cdot\cdot d_{k}^{2}$$ I am trying to find this formula. How to think about it? Clearly $A$ is similar to a diagonal matrix $D$ with diagonal entries as eigenvalues. Is it correct to find dimension of the space of all matrices $B$ such that $DB=BD$? If its okay then we get the same dimension as written above. If its okay then how? Please describe me. Thanks in advance.

• I don't have time to write a detailed answer right now, but the idea is correct (the centralizer of a conjugate is the conjugate of the centralizer). To do the count, one can show that the centralizer of the diagonal will consist of matrices with blocks along the diagonal of sizes $d_i$. – Tobias Kildetoft Sep 22 '15 at 7:29
• whenever you have time please can you describe it? – Parvesh Kumar Sep 22 '15 at 7:32