Game Development Reference
In-Depth Information
Figure 2.20
Scaling one operand of the dot
product
The expanded scalar math in the middle uses three dimensions as our ex-
ample, but the vector notation at either end of the equation applies for
vectors of any dimension.
We've seen what happens when we scale b : the length of its projection
onto a increases along with the value of the dot product. What if we scale
a ? The algebraic argument we just made can be used to show that the
value of the dot product scales with the length of a , just like it does when
we scale b . In other words,
(k a ) b = k( a b ) = a (k b ).
Dot product is
associative with
multiplication by a scalar
for either vector
So scaling a scales the numeric value of the dot product. However, this
scale has no affect geometrically on the length of the projection of b onto
a . Now that we know what happens if we scale either a or b , we can write
our geometric definition without any assumptions about the length of the
vectors.
Dot Product as Projection
The dot product a b is equal to the signed length of the projection of b
onto any line parallel to a , multiplied by the length of a .
As we continue to examine the properties of the dot product, some will
be easiest to illustrate geometrically when either a , or both a and b , are
unit vectors. Because we have shown that scaling either a or b directly
scales the value of the dot product, it will be easy to generalize our results
after we have obtained them. Furthermore, in the algebraic arguments that
accompany each geometric argument, unit vector assumptions won't be
necessary. Remember that we put hats on top of vectors that are assumed
to have unit length.
You may well wonder why the dot product measures the projection of
the second operand onto the first, and not the other way around. When
the two vectors a and b are unit vectors, we can easily make a geometric
 
Search WWH ::




Custom Search