We observe that, for
multiplication of two matrices A and B, the number of columns in A should be equal to
the number of rows in B Furthermore for getting the elements of the product matrix,
we take rows of A and columns of B, multiply them element-wise and take the sum Formally, we define multiplication of matrices as follows:
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 Let A = [aij] be an m × n matrix and B = [bjk] be an
n × p matrix