Commuting Matrices — Definition, Formula & Examples
Commuting matrices are two square matrices and that satisfy . Since matrix multiplication is generally not commutative, commuting matrices are a special case where the order of multiplication does not affect the result.
Two matrices and are said to commute if their commutator equals the zero matrix . Equivalently, and commute if and only if .
Key Formula
Where:
- = Square matrices of the same size
- = The zero matrix of the same size
How It Works
To check whether two matrices commute, compute both products and separately, then compare. If every corresponding entry is equal, the matrices commute. Notable cases where commutativity always holds: any matrix commutes with the identity matrix , with the zero matrix , with scalar multiples of itself, and with its own inverse (if one exists). Diagonal matrices of the same size also commute with each other.
Worked Example
Problem: Determine whether the matrices A and B commute, where A = [[1, 2], [0, 3]] and B = [[5, 2], [0, 1]].
Compute AB: Multiply A by B using standard matrix multiplication.
Compute BA: Multiply B by A in the reversed order.
Compare: The (1,2) entries differ: 4 versus 16. Since AB ≠ BA, the matrices do not commute.
Answer: A and B do not commute because .
Why It Matters
Commutativity matters when simplifying matrix expressions. For instance, the identity holds only when and commute. In quantum mechanics and advanced algebra, whether operators (represented as matrices) commute determines whether physical quantities can be simultaneously measured.
Common Mistakes
Mistake: Assuming that if AB = BA for one pair, matrix multiplication is commutative in general.
Correction: Commutativity is a property of a specific pair of matrices, not of matrix multiplication overall. Most pairs of matrices do not commute.
