Okay, hopefully I can add to the discussion and clear up any lasting confusion you have crakinshot. My apologies for anything below that is trivial to you... I just want to fill in all the pieces of the puzzle.
The dot product (also called the inner product) of two vectors can be used to compute the scalar projection of one vector onto the other. If these two vectors are unit vectors, then the result is equivalent to the cosine of the angle between the unit vectors, as mentioned by several previous posters.
Draw two vectors, with a common origin, on a piece of paper. Now rotate the paper so that one of the vectors is horizontal and pointing to the right. Call it
A . The scalar projection of the other vector,
B , onto
A is given by
A.B compAB = --- |A|
This can also be seen to be the component of the vector
A that lies in the direction of
B .
It can be shown (by employing the law of cosines and vector calculus) that
A B cos(theta) = --- . --- |A| |B|
where theta is the angle between
A and
B .
There are some other elegant results involving the dot (inner) product operator, but I'll leave them for another day!
Cheers,
Timkin
[edited by - Timkin on August 2, 2002 10:13:06 PM]