Suppose that $A = M\_n(\mathbb{C})$ be the algebra of $n\*n$ matrices over $\mathbb{C}$.


If com(A) = {$B \in M\_n(\mathbb{C}); AB = BA$}, then what is the $dim(com(A))?$



Dimension of commutant
This is known for a general field by a theorem of Frobenius:


Let $F$ be a field and $V$ a finite dimensional $F$-vector sapce with a linear operator A. When $f\_i(X)$ denote the invariant factors of $A$ (such that $f\_i(X)$ divides $f\_{i+1}(X)$, then the dimension is equal to $\sum\limits\_{i=1}^{k}{(2k-2i+1)deg(f\_i(X))}$.


See Theorem 5.15 in the book "Algebra: An approach via module theory" by Adkins and Weintraub.


