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:02 --> 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:08 offer high-quality educational resources for free. 6 00:00:08 --> 00:00:11 To make a donation, or to view additional materials from 7 00:00:11 --> 00:00:11 hundreds of MIT courses, visit MIT OpenCourseWare 8 00:00:11 --> 00:00:20 at ocw.mit.edu. 9 00:00:20 --> 00:00:23 PROFESSOR STRANG: OK, so this is the start. 10 00:00:23 --> 00:00:27 I won't be able to do it all in one day of what I think of as 11 00:00:27 --> 00:00:35 the number one model in applied math, in discrete 12 00:00:35 --> 00:00:37 implied math, I'll say. 13 00:00:37 --> 00:00:41 Let me review what our four examples are. 14 00:00:41 --> 00:00:43 Just so you see the big picture. 15 00:00:43 --> 00:00:48 So the first example was the springs and masses. 16 00:00:48 --> 00:00:49 That was beautiful. 17 00:00:49 --> 00:00:50 It's simple. 18 00:00:50 --> 00:00:56 The masses are all in a line, and the matrix K, the 19 00:00:56 --> 00:01:01 free-fixed and fixed-fixed and free-free come out closely 20 00:01:01 --> 00:01:05 related to our K t b matrices. 21 00:01:05 --> 00:01:09 So that was the natural place to start, and actually we also 22 00:01:09 --> 00:01:15 got a chance to do the most important equation in time. 23 00:01:15 --> 00:01:15 Ku''. 24 00:01:17 --> 00:01:17 Sorry Mu''+Ku=0. 25 00:01:17 --> 00:01:20 26 00:01:20 --> 00:01:23 So that was a key example. 27 00:01:23 --> 00:01:26 Then least squares. 28 00:01:26 --> 00:01:29 Very important, I'm already getting questions from the 29 00:01:29 --> 00:01:34 class about problems that come up in your work, 30 00:01:34 --> 00:01:37 least square problems. 31 00:01:37 --> 00:01:45 Maybe I'll just mention that the professional numerical 32 00:01:45 --> 00:01:50 guys don't always go to A transpose A. 33 00:01:50 --> 00:01:53 If it's a badly conditioned problem, in that conditioning 34 00:01:53 --> 00:01:58 is a topic that was in 1.7 and we'll eventually come back to, 35 00:01:58 --> 00:02:02 if it's a badly conditioned problem matrix a then, a 36 00:02:02 --> 00:02:05 transpose a kind of makes it worse. 37 00:02:05 --> 00:02:09 So there's another way to orthogonalize in advance. 38 00:02:09 --> 00:02:10 And if you're working with orthogonal vectors, or 39 00:02:10 --> 00:02:17 orthonormal vectors, numerical calculations are as 40 00:02:17 --> 00:02:20 safe as they can be. 41 00:02:20 --> 00:02:21 Yeah. 42 00:02:21 --> 00:02:24 Wall Street is more like A transpose A. 43 00:02:24 --> 00:02:31 And the orthonormal is the safe way. 44 00:02:31 --> 00:02:36 Alright, this is today's lecture. 45 00:02:36 --> 00:02:39 You'll see the matrix a for a graph, for a network. 46 00:02:39 --> 00:02:46 It's simple to construct, and it just shows up everywhere. 47 00:02:46 --> 00:02:48 Because networks are everywhere. 48 00:02:48 --> 00:02:56 And, just, looking ahead, trusses are there partly 49 00:02:56 --> 00:02:58 because they're the most fun. 50 00:02:58 --> 00:02:59 You'll enjoy trusses. 51 00:02:59 --> 00:03:02 I mean, it's kind of fun to figure out is the truss 52 00:03:02 --> 00:03:04 going to collapse or not. 53 00:03:04 --> 00:03:05 It's good. 54 00:03:05 --> 00:03:09 And actually, what's the linear algebra in there? 55 00:03:09 --> 00:03:14 The collapsing or not will depend on solutions to Au=0. 56 00:03:15 --> 00:03:19 Let me just recall the equation Au=0. 57 00:03:21 --> 00:03:26 If A is our key matrix in each example, it's 58 00:03:26 --> 00:03:28 different in each example. 59 00:03:28 --> 00:03:34 And we sort of hope that Au=0 doesn't have solutions, or that 60 00:03:34 --> 00:03:36 it has solutions we know. 61 00:03:36 --> 00:03:42 Because if Au=0 has solutions that's the case where a 62 00:03:42 --> 00:03:48 transpose a is not invertable and we have to do something. 63 00:03:48 --> 00:03:49 Very useful to review. 64 00:03:49 --> 00:03:56 What were the solutions to Au=0, in the case of springs? 65 00:03:56 --> 00:04:00 Well, there were some in the free-free case. 66 00:04:00 --> 00:04:04 The all ones vector was the solution u or all constant, was 67 00:04:04 --> 00:04:07 the solution u in the free-free case and that's why we 68 00:04:07 --> 00:04:09 couldn't invert it. 69 00:04:09 --> 00:04:12 But the fixed-free or the fixed-fixed, when we have one 70 00:04:12 --> 00:04:17 support or two supports, that removed the all ones solution. 71 00:04:17 --> 00:04:20 Good. 72 00:04:20 --> 00:04:23 These squares, we assume there weren't any. 73 00:04:23 --> 00:04:27 We assumed because we wanted to work directly with a transpose 74 00:04:27 --> 00:04:32 a, the normal equations, so we assumed that the columns 75 00:04:32 --> 00:04:34 of a were independent. 76 00:04:34 --> 00:04:39 We assumed that there were no non-zero solutions to Au=0. 77 00:04:40 --> 00:04:43 Because if there were, that would have made a transpose a 78 00:04:43 --> 00:04:48 singular, and we would have had to do something different. 79 00:04:48 --> 00:04:52 Here, this'll be a lot like this one. 80 00:04:52 --> 00:04:57 Today, once you see A, you'll spot the solutions to Au=0. 81 00:04:59 --> 00:05:03 This is A for a network. 82 00:05:03 --> 00:05:07 And the solution is going to be that same guy, all ones. 83 00:05:07 --> 00:05:11 And that only tells us again that we have to ground a node, 84 00:05:11 --> 00:05:14 I may use an electrical term. 85 00:05:14 --> 00:05:18 Grounding a node is like fixing a displacement. 86 00:05:18 --> 00:05:22 Once you've fixed one of those, say at zero, whatever, but 87 00:05:22 --> 00:05:24 zero's the natural choice. 88 00:05:24 --> 00:05:27 Once you've said one of the potentials, one of the 89 00:05:27 --> 00:05:30 voltages is zero, then you know all the rest. 90 00:05:30 --> 00:05:33 You can find all the rest from our equations. 91 00:05:33 --> 00:05:37 So this is like this in having this all ones solution. 92 00:05:37 --> 00:05:42 And as you'll see with trusses, that could, depending on the 93 00:05:42 --> 00:05:44 truss, have more solutions. 94 00:05:44 --> 00:05:46 And if there are more solutions that's when 95 00:05:46 --> 00:05:49 the truss collapses. 96 00:05:49 --> 00:05:54 So the trusses need more than just a single support to 97 00:05:54 --> 00:05:58 hold up a whole truss. 98 00:05:58 --> 00:06:00 OK. 99 00:06:00 --> 00:06:01 So that's the Au=0. 100 00:06:02 --> 00:06:06 Now we're ready for the lecture itself. 101 00:06:06 --> 00:06:09 Graphs and networks. 102 00:06:09 --> 00:06:12 OK, let me start with, what's a graph. 103 00:06:12 --> 00:06:18 A graph is a bunch of nodes and some or all of the 104 00:06:18 --> 00:06:20 edges between them. 105 00:06:20 --> 00:06:23 Let me take just a particular example of a graph. 106 00:06:23 --> 00:06:26 And this of course you spot in the book. 107 00:06:26 --> 00:06:30 Oh and everybody recognized that, and it's probably now 108 00:06:30 --> 00:06:34 corrected, that in the homework where it said 3.4 109 00:06:34 --> 00:06:37 it meant 2.4, of course. 110 00:06:37 --> 00:06:41 And this is Section 2.4 now. 111 00:06:41 --> 00:06:44 Let me draw a different graph. 112 00:06:44 --> 00:06:49 Maybe it'll have four nodes, at those four edges, let 113 00:06:49 --> 00:06:51 me put in a fifth edge. 114 00:06:51 --> 00:06:54 OK, that's a graph. 115 00:06:54 --> 00:06:56 It's not a complete graph because I didn't include 116 00:06:56 --> 00:06:58 that extra edge. 117 00:06:58 --> 00:07:03 It's not a tree because there are some loops here. 118 00:07:03 --> 00:07:08 So complete graphs are one extreme where all 119 00:07:08 --> 00:07:12 the edges are in. 120 00:07:12 --> 00:07:15 A tree is the other extreme, where you have a minimum 121 00:07:15 --> 00:07:16 number of edges. 122 00:07:16 --> 00:07:19 It would only take probably three edges. 123 00:07:19 --> 00:07:23 So just while we're looking at it, there are a bunch of 124 00:07:23 --> 00:07:28 possible trees that would be sort of inside this graph. 125 00:07:28 --> 00:07:32 Sub-graphs of this graph, if I knock out those two 126 00:07:32 --> 00:07:35 edges I have a tree. 127 00:07:35 --> 00:07:39 Going out, or a tree could be like this. 128 00:07:39 --> 00:07:41 Or a tree could be like this. 129 00:07:41 --> 00:07:48 Anyway, five edges is in this graph, six in a complete 130 00:07:48 --> 00:07:51 graph, it would be three edges in a tree. 131 00:07:51 --> 00:07:55 OK, and the number of edges is always m. 132 00:07:55 --> 00:07:59 So five edges. 133 00:07:59 --> 00:08:04 And the number of nodes is always n, for nodes. 134 00:08:04 --> 00:08:07 So a will be five by four. 135 00:08:07 --> 00:08:10 OK. 136 00:08:10 --> 00:08:15 And it's called, so we get a special name in this world, 137 00:08:15 --> 00:08:19 it's called the incidence matrix of the graph. 138 00:08:19 --> 00:08:21 The incidence matrix. 139 00:08:21 --> 00:08:25 Or, of course, these things come up so often they 140 00:08:25 --> 00:08:26 have other names, too. 141 00:08:26 --> 00:08:32 But incidence matrix is a pretty general name. 142 00:08:32 --> 00:08:35 OK, I have to number the nodes just so we can 143 00:08:35 --> 00:08:37 create the matrix, A one, two, three, four. 144 00:08:38 --> 00:08:40 And I have to number the edges. 145 00:08:40 --> 00:08:42 If I don't number them, I don't know which is which. 146 00:08:42 --> 00:08:48 So let me call this edge one, from one to two, and I'll 147 00:08:48 --> 00:08:51 draw an arrow on the edges. 148 00:08:51 --> 00:08:55 So from one to two, maybe this'll be edge two, 149 00:08:55 --> 00:08:57 from one to three. 150 00:08:57 --> 00:08:58 This'll be edge three. 151 00:08:58 --> 00:09:01 Oh no, let me put edge three there, would be a natural 152 00:09:01 --> 00:09:03 one, say from two to three. 153 00:09:03 --> 00:09:07 And how about edge four there, from two to four. 154 00:09:07 --> 00:09:11 And edge five going from three to four. 155 00:09:11 --> 00:09:18 OK, so now I have numbered, I've identified the nodes, and 156 00:09:18 --> 00:09:20 I've identified the edges. 157 00:09:20 --> 00:09:23 And there were five edges and four nodes. 158 00:09:23 --> 00:09:25 Usually m is bigger than n. 159 00:09:25 --> 00:09:30 We're in this, except for trees, m will be at 160 00:09:30 --> 00:09:34 least as large as n. 161 00:09:34 --> 00:09:37 And I've put arrows on, so you could say it's 162 00:09:37 --> 00:09:38 a directed graph. 163 00:09:38 --> 00:09:40 Because I've given a direction. 164 00:09:40 --> 00:09:45 You'll see that the directions, those arrow directions, which 165 00:09:45 --> 00:09:51 are just to tell me which way current should count as plus, 166 00:09:51 --> 00:09:53 if it's with the arrow, or which way it should 167 00:09:53 --> 00:09:55 count as minus if it's against the arrow. 168 00:09:55 --> 00:09:58 Of course, current could go either way. 169 00:09:58 --> 00:10:01 It's just, now I have a convention of which is 170 00:10:01 --> 00:10:03 plus and which is minus. 171 00:10:03 --> 00:10:06 OK, so now let me tell you the incidence matrix. 172 00:10:06 --> 00:10:11 So everybody can get it right away, how do you create 173 00:10:11 --> 00:10:12 this incidence matrix? 174 00:10:12 --> 00:10:15 A five by four. 175 00:10:15 --> 00:10:18 So it's going to have five rows, one for every edge. 176 00:10:18 --> 00:10:22 So what's the row for edge one? 177 00:10:22 --> 00:10:25 And it's got four columns, one for every node. 178 00:10:25 --> 00:10:27 So these are the nodes. 179 00:10:27 --> 00:10:32 Nodes one, two, three, four. 180 00:10:32 --> 00:10:36 So there's a column for every node and a row for every edge. 181 00:10:36 --> 00:10:39 OK, edge one. 182 00:10:39 --> 00:10:43 This is just going to tell me everything about the graph. 183 00:10:43 --> 00:10:47 So exactly what's in that picture will be in this matrix. 184 00:10:47 --> 00:10:49 If I've erased one, I could reproduce it's by 185 00:10:49 --> 00:10:51 knowing the other one. 186 00:10:51 --> 00:10:55 OK, edge one goes from node one to node two. 187 00:10:55 --> 00:10:59 So it leaves node one, I'll put a minus one there. 188 00:10:59 --> 00:11:00 In the first column. 189 00:11:00 --> 00:11:05 And a plus one in the second column. 190 00:11:05 --> 00:11:09 Edge one doesn't touch nodes three and four. 191 00:11:09 --> 00:11:11 So there you go, that's edge one. 192 00:11:11 --> 00:11:15 Let me do edge two and then you'll be able 193 00:11:15 --> 00:11:16 to fill in the rest. 194 00:11:16 --> 00:11:21 So edge two goes from one to three, minus one, and a one. 195 00:11:21 --> 00:11:27 Edge three goes from two to three, I'll just keep going. 196 00:11:27 --> 00:11:29 Minus one and a one. 197 00:11:29 --> 00:11:35 Edge four goes from two to four. 198 00:11:35 --> 00:11:43 And edge five goes from three to four. 199 00:11:43 --> 00:11:44 OK. 200 00:11:44 --> 00:11:46 Simple, right? 201 00:11:46 --> 00:11:47 Got it. 202 00:11:47 --> 00:11:50 That matrix has got all the information that's in my 203 00:11:50 --> 00:11:56 picture, and the matrix, but the point about matrices 204 00:11:56 --> 00:11:58 is, they do something. 205 00:11:58 --> 00:12:02 They multiply vector u to produce something. 206 00:12:02 --> 00:12:07 They have a meaning beyond just a record of the picture. 207 00:12:07 --> 00:12:09 So a is a great thing. 208 00:12:09 --> 00:12:11 In fact, what does it do? 209 00:12:11 --> 00:12:12 Let's see. 210 00:12:12 --> 00:12:15 So that's the matrix a that we work with. 211 00:12:15 --> 00:12:18 Oh, first tell me about Au=0. 212 00:12:18 --> 00:12:22 Because we brought up that subject already? 213 00:12:22 --> 00:12:26 Are those four columns independent? 214 00:12:26 --> 00:12:30 I've got four columns, they're sitting in five-dimensional 215 00:12:30 --> 00:12:32 space, there's plenty of room there for four 216 00:12:32 --> 00:12:34 independent vectors. 217 00:12:34 --> 00:12:37 Are these four columns independent vectors? 218 00:12:37 --> 00:12:38 No. 219 00:12:38 --> 00:12:39 No, they're not. 220 00:12:39 --> 00:12:42 Because what combination of them produces the zero 221 00:12:42 --> 00:12:45 vector? . 222 00:12:45 --> 00:12:48 If I take that column plus that, plus that, plus 223 00:12:48 --> 00:12:50 that, I'm multiplying by. 224 00:12:50 --> 00:12:55 So, A I'll just put that up here and then I won't 225 00:12:55 --> 00:12:56 have to write it again. 226 00:12:56 --> 00:13:05 A times <1, 1, 1, 1>, is five zeroes. 227 00:13:05 --> 00:13:15 So that u, that particular u, of all ones is, I would say, in 228 00:13:15 --> 00:13:17 the null space of the matrix? 229 00:13:17 --> 00:13:20 The null space is all the solutions at Au=0. 230 00:13:21 --> 00:13:25 In other words, so these four columns, tell me 231 00:13:25 --> 00:13:26 about the geometry again. 232 00:13:26 --> 00:13:31 These four columns, if I take all their combinations, yeah. 233 00:13:31 --> 00:13:32 Think about this. 234 00:13:32 --> 00:13:36 If I take all four combinations, all combination, 235 00:13:36 --> 00:13:38 any amount of this column, this column, this column, that 236 00:13:38 --> 00:13:41 fourth column, those are all vectors in 237 00:13:41 --> 00:13:44 five-dimensional space. 238 00:13:44 --> 00:13:47 Now, this isn't essential but it's good. 239 00:13:47 --> 00:13:50 Do you have an idea of what you'd get? 240 00:13:50 --> 00:13:55 What would you get if you took, so this, think of four vectors, 241 00:13:55 --> 00:13:58 pointing along, take all their combinations, that 242 00:13:58 --> 00:14:00 kind of fills in. 243 00:14:00 --> 00:14:02 Whatever fill in may mean. 244 00:14:02 --> 00:14:04 And what does it fill in? 245 00:14:04 --> 00:14:06 What do I get? 246 00:14:06 --> 00:14:08 What's your image? 247 00:14:08 --> 00:14:09 Frankly, I don't know. 248 00:14:09 --> 00:14:13 I can't visualize five-dimensional space. 249 00:14:13 --> 00:14:14 That well. 250 00:14:14 --> 00:14:18 But still, we can use words. 251 00:14:18 --> 00:14:21 What do you think? 252 00:14:21 --> 00:14:23 You get a something subspace. 253 00:14:23 --> 00:14:28 You got a something, you get something flat. 254 00:14:28 --> 00:14:30 I don't know if you do. 255 00:14:30 --> 00:14:32 It's pretty flat, somehow. 256 00:14:32 --> 00:14:37 Like I'm just asking you to jump up from a case we know. 257 00:14:37 --> 00:14:42 Where we had columns in three-dimensional space and 258 00:14:42 --> 00:14:44 we took a combination and they gave us a plane. 259 00:14:44 --> 00:14:47 Right, when they were dependent? 260 00:14:47 --> 00:14:52 Now, how would you visualize the combinations in 261 00:14:52 --> 00:14:53 five-dimensional space? 262 00:14:53 --> 00:14:56 Just for the heck of it? 263 00:14:56 --> 00:15:00 It's some kind of a subspace, I would say. 264 00:15:00 --> 00:15:03 And what's its dimension, maybe that's what I want to ask you. 265 00:15:03 --> 00:15:04 What's the dimension? 266 00:15:04 --> 00:15:07 Do I get, like, a four-dimensional subspace of 267 00:15:07 --> 00:15:11 five-dimensional space when I take the combinations of these 268 00:15:11 --> 00:15:13 particular four guys? 269 00:15:13 --> 00:15:15 Yes or no? 270 00:15:15 --> 00:15:18 Do I get a four-dimensional subspace, whatever 271 00:15:18 --> 00:15:19 that may mean? 272 00:15:19 --> 00:15:20 No. 273 00:15:20 --> 00:15:22 Right answer, I don't. 274 00:15:22 --> 00:15:23 I don't. 275 00:15:23 --> 00:15:27 Somehow the dimension of that subspace, whatever I get, isn't 276 00:15:27 --> 00:15:32 four because this fourth guy is not contributing anything new. 277 00:15:32 --> 00:15:35 The fourth one is a combination of the first three. 278 00:15:35 --> 00:15:37 So I get a three-dimensional subspace. 279 00:15:37 --> 00:15:41 The rank of this matrix is three. 280 00:15:41 --> 00:15:49 If you allow me to introduce that key word, rank, is the 281 00:15:49 --> 00:15:52 number of independent columns. 282 00:15:52 --> 00:15:58 It tells you how big the matrix really is. 283 00:15:58 --> 00:16:01 You know, if the matrix, if I pile on a whole lot of zero 284 00:16:01 --> 00:16:07 columns, or a lot of zero rows, the matrix looks bigger. 285 00:16:07 --> 00:16:10 But of course it isn't truly bigger. 286 00:16:10 --> 00:16:12 The heart of the matrix, the core of the matrix 287 00:16:12 --> 00:16:15 is somehow just three. 288 00:16:15 --> 00:16:20 And actually, I tell you now and we'll see it happen, can I 289 00:16:20 --> 00:16:25 tell you the key result in the first half of linear algebra? 290 00:16:25 --> 00:16:27 It's this. 291 00:16:27 --> 00:16:29 That if I have three independent columns, and by the 292 00:16:29 --> 00:16:33 way any three are independent, it's just all four 293 00:16:33 --> 00:16:35 together are dependent. 294 00:16:35 --> 00:16:38 This has three independent columns, then the great 295 00:16:38 --> 00:16:42 fact is, it has three independent rows. 296 00:16:42 --> 00:16:44 That's kind of fantastic. 297 00:16:44 --> 00:16:49 Since it's such a beautiful and remarkable and basic 298 00:16:49 --> 00:16:52 fact, look at the rows. 299 00:16:52 --> 00:16:55 That what linear algebra is all about. 300 00:16:55 --> 00:16:59 Looking at a matrix by columns, and then by rows, and seeing 301 00:16:59 --> 00:17:01 what are the connections. 302 00:17:01 --> 00:17:05 And the connection is, the key connection is, that these 303 00:17:05 --> 00:17:09 five rows, now what space are they in? 304 00:17:09 --> 00:17:15 What what space are these rows in? four-dimensional space. 305 00:17:15 --> 00:17:17 They only have four components. 306 00:17:17 --> 00:17:24 So I had four columns in 5-D, I have five rows in 4-D. 307 00:17:24 --> 00:17:27 But now, are those five rows independent? 308 00:17:27 --> 00:17:29 Let me just ask that question. 309 00:17:29 --> 00:17:32 Are those five independent rows, are they pointing in 310 00:17:32 --> 00:17:36 different directions, or could any combination give the zero 311 00:17:36 --> 00:17:40 vector in 4-D, looking at those five rows? 312 00:17:40 --> 00:17:43 What do you say, wait a minute. 313 00:17:43 --> 00:17:46 Five vectors, in four-dimensional space? 314 00:17:46 --> 00:17:48 Dependent, of course. 315 00:17:48 --> 00:17:48 Right. 316 00:17:48 --> 00:17:51 So they're dependent. 317 00:17:51 --> 00:17:55 There couldn't be five independent vectors in 4-D. 318 00:17:55 --> 00:18:00 But are there four in this particular case? 319 00:18:00 --> 00:18:03 And here's the great fact, no, there are three. 320 00:18:03 --> 00:18:08 If there are three independent columns and no more, then there 321 00:18:08 --> 00:18:11 are three independent rows and no more. 322 00:18:11 --> 00:18:15 And we'll get to see which rows are independent. 323 00:18:15 --> 00:18:16 And which are not. 324 00:18:16 --> 00:18:20 That's a question about A transpose, and we haven't 325 00:18:20 --> 00:18:22 got to A transpose yet. 326 00:18:22 --> 00:18:26 OK, are you OK with that incidence matrix? 327 00:18:26 --> 00:18:36 Because this is like the central matrix of our subject. 328 00:18:36 --> 00:18:41 We can figure out A transpose A, that's kind of fun. 329 00:18:41 --> 00:18:46 I do a transpose a then you'll see the core computations 330 00:18:46 --> 00:18:49 of this neat section. 331 00:18:49 --> 00:18:53 So if I do A transpose A, so I'm going to bring in a 332 00:18:53 --> 00:18:57 transpose and you know that I'm not just bringing it in from 333 00:18:57 --> 00:19:02 nowhere, that networks. 334 00:19:02 --> 00:19:05 The balance law is going to involve a transpose. 335 00:19:05 --> 00:19:07 So let's just anticipate. 336 00:19:07 --> 00:19:10 What do you think a transpose a looks like? 337 00:19:10 --> 00:19:12 Now, how am I going to do this for you? 338 00:19:12 --> 00:19:17 May I write may I erase this for a moment, and try to 339 00:19:17 --> 00:19:19 squeeze in a transpose here? 340 00:19:19 --> 00:19:26 So that you can multiply it by site and see the answer, and 341 00:19:26 --> 00:19:28 then you'll see the pattern. 342 00:19:28 --> 00:19:31 That's the great thing about math. 343 00:19:31 --> 00:19:35 You do a few examples, and you hope that a pattern 344 00:19:35 --> 00:19:36 reveals itself. 345 00:19:36 --> 00:19:39 So let me show a transpose. 346 00:19:39 --> 00:19:43 So now I'm going to take that column and make it a row. 347 00:19:43 --> 00:19:47 I'm going to take that column and make it a row, it's going 348 00:19:47 --> 00:19:50 to be a little squeezed but we can do it. 349 00:19:50 --> 00:19:56 Take that column, . 350 00:19:56 --> 00:20:01 And the last column, . 351 00:20:01 --> 00:20:02 OK. 352 00:20:02 --> 00:20:05 So I just wrote a transpose here. 353 00:20:05 --> 00:20:10 And now could you help me with A transpose A. 354 00:20:10 --> 00:20:14 Which is the key matrix in the graph here. 355 00:20:14 --> 00:20:17 What size will it be? 356 00:20:17 --> 00:20:19 Everybody knows it's going to be square, it's going to be 357 00:20:19 --> 00:20:23 symmetric, and just tell me the size. 358 00:20:23 --> 00:20:23 Four by four. 359 00:20:23 --> 00:20:28 Right, we have a four by five times a five by four, we're 360 00:20:28 --> 00:20:30 expecting this to be four by four. 361 00:20:30 --> 00:20:33 And what's the first entry? 362 00:20:33 --> 00:20:35 Two. 363 00:20:35 --> 00:20:39 Right, take row one, dot it with column one. 364 00:20:39 --> 00:20:44 I get two ones and then a bunch of zeroes, so I just get a two. 365 00:20:44 --> 00:20:46 What's the next entry? 366 00:20:46 --> 00:20:48 Take row one against column two, can you 367 00:20:48 --> 00:20:50 do that in your head? 368 00:20:50 --> 00:20:55 Row one, column two, the top one is going to hit on a minus 369 00:20:55 --> 00:20:59 one, and I think that's all there is, right? 370 00:20:59 --> 00:21:03 Then this one hits a zero and those three zeroes, so. 371 00:21:03 --> 00:21:09 And then what about the next guy here? 372 00:21:09 --> 00:21:10 A minus one. 373 00:21:10 --> 00:21:13 And the last guy? 374 00:21:13 --> 00:21:14 A zero. 375 00:21:14 --> 00:21:19 So that's row one of A transpose A. 376 00:21:19 --> 00:21:23 Can I just look at that for a moment before 377 00:21:23 --> 00:21:24 I fill in the rest? 378 00:21:24 --> 00:21:30 And then, when you fill in the rest it'll confirm the idea. 379 00:21:30 --> 00:21:31 Why do I have a zero there? 380 00:21:31 --> 00:21:38 Why did a zero appear in the 1, 4 position? 381 00:21:38 --> 00:21:41 If I look back at the graph, what is it about nodes one 382 00:21:41 --> 00:21:44 and four that told me ahead of time? 383 00:21:44 --> 00:21:49 You're going to get a zero in that A transpose A. 384 00:21:49 --> 00:21:52 Everybody see what nodes one and four are? 385 00:21:52 --> 00:21:54 Yeah, say it again. 386 00:21:54 --> 00:21:56 Not connected. 387 00:21:56 --> 00:21:58 No edge. 388 00:21:58 --> 00:22:00 Here there was an edge from node one to two. 389 00:22:00 --> 00:22:03 Here is an edge from node one to three. 390 00:22:03 --> 00:22:05 Those both produce the minus ones. 391 00:22:05 --> 00:22:11 And on the diagonal came the two to balance it. 392 00:22:11 --> 00:22:12 What does that two represent? 393 00:22:12 --> 00:22:16 That two represents the number of edges that 394 00:22:16 --> 00:22:17 do go into node one. 395 00:22:17 --> 00:22:20 See, that row is all about node one. 396 00:22:20 --> 00:22:24 So they're two edges into it, and then an edge out, and an 397 00:22:24 --> 00:22:29 edge out, and the edge out and the no edge. 398 00:22:29 --> 00:22:30 OK. 399 00:22:30 --> 00:22:34 So, now I know it's going to be a symmetric matrix, so I could 400 00:22:34 --> 00:22:36 speed up and fill those in. 401 00:22:36 --> 00:22:38 What's the next entry here? 402 00:22:38 --> 00:22:41 What's the guy on this diagonal? 403 00:22:41 --> 00:22:46 So that's row two against column two, so I have a one 404 00:22:46 --> 00:22:50 there, a one there, a one there, that makes a three. 405 00:22:50 --> 00:22:53 Why a three? 406 00:22:53 --> 00:22:55 Because there are, yeah, you got it. 407 00:22:55 --> 00:23:04 There are three edges into node number two. 408 00:23:04 --> 00:23:07 Three edges into node number two, and now I'm going to have 409 00:23:07 --> 00:23:11 some minus ones off the diagonal for those edges. 410 00:23:11 --> 00:23:16 So what are these entries going to be here? 411 00:23:16 --> 00:23:18 They're both minus ones. 412 00:23:18 --> 00:23:22 Edge two is connected to all three other nodes. 413 00:23:22 --> 00:23:25 So I'm going to see a minus one and a minus one there, and 414 00:23:25 --> 00:23:27 it's going to be symmetric. 415 00:23:27 --> 00:23:32 And I'm nearly there. 416 00:23:32 --> 00:23:36 Of course, I'm describing a pattern that you're just seeing 417 00:23:36 --> 00:23:42 unfold, but I'm doing it that way so that you'll feel hey, I 418 00:23:42 --> 00:23:46 can write down a transpose a, or check it quite quickly, 419 00:23:46 --> 00:23:51 without doing this complete matrix multiplication. 420 00:23:51 --> 00:23:53 So what number goes there? 421 00:23:53 --> 00:23:57 That's to do with node three, and I see node three connected 422 00:23:57 --> 00:24:02 to all three other nodes, and so what do you expect there? 423 00:24:02 --> 00:24:04 Minus one there, and a minus one there, and 424 00:24:04 --> 00:24:06 what do you expect here? 425 00:24:06 --> 00:24:07 Two. 426 00:24:07 --> 00:24:13 And so now I have my matrix. 427 00:24:13 --> 00:24:16 The a transpose a matrix. 428 00:24:16 --> 00:24:18 And that's square and it's symmetric. 429 00:24:18 --> 00:24:22 Now I ask you, is it positive definite? 430 00:24:22 --> 00:24:23 Or is it only semi-definite? 431 00:24:23 --> 00:24:27 Right, we know that A transpose A is always positive 432 00:24:27 --> 00:24:29 definite in the best case. 433 00:24:29 --> 00:24:34 But only positive semi-definite if it's singular, if there's 434 00:24:34 --> 00:24:38 some vector in its null space, if a transpose a times 435 00:24:38 --> 00:24:40 some vector gives zero. 436 00:24:40 --> 00:24:42 If some combination of those columns gives 437 00:24:42 --> 00:24:45 me the zero column. 438 00:24:45 --> 00:24:47 Which is it? 439 00:24:47 --> 00:24:52 Have I got a singular matrix or an invertible matrix here? 440 00:24:52 --> 00:24:54 Singular. 441 00:24:54 --> 00:24:56 Why singular? 442 00:24:56 --> 00:24:59 Because a had some solutions to Au=0. 443 00:25:00 --> 00:25:06 So if Au equaled zero, then I could multiply both sides by a 444 00:25:06 --> 00:25:10 transpose, that same u, A transpose times zero will still 445 00:25:10 --> 00:25:14 be zero, it might be a different size zero, 446 00:25:14 --> 00:25:17 but it'll be zero. 447 00:25:17 --> 00:25:19 And what's the u, then? 448 00:25:19 --> 00:25:21 It's the all ones vector. 449 00:25:21 --> 00:25:27 What am I saying about the columns of A transpose A? 450 00:25:27 --> 00:25:31 They're dependent.. they add up because it's the <1, 1, 451 00:25:31 --> 00:25:34 1, 1> vector that's guilty. 452 00:25:34 --> 00:25:37 Every row adds to zero. 453 00:25:37 --> 00:25:40 Every row adds to zero. 454 00:25:40 --> 00:25:45 Let me just say for a moment, introduce two notation 455 00:25:45 --> 00:25:50 for the diagonal matrix. 456 00:25:50 --> 00:25:54 D, that's the diagonal matrix, two, three, three, two. 457 00:25:54 --> 00:25:57 And then I'll put in a minus sign, and this 458 00:25:57 --> 00:26:02 is and I'll call it W. 459 00:26:02 --> 00:26:05 So you can pick out what D and W are, but let 460 00:26:05 --> 00:26:07 me do it for sure. 461 00:26:07 --> 00:26:13 So D, the degree matrix, OK this is this is like 462 00:26:13 --> 00:26:15 fun because I'm not doing anything yet. 463 00:26:15 --> 00:26:17 I'm just giving names here. 464 00:26:17 --> 00:26:19 Two, three, three, two. 465 00:26:19 --> 00:26:22 The degree of a node, the degree means how many 466 00:26:22 --> 00:26:25 edges go from it. 467 00:26:25 --> 00:26:26 How many edges touch it. 468 00:26:26 --> 00:26:33 And W is also a great matrix, it's called 469 00:26:33 --> 00:26:42 the adjacency matrix. 470 00:26:42 --> 00:26:46 It's also beautiful. 471 00:26:46 --> 00:26:50 Now it'll have plus ones because I wanted minus W, so it 472 00:26:50 --> 00:26:56 has, these nodes are not adjacent to themselves but it's 473 00:26:56 --> 00:26:59 got this one and this one and this one this one and that 474 00:26:59 --> 00:27:01 one, and that's a zero. 475 00:27:01 --> 00:27:07 So there are five, the adjacency matrix tells me 476 00:27:07 --> 00:27:09 which nodes are connected to which other nodes. 477 00:27:09 --> 00:27:13 And of course the connections are going both ways. 478 00:27:13 --> 00:27:17 So I see five ones from five edges. 479 00:27:17 --> 00:27:24 And I see five more ones below the diagonal, because the edges 480 00:27:24 --> 00:27:27 are connecting both ways. 481 00:27:27 --> 00:27:30 Ones connected to three, and three is connected to one. 482 00:27:30 --> 00:27:33 One is not connected to four, and four is not 483 00:27:33 --> 00:27:34 connected to one. 484 00:27:34 --> 00:27:37 One is not connected to itself. 485 00:27:37 --> 00:27:38 By an edge. 486 00:27:38 --> 00:27:43 If we allowed, like, little self loops, then a one could 487 00:27:43 --> 00:27:44 appear on the diagram. 488 00:27:44 --> 00:27:45 But we don't. 489 00:27:45 --> 00:27:48 OK, so that's D and W. 490 00:27:48 --> 00:27:49 Here are the key matrices. 491 00:27:49 --> 00:27:54 This is actually, I venture to say that any afternoon at 492 00:27:54 --> 00:27:59 MIT there's a seminar that involves these matrices. 493 00:27:59 --> 00:28:02 One name for this is the graph, Laplacian. 494 00:28:02 --> 00:28:09 From Laplace's equation and we'll see pretty soon where 495 00:28:09 --> 00:28:11 that name's coming from. 496 00:28:11 --> 00:28:12 But it's there. 497 00:28:12 --> 00:28:19 And should I think, I think I should, just about networks. 498 00:28:19 --> 00:28:22 Like where, does the networks come from? 499 00:28:22 --> 00:28:25 I think we've got networks all around us. 500 00:28:25 --> 00:28:26 Right? 501 00:28:26 --> 00:28:33 Electrical networks are the simplest, maybe in some ways 502 00:28:33 --> 00:28:36 the simplest to visualize. 503 00:28:36 --> 00:28:54 So that's the example, that's the language I'll use. 504 00:28:54 --> 00:28:59 Now, I get a network, I use the word network when there's 505 00:28:59 --> 00:29:01 a c_1, c_2, c_3, c_4, c_5. 506 00:29:03 --> 00:29:04 Those extra numbers. 507 00:29:04 --> 00:29:10 I've got the A, and now the network comes from the c part. 508 00:29:10 --> 00:29:15 That diagonal matrix, and if I'm talking electricity, 509 00:29:15 --> 00:29:17 these could be resistors. 510 00:29:17 --> 00:29:19 Status springs, they're resistors. 511 00:29:19 --> 00:29:27 So it's the conductance in those five resistors, are 512 00:29:27 --> 00:29:27 c_1, c_2, c_3, c_4, and c_5. 513 00:29:27 --> 00:29:31 514 00:29:31 --> 00:29:33 So I'm ready for that. 515 00:29:33 --> 00:29:36 Ready for the C matrix, because we got the a matrix. 516 00:29:36 --> 00:29:44 And we've got A transpose A, but the the applications 517 00:29:44 --> 00:29:47 throw in a c matrix also. 518 00:29:47 --> 00:29:51 What are other applications, I was saying, like this one is 519 00:29:51 --> 00:29:56 the one, I'll use the word current, for flow in the edges, 520 00:29:56 --> 00:29:59 or I'll use the word flow. 521 00:29:59 --> 00:30:04 A network of oil, or natural gas, or water pipes would be 522 00:30:04 --> 00:30:13 just that, and then the electrical people study. 523 00:30:13 --> 00:30:19 Professor Vergasian in Course 6 studies the electric grid. 524 00:30:19 --> 00:30:22 The US electric grid, or the western, off in the western 525 00:30:22 --> 00:30:24 half of the US electric grid. 526 00:30:24 --> 00:30:27 So that's got a whole lot of things. 527 00:30:27 --> 00:30:29 Pumping stations. 528 00:30:29 --> 00:30:30 You see it? 529 00:30:30 --> 00:30:35 Actually, the world wide web, the internet, is a giant 530 00:30:35 --> 00:30:39 network that people would love to understand. 531 00:30:39 --> 00:30:41 And the phone company would love to understand those 532 00:30:41 --> 00:30:43 networks of phone calls. 533 00:30:43 --> 00:30:47 I mean, those are really, that's what, giant businesses 534 00:30:47 --> 00:30:52 are are dependent on understanding and 535 00:30:52 --> 00:30:55 maintaining networks. 536 00:30:55 --> 00:30:57 OK, so I'm going to use resistors. 537 00:30:57 --> 00:31:00 Of course, I'm staying linear. 538 00:31:00 --> 00:31:04 And I'm staying steady state. 539 00:31:04 --> 00:31:06 So by staying linear there aren't any transistors 540 00:31:06 --> 00:31:08 in this net. 541 00:31:08 --> 00:31:10 By staying steady state, there aren't any 542 00:31:10 --> 00:31:12 capacitors or inductors. 543 00:31:12 --> 00:31:16 Those guys would be linear elements, but they 544 00:31:16 --> 00:31:20 would be coming in a time-dependent problem. 545 00:31:20 --> 00:31:22 A UTT problem. 546 00:31:22 --> 00:31:29 And I'm just staying now with Ku=f, I'm trying to create K. 547 00:31:29 --> 00:31:32 The stiffness matrix, which maybe here we might call 548 00:31:32 --> 00:31:35 the conductance matrix. 549 00:31:35 --> 00:31:38 OK, so ready for the picture now? 550 00:31:38 --> 00:31:42 That these come into? 551 00:31:42 --> 00:31:47 You know what the picture looks like, it's going to have the 552 00:31:47 --> 00:31:54 usual four, we'll start with these potentials u at the 553 00:31:54 --> 00:32:01 nodes, potentials at nodes, so those will be u_1, 554 00:32:01 --> 00:32:02 u_2, u_3, u_4. 555 00:32:02 --> 00:32:05 556 00:32:05 --> 00:32:11 Voltages, if I'm really speaking, those units 557 00:32:11 --> 00:32:18 would be volts, and now comes the matrix A. 558 00:32:18 --> 00:32:22 And now I get, what do I get from A? 559 00:32:22 --> 00:32:24 What do I get from A? 560 00:32:24 --> 00:32:25 Key question. 561 00:32:25 --> 00:32:29 If I multiply A times u, and you know that's coming, right? 562 00:32:29 --> 00:32:35 If I multiply A times u, so I'll erase A transpose now, 563 00:32:35 --> 00:32:37 because we've got that. 564 00:32:37 --> 00:32:41 So there's A, and now I'll make space to multiply 565 00:32:41 --> 00:32:45 by u, alright? 566 00:32:45 --> 00:32:48 So now I want to look at Au. 567 00:32:49 --> 00:32:53 So A multiplies a bunch of potentials, a 568 00:32:53 --> 00:32:55 bunch of voltages. 569 00:32:55 --> 00:32:57 And let's just do this multiplication and see 570 00:32:57 --> 00:32:59 what it produces. 571 00:32:59 --> 00:33:02 This is the great thing about matrices, they 572 00:33:02 --> 00:33:05 produce something. 573 00:33:05 --> 00:33:08 OK, what's the first component of Au? 574 00:33:10 --> 00:33:14 Of course, Au is going to be five by five. 575 00:33:14 --> 00:33:17 It's going to be associated with edges. 576 00:33:17 --> 00:33:20 Right, u's associated with nodes, a u with edges. 577 00:33:20 --> 00:33:22 Just, the pattern is so nice. 578 00:33:22 --> 00:33:26 Alright, what's the first component? 579 00:33:26 --> 00:33:30 Just do that multiplication and what do you get? u_2-u_1. 580 00:33:30 --> 00:33:33 581 00:33:33 --> 00:33:36 What do you get in the second component? 582 00:33:36 --> 00:33:38 Do that multiplication and you get u_3-u_1. 583 00:33:41 --> 00:33:42 The third one will be u_3-u_2. 584 00:33:44 --> 00:33:48 The fourth one would be u_4-u_2, and the fifth 585 00:33:48 --> 00:33:49 one will be u_4-u_3. 586 00:33:49 --> 00:33:56 587 00:33:56 --> 00:34:03 Just like our first difference matrices. 588 00:34:03 --> 00:34:11 But this one deals with, I mean, our first difference 589 00:34:11 --> 00:34:15 matrices were exactly like this when the graph 590 00:34:15 --> 00:34:17 was all in a line. 591 00:34:17 --> 00:34:21 The big step now is that the graph is not in a line, not 592 00:34:21 --> 00:34:24 even necessarily in a plane. 593 00:34:24 --> 00:34:29 Could be in, it's a bunch of points, and edges. 594 00:34:29 --> 00:34:33 Actually, the position of those points, we don't have to 595 00:34:33 --> 00:34:34 know are they in a plane. 596 00:34:34 --> 00:34:37 I think of them as nodes and edges. 597 00:34:37 --> 00:34:44 OK, what's the natural name for Au? 598 00:34:44 --> 00:34:46 I would call those potential differences, right? 599 00:34:46 --> 00:34:48 Voltage differences. 600 00:34:48 --> 00:34:50 So that's what we see here and those will be e. e_1, e_2, e_3, 601 00:34:50 --> 00:35:00 e_4, e_5 will be potential or voltage differences. 602 00:35:00 --> 00:35:02 Voltage drops, you might say. 603 00:35:02 --> 00:35:05 Potential differences, voltage drops. 604 00:35:05 --> 00:35:10 Oh well, now. 605 00:35:10 --> 00:35:15 When I say voltage drops, that's because, as we noted 606 00:35:15 --> 00:35:21 before, the current goes from a higher to a lower potential. 607 00:35:21 --> 00:35:24 It goes in the direction of the drop. 608 00:35:24 --> 00:35:31 And I think that what we need now is minus Au, for e. 609 00:35:31 --> 00:35:35 So I think we need a minus sign and it's quite common 610 00:35:35 --> 00:35:36 to have the minus sign. 611 00:35:36 --> 00:35:40 We saw it already with least squared. 612 00:35:40 --> 00:35:48 And let me say also, so this is e. 613 00:35:48 --> 00:35:52 I'll abbreviate those always five e's I just wrote 614 00:35:52 --> 00:35:53 down, five of them. 615 00:35:53 --> 00:35:55 So you would remember there are five. 616 00:35:55 --> 00:35:57 We're talking about the currents. 617 00:35:57 --> 00:36:01 We're talking about, this is the e in e=IR. 618 00:36:03 --> 00:36:06 The voltage drop. 619 00:36:06 --> 00:36:08 That makes some current go. 620 00:36:08 --> 00:36:14 Now, also, just as with least squares, so it was great that 621 00:36:14 --> 00:36:18 we saw it before, there could be a source term here. 622 00:36:18 --> 00:36:24 So I'm completing the picture here, allowing the source term. 623 00:36:24 --> 00:36:27 And we'll come back to what does that mean, physically. 624 00:36:27 --> 00:36:32 But at that point could enter b, and b is really 625 00:36:32 --> 00:36:35 standing for batteries. 626 00:36:35 --> 00:36:40 I work hard to make the language match the initials. 627 00:36:40 --> 00:36:41 These letters. 628 00:36:41 --> 00:36:45 OK, now what? 629 00:36:45 --> 00:36:51 That step just involved A, nothing physical. 630 00:36:51 --> 00:36:57 Now comes the step that involves A, so w will be Ce. 631 00:36:57 --> 00:37:02 And these will be the currents on the edges. 632 00:37:02 --> 00:37:09 And that's the law, then, with a matrix C, of course C is 633 00:37:09 --> 00:37:12 our old friend c_1 to c_5. 634 00:37:14 --> 00:37:17 And tell me first, the name. 635 00:37:17 --> 00:37:19 Whose law is this? 636 00:37:19 --> 00:37:21 That the current is proportional to 637 00:37:21 --> 00:37:22 the voltage drop? 638 00:37:22 --> 00:37:24 Ohm. 639 00:37:24 --> 00:37:28 So this is Ohm's law. 640 00:37:28 --> 00:37:30 Instead of Hooke's law, it's Ohm's law. 641 00:37:30 --> 00:37:34 And I've written it with conductances, not resistances. 642 00:37:34 --> 00:37:42 So resistances are 1/R, the usual R in e=IR, would be, I'm 643 00:37:42 --> 00:37:48 more looking at it as i current equals Ce, instead of e=IR. 644 00:37:49 --> 00:37:55 So I'm flipping the the the resistance, or the impedance 645 00:37:55 --> 00:37:57 to give the conductance. 646 00:37:57 --> 00:38:05 OK, and now finally can you tell me what the last 647 00:38:05 --> 00:38:08 step is going to be? 648 00:38:08 --> 00:38:15 If life is good, well you might wonder whether life is good, 649 00:38:15 --> 00:38:21 reading the papers, but it's still good here. 650 00:38:21 --> 00:38:23 OK, what matrix shows up there? 651 00:38:23 --> 00:38:25 Everybody knows it. 652 00:38:25 --> 00:38:26 A transpose. 653 00:38:26 --> 00:38:31 So the final equation, the balance equation, will 654 00:38:31 --> 00:38:35 be, let me write it so I don't catch it up here. 655 00:38:35 --> 00:38:39 Will be A transpose w equals whatever. 656 00:38:39 --> 00:38:42 Will be the balance equation. 657 00:38:42 --> 00:38:45 The current balance, it's the balance of currents, balance 658 00:38:45 --> 00:38:48 of charge, whatever you like to say. 659 00:38:48 --> 00:38:51 At each node, it's the balance at the nodes. 660 00:38:51 --> 00:38:55 Because when we're up on this line, we're 661 00:38:55 --> 00:38:56 in the node picture. 662 00:38:56 --> 00:38:58 We have four equations here, right? 663 00:38:58 --> 00:39:01 We're talking about at each node. 664 00:39:01 --> 00:39:05 Here we're talking about on each edge. 665 00:39:05 --> 00:39:06 There is so critical. 666 00:39:06 --> 00:39:09 These two variables. 667 00:39:09 --> 00:39:13 Which we're seeing physically as node variables 668 00:39:13 --> 00:39:17 and edge variables. 669 00:39:17 --> 00:39:21 That pair of variables just shows up everywhere. 670 00:39:21 --> 00:39:28 In displacements and stresses, it's fundamental in elasticity. 671 00:39:28 --> 00:39:35 And oh, there are just so many in optimization, 672 00:39:35 --> 00:39:36 it's everywhere. 673 00:39:36 --> 00:39:39 And a big part of this course is to see it everywhere. 674 00:39:39 --> 00:39:46 OK, why don't I, just so you see the main picture. 675 00:39:46 --> 00:39:51 We're going to have the A transpose C A matrix that I'm 676 00:39:51 --> 00:39:54 going to maybe call K again. 677 00:39:54 --> 00:39:58 And now of course there could be current sources. 678 00:39:58 --> 00:40:04 Just the way there could be forces that we had to balance. 679 00:40:04 --> 00:40:09 There could be, not always but there could be, current 680 00:40:09 --> 00:40:10 sources from outside. 681 00:40:10 --> 00:40:12 External current sources. 682 00:40:12 --> 00:40:15 So these are external voltage sources. 683 00:40:15 --> 00:40:17 These are external current sources. 684 00:40:17 --> 00:40:22 So in a way, we now have combined our first two 685 00:40:22 --> 00:40:26 examples, our springs and masses only had 686 00:40:26 --> 00:40:28 forces external. 687 00:40:28 --> 00:40:33 Our least squares problem had an external b. 688 00:40:33 --> 00:40:34 Measurement. 689 00:40:34 --> 00:40:36 This picture is the whole deal. 690 00:40:36 --> 00:40:40 It's gotta b and f, and actually I could put in 691 00:40:40 --> 00:40:46 even a little more. 692 00:40:46 --> 00:40:55 Sources like, well, we already kind of caught on to the fact 693 00:40:55 --> 00:41:00 that we'd better ground the node or A transpose C A as it 694 00:41:00 --> 00:41:03 stands, A transpose C A as it stands will be singular. 695 00:41:03 --> 00:41:06 You know, it's the matrix, there's A transpose A 696 00:41:06 --> 00:41:09 and the C in the middle isn't going to help any. 697 00:41:09 --> 00:41:10 That's singular. 698 00:41:10 --> 00:41:17 If we wanted to be able to compute voltages, we've 699 00:41:17 --> 00:41:19 got to set one of them. 700 00:41:19 --> 00:41:23 It's like setting one temperature, it's like deciding 701 00:41:23 --> 00:41:24 where is absolute zero. 702 00:41:24 --> 00:41:28 Let's put absolute zero down here. u_4=0. 703 00:41:29 --> 00:41:32 Grounded the node. 704 00:41:32 --> 00:41:36 OK, so we've fixed a potential. 705 00:41:36 --> 00:41:40 So here's a boundary condition coming in u_4=0. 706 00:41:40 --> 00:41:43 707 00:41:43 --> 00:41:46 That's another source term, another thing coming, you could 708 00:41:46 --> 00:41:50 say sort of from outside the A transpose C A. 709 00:41:50 --> 00:41:54 We could fix another voltage at, I mean, I'm thinking now 710 00:41:54 --> 00:41:58 about what's the picture. 711 00:41:58 --> 00:42:04 What's the whole problem? 712 00:42:04 --> 00:42:09 So the problem could have batteries, in the edges. 713 00:42:09 --> 00:42:12 It could have current sources into the nodes. 714 00:42:12 --> 00:42:19 It could fix u_1 at some voltage like ten. 715 00:42:19 --> 00:42:20 Our problem could fix 716 00:42:20 --> 00:42:22 - we must fix one of them. 717 00:42:22 --> 00:42:28 Otherwise our matrix isn't as singular. 718 00:42:28 --> 00:42:31 But once we've set up the matrix, and when we fix 719 00:42:31 --> 00:42:35 u_4=0 by the way, what happens to our matrix? 720 00:42:35 --> 00:42:39 Let me take u_4=0, so this is a key step here. 721 00:42:39 --> 00:42:42 When I set u_4=0, I now know u_4. 722 00:42:43 --> 00:42:45 It's not an unknown any more. 723 00:42:45 --> 00:42:52 So I've removed u_4 from the problem. 724 00:42:52 --> 00:42:55 And then it'll be also removed from A transpose A. 725 00:42:55 --> 00:42:58 So this, is you could say, like a reduced A, or 726 00:42:58 --> 00:43:00 a grounded matrix A. 727 00:43:00 --> 00:43:03 It's now five by three. 728 00:43:03 --> 00:43:05 And A transpose A, what shape will the a 729 00:43:05 --> 00:43:08 transpose a matrix be? 730 00:43:08 --> 00:43:10 It'll be three by three, right? 731 00:43:10 --> 00:43:13 I now have five by three, three by five. 732 00:43:13 --> 00:43:16 Multiplying five by three gives me three by three. 733 00:43:16 --> 00:43:21 This column is gone, and that row is gone. 734 00:43:21 --> 00:43:24 Because the row came from A transpose and the column 735 00:43:24 --> 00:43:27 came from A, and we've just thrown them away. 736 00:43:27 --> 00:43:29 By grounding that node. 737 00:43:29 --> 00:43:37 Now give me the key fact about that A transpose A matrix? 738 00:43:37 --> 00:43:39 What what do you see there? 739 00:43:39 --> 00:43:44 Now, you see a reduced, a grounded A transpose A. 740 00:43:44 --> 00:43:46 What kind of a matrix have I got? 741 00:43:46 --> 00:43:47 Positive def. 742 00:43:47 --> 00:43:48 Good. 743 00:43:48 --> 00:43:49 Positive definite. 744 00:43:49 --> 00:43:54 It's now not singular any more, its determinant is 745 00:43:54 --> 00:43:56 some positive number. 746 00:43:56 --> 00:43:59 And everything is positive, its eigenvalues are all 747 00:43:59 --> 00:44:02 positive, everything's good about that matrix. 748 00:44:02 --> 00:44:08 OK, and I guess what I was starting to say here, if I 749 00:44:08 --> 00:44:13 wanted to fix, this would be a natural problem. 750 00:44:13 --> 00:44:17 Fix the top voltage at one, say. 751 00:44:17 --> 00:44:22 Fix u_1=1 and see how much current flows. 752 00:44:22 --> 00:44:25 That would be a natural question. 753 00:44:25 --> 00:44:28 What's the system resistance between the top node and the 754 00:44:28 --> 00:44:33 bottom, if I'm given, or the system conductance. 755 00:44:33 --> 00:44:40 If I'm given a c_1, a c_2, a c_3, a c_4, and a c_5, I could 756 00:44:40 --> 00:44:44 say I could fix that voltage at one, I could fix this at zero. 757 00:44:44 --> 00:44:47 Maybe one of the homework problems asks you for 758 00:44:47 --> 00:44:48 something like this. 759 00:44:48 --> 00:44:52 And then you find all the currents. 760 00:44:52 --> 00:44:54 And the voltages, you solve the problem. 761 00:44:54 --> 00:44:58 And you know what the currents are. 762 00:44:58 --> 00:45:02 You know the total current that leaves node one, enters node 763 00:45:02 --> 00:45:08 four when the voltages drop by one, between, right? 764 00:45:08 --> 00:45:11 So current can flow down here, cross over here, 765 00:45:11 --> 00:45:13 down here whatever. 766 00:45:13 --> 00:45:19 Somehow all these five numbers are going to play a part 767 00:45:19 --> 00:45:21 in that system resistance. 768 00:45:21 --> 00:45:24 So that would be an interesting number to know. 769 00:45:24 --> 00:45:29 Out of those five numbers, somehow five c's, there's a 770 00:45:29 --> 00:45:32 system resistance between that node and that node. 771 00:45:32 --> 00:45:35 And we can find it by setting this to be one, this to be 772 00:45:35 --> 00:45:40 zero, having the reduced matrix - oh, well what will happen? 773 00:45:40 --> 00:45:43 How many unknowns well I have? 774 00:45:43 --> 00:45:45 Just do this mental experiment. 775 00:45:45 --> 00:45:51 Suppose I introduce u_1 to be one, for example. 776 00:45:51 --> 00:45:54 This is just one type of possible problem. 777 00:45:54 --> 00:46:03 If I take u_1 to be one, what happens to my matrix A? 778 00:46:03 --> 00:46:07 It loses its first column, too. u_1 is not unknown any more. 779 00:46:07 --> 00:46:12 u_1 will not be unknown. 780 00:46:12 --> 00:46:16 And that value one is somehow going to move to the 781 00:46:16 --> 00:46:17 right-hand side, right? 782 00:46:17 --> 00:46:21 People have asked me after class, well what happens if a 783 00:46:21 --> 00:46:24 boundary condition isn't zero? 784 00:46:24 --> 00:46:28 Suppose we have this fixed springs and we pull this 785 00:46:28 --> 00:46:32 spring down to make its displacement 12. 786 00:46:32 --> 00:46:34 Well, somehow that 12 is going to show up on the right 787 00:46:34 --> 00:46:36 side of the equation. 788 00:46:36 --> 00:46:39 It's a source, it's an external term. 789 00:46:39 --> 00:46:43 OK, so if we had u_1 equals whatever, this 790 00:46:43 --> 00:46:44 u_1 would disappear. 791 00:46:44 --> 00:46:47 I would only have a two by two problem. 792 00:46:47 --> 00:46:49 Because I would only have two, I now have only 793 00:46:49 --> 00:46:52 two unknown u's, right? 794 00:46:52 --> 00:46:55 So that's where sources can come. 795 00:46:55 --> 00:47:01 And can I just complete the picture of the source stuff? 796 00:47:01 --> 00:47:08 We could fix, we could. 797 00:47:08 --> 00:47:10 Look, here's what I'm going to say. 798 00:47:10 --> 00:47:12 External stuff. 799 00:47:12 --> 00:47:15 Sources can come into here. 800 00:47:15 --> 00:47:17 They can come into here. 801 00:47:17 --> 00:47:20 They can come into here, so of course everybody says why 802 00:47:20 --> 00:47:22 shouldn't they come in here? 803 00:47:22 --> 00:47:23 And the answer is we could send them here. 804 00:47:23 --> 00:47:33 So we could fix, we could fix some w's. 805 00:47:33 --> 00:47:36 Of course, you understand we can't do everything. 806 00:47:36 --> 00:47:41 I mean, there's a limit to how much we can put on the system. 807 00:47:41 --> 00:47:44 We want to have some unknowns left. 808 00:47:44 --> 00:47:46 Some matrix still, but anyway. 809 00:47:46 --> 00:47:50 I like this picture now, it's more complete. 810 00:47:50 --> 00:47:57 That you now see the node variables and node equations, 811 00:47:57 --> 00:48:00 the edge variables, e and w. 812 00:48:00 --> 00:48:01 The currents. 813 00:48:01 --> 00:48:08 These guys are the big ones. w and u are what I think of as 814 00:48:08 --> 00:48:14 the crucial unknowns. e is sort of on the way. f is the source. 815 00:48:14 --> 00:48:17 But now we have the possibility of sources 816 00:48:17 --> 00:48:20 at all four positions. 817 00:48:20 --> 00:48:24 OK, let's see. 818 00:48:24 --> 00:48:31 If I wrote out, If I looked at A transpose C A, would you 819 00:48:31 --> 00:48:34 like to tell me, yeah. 820 00:48:34 --> 00:48:35 Have we got? 821 00:48:35 --> 00:48:37 No, we don't. 822 00:48:37 --> 00:48:40 I was going to say, what's a typical row of A transpose C A, 823 00:48:40 --> 00:48:43 can I just say it in words? 824 00:48:43 --> 00:48:45 It'll be too quick to really catch. 825 00:48:45 --> 00:48:49 So without the C, this is what we had. 826 00:48:49 --> 00:48:53 So what do you think that two becomes if there's an A 827 00:48:53 --> 00:48:56 transpose C A, if there's a C in the middle. 828 00:48:56 --> 00:48:58 Have you got the pattern yet? 829 00:48:58 --> 00:49:02 That two was there because of two edges. 830 00:49:02 --> 00:49:05 Edges one and two, it happened to be. 831 00:49:05 --> 00:49:08 So instead of the two, I'm going to see c_1+c_2. 832 00:49:11 --> 00:49:11 Right. 833 00:49:11 --> 00:49:14 When those were ones, I got the two. 834 00:49:14 --> 00:49:18 So this will be c_1+c_2, this'll be a minus c_1, and 835 00:49:18 --> 00:49:21 that'll be a minus c_1, when we do it out. 836 00:49:21 --> 00:49:22 And you could do it out for yourself. 837 00:49:22 --> 00:49:27 Just tell me what would show up there. 838 00:49:27 --> 00:49:30 In A transpose C A, so I'm talking now about 839 00:49:30 --> 00:49:33 A transpose C A. 840 00:49:33 --> 00:49:37 So instead of one plus one plus one, what do I have? 841 00:49:37 --> 00:49:40 What am I going to have, and you really want to multiply 842 00:49:40 --> 00:49:44 it out, because it's so nice to see it happen. 843 00:49:44 --> 00:49:45 What do I have? 844 00:49:45 --> 00:49:50 I'm looking at node two, I'm seeing three edges out of it. 845 00:49:50 --> 00:49:53 And instead of one, one, one, I'll have c_1+c_3+c_4. 846 00:49:56 --> 00:50:00 c_1+c_3+c_4 will be sitting here. 847 00:50:00 --> 00:50:02 And minus c_1 will be here, and minus c_3 will be here, and 848 00:50:02 --> 00:50:06 minus c_4 will be there. 849 00:50:06 --> 00:50:08 The pattern's just nice. 850 00:50:08 --> 00:50:14 So if you can read this part of the section, I'll have more 851 00:50:14 --> 00:50:20 to say Friday about the a transpose w, the balance. 852 00:50:20 --> 00:50:23 That critical point we didn't do yet. 853 00:50:23 --> 00:50:27 But the main thing, you've got it.