since $\displaystyle Q^{-1}BQ $ and $\displaystyle Q^{-1}CQ $ are diagonal matrix,

than

$\displaystyle Q^{-1}BQ $ = $\displaystyle Q^{-1}CQ $ as Q diagonalises B and C.

Q is invertible, so multiply both sides by Q

$\displaystyle QQ^{-1}BQ = QQ^{-1}CQ $

=

BQ = CQ

$\displaystyle BQQ^{-1} = CQQ^{-1} $

B = C

since they are equal BC = CB

Is this correct?