Game Development Reference
F IGURE 2.6
Geometric interpretation of the scalar product.
Ve c t o r c , however, is smaller in magnitude, but it is not pointing at right angles
a . Notice that it is pointing in almost the opposite direction to
a . In this case its
component in the direction of
a is negative.
We can see this in the scalar products:
2 . 0
1 . 5
0 . 3
1 . 2
If one vector is not normalized, then the size of the scalar product is multiplied by
its length (from equation 2.4). In most cases, however, at least one vector, and often
both, will be normalized before performing a scalar product.
When you see the scalar product in the physics engines in this topic, it will most
likely be as part of a calculation that needs to find how much one vector lies in the
direction of another.
T HE V ECTOR P RODUCT
Whereas the scalar product multiplies two vectors together to give a scalar value, the
vector product multiplies them to get another vector. In this way it is similar to the
component product but is considerably more common.