# Prove: If A and B are n times n diagonal matrices, then AB = BA.

Prove: If A and B are $n×n$ diagonal matrices, then
AB = BA.
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Asma Vang
Step 1
Given, A and B are $n×n$ diagonal matrices
Step 2
Suppose
$A=\left[\begin{array}{cccc}{a}_{11}& 0& \dots & 0\\ c& {a}_{22}& \dots & 0\\ ⋮& ⋮& \ddots & 0\\ 0& 0& \dots & {a}_{nn}\end{array}\right],B=\left[\begin{array}{cccc}{b}_{11}& 0& \dots & 0\\ 0& {b}_{22}& \dots & 0\\ ⋮& ⋮& \ddots & 0\\ 0& 0& \dots & {b}_{nn}\end{array}\right]$
Now
L.H.S.=AB
$=\left[\begin{array}{cccc}{a}_{11}& 0& \dots & 0\\ c& {a}_{22}& \dots & 0\\ ⋮& ⋮& \ddots & 0\\ 0& 0& \dots & {a}_{nn}\end{array}\right]\left[\begin{array}{cccc}{b}_{11}& 0& \dots & 0\\ 0& {b}_{22}& \dots & 0\\ ⋮& ⋮& \ddots & 0\\ 0& 0& \dots & {b}_{nn}\end{array}\right]$
$=\left[\begin{array}{cccc}{a}_{11}{b}_{11}& 0& \dots & 0\\ 0& {a}_{22}{b}_{22}& \dots & 0\\ ⋮& ⋮& \ddots & 0\\ 0& 0& \dots & {a}_{nn}{b}_{nn}\end{array}\right]$
Now
R.H.S.=BA
$=\left[\begin{array}{cccc}{b}_{11}& 0& \dots & 0\\ 0& {b}_{22}& \dots & 0\\ ⋮& ⋮& \ddots & 0\\ 0& 0& \dots & {b}_{nn}\end{array}\right]\left[\begin{array}{cccc}{a}_{11}& 0& \dots & 0\\ c& {a}_{22}& \dots & 0\\ ⋮& ⋮& \ddots & 0\\ 0& 0& \dots & {a}_{nn}\end{array}\right]$
$=\left[\begin{array}{cccc}{b}_{11}{a}_{11}& 0& \dots & 0\\ 0& {b}_{22}{a}_{22}& \dots & 0\\ ⋮& ⋮& \ddots & 0\\ 0& 0& \dots & {b}_{nn}{a}_{nn}\end{array}\right]$
$=\left[\begin{array}{cccc}{a}_{11}{b}_{11}& 0& \dots & 0\\ 0& {a}_{22}{b}_{22}& \dots & 0\\ ⋮& ⋮& \ddots & 0\\ 0& 0& \dots & {a}_{nn}{b}_{nn}\end{array}\right]$
Thus AB=BA
Jeffrey Jordon