dot product
Let a be the direction vector <a1, a2, a3>
Let b be the direction vector <b1, b2, b3>
Dot Product (final answer is a scalar):
a • b = <a1, a2, a3> • <b1, b2, b3> = (a1)(b1) + (a2)(b2) + (a3)(b3) or
a • b = ||a||||b||cosθ, where θ is the angle between the two vectors,
||a|| is the magnitude of a, and
||b|| is the magnitude of b
If a • b = 0, the angle between the two vectors is π rad (90°)
meaning the two vectors are orthogonal (perpendicular).
If vector "dot-products" with itself:
a • a = ||a||^2, where ||a|| is the length of a.