On multiplying by diagonal matrices

811 Views Asked by At

Given two matrices $A,B\in\Bbb C^{n\times n}$ supposing there exists a diagonal matrix $D\in\Bbb C^{n\times n}$ such $$AD=DB$$ does that mean $A,B$ are diagonals and hence equal?

3

There are 3 best solutions below

5
On BEST ANSWER

No.

Take $D$ to be the zero matrix and let $A,B$ be non-equal matrices.

A non trivial example is to take $A,B$ to be diagonal with different entries in some coordinates and $D$ to be diagonal with zeros in the coordinates where $A,B$ differ.

In fact, even if $A,B$ are the same matrix, its not necessarily the case that $AD=DA$; a diagonal matrix $D=diag(d_1,d_2,\ldots)$ commutes with $A=[a_{ij}]$ if and only if $a_{ij}=0$ whenever $d_i \neq d_j$.

1
On

This is a counterexample:

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

3
On

No. Let $A=\begin{pmatrix} 1&1\\1&1 \end {pmatrix},D=\begin{pmatrix} 2&0\\0&1 \end {pmatrix},B=\begin{pmatrix} 1&1/2\\2&1 \end {pmatrix}$