The Angle between two Lines

Problem:

Find the angle between the line parallel to the vector [1, -1, 1] and the line parallel to the vector [-6, -4, 0]

A diagram of this is shown on the right. [Graphics:Images/index_gr_1.gif] is the vector to which one line is parallel.

[Graphics:Images/index_gr_2.gif] is the vector to which the other line is parallel.

θ is the angle between the two lines.
The scalar (dot) product of two vectors is defined as;

      the product of their magnetude and the cosine of their included angle;
      
      The scalar (dot) product of  [Graphics:Images/index_gr_3.gif] and [Graphics:Images/index_gr_4.gif] is therefore;
      
                      [Graphics:Images/index_gr_5.gif] . [Graphics:Images/index_gr_6.gif]  = | [Graphics:Images/index_gr_7.gif] | × | [Graphics:Images/index_gr_8.gif] |cosθ
Using  [Graphics:Images/index_gr_9.gif] . [Graphics:Images/index_gr_10.gif]  = | [Graphics:Images/index_gr_11.gif] | × | [Graphics:Images/index_gr_12.gif] |cosθ  the required angle can be found. The scalar (dot) product [Graphics:Images/index_gr_13.gif] . [Graphics:Images/index_gr_14.gif] = [1, -1, 1] . [-6, -4, 0]

                                                          = 1 × -6   +   -1 × -4   +  1 × 0
                                                          
                                                          = -2
                                                          
                                                          
The product  | [Graphics:Images/index_gr_15.gif] | × | [Graphics:Images/index_gr_16.gif] |  =   [Graphics:Images/index_gr_17.gif]  ×   [Graphics:Images/index_gr_18.gif]

                                             =  2[Graphics:Images/index_gr_19.gif]
                                             
We can now calculate the cosine of the angle between the two vectors using;

                        [Graphics:Images/index_gr_20.gif] . [Graphics:Images/index_gr_21.gif]  = | [Graphics:Images/index_gr_22.gif] | × | [Graphics:Images/index_gr_23.gif] |cosθ
                        
                                  -2  = 2[Graphics:Images/index_gr_24.gif]cosθ
                                  
                                  θ   =  [Graphics:Images/index_gr_25.gif][Graphics:Images/index_gr_26.gif]

                                       =  1.73 radians
                                       
The required angle is  1.73 radians.

                                       
                                             
 

HOME