Matrix - Matrix Multiplication

Matrix multiplication is only well-defined for matrices where the number of columns in the first matrix equals the number of rows in the second matrix.

To multiply two matrices and , where is an by matrix and is an by matrix, the resulting matrix will be an by matrix defined by

This means that each entry in the resulting matrix is computed by taking the Dot Product of the -th row of matrix and the -th column of matrix .

Example

Consider the following matrices:

The product is calculated as follows:

Resulting in