Given two vectors V and W, suppose they are represented by the coordinatesa = (xa, ya) andb = (xb, yb). (Place tails of V and W at the origin. Then their heads are ata = (xa, ya) andb = (xb, yb).) Definition: The dot product of V and W is defined to be V
W = xa*xb + ya*yb
It's hard to see what the dot product is good for at this stage of the game. We'll work on it. One important thing ... What's V
V?
V
V = xa2 + ya2, but that's just the length of V squared - V
V = |V||V|
(See, dot products are good for something.)