Assuming that the sizes of the matrices are such that the indicated operations can be performed, the following rules of matrix arithmetic are valid.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)A+B=B+AA+(B+C)=(A+B)+CA(BC)=(AB)CA(B+C)=AB+AC(B+C)A=BA+CAA(B−C)=AB−AC(B−C)A=BA−CAa(B+C)=aB+aCa(B−C)=aB−aC(a+b)C=aC+bC(a−b)C=aC−bCa(bC)=(ab)Ca(BC)=(aB)C=B(aC)[Commutative law for matrix addition][Associative law for matrix addition][Associative law for matrix multiplication][Left distributive law][Right distributive law]
Remark
Unlike real numbers arithmetic where ab=ba, the equality of AB and BA can fail for 3 possible reasons:
AB is defined, but not BA (e.g., when A is 2×3 and B is 3×4)
AB and BA is defined, but have different sizes (e.g., when A is 2×3 and B is 3×2)
AB and BA is defined, have same size, but is different