Let A be an n×n matrix and let Λ be an n×n diagonal matrix. Is it always the case that AΛ=ΛA? If not, when is it the case that AΛ=ΛA?
If we restrict the diagonal entries of Λ to being the equal (i.e. Λ=drag(a,a,…,a)), then it is clear that AΛ=AaI=aIA=ΛA. However, I can’t seem to come up with an argument for the general case.
Answer
It is possible that a diagonal matrix Λ commutes with a matrix A when A is symmetric and AΛ is also symmetric. We have
ΛA=(A⊤Λ⊤)⊤=(AΛ)⊤=AΛ
The above trivially holds when A and Λ are both diagonal.
Attribution
Source : Link , Question Author : Jeff Scott , Answer Author : user322903