Matrix Multiplication
The preceding section looked at multiplying a scalar and a matrix. The next logical step is to investigate the product of two matrices, or a matrix times another matrix. This process involves the dot product, so you might want to flip back to Chapter 4, “Vector Operations,” for a quick review of the dot product before proceeding.
You can multiply matrices by taking a series of dot products. Keep in mind two important aspects of the dot product:
The two vectors must have the same number of entries to take the dot product.
The dot product returns a scalar quantity (a single number).
Let's start by looking at two 2×2 matrices. Matrices to be multiplied don't have to be square and don't have to be the same size, but there are ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access