# Product of a diagonal matrix and an orthogonal matrix [closed]

I am in a situation where I need to prove a property, and I need to know this:

Is the product of a diagonal matrix and an orthogonal matrix commutative?

## closed as off-topic by amWhy, GNUSupporter 8964民主女神 地下教會, José Carlos Santos, Davide Giraudo, CesareoDec 22 '18 at 0:12

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – amWhy, GNUSupporter 8964民主女神 地下教會, José Carlos Santos, Davide Giraudo, Cesareo
If this question can be reworded to fit the rules in the help center, please edit the question.

• The simplest example like $\begin{bmatrix}1&0\\0&0\end{bmatrix}$ and $\begin{bmatrix}0&1\\1&0\end{bmatrix}$ will tell you this is false. – Christoph Dec 9 '18 at 14:05

take $$A = \begin{bmatrix}0&0&0&1\\0&0&1&0\\1&0&0&0\\0&1&0&0\\\end{bmatrix}$$

and $$B = \begin{bmatrix}2&0&0&0\\0&1&0&0\\0&0&0&0\\0&0&0&2\end{bmatrix}$$

Then $$A$$ is orthogonal matrix and $$B$$ is diagonal But, $$AB≠BA$$.

(You can see, here $$A$$ is also permutation matrix corresponding to permutation $$\sigma =(1324)$$. Hence accordingly pre multiplying by $$A$$ to $$B$$ just permuted rows of $$B$$ and post multiplying $$A$$ to $$B$$ just permuted columns of $$B$$)