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