Let $A$ be a $4 \times 4$ complex diagonal matrix with exactly three distint entries on its diagonal.
(1) What is the dimension of the vector space of polynomials of $A$?
(2) What is the dimension of the vector space of $4 \times 4$ complex matrices that commute with $A$?
(3) If $B$ is a $4 \times 4$ complex diagonal matrix with exactly three distinct entries on its diagonal, is it similar to a polynomial of $A$?
I am looking for explainations more so than the actual answers.
In order to make writing things easier, I will specifically consider the case where the repeated eigenvalue comes first. That is, we have $$ A = \pmatrix{\lambda_1 \\ & \lambda_1 \\ && \lambda_2 \\ &&& \lambda_3} = \pmatrix{\lambda_1 I_{2}\\ & \lambda_2 \\ && \lambda_3} $$ where $I_2$ denotes a size $2$ identity matrix.
Hint for 1: Note that for any polynomial $p$, $$ p(A) = \pmatrix{p(\lambda_1)I_{2} \\ & p(\lambda_2) \\ && p(\lambda_3)} $$
Hint for 2: Verify that any block matrix of the form $$ B = \pmatrix{B_1\\ & b_2 \\ && b_3} $$ will commute with $A$, where $B_1$ can be any $2 \times 2$ matrix and the $b_i$ are scalars. Note too that these are the only matrices that commute with $A$.
Hint for 3: Every polynomial of $A$ is diagonal (and therefore diagonalizable). However, the matrix $$ \pmatrix{\lambda_1&1 \\ & \lambda_1 \\ && \lambda_2 \\ &&& \lambda_3} $$ is neither diagonal nor diagonalizable.