Page 207 -
P. 207

Solution: Choose two arbitrary points on this line. Denote their coordinates
                             by (x , y ) and (x , y ); being on the line, they satisfy the equation of the line:
                                    1
                                 1
                                           2
                                              2
                                                        ax + by + =  0
                                                                 c
                                                         1    1
                                                        ax + by + =  0
                                                                 c
                                                          2   2
                             Substracting the first equation from the second equation, we obtain:
                                                    ax(  −  x ) +  b y(  − y ) =  0
                                                       2  1     2   1
                             which means that  (, ) (ab ⊥  x −  x  , y −  y  ),   and the unit vector perpendicular
                                                     2   1  2  1
                             to the line is:


                                                          a        b   
                                                   ê =         ,       
                                                    ⊥
                                                         a +  b 2  a + b 
                                                                   2
                                                                       2
                                                           2
                             Example 7.5
                             Find the angle that the lines 3x + 2y + 2 = 0 and 2x – y + 1 = 0 and make
                             together.

                             Solution: The angle between two lines is equal to the angle between their nor-
                             mal unit vectors. The unit vectors normal to each of the lines are, respectively:


                                                   3   2               2  − 1 
                                             ˆ n =   ,      and  ˆ n =   ,  
                                              1    13  13         2    5  5 

                             Having the two orthogonal unit vectors, it is a simple matter to compute the
                             angle between them:


                                                   ˆ ⋅
                                            cos( )θ = nn ˆ =  4  ⇒  θ =  . 1 0517 radians
                                                    1  2
                                                            65

                             7.2.1  MATLAB Representation of the Dot Product
                             The dot product is written as the product of a row vector by a column vector
                             of the same length.

                             Example 7.6
                             Find the dot product of the vectors:



                             © 2001 by CRC Press LLC
   202   203   204   205   206   207   208   209   210   211   212