<s>[INST] Which Matrix Equality is always true? Let $A_{r\times m}$and $B_{m\times r}$ be full matrices, $C_{r\times r}$is a diagonal matrix, and $D_{r\times r}$is an identity matrix. Which of the following is always true?


*

*$AB=(AB)^{T}$

*$ABD = DAB$

*$BC = CB$

*$A^{T}C=CA^{T}$


I don't think it would be $1$ because the $A^{T}$ and $B$ would not take into account the diagonal and identity matrix, and I do not think that it would be $3$ either. Any help with this one?
 [/INST] (1) is false
$$\begin{pmatrix} 1 & 2\\ 3 & 4 \end{pmatrix}\begin{pmatrix} 1 & 0\\ 0 & 1 \end{pmatrix}\ne \left(\begin{pmatrix} 1 & 2\\ 3 & 4 \end{pmatrix}\begin{pmatrix} 1 & 0\\ 0 & 1 \end{pmatrix}\right)^T$$
(3) is false
$$\begin{pmatrix} 1 & 2\\ 3 & 4 \end{pmatrix}\begin{pmatrix} 2 & 0\\ 0 & 1 \end{pmatrix}\ne \begin{pmatrix} 2 & 0\\ 0 & 1 \end{pmatrix}\begin{pmatrix} 1 & 2\\ 3 & 4 \end{pmatrix}$$
Moreover, note that we need $m= r.$ 
(4) is false
$$\begin{pmatrix} 1 & 3\\ 3 & 4 \end{pmatrix}^T\begin{pmatrix} 2 & 0\\ 0 & 1 \end{pmatrix}\ne \begin{pmatrix} 2 & 0\\ 0 & 1 \end{pmatrix}\begin{pmatrix} 1 & 3\\ 2 & 4 \end{pmatrix}^T$$
Moreover, note that we need $m= r.$ 
(2) is true
Since $D$ is the identity matrix one has that $MD=DM=M.$ Thus
$$ABD=(AB)D=(AB)=D(AB)=DAB.$$ 
</s>