Example 6-11. Derive the law of cosines for the triangle illustrated.
Figure 6-11. Triangle for law of cosines.
Solution Let C =A−B so that the dot product of C with itself gives
C·C= (A−B)·(A−B) = A·A+B·B− 2 A·B
or
C^2 =A^2 +B^2 − 2 AB cos θ,
where A=|A|, B=|B|, C=|C|represent the magnitudes of the vector sides.
Example 6-12. Find the vector equation of the line which passes through the
two points P 1 (x 1 , y 1 , z 1 )and P 2 (x 2 , y 2 , z 2 ).
Solution Let
r 1 =x 1 ˆe 1 +x 2 ˆe 2 +x 3 ˆe 3
and r 2 =x 2 ˆe 1 +y 2 ˆe 2 +z 2 ˆe 3
denote position vectors to the points P 1 and P 2
respectively and let r =xˆe 1 +yˆe 2 +zeˆ 3 denote the
position vector of any other variable point on the
line. Observe that the vector r 2 −r 1 is parallel
to the line through the points P 1 and P 2 .By vector addition the (x, y, z )position on
the line is given by
r =r 1 +λ(r 2 −r 1 ) −∞ < λ < ∞ (6 .41)