When multiplying matrices, the elements of the rows in the first matrix are multiplied with corresponding columns in the second matrix. this means that the column number of the left matrix has to be equal to the line numbers of the right matrix.
The product of a l x m -Matrix A = (aij)i=1...l, j=1...m and a m x n -Matrix B = (bij)i=1...m, j=1...n is al x n -Matrix C = (cij)i=1...l, j=1...n :