Two diagonal matrices

54 Views Asked by At

Let $A$ be a diagonal matrix with any two diagonal entries different. If $B$ is a matrix such that $AB = BA$, show that $B$ is also diagonal.

2

There are 2 best solutions below

0
On

Note that $Ae_j=a_j e_j$ for the standard basis vectors $e_1,\dots,e_n$. So $ABe_j=BAe_j=Ba_j e_j=a_jBe_j$. Hence the vector $v=Be_j$ also satisfies $Av=a_j v$, i.e. lies in the kernel of $A-a_jI$. But the kernel of $A-a_j I$ is precisely the span of $e_j$, since $A-a_jI$ has rank $n-1$, having $n-1$ nonzero diagonal entries. So $Be_j$ is some multiple of $e_j$, for each $j$, i.e. $B$ is diagonal.

0
On

The result of $AB$ is multiplying the $i$th row of $B$ by $a_i$ for each $i$, while $BA$ is multiplying the $i$th column of $B$ by $a_i$. In other words, the $ij$th element of $AB$ is $a_ib_{ij}$ while the $ij$th element of $BA$ is $a_jb_{ij}$. If $i\neq j$, then $a_i\neq a_j$, so if $a_ib_{ij} = a_jb_{ij}$, that must mean $b_{ij} = 0$.