1 00:00:00 --> 00:00:01 2 00:00:01 --> 00:00:02 The following content is provided under a Creative 3 00:00:03 --> 00:00:03 Commons license. 4 00:00:03 --> 00:00:05 Your support will help MIT OpenCourseWare continue to 5 00:00:05 --> 00:00:09 offer high-quality educational resources for free. 6 00:00:09 --> 00:00:11 To make a donation, or to view additional materials from 7 00:00:11 --> 00:00:13 hundreds of MIT courses, visit MIT OpenCourseWare 8 00:00:13 --> 00:00:20 at ocw.mit.edu. 9 00:00:20 --> 00:00:24 PROFESSOR STRANG: OK, so this is a review session with 10 00:00:24 --> 00:00:27 open questions on homework. 11 00:00:27 --> 00:00:31 Open to questions on topics in the exam 12 00:00:31 --> 00:00:34 that's coming tomorrow. 13 00:00:34 --> 00:00:39 This morning I wrote down what the four questions would be 14 00:00:39 --> 00:00:42 about, and I'm glad I did. 15 00:00:42 --> 00:00:46 I never should have done this many times before. 16 00:00:46 --> 00:00:53 So you would know exactly and get down to seeing 17 00:00:53 --> 00:00:54 what those problems are. 18 00:00:54 --> 00:00:58 And of course the matrices called K, and A transpose 19 00:00:58 --> 00:01:05 C A are going to appear probably more than once. 20 00:01:05 --> 00:01:08 So, open for any questions. 21 00:01:08 --> 00:01:11 About any topic whatsoever. 22 00:01:11 --> 00:01:13 Please. 23 00:01:13 --> 00:01:14 Yes, thank you. 24 00:01:14 --> 00:01:16 AUDIENCE: [INAUDIBLE] 25 00:01:16 --> 00:01:18 PROFESSOR STRANG: The fourth question on the exam? 26 00:01:18 --> 00:01:24 AUDIENCE: [INAUDIBLE] 27 00:01:24 --> 00:01:27 PROFESSOR STRANG: I'm glad you used that word, fun. 28 00:01:27 --> 00:01:27 Yes. 29 00:01:27 --> 00:01:29 That's exactly what I mean. 30 00:01:29 --> 00:01:32 Section 2.4, and they are fun, yeah. 31 00:01:32 --> 00:01:36 So I drew by hand a little graph with nodes and edges. 32 00:01:36 --> 00:01:43 And you want to be able to take that first basic step. 33 00:01:43 --> 00:01:48 So the first step, which is as far as we got by last 34 00:01:48 --> 00:01:52 Wednesday, the first lecture on Section 2.4, was just creating 35 00:01:52 --> 00:02:00 the matrix A, understanding A transpose A, and of course 36 00:02:00 --> 00:02:04 there's more to understand about A transpose A. 37 00:02:04 --> 00:02:07 Actually, why don't we take one second. 38 00:02:07 --> 00:02:14 Suppose I have a graph with six nodes, let's say. 39 00:02:14 --> 00:02:16 Can you imagine a graph with six nodes? 40 00:02:16 --> 00:02:19 And every node connected to every other node. 41 00:02:19 --> 00:02:25 So however many edges that would be. 42 00:02:25 --> 00:02:32 Actually, my grandson just got that question on his exam. 43 00:02:32 --> 00:02:36 He was told there were l islands with a flight from 44 00:02:36 --> 00:02:39 every island to every other island, and he was asked how 45 00:02:39 --> 00:02:43 many flights that makes. 46 00:02:43 --> 00:02:45 So I sent him the answer. 47 00:02:45 --> 00:02:51 But I was very happy with his reply. 48 00:02:51 --> 00:02:58 He said "that's exactly what I got." So, what do you know. 49 00:02:58 --> 00:02:59 It seems to work. 50 00:02:59 --> 00:03:01 So anyway. 51 00:03:01 --> 00:03:04 Suppose we had, how many nodes did I say? six? 52 00:03:04 --> 00:03:05 OK. 53 00:03:05 --> 00:03:12 So we have like a six node, so n is six, and it's a complete 54 00:03:12 --> 00:03:18 graph, this is really just to start us off talking about 55 00:03:18 --> 00:03:19 some of these problems. 56 00:03:19 --> 00:03:24 So the matrix A, so I think it would be 15, where did I 57 00:03:24 --> 00:03:27 come up with that number 15? 58 00:03:27 --> 00:03:29 And is it right, actually? 59 00:03:29 --> 00:03:31 Yes. 60 00:03:31 --> 00:03:34 This is one way, would be the first node has five edges going 61 00:03:34 --> 00:03:40 out and then the second node would have four additional 62 00:03:40 --> 00:03:42 edges, and three and two and one. 63 00:03:42 --> 00:03:45 And five, four, three, two, one add to 15. 64 00:03:45 --> 00:03:51 So would be the shape of A in that case? 65 00:03:51 --> 00:03:54 So it has a row for every edge. 66 00:03:54 --> 00:03:57 So 15 by six, I think. 67 00:03:57 --> 00:04:07 OK, and I could create A transpose A just to 68 00:04:07 --> 00:04:08 have a look at it. 69 00:04:08 --> 00:04:12 So it would be, what shape what A transpose A be? 70 00:04:12 --> 00:04:16 Six by six, symmetric, of course. 71 00:04:16 --> 00:04:19 Will it be singular or non singular? 72 00:04:19 --> 00:04:20 Singular. 73 00:04:20 --> 00:04:22 Singular, because we haven't grounded any nodes. 74 00:04:22 --> 00:04:25 We've got all these nodes, all these edges, nothing. 75 00:04:25 --> 00:04:28 We haven't taken out that column; when I reduce it 76 00:04:28 --> 00:04:31 to five by five, then it'll be invertible. 77 00:04:31 --> 00:04:37 But six by six, so what will be the diagonal of this? 78 00:04:37 --> 00:04:43 This'll be now six by six, the the size will be six by six. 79 00:04:43 --> 00:04:47 And what will go on the diagonal is the degrees 80 00:04:47 --> 00:04:49 of every node. 81 00:04:49 --> 00:04:51 That means how many edges are coming in, and 82 00:04:51 --> 00:04:52 what number is that? 83 00:04:52 --> 00:04:53 Five. 84 00:04:53 --> 00:04:58 So I'll have five down the diagonal, and what else, what 85 00:04:58 --> 00:05:01 will be off the diagonal? 86 00:05:01 --> 00:05:04 Minus, a whole lot of minus ones, a minus one above 87 00:05:04 --> 00:05:06 and below for every edge. 88 00:05:06 --> 00:05:10 And since we have a complete graph, how many minus 89 00:05:10 --> 00:05:12 ones have we got? 90 00:05:12 --> 00:05:13 All of them. 91 00:05:13 --> 00:05:14 All minus ones. 92 00:05:14 --> 00:05:27 So all minus ones and all minus ones. 93 00:05:27 --> 00:05:33 That's fine to cross over if you need to, sure. 94 00:05:33 --> 00:05:36 I'm not sure what else to say about that matrix. 95 00:05:36 --> 00:05:38 Well, it's not invertible. 96 00:05:38 --> 00:05:43 Now let's take the next step which, I'm now going probably 97 00:05:43 --> 00:05:47 beyond the exam part. 98 00:05:47 --> 00:05:52 Just really to get us started, I ground the six nodes, suppose 99 00:05:52 --> 00:05:56 I ground node number six, that wipes out a row and 100 00:05:56 --> 00:05:57 a column, is that right? 101 00:05:57 --> 00:06:01 So I'm now left with a five by five matrix. 102 00:06:01 --> 00:06:04 It still has all minus ones there and there, but now it's 103 00:06:04 --> 00:06:07 five by five, now it is what kind of a matrix, what 104 00:06:07 --> 00:06:09 are its properties? 105 00:06:09 --> 00:06:14 Square, obviously, symmetric obviously, and now invertible. 106 00:06:14 --> 00:06:17 Positive definitely, OK. 107 00:06:17 --> 00:06:20 So it's fives there and now I would have five minus ones. 108 00:06:20 --> 00:06:23 Let's just write them in here. 109 00:06:23 --> 00:06:27 Typical row, now in this five by five matrix would have four 110 00:06:27 --> 00:06:31 minus ones and of course more here, and more here, 111 00:06:31 --> 00:06:33 and one there. 112 00:06:33 --> 00:06:38 And symmetric. 113 00:06:38 --> 00:06:41 All I want to say is that that matrix, we don't often write 114 00:06:41 --> 00:06:46 down the inverses of matrices, but that one I think we could. 115 00:06:46 --> 00:06:49 I think we could actually, and it's a little bit interesting 116 00:06:49 --> 00:06:54 to know, for that special matrix, everything about it. 117 00:06:54 --> 00:06:58 We could find its eigenvalues, its determinate, its 118 00:06:58 --> 00:07:01 pivots, the whole works for that matrix. 119 00:07:01 --> 00:07:05 And that's one page of the book, maybe at the end of 120 00:07:05 --> 00:07:11 Section 2.4, I think, comes more detail about that matrix. 121 00:07:11 --> 00:07:19 So in a way that special guy is like our special K matrix -1, 122 00:07:19 --> 00:07:22 2, -1 for second differences. 123 00:07:22 --> 00:07:27 Somehow this is taking, all nodes are connected. 124 00:07:27 --> 00:07:31 Instead of in a line, springs in a line, points in a 125 00:07:31 --> 00:07:35 line, we now have everybody connected to everybody. 126 00:07:35 --> 00:07:39 So this is sort of the special matrix when everybody is 127 00:07:39 --> 00:07:42 connected to everybody and we could learn all about 128 00:07:42 --> 00:07:43 that particular one. 129 00:07:43 --> 00:07:48 But then, of course, if some edges are not in then some 130 00:07:48 --> 00:07:52 zeroes will appear off the diagonal in adjacent 131 00:07:52 --> 00:07:54 C matrix part. 132 00:07:54 --> 00:07:58 The degrees will drop a little if we're missing some edges and 133 00:07:58 --> 00:08:03 the inverse will be not some simple expression. 134 00:08:03 --> 00:08:05 Anyway, that's to get us started. 135 00:08:05 --> 00:08:14 So that's really where the last lecture, Friday, 136 00:08:14 --> 00:08:16 brought us to this point. 137 00:08:16 --> 00:08:21 And I'll take this chance to add in the block matrix just 138 00:08:21 --> 00:08:24 because I think of it as quite important. 139 00:08:24 --> 00:08:26 So for this case, C is the identity. 140 00:08:26 --> 00:08:31 So I would have the identity up in that block, A in that block, 141 00:08:31 --> 00:08:33 A transpose in this block. 142 00:08:33 --> 00:08:39 That would be my mixed method matrix, you could say. 143 00:08:39 --> 00:08:42 My saddle point matrix. 144 00:08:42 --> 00:08:45 It starts out very positive, definite. 145 00:08:45 --> 00:08:48 But it ends up negative definite. 146 00:08:48 --> 00:08:52 And that's typical of mixed methods, when both unknowns, 147 00:08:52 --> 00:08:58 the currents as well as the potentials, are included 148 00:08:58 --> 00:08:59 in the system. 149 00:08:59 --> 00:09:04 So A transpose w, that was f, I think, and this is b. 150 00:09:04 --> 00:09:09 I just mentioned that again, it was in Friday's lecture and 151 00:09:09 --> 00:09:13 it's in the book but I would just want to say I often refer 152 00:09:13 --> 00:09:17 to this as the fundamental problem of numerical analysis, 153 00:09:17 --> 00:09:20 is how do you solve that system. 154 00:09:20 --> 00:09:23 And of course elimination is one way to do it. 155 00:09:23 --> 00:09:28 When I eliminate w, that will lead me to the equation A 156 00:09:28 --> 00:09:34 transpose Au equals, I think it'll be, there'll be an A 157 00:09:34 --> 00:09:39 transpose b minus f, I think. 158 00:09:39 --> 00:09:41 C being the identity there. 159 00:09:41 --> 00:09:43 So that's the mixed method, this is the displacement 160 00:09:43 --> 00:09:47 method, and this is the popular one. 161 00:09:47 --> 00:09:49 Because it's all at once. 162 00:09:49 --> 00:09:55 But people think about this one, too. 163 00:09:55 --> 00:10:00 So that's like saying what was in Friday's lecture and 164 00:10:00 --> 00:10:04 will be used going forward. 165 00:10:04 --> 00:10:06 OK, that was just to get us started. 166 00:10:06 --> 00:10:12 Now, please let's have some questions. 167 00:10:12 --> 00:10:14 We need another question. 168 00:10:14 --> 00:10:15 Who else? 169 00:10:15 --> 00:10:16 Yes, thank you. 170 00:10:16 --> 00:10:18 AUDIENCE: [INAUDIBLE] 171 00:10:18 --> 00:10:19 PROFESSOR STRANG: The first one in the homework. 172 00:10:19 --> 00:10:23 What number was that? 173 00:10:23 --> 00:10:27 Section 2.2, number six? 174 00:10:27 --> 00:10:30 About the trapezoidal rule? 175 00:10:30 --> 00:10:31 Yes. 176 00:10:31 --> 00:10:38 OK, now I did speak about that a little in the last review 177 00:10:38 --> 00:10:42 session, but can I just say a couple words more 178 00:10:42 --> 00:10:43 about it here? 179 00:10:43 --> 00:10:44 AUDIENCE: [INAUDIBLE] 180 00:10:44 --> 00:10:45 PROFESSOR STRANG: What's it asking? 181 00:10:45 --> 00:10:48 Yes. 182 00:10:48 --> 00:10:50 People often ask me that about my problems. 183 00:10:50 --> 00:10:54 I don't know. 184 00:10:54 --> 00:10:55 You can't read my mind? 185 00:10:55 --> 00:10:56 You should. 186 00:10:56 --> 00:11:04 OK, so the point is that for special differential equations, 187 00:11:04 --> 00:11:07 so let me just summarize what we did there. 188 00:11:07 --> 00:11:10 So this we did before, but I didn't do everything. 189 00:11:10 --> 00:11:18 So what we did before was point out that the system du/dt=Au, 190 00:11:18 --> 00:11:27 conserves energy. u squared, u of time, for all time, u of 191 00:11:27 --> 00:11:37 time squared stays constant if A transpose equals minus A. 192 00:11:37 --> 00:11:43 OK, essentially you take the derivative, it's got two terms 193 00:11:43 --> 00:11:47 because we've got a product there, a product rule. 194 00:11:47 --> 00:11:52 The derivative will be, one term will involve a, the other 195 00:11:52 --> 00:11:56 term will involve A transpose, if out matrix has this 196 00:11:56 --> 00:11:59 antisymmetric property, those terms will cancel; the 197 00:11:59 --> 00:12:01 derivative will be zero, and that'll mean that 198 00:12:01 --> 00:12:03 this is a constant. 199 00:12:03 --> 00:12:06 OK, so that's the differential equation. 200 00:12:06 --> 00:12:09 Now, the question was about the difference equation. 201 00:12:09 --> 00:12:15 So we're taking the trapezoidal rule and we want to show that 202 00:12:15 --> 00:12:22 un squared stays constant for the trapezoidal rule. 203 00:12:22 --> 00:12:30 And so what that means, in other words is step by step, 204 00:12:30 --> 00:12:39 U_(n+1), and I could write it U_(n+1) squared, but the other 205 00:12:39 --> 00:12:43 way to write that and the way we have to work with it 206 00:12:43 --> 00:12:47 is that is the same. 207 00:12:47 --> 00:12:51 Now, that was just an identity, that's just the meaning. 208 00:12:51 --> 00:12:56 Now, I want to show that that's the key. 209 00:12:56 --> 00:12:59 That's what we would want to prove. 210 00:12:59 --> 00:13:04 That the trapezoidal rule copies the property of 211 00:13:04 --> 00:13:08 constant energy of the differential equations. 212 00:13:08 --> 00:13:12 And of course, you know that in oscillating springs when 213 00:13:12 --> 00:13:17 there's no source, no forces coming from outside the total 214 00:13:17 --> 00:13:19 energy will stay constant. 215 00:13:19 --> 00:13:22 And you could think of many other situations. 216 00:13:22 --> 00:13:26 You have a spacecraft, where you've turned off the engines. 217 00:13:26 --> 00:13:29 It's just going there, it's possibly rotating. 218 00:13:29 --> 00:13:36 So there you've got angular velocity included in 219 00:13:36 --> 00:13:37 the total energy. 220 00:13:37 --> 00:13:41 Important fact, if energy stays constant you want to know it. 221 00:13:41 --> 00:13:44 And you're very happy if the finite difference 222 00:13:44 --> 00:13:46 method copies it. 223 00:13:46 --> 00:13:54 OK, so then it was just a question of here we took 224 00:13:54 --> 00:13:56 derivatives to do that one. 225 00:13:56 --> 00:13:59 Here we're going to be playing with differences, and my 226 00:13:59 --> 00:14:07 suggestion was that the good way to get it was to take that 227 00:14:07 --> 00:14:16 vector times the trapezoidal equation and show that this 228 00:14:16 --> 00:14:20 turned out to, the trapezoidal equation is something equals 229 00:14:20 --> 00:14:25 zero, and you hope, and it takes a few lines of jiggling 230 00:14:25 --> 00:14:31 around, that when you do that you'll get the difference. 231 00:14:31 --> 00:14:32 You get exactly this. 232 00:14:32 --> 00:14:39 You get U_(n+1) transpose U_(n+1) minus U_n 233 00:14:39 --> 00:14:41 transpose U_n. 234 00:14:41 --> 00:14:44 That's the goal. 235 00:14:44 --> 00:14:47 We know that the trapezoidal equation, maybe I move 236 00:14:47 --> 00:14:51 everything onto one side so I have something equals zero, 237 00:14:51 --> 00:14:57 then my trick is take that vector equation, multiply by 238 00:14:57 --> 00:15:03 that, play around with those terms and you'll get this. 239 00:15:03 --> 00:15:07 So, since that is zero, this is zero. 240 00:15:07 --> 00:15:11 And that's exactly what our goal was to prove. 241 00:15:11 --> 00:15:14 So it's just in the jiggling around and maybe we don't 242 00:15:14 --> 00:15:18 want to take the full time because I'll post that. 243 00:15:18 --> 00:15:22 Actually, I may post some of these solutions 244 00:15:22 --> 00:15:24 even before the quiz. 245 00:15:24 --> 00:15:27 And therefore before the homework is due, just because 246 00:15:27 --> 00:15:32 this particular homework, as I say, is not, the graders are 247 00:15:32 --> 00:15:39 just going to be so busy with all the quizzes. 248 00:15:39 --> 00:15:40 This is for learning. 249 00:15:40 --> 00:15:43 Now, here's the one thing you want to learn out of 250 00:15:43 --> 00:15:46 this messy computation. 251 00:15:46 --> 00:15:55 And also have a term, you'll also find a term U_n, when you 252 00:15:55 --> 00:15:59 just do this mechanically, you'll find a U_(n+1) transpose 253 00:15:59 --> 00:16:07 U_n, and you'll find a U_n transpose U_(n+1), and they'll 254 00:16:07 --> 00:16:10 come in with opposite signs. 255 00:16:10 --> 00:16:13 That'll be when you've plugged in the fact that A transpose 256 00:16:13 --> 00:16:19 equals minus A, and all I wanted to do is ask you, what 257 00:16:19 --> 00:16:20 does that term amount to? 258 00:16:20 --> 00:16:23 Because that term will show up. 259 00:16:23 --> 00:16:24 One way or another. 260 00:16:24 --> 00:16:26 And what does it equal? 261 00:16:26 --> 00:16:27 Zero. 262 00:16:27 --> 00:16:28 Everybody should know that. 263 00:16:28 --> 00:16:32 That's the one thing, if you have to add to just 264 00:16:32 --> 00:16:37 mechanically computing is the fact that the dot product of 265 00:16:37 --> 00:16:42 that vector with that, v transpose w is the same 266 00:16:42 --> 00:16:46 as w transpose v. 267 00:16:46 --> 00:16:49 So, it's good to just call attention to the easy 268 00:16:49 --> 00:16:51 things that are like that. 269 00:16:51 --> 00:16:53 Why is that? 270 00:16:53 --> 00:16:59 That's because both sides, this is equal to what? v_1*w_1, 271 00:16:59 --> 00:17:03 v_2*w_2, v_3*w_3, component by component. 272 00:17:03 --> 00:17:04 And this is w_1*v_1. 273 00:17:05 --> 00:17:08 But we're just talking numbers at that point. 274 00:17:08 --> 00:17:10 So the numbers of v_1 times w_1 are certainly the 275 00:17:10 --> 00:17:12 same as w_1 times v_1. 276 00:17:12 --> 00:17:16 Every component by component, they're exactly the same and 277 00:17:16 --> 00:17:19 of course then the dot products are the same. 278 00:17:19 --> 00:17:27 So that's the fact which for this v and that w, make the 279 00:17:27 --> 00:17:31 term go away, that's still sitting there. 280 00:17:31 --> 00:17:35 Other terms go away because of this property. 281 00:17:35 --> 00:17:40 Having written that and recognizing that we have 282 00:17:40 --> 00:17:46 Fourier stuff coming up in the last third of the course, where 283 00:17:46 --> 00:17:48 we have complex numbers. 284 00:17:48 --> 00:17:57 I have to say that if when I have complex vectors, 285 00:17:57 --> 00:18:01 do you know about those? 286 00:18:01 --> 00:18:06 The dot product, or the length squared, if this was a vector 287 00:18:06 --> 00:18:10 of complex, with possibly complex numbers, I wouldn't 288 00:18:10 --> 00:18:14 take the length squared just by adding up these squares. 289 00:18:14 --> 00:18:19 Suppose, my, yes, I'm really anticipating weeks ahead, but 290 00:18:19 --> 00:18:23 suppose my vector was . 291 00:18:23 --> 00:18:27 What's the length of that particular vector, v? 292 00:18:27 --> 00:18:31 Well, if I do v transpose v, what do I get? 293 00:18:31 --> 00:18:36 For v equals , what does v transpose v turn out to be? 294 00:18:36 --> 00:18:37 Zero. 295 00:18:37 --> 00:18:40 One squared plus i squared is zero. 296 00:18:40 --> 00:18:41 No good. 297 00:18:41 --> 00:18:45 So obviously some rule has to change a little bit to 298 00:18:45 --> 00:18:46 get the correct number. 299 00:18:46 --> 00:18:51 The correct length squared, I would rather expect two. 300 00:18:51 --> 00:18:54 The size of that squared plus the size of that squared. 301 00:18:54 --> 00:18:56 So I don't want to square i, I want to square 302 00:18:56 --> 00:18:58 its absolute value. 303 00:18:58 --> 00:19:01 And the way to do that is conjugate one 304 00:19:01 --> 00:19:03 of the two things. 305 00:19:03 --> 00:19:08 Now I'm taking , and on the other side I have 306 00:19:08 --> 00:19:11 and that gives me the two that I want. 307 00:19:11 --> 00:19:18 So what I'm doing, when I've got complex vectors then I 308 00:19:18 --> 00:19:23 would really do that, and now that is not the same as that. 309 00:19:23 --> 00:19:24 Right. yeah. 310 00:19:24 --> 00:19:31 If in one case if I'm doing the conjugate of v and the other 311 00:19:31 --> 00:19:33 case it's the conjugate of w, then I've got a 312 00:19:33 --> 00:19:35 complex conjugate. 313 00:19:35 --> 00:19:41 OK, that's a throwaway comment that just is relevant because 314 00:19:41 --> 00:19:47 it keeps us focused for a moment on the real case, 315 00:19:47 --> 00:19:52 where we do have equals. 316 00:19:52 --> 00:19:55 Now, I don't know if that was sufficient answer? 317 00:19:55 --> 00:19:59 It wasn't a complete answer because I didn't do the 318 00:19:59 --> 00:20:04 manipulations, but the solutions posted should 319 00:20:04 --> 00:20:06 show you those. 320 00:20:06 --> 00:20:08 And, of course, you can organize them a 321 00:20:08 --> 00:20:09 little different. 322 00:20:09 --> 00:20:11 OK, good for that one. 323 00:20:11 --> 00:20:12 Yes, please. 324 00:20:12 --> 00:20:16 AUDIENCE: [INAUDIBLE] 325 00:20:16 --> 00:20:18 PROFESSOR STRANG: The other two terms here? 326 00:20:18 --> 00:20:22 AUDIENCE: [INAUDIBLE] 327 00:20:22 --> 00:20:25 PROFESSOR STRANG: Yes. 328 00:20:25 --> 00:20:28 You couldn't cancel them. 329 00:20:28 --> 00:20:34 Well, I recommend just, that's how the best mathematics 330 00:20:34 --> 00:20:35 is done, right? 331 00:20:35 --> 00:20:39 You want zero, you just x it out. 332 00:20:39 --> 00:20:40 Anyway. 333 00:20:40 --> 00:20:44 Let me leave the posted solutions to be a hint 334 00:20:44 --> 00:20:46 and come back to it. 335 00:20:46 --> 00:20:47 Yeah. 336 00:20:47 --> 00:20:52 AUDIENCE: [INAUDIBLE] 337 00:20:52 --> 00:20:54 PROFESSOR STRANG: The next problem was? 338 00:20:54 --> 00:20:56 AUDIENCE: [INAUDIBLE] 339 00:20:56 --> 00:20:58 PROFESSOR STRANG: Oh, yes. 340 00:20:58 --> 00:21:03 OK, that one I spoke a little bit about, but now let me read 341 00:21:03 --> 00:21:08 from the problem set that I got. 342 00:21:08 --> 00:21:12 I noticed that was quite brief. 343 00:21:12 --> 00:21:16 Oh, to find that actual angle? 344 00:21:16 --> 00:21:20 Somehow that's a little interesting, isn't it? 345 00:21:20 --> 00:21:24 AUDIENCE: [INAUDIBLE] 346 00:21:24 --> 00:21:28 PROFESSOR STRANG: To tell the truth, I meant numerically. 347 00:21:28 --> 00:21:33 I meant, what's the point of that question. 348 00:21:33 --> 00:21:38 The point is we're trying to solve, this isn't a big deal. 349 00:21:38 --> 00:21:44 But it was just if we're using this trapezoidal method, the 350 00:21:44 --> 00:21:50 beauty of that exactly what our thing proves is, here the 351 00:21:50 --> 00:21:54 constant energy surface is the circle. 352 00:21:54 --> 00:21:57 The point of the trapezoidal method for this simple equation 353 00:21:57 --> 00:22:07 u''+u=0, which amounted to the equation uv' equals something 354 00:22:07 --> 00:22:17 like, our a matrix was antisymmetric. 355 00:22:17 --> 00:22:20 So it fit perfectly in that problem, and if we 356 00:22:20 --> 00:22:23 started on the circle we stay on the circle. 357 00:22:23 --> 00:22:28 And if I take 32 steps I come back pretty closely to here, 358 00:22:28 --> 00:22:33 and I just thought it might be fun to figure out numerically, 359 00:22:33 --> 00:22:38 with MATLAB or a calculator or something, we take an angle, 360 00:22:38 --> 00:22:43 theta, is that what the problem asks, and then come around here 361 00:22:43 --> 00:22:49 to 32 theta, and 32 theta will not be exactly 2pi. 362 00:22:49 --> 00:22:51 But darned close. 363 00:22:51 --> 00:22:53 Because you could see in the figure in the book 364 00:22:53 --> 00:22:56 it wasn't too far off. 365 00:22:56 --> 00:22:59 So the question was, what is that theta? 366 00:22:59 --> 00:23:05 So I think that the formula turned out to be that each step 367 00:23:05 --> 00:23:12 multiplied by this one plus i delta t, or h on two divided by 368 00:23:12 --> 00:23:15 one minus i delta t over two. 369 00:23:15 --> 00:23:24 And when you plug in delta t to be 2pi over 32, so that's the, 370 00:23:24 --> 00:23:28 what did I say, that's the tangent of theta or something? 371 00:23:28 --> 00:23:32 Sorry, I've forgotten the way the problem was put. 372 00:23:32 --> 00:23:38 Oh, it's e to the i theta, yeah. 373 00:23:38 --> 00:23:41 What's the main point about that complex number? 374 00:23:41 --> 00:23:44 When you look at that complex number what's the most 375 00:23:44 --> 00:23:47 essential thing you see? 376 00:23:47 --> 00:23:49 That it, yeah, tell me again. 377 00:23:49 --> 00:23:50 AUDIENCE: [INAUDIBLE] 378 00:23:50 --> 00:23:52 PROFESSOR STRANG: Magnitude one, great. 379 00:23:52 --> 00:23:55 It's a number divided by its complex conjugate, so it's 380 00:23:55 --> 00:23:57 a number of magnitude one. 381 00:23:57 --> 00:24:01 And now tell me, if you see a complex number of magnitude 382 00:24:01 --> 00:24:03 one, what jumps to mind? 383 00:24:03 --> 00:24:07 What form do you naturally put it in? e^(i*theta). 384 00:24:07 --> 00:24:10 385 00:24:10 --> 00:24:14 Every complex number of absolute value one is just 386 00:24:14 --> 00:24:16 beautifully written in the form e^(i*theta). 387 00:24:16 --> 00:24:19 388 00:24:19 --> 00:24:23 That complex number is some point on the unit 389 00:24:23 --> 00:24:24 circle, so there it is. 390 00:24:24 --> 00:24:26 Right there, there it is, e^(i*theta). 391 00:24:28 --> 00:24:32 With that, theta is negative there, because we're 392 00:24:32 --> 00:24:33 going the wrong way. 393 00:24:33 --> 00:24:35 No big deal. 394 00:24:35 --> 00:24:38 Maybe here theta's positive. 395 00:24:38 --> 00:24:45 I've forgotten, so I won't try to go either the clockwise or 396 00:24:45 --> 00:24:47 the counterclockwise way around. 397 00:24:47 --> 00:24:51 So, if I wanted to figure out what theta was and plugged 398 00:24:51 --> 00:24:54 in these things, let's see. 399 00:24:54 --> 00:25:03 So that's pi over 32, delta t over two would be pi over 32, 400 00:25:03 --> 00:25:11 and this guy would be its conjugate. pi over 32, and then 401 00:25:11 --> 00:25:16 in this solution that'll be plugged on the homework this 402 00:25:16 --> 00:25:28 will be, I think maybe, the theta comes out to be, it's 403 00:25:28 --> 00:25:34 kind of cool actually, twice the arc tangent of pi 404 00:25:34 --> 00:25:37 over 32 or something. 405 00:25:37 --> 00:25:38 I didn't know that. 406 00:25:38 --> 00:25:44 But that'll be in the solutions for you to check. 407 00:25:44 --> 00:25:50 So now, why do I like e^(i*theta) so much? 408 00:25:50 --> 00:25:54 Because now I could tell you what this point is, after 409 00:25:54 --> 00:25:56 you've done it 32 times. 410 00:25:56 --> 00:25:59 What's angle have you reached? 411 00:25:59 --> 00:26:04 This is the crunch line of using complex numbers, 412 00:26:04 --> 00:26:08 e^(i*theta), is that they're absolutely great 413 00:26:08 --> 00:26:09 for taking powers. 414 00:26:09 --> 00:26:15 If I take the 32nd power of x plus iy, I'm lost, right. x 415 00:26:15 --> 00:26:20 plus iy to the 32nd power starts out x^(32), ends 416 00:26:20 --> 00:26:24 up i^(32), y^(32), with horrible stuff in between. 417 00:26:24 --> 00:26:28 But what is the 32nd power of e^(i*theta)? 418 00:26:30 --> 00:26:30 e^(i*32theta). 419 00:26:30 --> 00:26:33 420 00:26:33 --> 00:26:37 Just that angle 32 times exactly as we've drawn it. 421 00:26:37 --> 00:26:39 So that's the point e^(i*32theta). 422 00:26:39 --> 00:26:42 423 00:26:42 --> 00:26:49 OK, and therefore if we now know what theta is, so yeah. 424 00:26:49 --> 00:26:55 So it must be pretty near 2pi, but not exactly. 425 00:26:55 --> 00:26:59 I guess that's about right. 426 00:26:59 --> 00:27:04 In fact, having got this far, the tangent of a very small 427 00:27:04 --> 00:27:09 angle is approximately what? 428 00:27:09 --> 00:27:11 It's approximately the angle, right? 429 00:27:11 --> 00:27:14 The sine of a very small angle is approximately the angle. 430 00:27:14 --> 00:27:16 The cosine is approximately one. 431 00:27:16 --> 00:27:19 The tangent is approximately the angle. 432 00:27:19 --> 00:27:26 So this, 32 theta, is 32 times two times approximately 433 00:27:26 --> 00:27:28 the angle. 434 00:27:28 --> 00:27:33 And what answer do you get? 435 00:27:33 --> 00:27:35 2pi. 436 00:27:35 --> 00:27:38 Which makes sense. 437 00:27:38 --> 00:27:47 So you could say what the trapezoidal method has done is 438 00:27:47 --> 00:27:52 to replace the exact angle by the inverse tangent 439 00:27:52 --> 00:27:53 approximately. 440 00:27:53 --> 00:27:56 That's sort of nice. 441 00:27:56 --> 00:27:59 In this example you can get as far as that and you 442 00:27:59 --> 00:28:03 could actually find out how near that is. 443 00:28:03 --> 00:28:06 And, by the way, how near what I expected it to be. 444 00:28:06 --> 00:28:11 I would expect it, so what do we know about the 445 00:28:11 --> 00:28:16 trapezoidal method without having proved it? 446 00:28:16 --> 00:28:19 It's second order accurate, right? 447 00:28:19 --> 00:28:23 If it was first order accurate, I would expect it to miss by 448 00:28:23 --> 00:28:26 something of the size of theta. 449 00:28:26 --> 00:28:28 Maybe a fraction of theta. 450 00:28:28 --> 00:28:30 But being second order accurate, I'm expecting 451 00:28:30 --> 00:28:34 it to miss by something of size theta squared. 452 00:28:34 --> 00:28:40 So it would be pretty near zero, right. 453 00:28:40 --> 00:28:46 And actually, another way I know it, around, and so the 454 00:28:46 --> 00:28:50 error would be something like, it would have a 32 squared 455 00:28:50 --> 00:28:51 in the denominator. 456 00:28:51 --> 00:28:59 And I've just thought of another way to see that. 457 00:28:59 --> 00:29:02 We just said that the first term in the arc tangent of a 458 00:29:02 --> 00:29:07 small angle, theta, of a small angle, alpha, whatever that is, 459 00:29:07 --> 00:29:11 pi over 32, the first term in the arc tangent is? 460 00:29:11 --> 00:29:12 The angle. 461 00:29:12 --> 00:29:14 That's what we just said. 462 00:29:14 --> 00:29:16 Then, do you know what would come next? 463 00:29:16 --> 00:29:20 Now we're looking at the error. 464 00:29:20 --> 00:29:27 So that of a very small angle will start theta, and I want to 465 00:29:27 --> 00:29:32 ask you about how many theta squareds and theta cubes. 466 00:29:32 --> 00:29:38 You're seeing what you can do with paper and 467 00:29:38 --> 00:29:41 pencils type stuff. 468 00:29:41 --> 00:29:47 Here's my main question, how many theta squareds in there? 469 00:29:47 --> 00:29:48 You want to make a guess? 470 00:29:48 --> 00:29:51 A mathematician's favorite number, zero. 471 00:29:51 --> 00:29:55 Right, there will be no theta squared terms in. 472 00:29:55 --> 00:29:59 That's an odd function, so I'm expecting only odd powers and 473 00:29:59 --> 00:30:02 therefore I won't be surprised to see theta cubed 474 00:30:02 --> 00:30:04 come up first. 475 00:30:04 --> 00:30:09 And then when I multiply by the 32, I get the theta squared 476 00:30:09 --> 00:30:14 that I guessed we would have. 477 00:30:14 --> 00:30:22 OK, once again I'll stop there because that's very narrow path 478 00:30:22 --> 00:30:26 to be following but it shows you how. 479 00:30:26 --> 00:30:30 You know, there's a lot of room still for what you can do 480 00:30:30 --> 00:30:35 with paper and pencil to understand a model problem. 481 00:30:35 --> 00:30:40 And then the computer would tell us about a serious problem 482 00:30:40 --> 00:30:44 of following the solar system for a million years. 483 00:30:44 --> 00:30:48 OK, another totally different question, if I can. 484 00:30:48 --> 00:30:49 Yes, thank you. 485 00:30:49 --> 00:30:50 AUDIENCE: [INAUDIBLE] 486 00:30:50 --> 00:30:51 PROFESSOR STRANG: Yeah, sure. 487 00:30:51 --> 00:30:53 AUDIENCE: [INAUDIBLE] 488 00:30:53 --> 00:30:56 PROFESSOR STRANG: 2.4.1, right. 489 00:30:56 --> 00:30:57 A mistake in the book. 490 00:30:57 --> 00:30:59 AUDIENCE: [INAUDIBLE] 491 00:30:59 --> 00:31:01 PROFESSOR STRANG: Or in the, yeah. 492 00:31:01 --> 00:31:04 It's quite possible. 493 00:31:04 --> 00:31:12 OK, there's a printed error in the graph. 494 00:31:12 --> 00:31:13 Yeah. 495 00:31:13 --> 00:31:18 So in numbering the edges, well let's blame it on 496 00:31:18 --> 00:31:19 the printer, right? 497 00:31:19 --> 00:31:20 Not the author. 498 00:31:20 --> 00:31:26 OK, so the diagonal edge, that five probably was intended 499 00:31:26 --> 00:31:28 to be a three, yeah. 500 00:31:28 --> 00:31:29 Thank you. 501 00:31:29 --> 00:31:35 So we'll catch that in the next printing. 502 00:31:35 --> 00:31:42 And you recognize that always numbering the edges and nodes 503 00:31:42 --> 00:31:45 is a pretty arbitrary thing, it's just if we number 504 00:31:45 --> 00:31:50 differently that just reorders the rows of the matrix. 505 00:31:50 --> 00:31:52 If we number the edge differently, it'll reorder the 506 00:31:52 --> 00:31:57 rows and it'll reorder rows and columns of A transpose A. 507 00:31:57 --> 00:32:00 So it won't make a serious difference in the matrix. 508 00:32:00 --> 00:32:00 Yeah. 509 00:32:00 --> 00:32:03 AUDIENCE: [INAUDIBLE] 510 00:32:03 --> 00:32:05 PROFESSOR STRANG: Do you want to go back to this guy? 511 00:32:05 --> 00:32:06 OK. 512 00:32:06 --> 00:32:11 AUDIENCE: So if you have an anti-symmetric matrix, does it 513 00:32:11 --> 00:32:12 follow that the eigenvectors used are perpendicular? 514 00:32:12 --> 00:32:16 PROFESSOR STRANG: This is a good question. 515 00:32:16 --> 00:32:20 This guy, way up here, with this property, 516 00:32:20 --> 00:32:22 AUDIENCE: The eigenvectors are perpendicular? 517 00:32:22 --> 00:32:24 PROFESSOR STRANG: The eigenvectors are perpendicular. 518 00:32:24 --> 00:32:26 Yes, yeah. 519 00:32:26 --> 00:32:32 So we have, there's this, like, the nobility among matrices are 520 00:32:32 --> 00:32:35 the ones with perpendicular eigenvectors. 521 00:32:35 --> 00:32:41 So that includes symmetric matrices, this is a good 522 00:32:41 --> 00:32:43 and straightforward point. 523 00:32:43 --> 00:32:46 So these are the good matrices. 524 00:32:46 --> 00:32:48 Symmetric matrices. 525 00:32:48 --> 00:32:51 A transpose equals A. 526 00:32:51 --> 00:32:56 Their eigenvalues lie on the real line. 527 00:32:56 --> 00:33:04 And these are all perpendicular eigenvectors. 528 00:33:04 --> 00:33:08 What about antisymmetric? 529 00:33:08 --> 00:33:12 OK, that means A transpose is minus A. 530 00:33:12 --> 00:33:16 They also fall in this noble family of matrices, and where 531 00:33:16 --> 00:33:19 are their eigenvalues? 532 00:33:19 --> 00:33:22 Pure imaginary, right up here. 533 00:33:22 --> 00:33:26 Now do you want to know, who else is in this family? 534 00:33:26 --> 00:33:29 What's the other, this is the complex plane; there's one more 535 00:33:29 --> 00:33:32 piece of the complex plane that you know I'm going to put. 536 00:33:32 --> 00:33:35 Which is? 537 00:33:35 --> 00:33:39 What else to make that complex plane look familiar, it's going 538 00:33:39 --> 00:33:43 to have the unit circle. 539 00:33:43 --> 00:33:46 Every complex plane has got to have the unit circle. 540 00:33:46 --> 00:33:51 OK, so these guys went with the, and now what do you 541 00:33:51 --> 00:33:55 think goes with the, this will be the matrices. 542 00:33:55 --> 00:33:57 Can I call them Q instead, because I called 543 00:33:57 --> 00:33:59 them Q this morning. 544 00:33:59 --> 00:34:02 Q transpose is Q inverse. 545 00:34:02 --> 00:34:05 Q transpose Q, and they're the orthogonal matrices. 546 00:34:05 --> 00:34:10 So those matrices again, beautiful matrices 547 00:34:10 --> 00:34:11 in the best class. 548 00:34:11 --> 00:34:15 And their eigenvalues are on the unit circle. 549 00:34:15 --> 00:34:17 And that would be z. 550 00:34:17 --> 00:34:20 Why don't I just show you why? 551 00:34:20 --> 00:34:23 Because orthogonal matrices, there are not so many that 552 00:34:23 --> 00:34:25 are really worth knowing. 553 00:34:25 --> 00:34:31 So, let me take Qx=lambda*x, and what is it that 554 00:34:31 --> 00:34:33 I want to prove? 555 00:34:33 --> 00:34:37 I want to prove that the eigenvalues have 556 00:34:37 --> 00:34:39 absolute value one. 557 00:34:39 --> 00:34:40 That's the unit circle. 558 00:34:40 --> 00:34:42 So how do I show that the eigenvalues have 559 00:34:42 --> 00:34:45 absolute value of one? 560 00:34:45 --> 00:34:49 Let me take the dot product with Qx transpose. 561 00:34:49 --> 00:34:56 So both sides, I'll do Qx transpose Qx and I'll do 562 00:34:56 --> 00:35:01 lambda*x transpose lambda*x, right? 563 00:35:01 --> 00:35:04 Only these are complex. 564 00:35:04 --> 00:35:08 I've got to take complex stuff. 565 00:35:08 --> 00:35:10 OK. 566 00:35:10 --> 00:35:17 I just took the length squared of both sides, and kept in mind 567 00:35:17 --> 00:35:20 the possibility that this x and lambda could be, and probably 568 00:35:20 --> 00:35:22 will be, complex numbers. 569 00:35:22 --> 00:35:25 Now, what do I have on the left? 570 00:35:25 --> 00:35:28 Do you see it happening? 571 00:35:28 --> 00:35:31 I get an x bar transpose, what do I get? 572 00:35:31 --> 00:35:37 Q transpose Qx on the left side. 573 00:35:37 --> 00:35:40 That's the combination I'm looking for. 574 00:35:40 --> 00:35:42 For an orthogonal matrix. 575 00:35:42 --> 00:35:45 Let's imagine the matrix itself is real, otherwise 576 00:35:45 --> 00:35:48 I would just conjugate it. 577 00:35:48 --> 00:35:53 What nice about that left side? 578 00:35:53 --> 00:35:57 What fact am I going to use about Q? 579 00:35:57 --> 00:36:00 Q transpose Q is the identity. 580 00:36:00 --> 00:36:04 So this thing is nothing but x bar transpose x. 581 00:36:04 --> 00:36:05 That's the length of x squared. 582 00:36:05 --> 00:36:07 What have I got on the right side? 583 00:36:07 --> 00:36:11 I've got the length of x squared times the number. 584 00:36:11 --> 00:36:16 Lambda bar times lambda squared. 585 00:36:16 --> 00:36:17 It's there, now. 586 00:36:17 --> 00:36:20 On the left side I have the length of x squared. 587 00:36:20 --> 00:36:23 On the right side I have the length of x squared times that 588 00:36:23 --> 00:36:25 number, mod lambda squared. 589 00:36:25 --> 00:36:28 Therefore, that number has to be one and the eigenvalues 590 00:36:28 --> 00:36:30 are on the unit circle. 591 00:36:30 --> 00:36:36 So, I've given you the three big important classes of 592 00:36:36 --> 00:36:41 matrices with perpendicular eigenvectors. 593 00:36:41 --> 00:36:46 I think anybody would wonder, OK, what about 594 00:36:46 --> 00:36:48 other eigenvalues. 595 00:36:48 --> 00:36:52 What's the condition for perpendicular eigenvectors 596 00:36:52 --> 00:36:53 that includes this. 597 00:36:53 --> 00:36:55 And includes this. 598 00:36:55 --> 00:36:59 And includes this, and also allows eigenvalues 599 00:36:59 --> 00:37:01 all over the place. 600 00:37:01 --> 00:37:04 Would you like to know that condition? 601 00:37:04 --> 00:37:06 What the heck. 602 00:37:06 --> 00:37:12 That condition, that includes all these is this, that A 603 00:37:12 --> 00:37:17 transpose times A equals A times A transpose. 604 00:37:17 --> 00:37:22 That's the test for perpendicular eigenvectors. 605 00:37:22 --> 00:37:24 A transpose commutes with A. 606 00:37:24 --> 00:37:26 So this passes, of course. 607 00:37:26 --> 00:37:28 This passes, of course. 608 00:37:28 --> 00:37:32 This passes because both sides are the identity, and then 609 00:37:32 --> 00:37:34 some more matrices pass also. 610 00:37:34 --> 00:37:36 OK. 611 00:37:36 --> 00:37:37 Is that alright? 612 00:37:37 --> 00:37:41 You asked for some linear algebra and you got it. 613 00:37:41 --> 00:37:42 Now I'm ready, yes, thanks. 614 00:37:42 --> 00:37:45 AUDIENCE: [INAUDIBLE] 615 00:37:45 --> 00:37:50 PROFESSOR STRANG: 2.4.19. 616 00:37:50 --> 00:37:52 Oh, let me look. 617 00:37:52 --> 00:37:54 2.4.19. 618 00:37:54 --> 00:37:59 Ah. 619 00:37:59 --> 00:38:06 OK, yes, sorry and I should have done better with that. 620 00:38:06 --> 00:38:23 So one graphs that are important are grids like this. 621 00:38:23 --> 00:38:28 And we'll see them two, three, four, one, two, three, four. 622 00:38:28 --> 00:38:32 That would be where, these are the nodes. 623 00:38:32 --> 00:38:38 So this is a grid. 624 00:38:38 --> 00:38:41 I meant to draw them all in, but I won't. n squared. 625 00:38:41 --> 00:38:47 So n is six, and I'd have 36 nodes. 626 00:38:47 --> 00:38:50 And you can see the edges in there. 627 00:38:50 --> 00:38:53 So that's the graph I have in mind. 628 00:38:53 --> 00:39:00 And the reason that problem is there is that last year, I 629 00:39:00 --> 00:39:05 think it was last year or the year before, we spent some time 630 00:39:05 --> 00:39:09 with figuring out resistances and currents and so on 631 00:39:09 --> 00:39:11 for these problems. 632 00:39:11 --> 00:39:16 And we needed some fast way to generate A, because this matrix 633 00:39:16 --> 00:39:19 A is now, what size is the matrix A? 634 00:39:19 --> 00:39:23 It's got, I don't know how many edges does it have? 635 00:39:23 --> 00:39:27 One, two, three, four, five, maybe 30 edges going 636 00:39:27 --> 00:39:29 across and 30 coming down. 637 00:39:29 --> 00:39:38 It'll be 60 by how many columns in this matrix? 638 00:39:38 --> 00:39:41 You know the answer now and it's worth knowing, for 639 00:39:41 --> 00:39:42 the quiz of course. 640 00:39:42 --> 00:39:44 36. 641 00:39:44 --> 00:39:48 OK. 642 00:39:48 --> 00:39:55 Anyway, that class rebelled about creating these matrices 643 00:39:55 --> 00:40:03 and working with the matrices, with 2,160 non-zeroes. 644 00:40:03 --> 00:40:04 People were dropping the course. 645 00:40:04 --> 00:40:10 So we need a command that would create A pretty quickly. 646 00:40:10 --> 00:40:14 And so that's what the book, and so this was 647 00:40:14 --> 00:40:17 like the 18.085 command. 648 00:40:17 --> 00:40:23 After we stumbled around for a while, we discovered that a 649 00:40:23 --> 00:40:29 MATLAB command called kron was a quick way to 650 00:40:29 --> 00:40:31 create the matrix. 651 00:40:31 --> 00:40:38 We'll see that when we get to that point. 652 00:40:38 --> 00:40:40 This is an important graph. 653 00:40:40 --> 00:40:44 And it's closely connected to Laplace's. 654 00:40:44 --> 00:40:45 You remember Laplace's? 655 00:40:45 --> 00:40:47 I'll just tell you. 656 00:40:47 --> 00:40:52 Laplace's equation is this, you have a second x derivative, we 657 00:40:52 --> 00:40:54 know how to deal with those. 658 00:40:54 --> 00:40:59 But it also has a second y derivative. 659 00:40:59 --> 00:41:02 So I'm really looking ahead at the most important equation of 660 00:41:02 --> 00:41:05 Chapter 3, Laplace's equation. 661 00:41:05 --> 00:41:11 And suppose I use finite differences. i want a 662 00:41:11 --> 00:41:16 matrix K2D that deals with this 2D problem. 663 00:41:16 --> 00:41:19 And let me just say what it would be. 664 00:41:19 --> 00:41:22 At a typical point this x derivative is giving me a minus 665 00:41:22 --> 00:41:25 one, a two and a minus one. 666 00:41:25 --> 00:41:28 And the y derivative is giving me a minus one that moves this 667 00:41:28 --> 00:41:34 guy up to four and minus one. 668 00:41:34 --> 00:41:40 So instead of -1, 2, -1 along a typical row, we'll now have a 669 00:41:40 --> 00:41:45 four on the diagonal and four minus one in a certain pattern. 670 00:41:45 --> 00:41:46 Anyway. 671 00:41:46 --> 00:41:50 You'll see that, it's interesting when we get to it. 672 00:41:50 --> 00:41:53 That would show up in A transpose A. 673 00:41:53 --> 00:41:59 So what I've said here is what happens with A transpose A. 674 00:41:59 --> 00:42:04 I guess I'm hoping that you begin to know these matrices, 675 00:42:04 --> 00:42:08 first seeing them occasionally in homeworks and 676 00:42:08 --> 00:42:10 then in the lecture. 677 00:42:10 --> 00:42:11 Good. 678 00:42:11 --> 00:42:15 But that's looking ahead. 679 00:42:15 --> 00:42:20 I needed some questions that are like, close to really on 680 00:42:20 --> 00:42:24 what we're doing or what the quiz would do. 681 00:42:24 --> 00:42:25 Any - thank you. 682 00:42:25 --> 00:42:30 AUDIENCE: [INAUDIBLE] 683 00:42:30 --> 00:42:33 PROFESSOR STRANG: Oh yes. 684 00:42:33 --> 00:42:35 A little bit. 685 00:42:35 --> 00:42:39 OK, yeah. 686 00:42:39 --> 00:42:44 So I wrote down this equation and what I'm writing right 687 00:42:44 --> 00:42:47 there is the new part. 688 00:42:47 --> 00:42:52 Sort of new, and I guess equals some right hand side f(x). 689 00:42:52 --> 00:43:00 And the discrete version will be an A transpose C A equal a 690 00:43:00 --> 00:43:05 vector f, maybe there will be a delta x squared here. 691 00:43:05 --> 00:43:07 OK. 692 00:43:07 --> 00:43:12 I guess maybe, I don't want to go far but I want you to see 693 00:43:12 --> 00:43:16 that if we have a coefficient C in here it should 694 00:43:16 --> 00:43:20 show up there. 695 00:43:20 --> 00:43:26 You could actually, it might be reasonable to look at 3.1 just 696 00:43:26 --> 00:43:31 to look slightly ahead to see the parallels but you would get 697 00:43:31 --> 00:43:37 them right without a lecture on it. 698 00:43:37 --> 00:43:42 Your coefficient shows up in the differential equation, and 699 00:43:42 --> 00:43:49 it shows up on the diagonal of C in the difference equation. 700 00:43:49 --> 00:43:57 I won't give a whole lecture on that, just to say that 701 00:43:57 --> 00:44:01 correspondence is exactly the one we know. 702 00:44:01 --> 00:44:05 A is a difference matrix. 703 00:44:05 --> 00:44:07 Like the derivative. 704 00:44:07 --> 00:44:11 C will be a diagonal matrix, A transpose will be whatever 705 00:44:11 --> 00:44:14 that comes out to be. 706 00:44:14 --> 00:44:18 And so you've seen A transpose A, but think again 707 00:44:18 --> 00:44:19 about that difference. 708 00:44:19 --> 00:44:22 And ask yourselves this. 709 00:44:22 --> 00:44:27 I suggest, take C to be one, get C out of there. 710 00:44:27 --> 00:44:33 And just think, again, what is the difference matrix A with a 711 00:44:33 --> 00:44:38 boundary either fixed-fixed or fixed-free, those will 712 00:44:38 --> 00:44:40 be two different A's. 713 00:44:40 --> 00:44:53 What are the A's for fixed-fixed and for fixed-free? 714 00:44:53 --> 00:44:57 This is what we were doing at the very beginning 715 00:44:57 --> 00:44:59 of the course. 716 00:44:59 --> 00:45:04 So A is a first difference matrix, and A transpose A will 717 00:45:04 --> 00:45:05 be the second difference. 718 00:45:05 --> 00:45:11 So the A transpose A, of course, I was doing A transpose 719 00:45:11 --> 00:45:16 A, then the answer here would be the matrix K and the answer 720 00:45:16 --> 00:45:20 here would be the matrix T. 721 00:45:20 --> 00:45:26 Or, depending which end is free, but we'd have one change. 722 00:45:26 --> 00:45:30 That's A transpose A, but now think about the 723 00:45:30 --> 00:45:32 a that it came from. 724 00:45:32 --> 00:45:39 So A will be, A is the matrix that takes differences of the 725 00:45:39 --> 00:45:45 u's, and then A transpose a takes second differences. 726 00:45:45 --> 00:45:49 Of all the questions asked, this is the one most relevant 727 00:45:49 --> 00:45:57 for the exam and for what we've done so far. 728 00:45:57 --> 00:46:01 I've gone off onto topics that we look ahead to, 729 00:46:01 --> 00:46:03 but this is where we are. 730 00:46:03 --> 00:46:07 So that matrix a is a first difference matrix, and then you 731 00:46:07 --> 00:46:11 put in the boundary conditions. 732 00:46:11 --> 00:46:12 OK. 733 00:46:12 --> 00:46:13 There was another question. 734 00:46:13 --> 00:46:13 Yeah. 735 00:46:13 --> 00:46:18 AUDIENCE: [INAUDIBLE] 736 00:46:18 --> 00:46:19 PROFESSOR STRANG: Of number four? 737 00:46:19 --> 00:46:22 Which number four in which? 738 00:46:22 --> 00:46:23 Oh, in the quiz. 739 00:46:23 --> 00:46:25 Oh yes, right. 740 00:46:25 --> 00:46:27 Yes. 741 00:46:27 --> 00:46:28 Did I tell you what problem four was? 742 00:46:28 --> 00:46:29 No. 743 00:46:29 --> 00:46:31 I hope not. 744 00:46:31 --> 00:46:39 OK problem four in the quiz. 745 00:46:39 --> 00:46:41 It's about a delta function? 746 00:46:41 --> 00:46:43 Yeah. 747 00:46:43 --> 00:46:52 What do I know, what do you want me to tell you? 748 00:46:52 --> 00:46:57 So the delta, of course, comes in as we've seen it, as the 749 00:46:57 --> 00:47:01 right hand side of a differential equation. 750 00:47:01 --> 00:47:05 So it might be the right hand side even of this equation. 751 00:47:05 --> 00:47:12 So if this equation was delta(x), or x-1/2 752 00:47:12 --> 00:47:20 or something. 753 00:47:20 --> 00:47:24 I mean, the essential thing is that when delta's on the right 754 00:47:24 --> 00:47:32 side, that gives you a drop in the slope. 755 00:47:32 --> 00:47:35 Suppose I just have a first order equation like d. 756 00:47:35 --> 00:47:35 I'll call it dz/dx=delta(x-a). 757 00:47:35 --> 00:47:41 758 00:47:41 --> 00:47:45 Yeah. 759 00:47:45 --> 00:47:53 And suppose that I know that z(0) starts at zero. 760 00:47:53 --> 00:47:58 You've got to be able to solve that equation, so this is 761 00:47:58 --> 00:48:02 a useful prep for that. 762 00:48:02 --> 00:48:08 That would be a good equation to know the solution to. 763 00:48:08 --> 00:48:13 And what kind of function is this? 764 00:48:13 --> 00:48:17 What kind of a function is z(x) there? 765 00:48:17 --> 00:48:20 I just use the letter z to have a new letter. 766 00:48:20 --> 00:48:28 z(x) will be a step. 767 00:48:28 --> 00:48:33 Right. z(x) will be a step function, yes. 768 00:48:33 --> 00:48:36 That's right. 769 00:48:36 --> 00:48:41 OK, so the solution is that at the point a, which I'm 770 00:48:41 --> 00:48:44 presuming is beyond zero, I come along at zero 771 00:48:44 --> 00:48:45 and I step up. 772 00:48:45 --> 00:48:45 Yep. 773 00:48:45 --> 00:48:46 OK. 774 00:48:46 --> 00:48:48 That would be a picture of z(x), yeah. 775 00:48:48 --> 00:48:54 So it's basic delta function material that 776 00:48:54 --> 00:49:04 I'm speaking about here. 777 00:49:04 --> 00:49:10 So z jumps by one and z is a slope, then the slope jumps by 778 00:49:10 --> 00:49:15 one or drops by one, depending on a plus or a minus sign here. 779 00:49:15 --> 00:49:19 The things that we've used to deal with delta functions, so 780 00:49:19 --> 00:49:23 that's what Question 4b is about. 781 00:49:23 --> 00:49:27 The drop in slope, or the jumps, or whatever happens 782 00:49:27 --> 00:49:31 when a delta function shows up on the right side. 783 00:49:31 --> 00:49:33 Good question. 784 00:49:33 --> 00:49:33 Yep. 785 00:49:33 --> 00:49:36 AUDIENCE: [INAUDIBLE] 786 00:49:36 --> 00:49:38 PROFESSOR STRANG: 1.1.27. 787 00:49:38 --> 00:49:38 Well. 788 00:49:38 --> 00:49:41 AUDIENCE: [INAUDIBLE] 789 00:49:41 --> 00:49:44 PROFESSOR STRANG: Oh, and then left a typo. 790 00:49:44 --> 00:49:53 AUDIENCE: [INAUDIBLE] 791 00:49:53 --> 00:49:54 PROFESSOR STRANG: Oh. 792 00:49:54 --> 00:49:58 I'm sorry, OK. 793 00:49:58 --> 00:50:05 1.1.27 My copy isn't showing it. 794 00:50:05 --> 00:50:07 Yeah. 795 00:50:07 --> 00:50:10 I may have to punt on that question. 796 00:50:10 --> 00:50:12 Or do you want me to look at it? 797 00:50:12 --> 00:50:18 OK, can you maybe just pass that the book up, alright. 798 00:50:18 --> 00:50:21 I'll try to read what that question was. 799 00:50:21 --> 00:50:23 OK. 800 00:50:23 --> 00:50:27 Yeah, maybe this is a question to answer. 801 00:50:27 --> 00:50:33 This is probably the one new question that got added. 802 00:50:33 --> 00:50:39 OK, yeah. 803 00:50:39 --> 00:50:41 Fair enough. 804 00:50:41 --> 00:50:46 So this is continuing the discussion that you asked me 805 00:50:46 --> 00:50:50 to start here about a, the first difference matrix, OK. 806 00:50:50 --> 00:50:57 So I'll go a little more over that. 807 00:50:57 --> 00:51:07 So in the book here, this writes down a matrix A_0 808 00:51:07 --> 00:51:10 I'll discuss this matrix. 809 00:51:10 --> 00:51:16 So there's a difference matrix. 810 00:51:16 --> 00:51:20 You see what I mean by a difference matrix, if were to 811 00:51:20 --> 00:51:26 multiply it by u, or something, I 812 00:51:26 --> 00:51:28 would get differences, right? 813 00:51:28 --> 00:51:33 I'd get u_1-u_0, u_2-u_1, and u_3-u_2. 814 00:51:33 --> 00:51:36 815 00:51:36 --> 00:51:37 Good. 816 00:51:37 --> 00:51:39 So that's A_0 times u. 817 00:51:39 --> 00:51:40 Alright. 818 00:51:40 --> 00:51:45 So that's a difference matrix. 819 00:51:45 --> 00:51:47 What graph would that come from? 820 00:51:47 --> 00:51:52 That's also the incidence matrix of a very simple graph. 821 00:51:52 --> 00:51:56 This is connecting Chapter 1 with Chapter 2. 822 00:51:56 --> 00:51:59 It would be a line of springs, it would be a graph. 823 00:51:59 --> 00:52:04 It's got edges and nodes. it's got three edges, 824 00:52:04 --> 00:52:05 so I've got three rows. 825 00:52:05 --> 00:52:13 It's got four nodes so I've got four columns. 826 00:52:13 --> 00:52:16 Are the columns independent here? 827 00:52:16 --> 00:52:18 No, they never are. 828 00:52:18 --> 00:52:23 The vector of all ones would have differences of all zeroes. 829 00:52:23 --> 00:52:26 So what would that, that would be the difference 830 00:52:26 --> 00:52:31 matrix for fixed? 831 00:52:31 --> 00:52:33 Free? 832 00:52:33 --> 00:52:37 Fixed, free, circular what would that difference 833 00:52:37 --> 00:52:41 matrix correspond to? 834 00:52:41 --> 00:52:42 Everybody's saying it. 835 00:52:42 --> 00:52:44 Say it a little louder just to. 836 00:52:44 --> 00:52:46 Free free. 837 00:52:46 --> 00:52:48 That's a free-free problem, because they're all in there. 838 00:52:48 --> 00:52:50 We haven't knocked any out. 839 00:52:50 --> 00:52:52 There are no boundary conditions yet. 840 00:52:52 --> 00:52:57 That's a free free, so that A_0 would be free free. 841 00:52:57 --> 00:53:03 OK. 842 00:53:03 --> 00:53:06 I'll take one more case and then I think we're at time. 843 00:53:06 --> 00:53:10 Suppose it was fixed fixed? 844 00:53:10 --> 00:53:14 What would be the difference matrix that would correspond 845 00:53:14 --> 00:53:18 to, how would I change that matrix if my problem 846 00:53:18 --> 00:53:20 became fixed fixed? 847 00:53:20 --> 00:53:26 So now I'm fixing that u, I'm fixing that u, in the mass 848 00:53:26 --> 00:53:31 spring case I'm adding supports there. 849 00:53:31 --> 00:53:34 How would that change the matrix? 850 00:53:34 --> 00:53:36 First and fourth, good. 851 00:53:36 --> 00:53:37 Say it again? 852 00:53:37 --> 00:53:43 First and fourth columns would go. 853 00:53:43 --> 00:53:48 So fixed free would then be three by two. 854 00:53:48 --> 00:53:52 Free free was three by four. 855 00:53:52 --> 00:53:55 Yeah, I'm glad this question came up because this is the 856 00:53:55 --> 00:53:59 right thing for you to be thinking about in 857 00:53:59 --> 00:54:04 connection with the recent question you asked. 858 00:54:04 --> 00:54:05 OK. 859 00:54:05 --> 00:54:08 Maybe that's the right place to stop, because now you've asked 860 00:54:08 --> 00:54:13 questions that are really on target for what we've done, 861 00:54:13 --> 00:54:16 and I hope useful to you. 862 00:54:16 --> 00:54:23 OK, see you guys tomorrow evening at 7:30 in 54-100, OK. 863 00:54:23 --> 00:54:25