Unlike matrix addition and subtraction, matrix multiplication is not a straightforward extension of ordinary multiplication. Matrix multiplication involves both multiplying and adding elements. If we multiply a row vector by a column vector, we obtain a scalar. To get it, we first multiply corresponding elements, and then add them. The result of multiplying two such vectors is called a scalar product.
Scalar products have many statistical applications.
For example, the sum of a variable can be found by placing that variable in a column vector and premultiplying it by row vector made of 1s. In general, the first matrix will be of order r1xc1 and the second will be of order r2xc2. To be conformable to multiplication c1 must be equal to r2. The order of the resulting matrix will be r1xc2. The inside numbers must be equal for multiplication of occur.