= Solution
{c}
Write $C=(c_{ij})$ and $(d_1,d_2,d_3)=(0,2,4)$. Because $D$ is a <diagonal matrix>,
$$
(CD)_{ij}=c_{ij}d_j,\qquad (DC)_{ij}=d_ic_{ij}.
$$
Thus $CD=DC$ exactly when $(d_j-d_i)c_{ij}=0$ for every $i,j$. The three <eigenvalues> are distinct, so every off-diagonal entry of $C$ must be zero; diagonal entries are unrestricted. Consequently the <centralizer of a diagonal matrix> here is
$$
\boxed{\{C:CD=DC\}=\{\operatorname{diag}(a,b,c):a,b,c\in\mathbb R\}.}
$$
Every displayed <matrix> indeed <commutes> with $D$, since <diagonal matrices> multiply entry by entry on the diagonal.
Back to article page