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?
2026-04-02 15:09:21.1775142561
On multiplying by diagonal matrices
811 Views Asked by user257494 https://math.techqa.club/user/user257494/detail At
3
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$.