Let C=A−B denote the directed line segment from (B 1 ,B 2 ,B 3 )to (A 1 ,A 2 ,A 3 ).The
length of this vector is found to be
|C|=
√
(A 1 −B 1 )^2 + (A 2 −B 2 )^2 + (A 3 −B 3 )^2.
If θis the angle between the vectors A and B, the law of cosines is employed to write
|C|^2 =|A|^2 +|B|^2 − 2 |A||B|cos θ.
Substitute into this relation the distances of the directed line segments for the mag-
nitudes of A,B and C. Expanding the resulting equation shows that the law of
cosines takes on the form
(A 1 −B 1 )^2 + (A 2 −B 2 )^2 + (A 3 −B 3 )^2 =A^21 +A^22 +A^23 +B 12 +B 22 +B^23 − 2 |A||B|cos θ.
With elementary algebra, this relation simplifies to the form
A 1 B 1 +A 2 B 2 +A 3 B 3 =|A||B|cos θ
which suggests the definition of a dot product as A·B=|A||B|cos θ.
Example6-3. If A=A 1 ˆe 1 +A 2 ˆe 2 +A 3 ˆe 3 is a given vector in component form,
then
A·A=A^21 +A^22 +A^33 and |A|=
√
A^21 +A^22 +A^23
The vector
̂eA=^1
|A|
A=A^1 √eˆ^1 +A^2 eˆ^2 +A^3 ˆe^3
A^21 +A^22 +A^23
= cos αˆe 1 + cos βˆe 2 + cos γˆe 3
is a unit vector in the direction of A, where
cos α=A^1
|A|
, cos β=A^2
|A|
, cos γ=A^3
|A|
are the direction cosines of the vector A. The dot product
̂eA·̂eA= cos^2 α+ cos^2 β+ cos^2 γ= 1
shows that the sum of squares of the direction cosines is unity.