1 00:00:01,000 --> 00:00:03,000 The following content is provided under a Creative 2 00:00:03,000 --> 00:00:05,000 Commons license. Your support will help MIT 3 00:00:05,000 --> 00:00:08,000 OpenCourseWare continue to offer high quality educational 4 00:00:08,000 --> 00:00:13,000 resources for free. To make a donation or to view 5 00:00:13,000 --> 00:00:18,000 additional materials from hundreds of MIT courses, 6 00:00:18,000 --> 00:00:23,000 visit MIT OpenCourseWare at ocw.mit.edu. 7 00:00:23,000 --> 00:00:25,000 So let's start right away with stuff that we will need to see 8 00:00:25,000 --> 00:00:28,000 before we can go on to more advanced things. 9 00:00:28,000 --> 00:00:31,000 So, hopefully yesterday in recitation, you heard a bit 10 00:00:31,000 --> 00:00:34,000 about vectors. How many of you actually knew 11 00:00:34,000 --> 00:00:39,000 about vectors before that? OK, that's the vast majority. 12 00:00:39,000 --> 00:00:42,000 If you are not one of those people, well, 13 00:00:42,000 --> 00:00:45,000 hopefully you'll learn about vectors right now. 14 00:00:45,000 --> 00:00:48,000 I'm sorry that the learning curve will be a bit steeper for 15 00:00:48,000 --> 00:00:50,000 the first week. But hopefully, 16 00:00:50,000 --> 00:00:55,000 you'll adjust fine. If you have trouble with 17 00:00:55,000 --> 00:00:59,000 vectors, do go to your recitation instructor's office 18 00:00:59,000 --> 00:01:03,000 hours for extra practice if you feel the need to. 19 00:01:03,000 --> 00:01:09,000 You will see it's pretty easy. So, just to remind you, 20 00:01:09,000 --> 00:01:18,000 a vector is a quantity that has both a direction and a magnitude 21 00:01:18,000 --> 00:01:20,000 of length. 22 00:01:33,000 --> 00:01:38,000 So -- So, concretely the way you draw a vector is by some 23 00:01:38,000 --> 00:01:40,000 arrow, like that, OK? 24 00:01:40,000 --> 00:01:43,000 And so, it has a length, and it's pointing in some 25 00:01:43,000 --> 00:01:45,000 direction. And, so, now, 26 00:01:45,000 --> 00:01:49,000 the way that we compute things with vectors, 27 00:01:49,000 --> 00:01:53,000 typically, as we introduce a coordinate system. 28 00:01:53,000 --> 00:01:57,000 So, if we are in the plane, x-y-axis, if we are in space, 29 00:01:57,000 --> 00:02:00,000 x-y-z axis. So, usually I will try to draw 30 00:02:00,000 --> 00:02:04,000 my x-y-z axis consistently to look like this. 31 00:02:04,000 --> 00:02:07,000 And then, I can represent my vector in terms of its 32 00:02:07,000 --> 00:02:10,000 components along the coordinate axis. 33 00:02:10,000 --> 00:02:13,000 So, that means when I have this row, I can ask, 34 00:02:13,000 --> 00:02:15,000 how much does it go in the x direction? 35 00:02:15,000 --> 00:02:17,000 How much does it go in the y direction? 36 00:02:17,000 --> 00:02:20,000 How much does it go in the z direction? 37 00:02:20,000 --> 00:02:25,000 And, so, let's call this a vector A. 38 00:02:25,000 --> 00:02:29,000 So, it's more convention. When we have a vector quantity, 39 00:02:29,000 --> 00:02:32,000 we put an arrow on top to remind us that it's a vector. 40 00:02:32,000 --> 00:02:35,000 If it's in the textbook, then sometimes it's in bold 41 00:02:35,000 --> 00:02:39,000 because it's easier to typeset. If you've tried in your 42 00:02:39,000 --> 00:02:44,000 favorite word processor, bold is easy and vectors are 43 00:02:44,000 --> 00:02:49,000 not easy. So, the vector you can try to 44 00:02:49,000 --> 00:02:56,000 decompose terms of unit vectors directed along the coordinate 45 00:02:56,000 --> 00:02:59,000 axis. So, the convention is there is 46 00:02:59,000 --> 00:03:03,000 a vector that we call ***amp***lt;i***amp***gt; 47 00:03:03,000 --> 00:03:08,000 hat that points along the x axis and has length one. 48 00:03:08,000 --> 00:03:10,000 There's a vector called ***amp***lt;j***amp***gt; 49 00:03:10,000 --> 00:03:12,000 hat that does the same along the y axis, 50 00:03:12,000 --> 00:03:14,000 and the ***amp***lt;k***amp***gt; 51 00:03:14,000 --> 00:03:16,000 hat that does the same along the z axis. 52 00:03:16,000 --> 00:03:20,000 And, so, we can express any vector in terms of its 53 00:03:20,000 --> 00:03:24,000 components. So, the other notation is 54 00:03:24,000 --> 00:03:29,000 ***amp***lt;a1, a2, a3 ***amp***gt; 55 00:03:29,000 --> 00:03:37,000 between these square brackets. Well, in angular brackets. 56 00:03:37,000 --> 00:03:42,000 So, the length of a vector we denote by, if you want, 57 00:03:42,000 --> 00:03:47,000 it's the same notation as the absolute value. 58 00:03:47,000 --> 00:03:50,000 So, that's going to be a number, as we say, 59 00:03:50,000 --> 00:03:54,000 now, a scalar quantity. OK, so, a scalar quantity is a 60 00:03:54,000 --> 00:03:58,000 usual numerical quantity as opposed to a vector quantity. 61 00:03:58,000 --> 00:04:08,000 And, its direction is sometimes called dir A, 62 00:04:08,000 --> 00:04:13,000 and that can be obtained just by scaling the vector down to 63 00:04:13,000 --> 00:04:17,000 unit length, for example, 64 00:04:17,000 --> 00:04:26,000 by dividing it by its length. So -- Well, there's a lot of 65 00:04:26,000 --> 00:04:32,000 notation to be learned. So, for example, 66 00:04:32,000 --> 00:04:37,000 if I have two points, P and Q, then I can draw a 67 00:04:37,000 --> 00:04:42,000 vector from P to Q. And, that vector is called 68 00:04:42,000 --> 00:04:46,000 vector PQ, OK? So, maybe we'll call it A. 69 00:04:46,000 --> 00:04:48,000 But, a vector doesn't really have, necessarily, 70 00:04:48,000 --> 00:04:50,000 a starting point and an ending point. 71 00:04:50,000 --> 00:04:54,000 OK, so if I decide to start here and I go by the same 72 00:04:54,000 --> 00:04:57,000 distance in the same direction, this is also vector A. 73 00:04:57,000 --> 00:05:04,000 It's the same thing. So, a lot of vectors we'll draw 74 00:05:04,000 --> 00:05:08,000 starting at the origin, but we don't have to. 75 00:05:08,000 --> 00:05:19,000 So, let's just check and see how things went in recitation. 76 00:05:19,000 --> 00:05:23,000 So, let's say that I give you the vector 77 00:05:23,000 --> 00:05:34,000 ***amp***lt;3,2,1***amp***gt;. And so, what do you think about 78 00:05:34,000 --> 00:05:46,000 the length of this vector? OK, I see an answer forming. 79 00:05:46,000 --> 00:05:49,000 So, a lot of you are answering the same thing. 80 00:05:49,000 --> 00:05:54,000 Maybe it shouldn't spoil it for those who haven't given it yet. 81 00:05:54,000 --> 00:05:59,000 OK, I think the overwhelming vote is in favor of answer 82 00:05:59,000 --> 00:06:02,000 number two. I see some sixes, I don't know. 83 00:06:02,000 --> 00:06:06,000 That's a perfectly good answer, too, but hopefully in a few 84 00:06:06,000 --> 00:06:10,000 minutes it won't be I don't know anymore. 85 00:06:10,000 --> 00:06:17,000 So, let's see. How do we find -- -- the length 86 00:06:17,000 --> 00:06:24,000 of a vector three, two, one? 87 00:06:24,000 --> 00:06:30,000 Well, so, this vector, A, it comes towards us along 88 00:06:30,000 --> 00:06:37,000 the x axis by three units. It goes to the right along the 89 00:06:37,000 --> 00:06:42,000 y axis by two units, and then it goes up by one unit 90 00:06:42,000 --> 00:06:46,000 along the z axis. OK, so, it's pointing towards 91 00:06:46,000 --> 00:06:51,000 here. That's pretty hard to draw. 92 00:06:51,000 --> 00:06:55,000 So, how do we get its length? Well, maybe we can start with 93 00:06:55,000 --> 00:06:58,000 something easier, the length of the vector in the 94 00:06:58,000 --> 00:07:01,000 plane. So, observe that A is obtained 95 00:07:01,000 --> 00:07:04,000 from a vector, B, in the plane. 96 00:07:04,000 --> 00:07:09,000 Say, B equals three (i) hat plus two (j) hat. 97 00:07:09,000 --> 00:07:15,000 And then, we just have to, still, go up by one unit, 98 00:07:15,000 --> 00:07:17,000 OK? So, let me try to draw a 99 00:07:17,000 --> 00:07:20,000 picture in this vertical plane that contains A and B. 100 00:07:20,000 --> 00:07:23,000 If I draw it in the vertical plane, 101 00:07:23,000 --> 00:07:27,000 so, that's the Z axis, that's not any particular axis, 102 00:07:27,000 --> 00:07:38,000 then my vector B will go here, and my vector A will go above 103 00:07:38,000 --> 00:07:43,000 it. And here, that's one unit. 104 00:07:43,000 --> 00:07:49,000 And, here I have a right angle. So, I can use the Pythagorean 105 00:07:49,000 --> 00:07:57,000 theorem to find that length A^2 equals length B^2 plus one. 106 00:07:57,000 --> 00:08:00,000 Now, we are reduced to finding the length of B. 107 00:08:00,000 --> 00:08:02,000 The length of B, we can again find using the 108 00:08:02,000 --> 00:08:06,000 Pythagorean theorem in the XY plane because here we have the 109 00:08:06,000 --> 00:08:09,000 right angle. Here we have three units, 110 00:08:09,000 --> 00:08:12,000 and here we have two units. OK, so, if you do the 111 00:08:12,000 --> 00:08:15,000 calculations, you will see that, 112 00:08:15,000 --> 00:08:18,000 well, length of B is square root of (3^2 2^2), 113 00:08:18,000 --> 00:08:23,000 that's 13. So, the square root of 13 -- -- 114 00:08:23,000 --> 00:08:32,000 and length of A is square root of length B^2 plus one (square 115 00:08:32,000 --> 00:08:41,000 it if you want) which is going to be square root of 13 plus one 116 00:08:41,000 --> 00:08:49,000 is the square root of 14, hence, answer number two which 117 00:08:49,000 --> 00:08:54,000 almost all of you gave. OK, so the general formula, 118 00:08:54,000 --> 00:09:02,000 if you follow it with it, in general if we have a vector 119 00:09:02,000 --> 00:09:07,000 with components a1, a2, a3, 120 00:09:07,000 --> 00:09:16,000 then the length of A is the square root of a1^2 plus a2^2 121 00:09:16,000 --> 00:09:23,000 plus a3^2. OK, any questions about that? 122 00:09:23,000 --> 00:09:29,000 Yes? Yes. 123 00:09:29,000 --> 00:09:32,000 So, in general, we indeed can consider vectors 124 00:09:32,000 --> 00:09:36,000 in abstract spaces that have any number of coordinates. 125 00:09:36,000 --> 00:09:38,000 And that you have more components. 126 00:09:38,000 --> 00:09:40,000 In this class, we'll mostly see vectors with 127 00:09:40,000 --> 00:09:44,000 two or three components because they are easier to draw, 128 00:09:44,000 --> 00:09:47,000 and because a lot of the math that we'll see works exactly the 129 00:09:47,000 --> 00:09:50,000 same way whether you have three variables or a million 130 00:09:50,000 --> 00:09:52,000 variables. If we had a factor with more 131 00:09:52,000 --> 00:09:55,000 components, then we would have a lot of trouble drawing it. 132 00:09:55,000 --> 00:09:58,000 But we could still define its length in the same way, 133 00:09:58,000 --> 00:10:01,000 by summing the squares of the components. 134 00:10:01,000 --> 00:10:04,000 So, I'm sorry to say that here, multi-variable, 135 00:10:04,000 --> 00:10:07,000 multi will mean mostly two or three. 136 00:10:07,000 --> 00:10:13,000 But, be assured that it works just the same way if you have 137 00:10:13,000 --> 00:10:20,000 10,000 variables. Just, calculations are longer. 138 00:10:20,000 --> 00:10:28,000 OK, more questions? So, what else can we do with 139 00:10:28,000 --> 00:10:31,000 vectors? Well, another thing that I'm 140 00:10:31,000 --> 00:10:35,000 sure you know how to do with vectors is to add them to scale 141 00:10:35,000 --> 00:10:39,000 them. So, vector addition, 142 00:10:39,000 --> 00:10:48,000 so, if you have two vectors, A and B, then you can form, 143 00:10:48,000 --> 00:10:52,000 their sum, A plus B. How do we do that? 144 00:10:52,000 --> 00:10:54,000 Well, first, I should tell you, 145 00:10:54,000 --> 00:10:56,000 vectors, they have this double life. 146 00:10:56,000 --> 00:10:59,000 They are, at the same time, geometric objects that we can 147 00:10:59,000 --> 00:11:02,000 draw like this in pictures, and there are also 148 00:11:02,000 --> 00:11:06,000 computational objects that we can represent by numbers. 149 00:11:06,000 --> 00:11:09,000 So, every question about vectors will have two answers, 150 00:11:09,000 --> 00:11:11,000 one geometric, and one numerical. 151 00:11:11,000 --> 00:11:14,000 OK, so let's start with the geometric. 152 00:11:14,000 --> 00:11:17,000 So, let's say that I have two vectors, A and B, 153 00:11:17,000 --> 00:11:21,000 given to me. And, let's say that I thought 154 00:11:21,000 --> 00:11:24,000 of drawing them at the same place to start with. 155 00:11:24,000 --> 00:11:28,000 Well, to take the sum, what I should do is actually 156 00:11:28,000 --> 00:11:33,000 move B so that it starts at the end of A, at the head of A. 157 00:11:33,000 --> 00:11:38,000 OK, so this is, again, vector B. So, observe, 158 00:11:38,000 --> 00:11:41,000 this actually forms, now, a parallelogram, 159 00:11:41,000 --> 00:11:43,000 right? So, this side is, 160 00:11:43,000 --> 00:11:48,000 again, vector A. And now, if we take the 161 00:11:48,000 --> 00:11:57,000 diagonal of that parallelogram, this is what we call A plus B, 162 00:11:57,000 --> 00:12:00,000 OK, so, the idea being that to move along A plus B, 163 00:12:00,000 --> 00:12:03,000 it's the same as to move first along A and then along B, 164 00:12:03,000 --> 00:12:09,000 or, along B, then along A. A plus B equals B plus A. 165 00:12:09,000 --> 00:12:13,000 OK, now, if we do it numerically, 166 00:12:13,000 --> 00:12:19,000 then all you do is you just add the first component of A with 167 00:12:19,000 --> 00:12:23,000 the first component of B, the second with the second, 168 00:12:23,000 --> 00:12:28,000 and the third with the third. OK, say that A was 169 00:12:28,000 --> 00:12:31,000 ***amp***lt;a1, a2, a3***amp***gt; 170 00:12:31,000 --> 00:12:35,000 B was ***amp***lt;b1, b2, b3***amp***gt;, 171 00:12:35,000 --> 00:12:40,000 then you just add this way. OK, so it's pretty 172 00:12:40,000 --> 00:12:44,000 straightforward. So, for example, 173 00:12:44,000 --> 00:12:48,000 I said that my vector over there, its components are three, 174 00:12:48,000 --> 00:12:54,000 two, one. But, I also wrote it as 3i 2j k. 175 00:12:54,000 --> 00:12:57,000 What does that mean? OK, so I need to tell you first 176 00:12:57,000 --> 00:13:06,000 about multiplying by a scalar. So, this is about addition. 177 00:13:06,000 --> 00:13:11,000 So, multiplication by a scalar, it's very easy. 178 00:13:11,000 --> 00:13:15,000 If you have a vector, A, then you can form a vector 179 00:13:15,000 --> 00:13:20,000 2A just by making it go twice as far in the same direction. 180 00:13:20,000 --> 00:13:24,000 Or, we can make half A more modestly. 181 00:13:24,000 --> 00:13:31,000 We can even make minus A, and so on. 182 00:13:31,000 --> 00:13:35,000 So now, you see, if I do the calculation, 183 00:13:35,000 --> 00:13:38,000 3i 2j k, well, what does it mean? 184 00:13:38,000 --> 00:13:43,000 3i is just going to go along the x axis, but by distance of 185 00:13:43,000 --> 00:13:47,000 three instead of one. And then, 2j goes two units 186 00:13:47,000 --> 00:13:51,000 along the y axis, and k goes up by one unit. 187 00:13:51,000 --> 00:13:54,000 Well, if you add these together, you will go from the 188 00:13:54,000 --> 00:13:58,000 origin, then along the x axis, then parallel to the y axis, 189 00:13:58,000 --> 00:14:02,000 and then up. And, you will end up, 190 00:14:02,000 --> 00:14:05,000 indeed, at the endpoint of a vector. 191 00:14:05,000 --> 00:14:19,000 OK, any questions at this point? Yes? 192 00:14:19,000 --> 00:14:21,000 Exactly. To add vectors geometrically, 193 00:14:21,000 --> 00:14:25,000 you just put the head of the first vector and the tail of the 194 00:14:25,000 --> 00:14:30,000 second vector in the same place. And then, it's head to tail 195 00:14:30,000 --> 00:14:35,000 addition. Any other questions? 196 00:14:35,000 --> 00:14:41,000 Yes? That's correct. 197 00:14:41,000 --> 00:14:43,000 If you subtract two vectors, that just means you add the 198 00:14:43,000 --> 00:14:45,000 opposite of a vector. So, for example, 199 00:14:45,000 --> 00:14:49,000 if I wanted to do A minus B, I would first go along A and 200 00:14:49,000 --> 00:14:52,000 then along minus B, which would take me somewhere 201 00:14:52,000 --> 00:14:55,000 over there, OK? So, A minus B, 202 00:14:55,000 --> 00:15:01,000 if you want, would go from here to here. 203 00:15:01,000 --> 00:15:08,000 OK, so hopefully you've kind of seen that stuff either before in 204 00:15:08,000 --> 00:15:13,000 your lives, or at least yesterday. 205 00:15:13,000 --> 00:15:23,000 So, I'm going to use that as an excuse to move quickly forward. 206 00:15:23,000 --> 00:15:28,000 So, now we are going to learn a few more operations about 207 00:15:28,000 --> 00:15:31,000 vectors. And, these operations will be 208 00:15:31,000 --> 00:15:34,000 useful to us when we start trying to do a bit of geometry. 209 00:15:34,000 --> 00:15:37,000 So, of course, you've all done some geometry. 210 00:15:37,000 --> 00:15:40,000 But, we are going to see that geometry can be done using 211 00:15:40,000 --> 00:15:42,000 vectors. And, in many ways, 212 00:15:42,000 --> 00:15:44,000 it's the right language for that, 213 00:15:44,000 --> 00:15:47,000 and in particular when we learn about functions we really will 214 00:15:47,000 --> 00:15:51,000 want to use vectors more than, maybe, the other kind of 215 00:15:51,000 --> 00:15:54,000 geometry that you've seen before. 216 00:15:54,000 --> 00:15:56,000 I mean, of course, it's just a language in a way. 217 00:15:56,000 --> 00:15:59,000 I mean, we are just reformulating things that you 218 00:15:59,000 --> 00:16:02,000 have seen, you already know since childhood. 219 00:16:02,000 --> 00:16:07,000 But, you will see that notation somehow helps to make it more 220 00:16:07,000 --> 00:16:10,000 straightforward. So, what is dot product? 221 00:16:10,000 --> 00:16:16,000 Well, dot product as a way of multiplying two vectors to get a 222 00:16:16,000 --> 00:16:21,000 number, a scalar. And, well, let me start by 223 00:16:21,000 --> 00:16:25,000 giving you a definition in terms of components. 224 00:16:25,000 --> 00:16:29,000 What we do, let's say that we have a vector, 225 00:16:29,000 --> 00:16:32,000 A, with components a1, a2, a3, vector B with 226 00:16:32,000 --> 00:16:34,000 components b1, b2, b3. 227 00:16:34,000 --> 00:16:38,000 Well, we multiply the first components by the first 228 00:16:38,000 --> 00:16:43,000 components, the second by the second, the third by the third. 229 00:16:43,000 --> 00:16:46,000 If you have N components, you keep going. 230 00:16:46,000 --> 00:16:49,000 And, you sum all of these together. 231 00:16:49,000 --> 00:16:55,000 OK, and important: this is a scalar. 232 00:16:55,000 --> 00:16:59,000 OK, you do not get a vector. You get a number. 233 00:16:59,000 --> 00:17:01,000 I know it sounds completely obvious from the definition 234 00:17:01,000 --> 00:17:03,000 here, but in the middle of the action 235 00:17:03,000 --> 00:17:07,000 when you're going to do complicated problems, 236 00:17:07,000 --> 00:17:14,000 it's sometimes easy to forget. So, that's the definition. 237 00:17:14,000 --> 00:17:17,000 What is it good for? Why would we ever want to do 238 00:17:17,000 --> 00:17:20,000 that? That's kind of a strange 239 00:17:20,000 --> 00:17:23,000 operation. So, probably to see what it's 240 00:17:23,000 --> 00:17:27,000 good for, I should first tell you what it is geometrically. 241 00:17:27,000 --> 00:17:29,000 OK, so what does it do geometrically? 242 00:17:38,000 --> 00:17:42,000 Well, what you do when you multiply two vectors in this 243 00:17:42,000 --> 00:17:45,000 way, I claim the answer is equal to 244 00:17:45,000 --> 00:17:51,000 the length of A times the length of B times the cosine of the 245 00:17:51,000 --> 00:17:59,000 angle between them. So, I have my vector, A, 246 00:17:59,000 --> 00:18:04,000 and if I have my vector, B, and I have some angle between 247 00:18:04,000 --> 00:18:06,000 them, I multiply the length of A 248 00:18:06,000 --> 00:18:10,000 times the length of B times the cosine of that angle. 249 00:18:10,000 --> 00:18:13,000 So, that looks like a very artificial operation. 250 00:18:13,000 --> 00:18:16,000 I mean, why would want to do that complicated multiplication? 251 00:18:16,000 --> 00:18:21,000 Well, the basic answer is it tells us at the same time about 252 00:18:21,000 --> 00:18:25,000 lengths and about angles. And, the extra bonus thing is 253 00:18:25,000 --> 00:18:29,000 that it's very easy to compute if you have components, 254 00:18:29,000 --> 00:18:32,000 see, that formula is actually pretty easy. 255 00:18:32,000 --> 00:18:39,000 So, OK, maybe I should first tell you, how do we get this 256 00:18:39,000 --> 00:18:41,000 from that? Because, you know, 257 00:18:41,000 --> 00:18:44,000 in math, one tries to justify everything to prove theorems. 258 00:18:44,000 --> 00:18:45,000 So, if you want, that's the theorem. 259 00:18:45,000 --> 00:18:47,000 That's the first theorem in 18.02. 260 00:18:47,000 --> 00:18:52,000 So, how do we prove the theorem? How do we check that this is, 261 00:18:52,000 --> 00:18:55,000 indeed, correct using this definition? 262 00:18:55,000 --> 00:19:06,000 So, in more common language, what does this geometric 263 00:19:06,000 --> 00:19:11,000 definition mean? Well, the first thing it means, 264 00:19:11,000 --> 00:19:14,000 before we multiply two vectors, let's start multiplying a 265 00:19:14,000 --> 00:19:17,000 vector with itself. That's probably easier. 266 00:19:17,000 --> 00:19:19,000 So, if we multiply a vector, A, with itself, 267 00:19:19,000 --> 00:19:22,000 using this dot product, so, by the way, 268 00:19:22,000 --> 00:19:24,000 I should point out, we put this dot here. 269 00:19:24,000 --> 00:19:28,000 That's why it's called dot product. 270 00:19:28,000 --> 00:19:33,000 So, what this tells us is we should get the same thing as 271 00:19:33,000 --> 00:19:38,000 multiplying the length of A with itself, so, squared, 272 00:19:38,000 --> 00:19:43,000 times the cosine of the angle. But now, the cosine of an 273 00:19:43,000 --> 00:19:49,000 angle, of zero, cosine of zero you all know is 274 00:19:49,000 --> 00:19:52,000 one. OK, so that's going to be 275 00:19:52,000 --> 00:19:56,000 length A^2. Well, doesn't stand a chance of 276 00:19:56,000 --> 00:19:57,000 being true? Well, let's see. 277 00:19:57,000 --> 00:20:03,000 If we do AdotA using this formula, we will get a1^2 a2^2 278 00:20:03,000 --> 00:20:07,000 a3^2. That is, indeed, 279 00:20:07,000 --> 00:20:14,000 the square of the length. So, check. 280 00:20:14,000 --> 00:20:18,000 That works. OK, now, what about two 281 00:20:18,000 --> 00:20:23,000 different vectors? Can we understand what this 282 00:20:23,000 --> 00:20:27,000 says, and how it relates to that? 283 00:20:27,000 --> 00:20:33,000 So, let's say that I have two different vectors, 284 00:20:33,000 --> 00:20:40,000 A and B, and I want to try to understand what's going on. 285 00:20:40,000 --> 00:20:45,000 So, my claim is that we are going to be able to understand 286 00:20:45,000 --> 00:20:49,000 the relation between this and that in terms of the law of 287 00:20:49,000 --> 00:20:52,000 cosines. So, the law of cosines is 288 00:20:52,000 --> 00:20:56,000 something that tells you about the length of the third side in 289 00:20:56,000 --> 00:21:00,000 the triangle like this in terms of these two sides, 290 00:21:00,000 --> 00:21:07,000 and the angle here. OK, so the law of cosines, 291 00:21:07,000 --> 00:21:11,000 which hopefully you have seen before, says that, 292 00:21:11,000 --> 00:21:14,000 so let me give a name to this side. 293 00:21:14,000 --> 00:21:19,000 Let's call this side C, and as a vector, 294 00:21:19,000 --> 00:21:29,000 C is A minus B. It's minus B plus A. 295 00:21:29,000 --> 00:21:37,000 So, it's getting a bit cluttered here. 296 00:21:37,000 --> 00:21:45,000 So, the law of cosines says that the length of the third 297 00:21:45,000 --> 00:21:53,000 side in this triangle is equal to length A2 plus length B2. 298 00:21:53,000 --> 00:21:56,000 Well, if I stopped here, that would be Pythagoras, 299 00:21:56,000 --> 00:22:01,000 but I don't have a right angle. So, I have a third term which 300 00:22:01,000 --> 00:22:07,000 is twice length A, length B, cosine theta, 301 00:22:07,000 --> 00:22:10,000 OK? Has everyone seen this formula 302 00:22:10,000 --> 00:22:13,000 sometime? I hear some yeah's. 303 00:22:13,000 --> 00:22:16,000 I hear some no's. Well, it's a fact about, 304 00:22:16,000 --> 00:22:19,000 I mean, you probably haven't seen it with vectors, 305 00:22:19,000 --> 00:22:22,000 but it's a fact about the side lengths in a triangle. 306 00:22:22,000 --> 00:22:27,000 And, well, let's say, if you haven't seen it before, 307 00:22:27,000 --> 00:22:32,000 then this is going to be a proof of the law of cosines if 308 00:22:32,000 --> 00:22:39,000 you believe this. Otherwise, it's the other way 309 00:22:39,000 --> 00:22:43,000 around. So, let's try to see how this 310 00:22:43,000 --> 00:22:47,000 relates to what I'm saying about the dot product. 311 00:22:47,000 --> 00:22:54,000 So, I've been saying that length C^2, that's the same 312 00:22:54,000 --> 00:22:56,000 thing as CdotC, OK? 313 00:22:56,000 --> 00:23:01,000 That, we have checked. Now, CdotC, well, 314 00:23:01,000 --> 00:23:06,000 C is A minus B. So, it's A minus B, 315 00:23:06,000 --> 00:23:09,000 dot product, A minus B. 316 00:23:09,000 --> 00:23:11,000 Now, what do we want to do in a situation like that? 317 00:23:11,000 --> 00:23:16,000 Well, we want to expand this into a sum of four terms. 318 00:23:16,000 --> 00:23:19,000 Are we allowed to do that? Well, we have this dot product 319 00:23:19,000 --> 00:23:22,000 that's a mysterious new operation. 320 00:23:22,000 --> 00:23:24,000 We don't really know. Well, the answer is yes, 321 00:23:24,000 --> 00:23:27,000 we can do it. You can check from this 322 00:23:27,000 --> 00:23:31,000 definition that it behaves in the usual way in terms of 323 00:23:31,000 --> 00:23:34,000 expanding, vectoring, and so on. 324 00:23:34,000 --> 00:23:49,000 So, I can write that as AdotA minus AdotB minus BdotA plus 325 00:23:49,000 --> 00:23:55,000 BdotB. So, AdotA is length A^2. 326 00:23:55,000 --> 00:23:56,000 Let me jump ahead to the last term. 327 00:23:56,000 --> 00:24:01,000 BdotB is length B^2, and then these two terms, 328 00:24:01,000 --> 00:24:04,000 well, they're the same. You can check from the 329 00:24:04,000 --> 00:24:07,000 definition that AdotB and BdotA are the same thing. 330 00:24:20,000 --> 00:24:24,000 Well, you see that this term, I mean, this is the only 331 00:24:24,000 --> 00:24:30,000 difference between these two formulas for the length of C. 332 00:24:30,000 --> 00:24:34,000 So, if you believe in the law of cosines, then it tells you 333 00:24:34,000 --> 00:24:39,000 that, yes, this a proof that AdotB equals length A length B 334 00:24:39,000 --> 00:24:41,000 cosine theta. Or, vice versa, 335 00:24:41,000 --> 00:24:45,000 if you've never seen the law of cosines, you are willing to 336 00:24:45,000 --> 00:24:49,000 believe this. Then, this is the proof of the 337 00:24:49,000 --> 00:24:53,000 law of cosines. So, the law of cosines, 338 00:24:53,000 --> 00:24:59,000 or this interpretation, are equivalent to each other. 339 00:24:59,000 --> 00:25:07,000 OK, any questions? Yes? 340 00:25:07,000 --> 00:25:12,000 So, in the second one there isn't a cosine theta because I'm 341 00:25:12,000 --> 00:25:16,000 just expanding a dot product. OK, so I'm just writing C 342 00:25:16,000 --> 00:25:19,000 equals A minus B, and then I'm expanding this 343 00:25:19,000 --> 00:25:22,000 algebraically. And then, I get to an answer 344 00:25:22,000 --> 00:25:24,000 that has an A.B. So then, if I wanted to express 345 00:25:24,000 --> 00:25:27,000 that without a dot product, then I would have to introduce 346 00:25:27,000 --> 00:25:31,000 a cosine. And, I would get the same as 347 00:25:31,000 --> 00:25:34,000 that, OK? So, yeah, if you want, 348 00:25:34,000 --> 00:25:38,000 the next step to recall the law of cosines would be plug in this 349 00:25:38,000 --> 00:25:43,000 formula for AdotB. And then you would have a 350 00:25:43,000 --> 00:25:58,000 cosine. OK, let's keep going. 351 00:25:58,000 --> 00:26:03,000 OK, so what is this good for? Now that we have a definition, 352 00:26:03,000 --> 00:26:06,000 we should figure out what we can do with it. 353 00:26:06,000 --> 00:26:11,000 So, what are the applications of dot product? 354 00:26:11,000 --> 00:26:14,000 Well, will this discover new applications of dot product 355 00:26:14,000 --> 00:26:17,000 throughout the entire semester,but let me tell you at 356 00:26:17,000 --> 00:26:20,000 least about those that are readily visible. 357 00:26:20,000 --> 00:26:33,000 So, one is to compute lengths and angles, especially angles. 358 00:26:33,000 --> 00:26:39,000 So, let's do an example. Let's say that, 359 00:26:39,000 --> 00:26:44,000 for example, I have in space, 360 00:26:44,000 --> 00:26:51,000 I have a point, P, which is at (1,0,0). 361 00:26:51,000 --> 00:26:55,000 I have a point, Q, which is at (0,1,0). 362 00:26:55,000 --> 00:26:58,000 So, it's at distance one here, one here. 363 00:26:58,000 --> 00:27:03,000 And, I have a third point, R at (0,0,2), 364 00:27:03,000 --> 00:27:07,000 so it's at height two. And, let's say that I'm 365 00:27:07,000 --> 00:27:11,000 curious, and I'm wondering what is the angle here? 366 00:27:11,000 --> 00:27:15,000 So, here I have a triangle in space connect P, 367 00:27:15,000 --> 00:27:20,000 Q, and R, and I'm wondering, what is this angle here? 368 00:27:20,000 --> 00:27:23,000 OK, so, of course, one solution is to build a 369 00:27:23,000 --> 00:27:25,000 model and then go and measure the angle. 370 00:27:25,000 --> 00:27:28,000 But, we can do better than that. We can just find the angle 371 00:27:28,000 --> 00:27:32,000 using dot product. So, how would we do that? 372 00:27:32,000 --> 00:27:38,000 Well, so, if we look at this formula, we see, 373 00:27:38,000 --> 00:27:44,000 so, let's say that we want to find the angle here. 374 00:27:44,000 --> 00:27:50,000 Well, let's look at the formula for PQdotPR. 375 00:27:50,000 --> 00:27:56,000 Well, we said it should be length PQ times length PR times 376 00:27:56,000 --> 00:27:59,000 the cosine of the angle, OK? 377 00:27:59,000 --> 00:28:01,000 Now, what do we know, and what do we not know? 378 00:28:01,000 --> 00:28:04,000 Well, certainly at this point we don't know the cosine of the 379 00:28:04,000 --> 00:28:06,000 angle. That's what we would like to 380 00:28:06,000 --> 00:28:08,000 find. The lengths, 381 00:28:08,000 --> 00:28:11,000 certainly we can compute. We know how to find these 382 00:28:11,000 --> 00:28:14,000 lengths. And, this dot product we know 383 00:28:14,000 --> 00:28:17,000 how to compute because we have an easy formula here. 384 00:28:17,000 --> 00:28:20,000 OK, so we can compute everything else and then find 385 00:28:20,000 --> 00:28:25,000 theta. So, I'll tell you what we will 386 00:28:25,000 --> 00:28:31,000 do is we will find theta -- -- in this way. 387 00:28:31,000 --> 00:28:34,000 We'll take the dot product of PQ with PR, and then we'll 388 00:28:34,000 --> 00:28:36,000 divide by the lengths. 389 00:29:14,000 --> 00:29:27,000 OK, so let's see. So, we said cosine theta is 390 00:29:27,000 --> 00:29:33,000 PQdotPR over length PQ length PR. 391 00:29:33,000 --> 00:29:36,000 So, let's try to figure out what this vector, 392 00:29:36,000 --> 00:29:39,000 PQ, well, to go from P to Q, 393 00:29:39,000 --> 00:29:43,000 I should go minus one unit along the x direction plus one 394 00:29:43,000 --> 00:29:46,000 unit along the y direction. And, I'm not moving in the z 395 00:29:46,000 --> 00:29:49,000 direction. So, to go from P to Q, 396 00:29:49,000 --> 00:29:54,000 I have to move by ***amp***lt;-1,1,0***amp***gt;. 397 00:29:54,000 --> 00:29:59,000 To go from P to R, I go -1 along the x axis and 2 398 00:29:59,000 --> 00:30:04,000 along the z axis. So, PR, I claim, is this. 399 00:30:04,000 --> 00:30:12,000 OK, then, the lengths of these vectors, well,(-1)^2 (1)^2 400 00:30:12,000 --> 00:30:19,000 (0)^2, square root, and then same thing with the 401 00:30:19,000 --> 00:30:24,000 other one. OK, so, the denominator will 402 00:30:24,000 --> 00:30:30,000 become the square root of 2, and there's a square root of 5. 403 00:30:30,000 --> 00:30:34,000 What about the numerator? Well, so, remember, 404 00:30:34,000 --> 00:30:37,000 to do the dot product, we multiply this by this, 405 00:30:37,000 --> 00:30:40,000 and that by that, that by that. 406 00:30:40,000 --> 00:30:45,000 And, we add. Minus 1 times minus 1 makes 1 407 00:30:45,000 --> 00:30:49,000 plus 1 times 0, that's 0. 408 00:30:49,000 --> 00:30:55,000 Zero times 2 is 0 again. So, we will get 1 over square 409 00:30:55,000 --> 00:30:59,000 root of 10. That's the cosine of the angle. 410 00:30:59,000 --> 00:31:03,000 And, of course if we want the actual angle, 411 00:31:03,000 --> 00:31:08,000 well, we have to take a calculator, find the inverse 412 00:31:08,000 --> 00:31:12,000 cosine, and you'll find it's about 71.5°. 413 00:31:12,000 --> 00:31:18,000 Actually, we'll be using mostly radians, but for today, 414 00:31:18,000 --> 00:31:26,000 that's certainly more speaking. OK, any questions about that? 415 00:31:26,000 --> 00:31:29,000 No? OK, so in particular, 416 00:31:29,000 --> 00:31:32,000 I should point out one thing that's really neat about the 417 00:31:32,000 --> 00:31:34,000 answer. I mean, we got this number. 418 00:31:34,000 --> 00:31:37,000 We don't really know what it means exactly because it mixes 419 00:31:37,000 --> 00:31:39,000 together the lengths and the angle. 420 00:31:39,000 --> 00:31:41,000 But, one thing that's interesting here, 421 00:31:41,000 --> 00:31:45,000 it's the sign of the answer, the fact that we got a positive 422 00:31:45,000 --> 00:31:48,000 number. So, if you think about it, 423 00:31:48,000 --> 00:31:50,000 the lengths are always positive. 424 00:31:50,000 --> 00:31:56,000 So, the sign of a dot product is the same as a sign of cosine 425 00:31:56,000 --> 00:32:00,000 theta. So, in fact, 426 00:32:00,000 --> 00:32:13,000 the sign of AdotB is going to be positive if the angle is less 427 00:32:13,000 --> 00:32:17,000 than 90°. So, that means geometrically, 428 00:32:17,000 --> 00:32:21,000 my two vectors are going more or less in the same direction. 429 00:32:21,000 --> 00:32:27,000 They make an acute angle. It's going to be zero if the 430 00:32:27,000 --> 00:32:33,000 angle is exactly 90°, OK, because that's when the 431 00:32:33,000 --> 00:32:39,000 cosine will be zero. And, it will be negative if the 432 00:32:39,000 --> 00:32:43,000 angle is more than 90°. So, that means they go, 433 00:32:43,000 --> 00:32:46,000 however, in opposite directions. 434 00:32:46,000 --> 00:32:50,000 So, that's basically one way to think about what dot product 435 00:32:50,000 --> 00:32:54,000 measures. It measures how much the two 436 00:32:54,000 --> 00:32:58,000 vectors are going along each other. 437 00:32:58,000 --> 00:33:02,000 OK, and that actually leads us to the next application. 438 00:33:02,000 --> 00:33:05,000 So, let's see, did I have a number one there? 439 00:33:05,000 --> 00:33:07,000 Yes. So, if I had a number one, 440 00:33:07,000 --> 00:33:12,000 I must have number two. The second application is to 441 00:33:12,000 --> 00:33:16,000 detect orthogonality. It's to figure out when two 442 00:33:16,000 --> 00:33:21,000 things are perpendicular. OK, so orthogonality is just a 443 00:33:21,000 --> 00:33:26,000 complicated word from Greek to say things are perpendicular. 444 00:33:26,000 --> 00:33:34,000 So, let's just take an example. Let's say I give you the 445 00:33:34,000 --> 00:33:41,000 equation x 2y 3z = 0. OK, so that defines a certain 446 00:33:41,000 --> 00:33:46,000 set of points in space, and what do you think the set 447 00:33:46,000 --> 00:33:52,000 of solutions look like if I give you this equation? 448 00:33:52,000 --> 00:34:01,000 So far I see one, two, three answers, 449 00:34:01,000 --> 00:34:06,000 OK. So, I see various competing 450 00:34:06,000 --> 00:34:11,000 answers, but, yeah, I see a lot of people 451 00:34:11,000 --> 00:34:18,000 voting for answer number four. I see also some I don't knows, 452 00:34:18,000 --> 00:34:22,000 and some other things. But, the majority vote seems to 453 00:34:22,000 --> 00:34:26,000 be a plane. And, indeed that's the correct 454 00:34:26,000 --> 00:34:28,000 answer. So, how do we see that it's a 455 00:34:28,000 --> 00:34:28,000 plane? 456 00:34:43,000 --> 00:34:49,000 So, I should say, this is the equation of a 457 00:34:49,000 --> 00:34:52,000 plane. So, there's many ways to see 458 00:34:52,000 --> 00:34:55,000 that, and I'm not going to give you all of them. 459 00:34:55,000 --> 00:34:58,000 But, here's one way to think about it. 460 00:34:58,000 --> 00:35:03,000 So, let's think geometrically about how to express this 461 00:35:03,000 --> 00:35:09,000 condition in terms of vectors. So, let's take the origin O, 462 00:35:09,000 --> 00:35:13,000 by convention is the point (0,0,0). 463 00:35:13,000 --> 00:35:18,000 And, let's take a point, P, that will satisfy this 464 00:35:18,000 --> 00:35:21,000 equation on it, so, at coordinates x, 465 00:35:21,000 --> 00:35:24,000 y, z. So, what does this condition 466 00:35:24,000 --> 00:35:28,000 here mean? Well, it means the following 467 00:35:28,000 --> 00:35:32,000 thing. So, let's take the vector, OP. 468 00:35:32,000 --> 00:35:37,000 OK, so vector OP, of course, has components x, 469 00:35:37,000 --> 00:35:40,000 y, z. Now, we can think of this as 470 00:35:40,000 --> 00:35:44,000 actually a dot product between OP and a mysterious vector that 471 00:35:44,000 --> 00:35:47,000 won't remain mysterious for very long, 472 00:35:47,000 --> 00:35:50,000 namely, the vector one, two, three. 473 00:35:50,000 --> 00:35:59,000 OK, so, this condition is the same as OP.A equals zero, 474 00:35:59,000 --> 00:36:03,000 right? If I take the dot product 475 00:36:03,000 --> 00:36:09,000 OPdotA I get x times one plus y times two plus z times three. 476 00:36:09,000 --> 00:36:14,000 But now, what does it mean that the dot product between OP and A 477 00:36:14,000 --> 00:36:19,000 is zero? Well, it means that OP and A 478 00:36:19,000 --> 00:36:25,000 are perpendicular. OK, so I have this vector, A. 479 00:36:25,000 --> 00:36:28,000 I'm not going to be able to draw it realistically. 480 00:36:28,000 --> 00:36:32,000 Let's say it goes this way. Then, a point, 481 00:36:32,000 --> 00:36:37,000 P, solves this equation exactly when the vector from O to P is 482 00:36:37,000 --> 00:36:40,000 perpendicular to A. And, I claim that defines a 483 00:36:40,000 --> 00:36:41,000 plane. For example, 484 00:36:41,000 --> 00:36:45,000 if it helps you to see it, take a vertical vector. 485 00:36:45,000 --> 00:36:47,000 What does it mean to be perpendicular to the vertical 486 00:36:47,000 --> 00:36:49,000 vector? It means you are horizontal. 487 00:36:49,000 --> 00:36:56,000 It's the horizontal plane. Here, it's a plane that passes 488 00:36:56,000 --> 00:37:05,000 through the origin and is perpendicular to this vector, 489 00:37:05,000 --> 00:37:14,000 A. OK, so what we get is a plane 490 00:37:14,000 --> 00:37:25,000 through the origin perpendicular to A. 491 00:37:25,000 --> 00:37:29,000 And, in general, what you should remember is 492 00:37:29,000 --> 00:37:35,000 that two vectors have a dot product equal to zero if and 493 00:37:35,000 --> 00:37:41,000 only if that's equivalent to the cosine of the angle between them 494 00:37:41,000 --> 00:37:46,000 is zero. That means the angle is 90°. 495 00:37:46,000 --> 00:37:51,000 That means A and B are perpendicular. 496 00:37:51,000 --> 00:37:57,000 So, we have a very fast way of checking whether two vectors are 497 00:37:57,000 --> 00:38:01,000 perpendicular. So, one additional application 498 00:38:01,000 --> 00:38:05,000 I think we'll see actually tomorrow is to find the 499 00:38:05,000 --> 00:38:10,000 components of a vector along a certain direction. 500 00:38:10,000 --> 00:38:13,000 So, I claim we can use this intuition I gave about dot 501 00:38:13,000 --> 00:38:16,000 product telling us how much to vectors go in the same direction 502 00:38:16,000 --> 00:38:19,000 to actually give a precise meaning to the notion of 503 00:38:19,000 --> 00:38:22,000 component for vector, not just along the x, 504 00:38:22,000 --> 00:38:27,000 y, or z axis, but along any direction in 505 00:38:27,000 --> 00:38:31,000 space. So, I think I should probably 506 00:38:31,000 --> 00:38:34,000 stop here. But, I will see you tomorrow at 507 00:38:34,000 --> 00:38:38,000 2:00 here, and we'll learn more about that and about cross 508 00:38:38,000 --> 00:38:44,000 products.