18.06.03: ‘Length and angle’ Lecturer: Barwick Monday 08 February 2016 18.06.03: ‘Length and angle’ ๐1 ๐ The length of a vector ๐โ = ( 2 ) ∈ R๐ is defined using the good old law โฎ ๐๐ of Pythagoras: โ๐โโ โ √๐12 + ๐22 + โฏ + ๐๐2 . Geometrically, it works exactly as we expect – it’s the length of the line segment from the origin to (๐1 , ๐2 , … , ๐๐ ): (๐1 , ๐2 , … , ๐๐ ) . . (0, 0, … , 0) 18.06.03: ‘Length and angle’ Here’s a vector in R9 . How long is it? ( ( ( ( ( ๐ฃโ = ( ( ( ( ( ( −6 0 2 −3 4 −7 0 9 −1 ) ) ) ) ) ) ) ) ) ) ) 18.06.03: ‘Length and angle’ −6 0 2 −3 4 −7 0 9 โ( −1 โ โ โ โ( โ( โ( โ( โ( โ( โ( โ( โ( โ( โ โ โ โ โ โ )โ )โ )โ )โ )โ )โ = 14 )โ )โ )โ )โ โ โ โ )โ 18.06.03: ‘Length and angle’ Here are the key facts about length, which you can deduce either from the geometry or from some easy algebra: โถ โ๐โโ ≥ 0; โถ โ๐โโ = 0 if and only if ๐โ = 0;โ โถ โ๐๐โโ = |๐|โ๐โ; โ โ โถ โ๐โ + ๐โโ ≤ โ๐โโ + โ๐โ. 18.06.03: ‘Length and angle’ The story we’re told is that nonzero vectors are nothing more than a length and a direction. We’ve already sorted out what length is. Direction can be obtained, in effect, by normalizing the length: if ๐โ ≠ 0,โ then we define ๐ฬ โ 1 ๐.โ โ๐โโ This is the unit vector in the direction of ๐.โ Clearly โฬ ๐โ = 1, and so ๐โ = โ๐โฬ โ ๐. The unit vector ๐ฬ is the direction of ๐.โ 18.06.03: ‘Length and angle’ One way to think about this is that you take a nonzero vector, and scale it so that the head of the arrow lies at the unit circle: . ๐ฬ ๐โ 18.06.03: ‘Length and angle’ Remember that vector ๐ฃ โ ∈ R9 ? The corresponding unit vector is ( ( ( ( ( ๐ฃฬ = ( ( ( ( ( ( −3/7 0 1/7 −3/14 2/7 −1/2 0 9/14 −1/14 ) ) ) ) ) ). ) ) ) ) ) 18.06.03: ‘Length and angle’ There are unit vectors in R๐ that everyone knows; we mentioned them on Friday: 0 0 ( โฎ ) ( ) ( 0 ) ( ) ( ) ๐๐ฬ = ( 1 ) , ( ) ( 0 ) ( ) ( 0 ) โฎ ( 0 ) where the 1 is in the ๐-th spot. 18.06.03: ‘Length and angle’ While walking in a quiet area of R17 , you encounter two unit vectors. Since these two vectors define a plane, you can just look at that plane: ๐ฬ ๐ฬ . 18.06.03: ‘Length and angle’ You can also draw the lines in the plane these vectors define: ๐ฬ ๐ฬ . 18.06.03: ‘Length and angle’ Now we can drop perpindiculars from our unit vectors to these lines: ๐ฬ ๐ฬ . The signed length from the origin to the right angle (either one!!) is the dot product ๐ฬ ⋅ ๐.ฬ Note that this is a scalar (not a vector), and it is the cosine of the angle between ๐ฬ and ๐.ฬ 18.06.03: ‘Length and angle’ ๐1 ๐ Let’s get some easy stuff out of the way. If ๐ฬ = ( 2 ), then what is โฎ ๐๐ ๐ฬ ⋅ ๐๐ฬ = ? 18.06.03: ‘Length and angle’ Indeed, ๐ฬ ⋅ ๐๐ฬ = ๐๐ : . ๐ฬ 18.06.03: ‘Length and angle’ But what if ๐โ and ๐โ aren’t unit vectors? In that case, we scale our dot product accordingly: โ ๐ ⋅ ๐). ฬ ๐โ ⋅ ๐โ โ โ๐โโ โ ๐โ(ฬ ๐ฬ ๐ฬ ๐๐ฬ . 18.06.03: ‘Length and angle’ This also gives us another way of writing down the length: โ๐โโ = √๐โ ⋅ ๐.โ 18.06.03: ‘Length and angle’ More generally, you have a good distributive law: (๐โ + ๐)โ ⋅ ๐ โ = ๐โ ⋅ ๐ โ + ๐โ ⋅ ๐.โ This distributive law is actually the key to computing the dot product! ๐โ ⋅ ๐โ = (๐1 ๐1ฬ + ๐2 ๐2ฬ + โฏ + ๐๐ ๐๐ฬ ) ⋅ ๐โ = ๐1 (๐1ฬ ⋅ ๐)โ + ๐2 (๐2ฬ ⋅ ๐)โ + โฏ + ๐๐ (๐๐ฬ ⋅ ๐)โ = ๐1 ๐1 + ๐2 ๐2 + โฏ + ๐๐ ๐๐ . 18.06.03: ‘Length and angle’ It’s surprisingly good news that the formula is so simple! Let’s see if we can use this. Question. What’s the angle between the following two lines in R4 ? ๐1 (๐ก) = (๐ก, −๐ก, ๐ก, −๐ก) and ๐2 (๐ก) = (2๐ก, ๐ก, 0 − 2๐ก) 18.06.03: ‘Length and angle’ Figure 1: Methane Question. What are the angles between the bonds in a molecule of methane? 18.06.03: ‘Length and angle’ The projection of a vector ๐โ onto a vector ๐โ is the vector โ โ ๐ = ๐โ ⋅ ๐ ๐.โ ๐๐โ (๐)โ โ (ฬ ๐ ⋅ ๐)ฬ ๐โ ⋅ ๐โ ๐โ . ๐โ ๐๐โ (๐)โ 18.06.03: ‘Length and angle’ On Wednesday, we will use the dot product repeatedly to convert systems of linear equations into matrices. The first problem set will be online soon.