If A is a matrix of order m x n and B is a matrix of order l x p. The product AB of two matrices is defined if,
m = l
n = p
m = p
n = l
The product of two matrices A and B is defined if the number of columns of A is equal to the number of rows of B.