The act of multiplying two matrices is common and trivial (though occasionally error prone!). However, most learn only a single way of viewing the process. The following will explore the most common way of doing matrix multiplication, followed by three more uncommon (but equally valid) ways.

**The first way.**

We’re going to use two toy matrices throughout our exercises here, matrices A and B:

The most common way of viewing the product of two matrices is one where each individual element or coordinate of the result matrix is the dot product of a row vector and column vector from the first and second matrices, respectively. Therefore the value of

is 23 because,

The process of dotting the vector combinations continue until the final result is produced:

Graphically what we’ve done looks something like this:

We’ve taken the red vector, dotted it with the blue vector, and produced the green dot (the dot product).

**The second and third way**

Linear algebra is big on the notion of linear combinations and so to see the product of matrices as linear combinations is reasonable. Let’s view a *column in the product as a linear combination of the columns of the multiplier*. The scalers for each column in the first matrix come from the vectors of the multiplicand. We can therefore see the first column of the product of our toy matrices as the following linear combination:

and the second column as:

We can again represent the operation graphically like this:

Where we multiply the red columns by the blue column to produce the green column.

Alternatively we can look at a row in the result as the linear combination of rows from the multiplicand (the “third way”).

So we take row elements from row 1 of the multiplier as scalers for the row vectors of the multiplicand:

And the same for the second row:

And finally we can see the operation graphically:

Where we are multiplying the blue rows by the red row producing the green one.

**The fourth way**

The fourth and final way is a divergence from what we’ve seen previously.

Recall that multiplying two vectors can result in a vector or a full matrix depending upon the shape and order of the vectors being multiplied. What we did in the preceding two “ways” was to multiply vectors in such a manner as to collapse the product into a vector. But we can multiply differently to produce a matrix for each operation. This will require a summation of the resultant matrices to produce our final product. Let’s turn to our example matrices.

Multiply the first column of the first matrix by the second row of the second matrix to produce a matrix:

Then multiply the second column of the first matrix by the second row of the second matrix:

We then sum the products:

And if we compare that with our previous results we see it checks out.