since and are diagonal matrix,
than
= as Q diagonalises B and C.
Q is invertible, so multiply both sides by Q
=
BQ = CQ
B = C
since they are equal BC = CB
Is this correct?
No, there is no reason to suppose that $Q^{-1}BQ$ and $Q^{-1}CQ$ are the SAME diagonal matrix.
What you want to do FIRST, is prove two diagonal matrices commute:
$D_1D_2 = D_2D_1$ when $D_1,D_2$ are diagonal (PROVE THIS!).
Now if $Q^{-1}BQ = D_1$, then $QD_1Q^{-1} = Q(Q^{-1}BQ)Q^{-1} = (QQ^{-1})B(QQ^{-1}) = IBI = B$.
Similarly, if $Q^{-1}CQ = D_2$, then $QD_2Q^{-1} = C$.
Thus:
$BC = (QD_1Q^{-1})(QD_2Q^{-1}) = QD_1(Q^{-1}Q)D_2Q^{-1} = QD_1D_2Q^{-1} =\dots$ can you finish?
Do you know how to multiply matrices?
Suppose we write $A = (a_{ij}),\ B = (b_{ij})$.
Then if $C = (c_{ij}) = AB$, we have:
$\displaystyle c_{ij} = \sum_{k = 1}^n a_{ik}b_{kj}$
that is, the $ij$-th entry of $AB$ is the dot product of the $i$-th row of $A$ with the $j$-th column of $B$.
Now, what does it MEAN for a matrix $A = (a_{ij})$ to be diagonal? It means that $a_{ij} = 0$ if $i \neq j$.
So when we multiply diagonal matrices, say $D_1D_2$, if $D_1 = (d_{ij})$ and $D_2 = (d'_{ij})$, the dot-product is going to be 0 unless we are multiplying the $i$-th row by the $i$-th column.
So the ONLY non-zero terms would be $\displaystyle \sum_{k = 1}^n d_{ik}d'_{ki}$, and the only term in that sum that survives is when $k = i$, and we get a product of two scalars: $d_{ii}d'_{ii}$.
So the product of two diagonal (square) matrices is again diagonal, and the diagonal elements are just the product of the diagonal elements of the matrices we are multiplying:
$D_1D_2 = \text{diag}(d_1,d_2,\dots,d_n)\text{diag}(d'_1,d'_ 2,\dots,d'_n) = \text{diag}(d_1d'_1,d_2d'_2,\dots,d_nd'_n)$
Do scalars commute?
If what I have written is not clear, I urge you to try to multiply together 2 3x3 diagonal matrices.