I am stuck in finding the generalised condition for two matrices of any order to commute over each other i.e.
$$AB=BA$$
I am stuck in finding the generalised condition for two matrices of any order to commute over each other i.e.
$$AB=BA$$
Matrix multiplication is always commutative when (i) one of the matrices is the Identity matrix (ii) One of the matrix is the Zero matrix. (iii) both matrices are Diagonal matrices.
Moreover, Two matrices that are simultaneously diagonalizable are always commutative.
Becase $A$ and $B$ are simultaneously diagonalizable, then a matrix $T$ exists, such that $D_A = S^{-1} \cdot A \cdot S$ and $D_B = S^{-1} \cdot B \cdot S$ \begin{align} A \cdot B &= S \cdot D_A S^{-1} \cdot S \cdot D_B \cdot S^{-1} \rm {~~as ~}(S^{-1}S = I)\\ &= S \cdot D_A \cdot D_B \cdot S^{-1} \\ &= S \cdot D_B \cdot D_A \cdot S^{-1} \\ &= S \cdot D_B \cdot S^{-1} \cdot S \cdot D_A \cdot S^{-1} \\ &= B \cdot A \end{align}