# When is the product of a diagonal matrix and a symmetric matrix symmetric?

A diagonal matrix and a symmetric matrix commute if their product is itself a symmetric matrix and vice versa (see the answers to this question). Are there other conditions that make their product symmetric?

More generally, if the diagonal matrix has the form $$D = \pmatrix{\lambda_1 I_{k_1}\\&\lambda_2 I_{k_2} \\ && \ddots \\ &&& \lambda_m I_{k_m}}$$ where $I_k$ denotes the $k \times k$ identity matrix, then a (symmetric) matrix $A$ will commute with $D$ if and only if $A$ is conformally block diagonal, which is to say that $$A = \pmatrix{A_1 \\ & A_2 \\ & & \ddots \\ &&& A_m}$$ Where for each $j$, $A_j$ is a (symmetric) matrix of size $k_j \times k_j$.
• When A is symmetric, $A_j$ is also symmetric, right? – Abhiram V P May 24 at 5:08