# Every matrix that commutes with $A \in \Bbb C^{n \times n}$ is a polynomial in $A$

From the National Board for Higher Mathematics (NBHM) 2022 exam:

Suppose $$A \in \Bbb C^{n \times n}$$ has the property that every matrix that commutes with $$A$$ is a polynomial in $$A$$. Then which of the following is/are true?

(a) Such a matrix $$A$$ is necessarily diagonalizable.

(b) Such a matrix $$A$$ cannot be nilpotent.

(c) The characteristic and minimal polynomials coincide for every such $$A$$.

For option a.

If a matrix A has n distinct eigenvalues, then A is diagonalizable. If two matrices commute, then they are simultaneously diagonalizable. First, let's prove that every matrix that commutes with A is diagonalizable. Suppose B is a matrix that commutes with A, that is, AB = BA. Then, by the second fact above, we know that A and B are simultaneously diagonalizable, meaning that there exists an invertible matrix P such that both A and B are diagonalized by P. That is, $$P^{-1}AP$$ and $$P^{-1}BP$$ are both diagonal matrices. But since AB = BA, we have

$$P^{-1}ABP$$ = $$P^{-1}BAP$$

which implies that both $$P^{-1}AP$$ and $$P^{-1}BP$$ commute with each other. Since diagonal matrices are uniquely determined by their diagonal entries, we conclude that $$P^{-1}AP$$ and $$P^{-1}BP$$ must have the same diagonal entries, which implies that A and B have the same eigenvectors. Therefore, B is also diagonalizable.

Now, let's prove that A itself is diagonalizable. Suppose A has a repeated eigenvalue λ, and let E be the eigenspace corresponding to λ. Then, we can choose a basis of E consisting of linearly independent eigenvectors, say $$v_1$$, $$v_2$$, ..., $$v_k$$. Since every matrix that commutes with A is diagonalizable, we know that the restriction of A to E, denoted by $$A|_E$$, is diagonalizable. Therefore, there exists an invertible matrix Q such that both $$A|_E$$ and $$Q^{-1}A|_EQ$$ are diagonal matrices. But since A commutes with $$A|_E$$, we have

AQ = $$QA|_E$$ = $$Q(Q^{-1}A|_EQ)$$ = $$(QQ^{-1})A|_EQ$$ = $$A|_EQ$$

which implies that the columns of Q are eigenvectors of A that belong to E. Thus, we can extend the basis $${v_1, v_2, ..., v_k}$$ of E to a basis $${v_1, v_2, ..., v_k, w_1, w_2, ..., w_l}$$ of $$C^n$$, where $${w_1, w_2, ..., w_l}$$ is a basis of the eigenspace corresponding to some other eigenvalue of A (which may or may not be distinct from λ). Let P be the matrix whose columns are the basis vectors $${v_1, v_2, ..., v_k, w_1, w_2, ..., w_l}$$. Then, we have $$P^{-1}AP = D$$, where D is a block diagonal matrix with the diagonal blocks being the diagonal matrices corresponding to the restriction of A to E and the eigenspaces corresponding to the other eigenvalues of A, respectively. But since A is assumed to commute with every matrix that commutes with it, we know that every matrix that commutes with A also commutes with $$P^{-1}AP$$ = D. Therefore, every such matrix must be a diagonal matrix with the same diagonal entries as D. But since the diagonal entries of the block diagonal matrix D are the eigenvalues of A, counted with multiplicity, we conclude that A has n distinct eigenvalues, and hence is diagonalizable.

Is it correct for option a? And what about for option b? Here is for option c Characteristic polynomial of a A agrees with its minimal polynomial if and only if all matrices that commutes with A is a polynomial of A

Answer is only option c is true and option a,b are false. Please have a look...

Hint $$:$$ To disprove $$(a)$$ and $$(b)$$ just consider the non-diagonalizable nilpotent matrix (of index $$2$$) $$A = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}.$$
It's easy to check that all the matrices that commute with $$A$$ are polynomials in $$A$$ which are of the form $$aI + b A = \begin{pmatrix} a & b \\ 0 & a \end{pmatrix}.$$
For $$(c)$$ you already have an answer.