O'Reilly logo

Beginning Math and Physics for Game Programmers by Wendy Stahler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required