#793 – Matrix Multiplication, Part III – Procedure

Once you know that an m x n matrix can be multiplied by an n x p matrix to get a m x p matrix and you know how to multiply a row by a column, you can multiply one matrix by another.

To do the operation, you multiply each row in the the first matrix by each column in the second matrix, using the dot product of two vectors to do the multiplication.  The resulting value is stored in the corresponding row and column of the target matrix, as follows.

Multiplying matrix A by matrix B to get matrix C, row i of matrix A is multiplied by column j of matrix B, to get a result that is stored in row i and column j of matrix C.

For example:

793-001