The product of an m × p matrix A and a p × n matrix B is an m × n matrix C where each element cij is the dot product of row i of A and column j of B.
C = AB
The product of matrices A and B is undefined unless the number of rows in A is equal to the number of columns in B. In this case, the matrices are conformable for multiplication.
In general, matrix multiplication is not commutative.
AB ≠ BA
As a consequence, the following terminology is sometimes used. Considering the matrix product
The left multiplicand A is said to premultiply the matrix B. The right multiplicand B is said to postmultiply the matrix A.
Matrix multiplication distributes over matrix addition
A(B + C) = AB + AC
(B + C)A = BA + CA
if A, B, and C are conformable for the indicated operations. With the same caveat, matrix multiplication is associative.
A(BC) = (AB)C
The transpose of a matrix product is the product of the factors in reverse order, i.e.
(ABC)T = CTBTAT
The set of square matrices has a multiplicative identity which is denoted by I. The identity is a diagonal matrix with ones along the diagonal
The 3 × 3 multiplicative identity is