Dot Product

Remember when you first learned the multiplication tables? Your teacher probably told you that 2 times 3 could be written as 2 × 3 or as 2 • 3, and that they mean the same thing. This statement is true for scalar quantities. However, it's not true for more complex structures, such as vectors. We'll first look at 2 • 3, which is called the dot product. Then we'll investigate the cross product, 2 × 3, in the next section.

The most important thing to remember about the dot product of two vectors is that it always returns a scalar value. Let's first discuss how to calculate it, and then we'll talk about what that number represents.

NOTE

Some math texts call the dot product of two vectors the scalar product because that is what the dot ...

Get Beginning Math and Physics for Game Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.