1 00:00:00,000 --> 00:00:00,030 2 00:00:00,030 --> 00:00:02,330 The following content is provided under a Creative 3 00:00:02,330 --> 00:00:03,610 Commons license. 4 00:00:03,610 --> 00:00:05,970 Your support will help MIT OpenCourseWare 5 00:00:05,970 --> 00:00:09,960 continue to offer high-quality educational resources for free. 6 00:00:09,960 --> 00:00:12,590 To make a donation, or to view additional materials 7 00:00:12,590 --> 00:00:15,210 from hundreds of MIT courses, visit MIT OpenCourseWare 8 00:00:15,210 --> 00:00:19,819 at ocw.mit.edu. 9 00:00:19,819 --> 00:00:21,610 PROFESSOR STRANG: This is my second lecture 10 00:00:21,610 --> 00:00:27,430 on the example, the model of graphs and networks. 11 00:00:27,430 --> 00:00:32,220 Really perfect, beautiful model for the whole framework. 12 00:00:32,220 --> 00:00:37,230 And important in itself. 13 00:00:37,230 --> 00:00:42,700 So, I guess a major thing that I still have to do 14 00:00:42,700 --> 00:00:45,080 is discuss A transpose. 15 00:00:45,080 --> 00:00:48,140 See how A transpose just naturally appears 16 00:00:48,140 --> 00:00:50,800 in the balance law. 17 00:00:50,800 --> 00:00:55,500 Kirchhoff's current law, KCL, is just 18 00:00:55,500 --> 00:00:58,290 like a model for balance equations. 19 00:00:58,290 --> 00:01:02,700 By balance I mean, in equals out, essentially. 20 00:01:02,700 --> 00:01:05,030 Flow in equals flow out because we're 21 00:01:05,030 --> 00:01:06,860 talking about steady state. 22 00:01:06,860 --> 00:01:11,550 So in each node, at node three, for example, 23 00:01:11,550 --> 00:01:14,500 I have three edges. 24 00:01:14,500 --> 00:01:18,210 So the law, Kirchhoff's current law at that point 25 00:01:18,210 --> 00:01:29,810 is going to tell me that the flow w_2 plus w_3 minus w_5 26 00:01:29,810 --> 00:01:33,150 would be zero if there's no current source, 27 00:01:33,150 --> 00:01:37,850 or if I'm feeding current into there, some current f_3, 28 00:01:37,850 --> 00:01:41,000 then it would match f_3. 29 00:01:41,000 --> 00:01:43,330 So maybe having just said those words, 30 00:01:43,330 --> 00:01:46,790 let me just say, w_2, I'll say it again, 31 00:01:46,790 --> 00:01:52,160 w_2 plus w_3 minus w_5, and I'm hoping 32 00:01:52,160 --> 00:01:56,860 that I'll find that in the third column here. 33 00:01:56,860 --> 00:01:58,790 And I do. 34 00:01:58,790 --> 00:02:02,850 Because I'm thinking, and we'll write it down, 35 00:02:02,850 --> 00:02:04,490 I'm thinking to take a transpose, 36 00:02:04,490 --> 00:02:07,040 so it'll be the third row, and here I 37 00:02:07,040 --> 00:02:10,810 see the w_2, w_3 and minus w_5 that 38 00:02:10,810 --> 00:02:15,780 will show up in the third equation there, 39 00:02:15,780 --> 00:02:18,900 the in equals out at node three. 40 00:02:18,900 --> 00:02:23,630 Well I'll write that down, because it's-- So, 41 00:02:23,630 --> 00:02:26,400 two or three jobs for today. 42 00:02:26,400 --> 00:02:32,390 And then Monday I plan to spend a part of the lecture 43 00:02:32,390 --> 00:02:38,620 and all of the review session in review, 44 00:02:38,620 --> 00:02:43,650 it's a great chance to go back to the things we've done 45 00:02:43,650 --> 00:02:49,860 and collect them, assemble them, organize them and see them 46 00:02:49,860 --> 00:02:50,480 again. 47 00:02:50,480 --> 00:02:54,950 So that's my goal for both sessions on Monday. 48 00:02:54,950 --> 00:02:59,050 And questions, then, about every aspect. 49 00:02:59,050 --> 00:03:05,600 So, before I get to A transpose, this part 50 00:03:05,600 --> 00:03:09,490 I had written down last time, but there's a little more 51 00:03:09,490 --> 00:03:10,880 to say. 52 00:03:10,880 --> 00:03:15,840 And what I was saying and want to continue with 53 00:03:15,840 --> 00:03:20,750 is the source terms. 54 00:03:20,750 --> 00:03:28,160 I put in this b but I didn't draw anything on the network. 55 00:03:28,160 --> 00:03:34,010 So let me draw what these b's represent. 56 00:03:34,010 --> 00:03:41,140 So this second, lower, row is about edge equations, 57 00:03:41,140 --> 00:03:42,610 edge variables. 58 00:03:42,610 --> 00:03:48,020 So those batteries b are on the edges. 59 00:03:48,020 --> 00:03:51,120 And there will be, b has length five. 60 00:03:51,120 --> 00:03:54,220 There are five edges. 61 00:03:54,220 --> 00:03:57,320 This is a vector of length five, this matrix, A, 62 00:03:57,320 --> 00:04:00,690 you remember was five by four. 63 00:04:00,690 --> 00:04:05,410 It produced from four inputs, from four potentials 64 00:04:05,410 --> 00:04:13,370 at the four nodes, A produces Au, five potential differences. 65 00:04:13,370 --> 00:04:16,010 So those are the differences in potentials. 66 00:04:16,010 --> 00:04:18,920 But then also there can be source terms 67 00:04:18,920 --> 00:04:22,270 from batteries in the edges, and the minus sign 68 00:04:22,270 --> 00:04:25,280 is there because I'm talking about voltage drops. 69 00:04:25,280 --> 00:04:28,440 So when I say differences I'm really 70 00:04:28,440 --> 00:04:32,280 speaking about voltage drops. 71 00:04:32,280 --> 00:04:35,720 Because that's the way current flows. 72 00:04:35,720 --> 00:04:40,560 OK, this is the moment that I hate. 73 00:04:40,560 --> 00:04:44,480 Putting the batteries in. 74 00:04:44,480 --> 00:04:49,580 I think you draw a battery with a long and a short? 75 00:04:49,580 --> 00:04:50,650 Is that right? 76 00:04:50,650 --> 00:04:55,460 And then you put a plus and a minus? 77 00:04:55,460 --> 00:05:04,340 Well, can I just say, life is too short to get those, 78 00:05:04,340 --> 00:05:10,930 to get this sign right. 79 00:05:10,930 --> 00:05:13,210 You may say when my car battery stalls 80 00:05:13,210 --> 00:05:15,880 how do I, because it's important at that moment, right? 81 00:05:15,880 --> 00:05:17,930 When you start it up you're supposed 82 00:05:17,930 --> 00:05:23,330 to put the right battery, the right lead on the positive 83 00:05:23,330 --> 00:05:26,250 and the right on the negative, or your blow yourself up. 84 00:05:26,250 --> 00:05:27,420 OK. 85 00:05:27,420 --> 00:05:28,670 So what's my solution? 86 00:05:28,670 --> 00:05:32,330 Because I literally refuse to deal with these signs. 87 00:05:32,330 --> 00:05:35,220 So my solution is call AAA. 88 00:05:35,220 --> 00:05:37,710 OK, they're paid to blow themselves up. 89 00:05:37,710 --> 00:05:39,090 They can do it. 90 00:05:39,090 --> 00:05:45,360 But so this is serious now, I don't want 91 00:05:45,360 --> 00:05:48,820 to be asked about these signs. 92 00:05:48,820 --> 00:05:52,040 And I forgive you for messing up the signs. 93 00:05:52,040 --> 00:05:56,330 So possibly that's plus, possibly minus, I don't know. 94 00:05:56,330 --> 00:06:00,290 But there's a battery in there of length b_1, 95 00:06:00,290 --> 00:06:04,230 of voltage-- A nine-volt battery, b_1 would be nine. 96 00:06:04,230 --> 00:06:06,780 And depending how it was placed in there, 97 00:06:06,780 --> 00:06:10,510 the b here would be a plus nine or a minus nine 98 00:06:10,510 --> 00:06:12,000 in the first component. 99 00:06:12,000 --> 00:06:15,020 And then if I had another battery here, 100 00:06:15,020 --> 00:06:18,990 a b that's on edge four, there would be a battery b_4, 101 00:06:18,990 --> 00:06:24,230 and that would show up there in Ohm's law. 102 00:06:24,230 --> 00:06:27,330 Because Ohm's law will look at the difference 103 00:06:27,330 --> 00:06:30,400 in these potentials, but then it'll also 104 00:06:30,400 --> 00:06:33,790 account for the battery, right? 105 00:06:33,790 --> 00:06:39,130 The voltage that comes from the battery, and somehow 106 00:06:39,130 --> 00:06:42,730 combining the Au, which is the difference in these guys, 107 00:06:42,730 --> 00:06:46,760 with the b_4, I'll know what is the voltage drop 108 00:06:46,760 --> 00:06:48,010 across the resistor. 109 00:06:48,010 --> 00:06:50,060 And that's what Ohm's law applies to. 110 00:06:50,060 --> 00:06:53,870 Ohm's law says the voltage drop across the resistor 111 00:06:53,870 --> 00:07:00,300 times the conductance, so this is Ohm's law, that on that edge 112 00:07:00,300 --> 00:07:04,220 the voltage drop across the resistor times the conductance 113 00:07:04,220 --> 00:07:05,570 gives the current. 114 00:07:05,570 --> 00:07:07,410 So that's the physical law. 115 00:07:07,410 --> 00:07:09,470 Is that OK? 116 00:07:09,470 --> 00:07:10,850 For batteries. 117 00:07:10,850 --> 00:07:12,950 Now a comment on current sources. 118 00:07:12,950 --> 00:07:14,530 So what's with current sources? 119 00:07:14,530 --> 00:07:16,180 How would I draw those? 120 00:07:16,180 --> 00:07:22,990 Well, very often maybe I might draw a current going 121 00:07:22,990 --> 00:07:28,590 into node one, so that would be in f_1 that goes into node one 122 00:07:28,590 --> 00:07:30,980 and maybe comes out at ground. 123 00:07:30,980 --> 00:07:34,010 So that would be a typical f. 124 00:07:34,010 --> 00:07:37,850 That if I imposed a current source, 125 00:07:37,850 --> 00:07:40,380 if I sent a current source through there 126 00:07:40,380 --> 00:07:44,490 it would go down and come out at ground, 127 00:07:44,490 --> 00:07:49,480 and our question is what are the currents in the five edges? 128 00:07:49,480 --> 00:07:51,740 What are the potentials at the four nodes? 129 00:07:51,740 --> 00:07:53,890 Well, I'm making this one ground. 130 00:07:53,890 --> 00:07:58,240 So I'm grounding this one to be u_4=0. 131 00:07:58,240 --> 00:08:00,370 And you remember of course why I had 132 00:08:00,370 --> 00:08:04,980 to do that, because this matrix A transpose A, as it stands 133 00:08:04,980 --> 00:08:10,060 is-- What's the matter with A transpose A as it stands? 134 00:08:10,060 --> 00:08:11,960 It's singular, right? 135 00:08:11,960 --> 00:08:18,360 And as I, looking ahead, just a small comment, 136 00:08:18,360 --> 00:08:20,640 that this will have exactly the same thing 137 00:08:20,640 --> 00:08:24,030 in so many other applications in big, finite element codes, 138 00:08:24,030 --> 00:08:28,030 you produce a stiffness matrix that's initially singular. 139 00:08:28,030 --> 00:08:30,970 And then you impose the boundary conditions. 140 00:08:30,970 --> 00:08:32,780 That's the efficient way to do it, 141 00:08:32,780 --> 00:08:36,080 is create the matrix first, that's the big job, 142 00:08:36,080 --> 00:08:38,010 then impose the boundary conditions, 143 00:08:38,010 --> 00:08:42,100 that's the small but occasionally tricky part. 144 00:08:42,100 --> 00:08:45,540 Now I indicated what happened here. 145 00:08:45,540 --> 00:08:50,770 When u_4 was zero, that means that A times u, the u_4 146 00:08:50,770 --> 00:08:54,960 there, the zero is multiplying this, is not unknown any more. 147 00:08:54,960 --> 00:08:56,150 It's known. 148 00:08:56,150 --> 00:09:03,440 And so that column is not really any more needed in A. 149 00:09:03,440 --> 00:09:11,590 Because u_4 is gone from my list of unknown potentials. 150 00:09:11,590 --> 00:09:18,500 Now, at the same time, when I went over to A transpose A-- 151 00:09:18,500 --> 00:09:20,620 I'm making this comment because there 152 00:09:20,620 --> 00:09:22,680 were several good questions about it. 153 00:09:22,680 --> 00:09:30,820 I claim that also, that row, coming, 154 00:09:30,820 --> 00:09:34,030 which of course comes from the fourth row of A transpose. 155 00:09:34,030 --> 00:09:38,640 The fourth column of A is gone, so the fourth row 156 00:09:38,640 --> 00:09:40,800 of A transpose should be gone. 157 00:09:40,800 --> 00:09:44,150 And we might just think why's that, what's going on? 158 00:09:44,150 --> 00:09:47,200 Of course, it produces exactly what we want. 159 00:09:47,200 --> 00:09:49,870 It leaves us with a three by three matrix 160 00:09:49,870 --> 00:09:52,000 that's not singular any more. 161 00:09:52,000 --> 00:09:57,140 I've removed that [1, 1, 1, 1] from the null space by fixing 162 00:09:57,140 --> 00:09:58,910 a potential. 163 00:09:58,910 --> 00:10:03,850 Grounding a node, and the problem 164 00:10:03,850 --> 00:10:05,990 becomes just what we want. 165 00:10:05,990 --> 00:10:09,350 And I'll write down the equations 166 00:10:09,350 --> 00:10:15,080 when I get the Kirchhoff current law to complete the loop. 167 00:10:15,080 --> 00:10:17,880 Now, what's going on? 168 00:10:17,880 --> 00:10:21,910 Let me remove this current source, 169 00:10:21,910 --> 00:10:28,690 just so we focus on what I'm speaking about now. 170 00:10:28,690 --> 00:10:34,360 On this type of boundary condition, 171 00:10:34,360 --> 00:10:38,590 this is like fixing a support, right? 172 00:10:38,590 --> 00:10:43,060 It's like fixing a support in our spring mass problem. 173 00:10:43,060 --> 00:10:46,070 Can I squeeze in a little spring mass problem, 174 00:10:46,070 --> 00:10:56,760 so I have a spring, and then I'm fixing this displacement, 175 00:10:56,760 --> 00:10:58,840 u_4 to be zero. 176 00:10:58,840 --> 00:11:06,220 Now, I want to try to think through what 177 00:11:06,220 --> 00:11:11,660 happens in a balance equation, A transpose w, 178 00:11:11,660 --> 00:11:14,850 let me make it A transpose w equal f, 179 00:11:14,850 --> 00:11:23,410 because that's the case with right hand side allowed. 180 00:11:23,410 --> 00:11:28,730 And now what happens when I fix this, 181 00:11:28,730 --> 00:11:34,780 I'm asking you to think back about force balance, which 182 00:11:34,780 --> 00:11:41,370 we certainly saw was an A transpose w equal f business. 183 00:11:41,370 --> 00:11:47,480 And then parallel will be the current balance, at that node. 184 00:11:47,480 --> 00:11:54,240 OK, so what was the deal on force balance? 185 00:11:54,240 --> 00:12:00,480 A transpose with this fixed in here. 186 00:12:00,480 --> 00:12:04,600 What was the thing with A transpose that that fixed in? 187 00:12:04,600 --> 00:12:07,880 We did not write the equation A transpose w equal 188 00:12:07,880 --> 00:12:09,790 f at this point. 189 00:12:09,790 --> 00:12:14,120 We did not write the force balance equation at that point. 190 00:12:14,120 --> 00:12:19,960 When I fixed u_4, in this case it was the displacement so I'm 191 00:12:19,960 --> 00:12:24,130 fixing it at zero displacement, I 192 00:12:24,130 --> 00:12:27,390 didn't have a force balance in the A transpose part 193 00:12:27,390 --> 00:12:28,680 at this node. 194 00:12:28,680 --> 00:12:30,670 Now, you could say why? 195 00:12:30,670 --> 00:12:33,310 Because of course forces have to balance. 196 00:12:33,310 --> 00:12:35,020 But what's going on? 197 00:12:35,020 --> 00:12:39,430 What's really happening here is I don't have to write out, 198 00:12:39,430 --> 00:12:43,680 I don't have to-- the displacement here is known. 199 00:12:43,680 --> 00:12:45,700 It's not unknown. 200 00:12:45,700 --> 00:12:50,260 And let me say it in a sentence. 201 00:12:50,260 --> 00:12:54,530 Force balance does hold because the support 202 00:12:54,530 --> 00:13:01,890 supplies whatever force it takes to balance the internal forces. 203 00:13:01,890 --> 00:13:09,120 So, in other words, let me say that again, the force balance 204 00:13:09,120 --> 00:13:11,720 will hold and it will tell me, after I've 205 00:13:11,720 --> 00:13:14,120 solved the rest of the problem, it'll tell me 206 00:13:14,120 --> 00:13:18,850 what the support has to supply, how much force the support is 207 00:13:18,850 --> 00:13:19,720 actually supplying. 208 00:13:19,720 --> 00:13:22,430 It's a reaction force, it would be called. 209 00:13:22,430 --> 00:13:26,710 So a reaction force is whatever the support has 210 00:13:26,710 --> 00:13:29,530 to do to fix that displacement. 211 00:13:29,530 --> 00:13:35,810 And so I solved the fixed problems 212 00:13:35,810 --> 00:13:40,020 for all the other displacements and all the spring forces. 213 00:13:40,020 --> 00:13:42,320 And then I could come back at the end 214 00:13:42,320 --> 00:13:46,060 and say OK, what was the force in that spring and therefore 215 00:13:46,060 --> 00:13:51,340 how much is that support, what's the force being supplied 216 00:13:51,340 --> 00:13:52,770 by that support. 217 00:13:52,770 --> 00:13:53,920 See what I'm saying? 218 00:13:53,920 --> 00:14:05,270 That the force balance at this node comes afterwards. 219 00:14:05,270 --> 00:14:12,020 That equation is like knocking that one out of this problem. 220 00:14:12,020 --> 00:14:17,860 It would be the same here, I fix the potential at zero. 221 00:14:17,860 --> 00:14:19,760 I fix ground at zero. 222 00:14:19,760 --> 00:14:21,960 Current flows. 223 00:14:21,960 --> 00:14:26,540 Maybe some, maybe I might fix that potential at one. 224 00:14:26,540 --> 00:14:28,350 I fix that potential at zero. 225 00:14:28,350 --> 00:14:29,770 Current flows. 226 00:14:29,770 --> 00:14:31,010 OK. 227 00:14:31,010 --> 00:14:33,730 Ta-da, I find out, I compute what they are, 228 00:14:33,730 --> 00:14:40,200 and this row and column will be gone. 229 00:14:40,200 --> 00:14:41,620 Find out what they are. 230 00:14:41,620 --> 00:14:46,840 At this node, what's happened? 231 00:14:46,840 --> 00:14:50,010 What's happening to the balance of currents? 232 00:14:50,010 --> 00:14:52,820 Does this current have to balance that current 233 00:14:52,820 --> 00:14:54,220 at the ground? 234 00:14:54,220 --> 00:14:55,070 No. 235 00:14:55,070 --> 00:15:00,700 The ground, whatever current comes here 236 00:15:00,700 --> 00:15:04,110 plus whatever current comes here, goes into ground. 237 00:15:04,110 --> 00:15:07,920 Do you see the point? 238 00:15:07,920 --> 00:15:10,200 Kirchhoff's current law, the balance 239 00:15:10,200 --> 00:15:14,840 of currents that in equals out, is true 240 00:15:14,840 --> 00:15:18,000 but it's not an equation I have to solve 241 00:15:18,000 --> 00:15:20,920 in finding the currents, it's something 242 00:15:20,920 --> 00:15:22,540 I can discover at the end. 243 00:15:22,540 --> 00:15:25,860 I can say OK, how much current flowed from ground? 244 00:15:25,860 --> 00:15:27,280 And similarly up here. 245 00:15:27,280 --> 00:15:32,167 If I fix u_1 to be zero, then you, no, I 246 00:15:32,167 --> 00:15:34,500 don't want to fix it to be zero too, that would be a way 247 00:15:34,500 --> 00:15:36,850 to make very little happen. 248 00:15:36,850 --> 00:15:41,940 Let me fix u_1 to be one, so this is 249 00:15:41,940 --> 00:15:44,810 a standard important problem. 250 00:15:44,810 --> 00:15:48,210 It's like what's the resistance in the net-- what's 251 00:15:48,210 --> 00:15:50,870 the net system resistance? 252 00:15:50,870 --> 00:15:55,500 If I fix this at one fix this at zero, some current will flow, 253 00:15:55,500 --> 00:15:59,740 it'll come out here. 254 00:15:59,740 --> 00:16:01,800 And that'll be the current going into here. 255 00:16:01,800 --> 00:16:06,680 Somehow there'll be a balance there, and a balance there. 256 00:16:06,680 --> 00:16:10,680 But it's found later. 257 00:16:10,680 --> 00:16:14,220 Just the way the force in the support is found later. 258 00:16:14,220 --> 00:16:16,430 OK, that takes a little thinking. 259 00:16:16,430 --> 00:16:23,400 I just wanted to, because I had blithely knocked this row out. 260 00:16:23,400 --> 00:16:26,000 And you could do it on the basis, 261 00:16:26,000 --> 00:16:28,740 well if you knock out this column of A 262 00:16:28,740 --> 00:16:31,360 then you're knocking out the row of A transpose, 263 00:16:31,360 --> 00:16:35,050 and therefore A transpose A will be three by three. 264 00:16:35,050 --> 00:16:40,340 And it'll go down to two by two if I fix that potential. 265 00:16:40,340 --> 00:16:43,730 And if I don't fix it at zero, if I fix it at one 266 00:16:43,730 --> 00:16:47,180 then something will move to the right hand side. 267 00:16:47,180 --> 00:16:57,590 OK. that's that point I hope at least discussed. 268 00:16:57,590 --> 00:17:03,220 So now we have the whole pattern here. 269 00:17:03,220 --> 00:17:09,480 Except that I really have still to justify the fact that it 270 00:17:09,480 --> 00:17:14,650 truly is A transpose, the transpose of that matrix, 271 00:17:14,650 --> 00:17:17,010 that comes into Kirchhoff's current law. 272 00:17:17,010 --> 00:17:20,200 I guess in the first minute of the lecture I 273 00:17:20,200 --> 00:17:21,800 looked at that particular node. 274 00:17:21,800 --> 00:17:23,410 Let's look at all the nodes. 275 00:17:23,410 --> 00:17:28,100 Let me look at A transpose w equals zero. 276 00:17:28,100 --> 00:17:28,960 OK. 277 00:17:28,960 --> 00:17:32,150 So I'll copy a transpose because I truly 278 00:17:32,150 --> 00:17:35,790 believe that Kirchhoff would want me to do it. 279 00:17:35,790 --> 00:17:45,080 OK, so that becomes a row, that becomes the next row, of course 280 00:17:45,080 --> 00:17:50,500 I see three guys going into node one, 281 00:17:50,500 --> 00:17:53,370 then the one that I looked at before. 282 00:17:53,370 --> 00:17:59,310 That's the three edges, node three, and then the last one. 283 00:17:59,310 --> 00:18:02,340 Let's keep the last one in for now. 284 00:18:02,340 --> 00:18:08,310 And because if I didn't fix that I'd have that last one. 285 00:18:08,310 --> 00:18:12,290 There we go, so that multiplies, what does that multiply now 286 00:18:12,290 --> 00:18:14,020 in Kirchhoff's current law? 287 00:18:14,020 --> 00:18:16,680 Multiplies w, so currents. 288 00:18:16,680 --> 00:18:22,480 So here the currents, one, two, three, four and five. 289 00:18:22,480 --> 00:18:26,300 All I'm doing now is just, like, convincing you 290 00:18:26,300 --> 00:18:29,230 that it really is a transpose, that if I look at, 291 00:18:29,230 --> 00:18:32,250 let me pick that node now, if I look 292 00:18:32,250 --> 00:18:38,840 at that node I see edge one coming in, 293 00:18:38,840 --> 00:18:42,820 I see edge three going out, I see edge four going out 294 00:18:42,820 --> 00:18:45,410 and when I look at that second node, 295 00:18:45,410 --> 00:18:48,980 I look here at the second row, I see edge one coming in, 296 00:18:48,980 --> 00:18:51,020 edge three and edge four going out, 297 00:18:51,020 --> 00:18:54,280 multiplying those currents, and that will give, 298 00:18:54,280 --> 00:18:58,580 that current balance there gives that zero. 299 00:18:58,580 --> 00:18:59,080 Right? 300 00:18:59,080 --> 00:19:02,510 That current balance at node two gives that 301 00:19:02,510 --> 00:19:05,770 zero in the right hand side. 302 00:19:05,770 --> 00:19:09,720 And then, of course, other zeroes are here too. 303 00:19:09,720 --> 00:19:14,860 This is minus w_1, minus w_2, so I have a zero. 304 00:19:14,860 --> 00:19:19,240 This is with no current sources. 305 00:19:19,240 --> 00:19:19,930 OK. 306 00:19:19,930 --> 00:19:23,890 And this one, of course. 307 00:19:23,890 --> 00:19:29,070 I guess I'm hoping that you say yes, the A transpose really 308 00:19:29,070 --> 00:19:35,010 was the right matrix to express in equals out, Kirchhoff's 309 00:19:35,010 --> 00:19:38,040 current law. 310 00:19:38,040 --> 00:19:41,020 OK. 311 00:19:41,020 --> 00:19:43,620 Of course, by now you're probably getting blasé. 312 00:19:43,620 --> 00:19:47,600 You expect it to be A transpose, you don't need any convincing. 313 00:19:47,600 --> 00:19:50,980 But it's kind of good to see each time because it's 314 00:19:50,980 --> 00:19:53,620 like, well, it's not a miracle. 315 00:19:53,620 --> 00:19:56,100 But it's like a miracle. 316 00:19:56,100 --> 00:19:57,930 It's as good as a miracle. 317 00:19:57,930 --> 00:20:01,930 Because to get A transpose is just 318 00:20:01,930 --> 00:20:04,590 what makes everything right. 319 00:20:04,590 --> 00:20:11,340 Now, here's a question. 320 00:20:11,340 --> 00:20:15,830 This is a question worth thinking about. 321 00:20:15,830 --> 00:20:17,120 What are the solutions? 322 00:20:17,120 --> 00:20:21,540 If I only look at this piece of the framework, 323 00:20:21,540 --> 00:20:25,330 if I just look at Kirchhoff's current law, it's telling me, 324 00:20:25,330 --> 00:20:27,950 and I have zero current sources. 325 00:20:27,950 --> 00:20:30,410 Well let's take that, let me take 326 00:20:30,410 --> 00:20:35,210 just this piece of the whole framework and ask you, 327 00:20:35,210 --> 00:20:41,210 how many vectors w, how many solutions? 328 00:20:41,210 --> 00:20:42,780 Are there any solutions? 329 00:20:42,780 --> 00:20:45,510 Well, of course, there's always the zero solution. 330 00:20:45,510 --> 00:20:50,300 But I always ask you, what are the solutions when 331 00:20:50,300 --> 00:20:52,790 zero is on the right hand side? 332 00:20:52,790 --> 00:20:56,770 So, what are the w's that solve Kirchhoff's current law. 333 00:20:56,770 --> 00:20:58,390 Now that's a new question. 334 00:20:58,390 --> 00:20:59,930 We haven't asked that before. 335 00:20:59,930 --> 00:21:04,880 What we asked before was the question Au, Au=0, 336 00:21:04,880 --> 00:21:09,590 remember it was then A. This five by four matrix, 337 00:21:09,590 --> 00:21:11,880 u had four components. 338 00:21:11,880 --> 00:21:16,720 Just remind me, and I'm putting that column back in, 339 00:21:16,720 --> 00:21:19,840 so this is still here. 340 00:21:19,840 --> 00:21:23,760 In the un-reduced, un-grounded case. 341 00:21:23,760 --> 00:21:27,090 Well, just so we get started, remind me 342 00:21:27,090 --> 00:21:35,120 what the solutions u were for Au equals zero. [1, 1, 1, 1]. 343 00:21:35,120 --> 00:21:36,330 Or any multiple of it. 344 00:21:36,330 --> 00:21:39,280 A whole line of vectors. 345 00:21:39,280 --> 00:21:42,090 [c, c, c, c], any constant c. 346 00:21:42,090 --> 00:21:47,040 OK, so this had, there were four columns. 347 00:21:47,040 --> 00:21:49,140 But only three were independent. 348 00:21:49,140 --> 00:21:49,900 OK. 349 00:21:49,900 --> 00:21:56,580 Now, now I've made them into rows. 350 00:21:56,580 --> 00:21:59,170 And I made the rows into columns. 351 00:21:59,170 --> 00:22:02,640 So now I have five columns. 352 00:22:02,640 --> 00:22:08,240 What I'm leading to is, I want to count in advance 353 00:22:08,240 --> 00:22:12,900 how many w's I should be looking for, and then look for them. 354 00:22:12,900 --> 00:22:18,420 OK, so the first question is how many different solutions w. 355 00:22:18,420 --> 00:22:22,280 First of all, are there some solutions? 356 00:22:22,280 --> 00:22:25,880 Is there is a solution w, other than zero of course, 357 00:22:25,880 --> 00:22:27,980 to this system? 358 00:22:27,980 --> 00:22:30,950 Well, as we said last time, we've 359 00:22:30,950 --> 00:22:33,180 only got four equations here. 360 00:22:33,180 --> 00:22:35,810 We've got five unknowns. 361 00:22:35,810 --> 00:22:38,490 Of course there's at least one solution. 362 00:22:38,490 --> 00:22:42,190 Four equations, five unknowns, I can do elimination, 363 00:22:42,190 --> 00:22:45,490 whatever systematic procedure you want me to do. 364 00:22:45,490 --> 00:22:48,030 In the end, I'm going to find a solution. 365 00:22:48,030 --> 00:22:50,100 Now, I might find more solutions. 366 00:22:50,100 --> 00:22:52,590 So that's the question. 367 00:22:52,590 --> 00:22:57,840 So what's the, now this is the key fact of linear algebra. 368 00:22:57,840 --> 00:23:02,930 Which is, it just tells us the numbers of everything. 369 00:23:02,930 --> 00:23:07,950 So this told us that there were three independent columns. 370 00:23:07,950 --> 00:23:15,130 Of A. Now, for that key theorem, which tells me that, 371 00:23:15,130 --> 00:23:19,040 how many independent rows of A are there? 372 00:23:19,040 --> 00:23:19,970 Three. 373 00:23:19,970 --> 00:23:22,940 That number is equal. 374 00:23:22,940 --> 00:23:25,860 I just want to say that's a pretty remarkable fact. 375 00:23:25,860 --> 00:23:32,930 If I have a 50 by 80 matrix and that 50 by 80 matrix 376 00:23:32,930 --> 00:23:38,240 has 17 independent columns, then this great fact 377 00:23:38,240 --> 00:23:41,330 tells me that there are 17 independent rows. 378 00:23:41,330 --> 00:23:47,960 And if those 50 times 80, 4,000 numbers are random, 379 00:23:47,960 --> 00:23:52,690 boy, you can't look at it and see what are they. 380 00:23:52,690 --> 00:23:53,740 Independent rows. 381 00:23:53,740 --> 00:23:56,660 But if you know there are 17 independent columns then 382 00:23:56,660 --> 00:23:58,570 there are 17 independent rows. 383 00:23:58,570 --> 00:24:01,990 So, what does that mean here? 384 00:24:01,990 --> 00:24:04,450 That means that out of the five columns 385 00:24:04,450 --> 00:24:10,810 of A transpose, which were rows of A, three are independent. 386 00:24:10,810 --> 00:24:14,220 So just tell me, how many solutions I'm looking for. 387 00:24:14,220 --> 00:24:16,470 Before I look for them. 388 00:24:16,470 --> 00:24:20,750 So the number of-- The number of independent w's, 389 00:24:20,750 --> 00:24:25,700 independent solutions will be what? 390 00:24:25,700 --> 00:24:27,770 What's your guess? 391 00:24:27,770 --> 00:24:28,620 Two! 392 00:24:28,620 --> 00:24:30,320 Two is the right guess. 393 00:24:30,320 --> 00:24:34,700 Two, because I have altogether five unknowns, 394 00:24:34,700 --> 00:24:39,650 I subtract three equations that are really there, 395 00:24:39,650 --> 00:24:41,670 I have three real equations there 396 00:24:41,670 --> 00:24:43,300 even though it looks like four. 397 00:24:43,300 --> 00:24:44,940 And I get two. 398 00:24:44,940 --> 00:24:49,460 So that general picture is n-- Oh, I'm 399 00:24:49,460 --> 00:24:54,070 sorry it's actually m because I'm doing the transpose here. 400 00:24:54,070 --> 00:25:00,890 So it's m w's minus r, the rank. 401 00:25:00,890 --> 00:25:03,840 So that's m is five, the rank is three 402 00:25:03,840 --> 00:25:07,520 and this counts the number of independent solutions. 403 00:25:07,520 --> 00:25:12,960 So it's a nice, it couldn't be better. 404 00:25:12,960 --> 00:25:17,520 It's a fundamental count of how many solutions are there. 405 00:25:17,520 --> 00:25:22,090 You're really taking the number of unknowns, five, 406 00:25:22,090 --> 00:25:24,490 and you're subtracting the number of equations 407 00:25:24,490 --> 00:25:27,270 that are really there, three, and that leaves you 408 00:25:27,270 --> 00:25:30,780 with two solutions which we will have to find in a minute. 409 00:25:30,780 --> 00:25:35,930 Can you say why there's really only three equations there? 410 00:25:35,930 --> 00:25:41,910 Why do I say that that fourth equation is not 411 00:25:41,910 --> 00:25:45,600 contributing anything new? 412 00:25:45,600 --> 00:25:50,040 I believe that that fourth equation is a consequence 413 00:25:50,040 --> 00:25:52,400 of the first three. 414 00:25:52,400 --> 00:25:55,830 And, therefore, if it's there or if it's not there, 415 00:25:55,830 --> 00:25:59,490 it's not telling me anything new about in=out. 416 00:25:59,490 --> 00:26:03,060 In other words, if I have a closed system, 417 00:26:03,060 --> 00:26:05,700 closed because it's zero on the right side, 418 00:26:05,700 --> 00:26:10,430 if I have a closed system and I have in=out at those three 419 00:26:10,430 --> 00:26:14,400 nodes, then I'll automatically have in=out at the fourth node, 420 00:26:14,400 --> 00:26:19,060 because the total in is zero. 421 00:26:19,060 --> 00:26:20,690 And the total out is zero. 422 00:26:20,690 --> 00:26:23,850 So if I'm right at three I'll be right at the fourth one. 423 00:26:23,850 --> 00:26:26,360 And now just tell me with the numbers, 424 00:26:26,360 --> 00:26:37,050 how would I get this equation w_4+w_5=0 from the first three? 425 00:26:37,050 --> 00:26:39,450 Well, it's probably the same way that I 426 00:26:39,450 --> 00:26:41,400 got that column, that that column was 427 00:26:41,400 --> 00:26:44,920 connected to those columns. 428 00:26:44,920 --> 00:26:46,940 What do I do? 429 00:26:46,940 --> 00:26:48,900 Add them. 430 00:26:48,900 --> 00:26:52,640 If you add that equation to that equation to that equation, 431 00:26:52,640 --> 00:26:54,930 add those three equations, what happens? 432 00:26:54,930 --> 00:26:59,320 the w_1's cancel, the w_2's cancel, the w_3's cancel, 433 00:26:59,320 --> 00:27:02,940 this says there's a minus w_4 and a minus w_5 434 00:27:02,940 --> 00:27:07,280 that adds to zero plus zero plus zero, minus w_4, 435 00:27:07,280 --> 00:27:11,850 minus w_5 equalling zero is the same as plus w_4 436 00:27:11,850 --> 00:27:14,930 plus w_5 equals zero. 437 00:27:14,930 --> 00:27:18,380 The four equations add to zero equals zero. 438 00:27:18,380 --> 00:27:21,530 That's what the central thing is. 439 00:27:21,530 --> 00:27:24,210 The four equations add to zero equals zero just 440 00:27:24,210 --> 00:27:28,740 the way the four columns up here added to the zero column. 441 00:27:28,740 --> 00:27:29,730 OK. 442 00:27:29,730 --> 00:27:32,070 So we got the count. 443 00:27:32,070 --> 00:27:37,010 Now, this is the interesting part, always. 444 00:27:37,010 --> 00:27:38,860 What are the solutions? 445 00:27:38,860 --> 00:27:40,900 What are the actual w's? 446 00:27:40,900 --> 00:27:43,570 OK. 447 00:27:43,570 --> 00:27:45,890 You could say, wait a minute, you're 448 00:27:45,890 --> 00:27:52,210 asking me to solve four equations and five unknowns, 449 00:27:52,210 --> 00:27:53,710 and just say what the answer is. 450 00:27:53,710 --> 00:27:57,010 Well, normally that's not reasonable. 451 00:27:57,010 --> 00:28:02,140 But here we can get help from the graph. 452 00:28:02,140 --> 00:28:04,570 Let me give you an idea here. 453 00:28:04,570 --> 00:28:09,380 So what are we looking for on the graph, that solves it? 454 00:28:09,380 --> 00:28:11,760 We're looking for a bunch of currents 455 00:28:11,760 --> 00:28:14,860 that balance themselves. 456 00:28:14,860 --> 00:28:15,360 Right? 457 00:28:15,360 --> 00:28:17,490 We've got zero on the right hand side. 458 00:28:17,490 --> 00:28:20,810 So we're not getting any help from outside. 459 00:28:20,810 --> 00:28:24,200 How could you send current in this loop 460 00:28:24,200 --> 00:28:27,750 in a way that would satisfy Kirchhoff. 461 00:28:27,750 --> 00:28:29,650 He'd be happy. 462 00:28:29,650 --> 00:28:32,270 The balance law would be true. 463 00:28:32,270 --> 00:28:37,810 OK. b-- I'm just looking at currents. 464 00:28:37,810 --> 00:28:41,380 Current w_1, w_2, w_3. 465 00:28:41,380 --> 00:28:44,010 Is there any combination of w_1, w_2, 466 00:28:44,010 --> 00:28:52,510 w_3 that would balance itself, that would make Kirchhoff OK? 467 00:28:52,510 --> 00:28:55,820 Well, here's the idea. 468 00:28:55,820 --> 00:28:58,620 Send that current around a loop. 469 00:28:58,620 --> 00:29:05,120 Loop currents are solutions to Kirchhoff's balance law. 470 00:29:05,120 --> 00:29:09,970 If I send an amp on that edge, on that edge 471 00:29:09,970 --> 00:29:13,640 and backward on that edge, right? 472 00:29:13,640 --> 00:29:17,830 It's around a loop at every node, it's totally OK. 473 00:29:17,830 --> 00:29:21,310 So I believe that a particular solution will 474 00:29:21,310 --> 00:29:29,280 be for these things to be, let's see what did I say? w_1, 475 00:29:29,280 --> 00:29:34,710 I'll send one around. w_3 will be a one. w_2 was backwards, 476 00:29:34,710 --> 00:29:37,260 it wasn't traveling on w_4. 477 00:29:37,260 --> 00:29:39,790 I think that's a solution. 478 00:29:39,790 --> 00:29:42,180 That loop current gives me a solution so 479 00:29:42,180 --> 00:29:49,340 let me call this solution, that's the first solution. 480 00:29:49,340 --> 00:29:51,910 And if we do these multiplications, of course 481 00:29:51,910 --> 00:29:53,670 it's going to come out right. 482 00:29:53,670 --> 00:29:58,930 OK, so that's solution number one. 483 00:29:58,930 --> 00:30:01,270 A w that works. 484 00:30:01,270 --> 00:30:04,490 OK, with that hint, tell me a second w that works. 485 00:30:04,490 --> 00:30:08,030 In fact, since there are only two, 486 00:30:08,030 --> 00:30:12,820 you'll be giving me the rest of the answer. 487 00:30:12,820 --> 00:30:17,680 So that was a loop current that went around that loop. 488 00:30:17,680 --> 00:30:20,730 Tell me another one. 489 00:30:20,730 --> 00:30:25,640 Well, we're a big class but everybody's seen it. 490 00:30:25,640 --> 00:30:30,620 How about around that loop? 491 00:30:30,620 --> 00:30:33,540 So that would be another thing and it's 492 00:30:33,540 --> 00:30:37,620 pretty clearly not the same as this one. 493 00:30:37,620 --> 00:30:41,390 So I'm really truly finding two independent solutions. 494 00:30:41,390 --> 00:30:43,670 And what is that second solution? 495 00:30:43,670 --> 00:30:48,810 Let me maybe just put it in here. 496 00:30:48,810 --> 00:30:52,860 And they're both giving me [0, 0, 0, 0]. 497 00:30:52,860 --> 00:30:57,560 And now, what is this number two solution, the loop number two? 498 00:30:57,560 --> 00:31:00,790 One and two are not involved now. 499 00:31:00,790 --> 00:31:07,900 Number three, see I'm usually sending it counterclockwise, 500 00:31:07,900 --> 00:31:09,430 that's the sort of convention. 501 00:31:09,430 --> 00:31:13,460 But you know, of course you just have 502 00:31:13,460 --> 00:31:17,270 to follow some convention in connection with the arrows. 503 00:31:17,270 --> 00:31:20,570 So that would go backwards on three, I think. 504 00:31:20,570 --> 00:31:24,630 Forwards on four, and backwards on five. 505 00:31:24,630 --> 00:31:27,770 So that would be solution number two. 506 00:31:27,770 --> 00:31:29,650 OK. 507 00:31:29,650 --> 00:31:32,040 Now, tell me what all the solutions are. 508 00:31:32,040 --> 00:31:36,960 I found two particular solutions, two particular loop 509 00:31:36,960 --> 00:31:39,970 currents, particularly easy. 510 00:31:39,970 --> 00:31:45,090 What would be all the solutions to Kirchhoff's current law, 511 00:31:45,090 --> 00:31:47,800 A transpose w equals zero? 512 00:31:47,800 --> 00:31:50,980 Every w now since I've found the right number, 513 00:31:50,980 --> 00:31:57,840 every w will be a combination of those two. 514 00:31:57,840 --> 00:31:59,900 Ah, well wait a minute. 515 00:31:59,900 --> 00:32:01,110 Have I got them all? 516 00:32:01,110 --> 00:32:04,720 I should have thought, what about current 517 00:32:04,720 --> 00:32:07,660 around the big loop? 518 00:32:07,660 --> 00:32:10,870 That would certainly satisfy Kirchhoff. 519 00:32:10,870 --> 00:32:19,560 Plus one, one, so why is this not number three? 520 00:32:19,560 --> 00:32:22,690 Around the big loop I have a one and then 521 00:32:22,690 --> 00:32:24,760 a one on the fourth position. 522 00:32:24,760 --> 00:32:28,420 Backwards on five, backwards on two. 523 00:32:28,420 --> 00:32:32,310 And so there is number-- So I'll put number three 524 00:32:32,310 --> 00:32:36,130 with a question mark. 525 00:32:36,130 --> 00:32:41,670 What's up with that guy? 526 00:32:41,670 --> 00:32:46,510 You know, unless mathematics has got to close up shop, 527 00:32:46,510 --> 00:32:51,070 this better be a combination of those. 528 00:32:51,070 --> 00:32:52,170 And of course, it is. 529 00:32:52,170 --> 00:32:56,090 If I send something around the top loop and something 530 00:32:56,090 --> 00:32:58,440 around the second loop and add them together, 531 00:32:58,440 --> 00:33:00,740 they'll cancel on the middle edge 532 00:33:00,740 --> 00:33:04,000 there and produce number three. 533 00:33:04,000 --> 00:33:07,580 So this is probably just the sum. 534 00:33:07,580 --> 00:33:11,240 If I add that one to that one, I think I get number three. 535 00:33:11,240 --> 00:33:14,270 So number three is true. 536 00:33:14,270 --> 00:33:17,510 It's a solution but it's not a new one. 537 00:33:17,510 --> 00:33:20,590 OK. 538 00:33:20,590 --> 00:33:25,720 That was simple, right, once we saw that loops gave the answer. 539 00:33:25,720 --> 00:33:33,330 But, it's, actually it's quite important 540 00:33:33,330 --> 00:33:35,570 and appears everywhere. 541 00:33:35,570 --> 00:33:42,400 In fact the theory of electrical networks, 542 00:33:42,400 --> 00:33:43,880 current laws and so on. 543 00:33:43,880 --> 00:33:46,060 I mean that used to be a, like, basic course 544 00:33:46,060 --> 00:33:47,340 in electrical engineering. 545 00:33:47,340 --> 00:33:52,220 There was a text by Professor Ernst Guillemin, I remember. 546 00:33:52,220 --> 00:33:56,420 It's sort of not so central to the world any more. 547 00:33:56,420 --> 00:34:03,260 And now-- Bu the structure is just right somehow. 548 00:34:03,260 --> 00:34:08,040 And what I wanted to say is you could take, in those days 549 00:34:08,040 --> 00:34:11,190 you maybe took loop currents as the unknowns. 550 00:34:11,190 --> 00:34:13,510 You could think of currents in the loops 551 00:34:13,510 --> 00:34:16,300 as your principal unknowns. 552 00:34:16,300 --> 00:34:17,620 We don't do that now. 553 00:34:17,620 --> 00:34:23,400 But, oh, there's, yeah it comes up again. 554 00:34:23,400 --> 00:34:27,250 Knowing all the solutions to A transpose w equals zero, 555 00:34:27,250 --> 00:34:31,350 well, you'll see, what's ahead? 556 00:34:31,350 --> 00:34:36,430 It will be the continuous analog of this, where I have flows, 557 00:34:36,430 --> 00:34:40,970 not just around a graph, but in a region. 558 00:34:40,970 --> 00:34:43,510 And Laplace's equation is going to come up, 559 00:34:43,510 --> 00:34:46,830 and the equations of divergence and gradient, 560 00:34:46,830 --> 00:34:50,830 all that great stuff is coming in Chapter 3. 561 00:34:50,830 --> 00:34:59,160 And this is somehow the discrete case. 562 00:34:59,160 --> 00:35:03,000 These loop currents, that has something to do with the curl. 563 00:35:03,000 --> 00:35:07,560 And these differences that A takes 564 00:35:07,560 --> 00:35:09,800 has something to do with gradients. 565 00:35:09,800 --> 00:35:12,890 And this, Kirchhoff's current law 566 00:35:12,890 --> 00:35:15,580 has something to do with divergence. 567 00:35:15,580 --> 00:35:21,010 Can I just say ahead of time, what we're doing is really 568 00:35:21,010 --> 00:35:27,270 good to see and get it because then you have a way 569 00:35:27,270 --> 00:35:33,390 to understand vector calculus. 570 00:35:33,390 --> 00:35:36,410 This is discrete vector calculus we're doing. 571 00:35:36,410 --> 00:35:37,170 OK. 572 00:35:37,170 --> 00:35:40,810 Now, it's just right. 573 00:35:40,810 --> 00:35:45,290 Forgive me for my sermon here. 574 00:35:45,290 --> 00:35:45,910 Alright. 575 00:35:45,910 --> 00:35:50,980 Now, may I bring the pieces together finally? 576 00:35:50,980 --> 00:35:56,930 May I bring the three steps together into, 577 00:35:56,930 --> 00:36:01,910 well first you would say bring them into one equation. 578 00:36:01,910 --> 00:36:05,880 Put the three steps, combine the three steps into one. 579 00:36:05,880 --> 00:36:06,800 OK. 580 00:36:06,800 --> 00:36:10,760 So, what happens if I do that? 581 00:36:10,760 --> 00:36:18,250 I take that last step A transpose-- f is A transpose w. 582 00:36:18,250 --> 00:36:24,880 So now I'm going to get one equation. 583 00:36:24,880 --> 00:36:26,790 Which is the equation that's going 584 00:36:26,790 --> 00:36:30,320 to have the stiffness matrix in it, A transpose C A. 585 00:36:30,320 --> 00:36:35,380 It's the conductance matrix. 586 00:36:35,380 --> 00:36:38,050 And it's the equation that a big finite element 587 00:36:38,050 --> 00:36:43,490 code, a circuit simulation code-- It's the matrix 588 00:36:43,490 --> 00:36:45,870 they have to find and work with. 589 00:36:45,870 --> 00:36:50,450 And those codes are enormous, and SPICE by the way 590 00:36:50,450 --> 00:36:54,540 is the sort of grandfather of circuit simulation codes. 591 00:36:54,540 --> 00:36:57,750 Somebody at Berkeley had the sense to see hey, 592 00:36:57,750 --> 00:37:00,700 we've got giant circuits now. 593 00:37:00,700 --> 00:37:03,730 Modern circuits have thousands of elements. 594 00:37:03,730 --> 00:37:09,160 And you can't do it by eye the way we can do this one by eye. 595 00:37:09,160 --> 00:37:12,780 You've got to organize it and write a code, 596 00:37:12,780 --> 00:37:14,660 and SPICE is the start. 597 00:37:14,660 --> 00:37:18,530 So one way to do it is to end up with one equation. 598 00:37:18,530 --> 00:37:22,210 So that was f equals A transpose w. 599 00:37:22,210 --> 00:37:25,550 I'm now going, I'm just assembling the whole loop. 600 00:37:25,550 --> 00:37:28,500 But w is Ce. 601 00:37:28,500 --> 00:37:41,400 So that's A transpose Ce, but e is b minus Au. 602 00:37:41,400 --> 00:37:43,750 Nothing new there. 603 00:37:43,750 --> 00:37:49,290 Nothing new maybe except that it involves both the f and the b, 604 00:37:49,290 --> 00:37:52,180 where our earlier examples involved either 605 00:37:52,180 --> 00:37:56,920 an f, in masses and springs, or a b in the squares. 606 00:37:56,920 --> 00:37:58,060 Now they're both here. 607 00:37:58,060 --> 00:38:01,760 So now, that's my equation, f equals this. 608 00:38:01,760 --> 00:38:06,600 And now let me just move that to the, let me just recollect it, 609 00:38:06,600 --> 00:38:10,180 that's A transpose C A, the big thing that I wanted to see. 610 00:38:10,180 --> 00:38:13,220 I'll put it on the left side. 611 00:38:13,220 --> 00:38:15,560 And what will I have on the right side? 612 00:38:15,560 --> 00:38:21,740 I'll have A transpose C b. 613 00:38:21,740 --> 00:38:25,050 And I'll have, f is now coming over to the other side 614 00:38:25,050 --> 00:38:26,710 with a minus. 615 00:38:26,710 --> 00:38:28,360 Minus f. 616 00:38:28,360 --> 00:38:31,840 That's the big equation. 617 00:38:31,840 --> 00:38:33,840 You could say that's the fundamental equation 618 00:38:33,840 --> 00:38:35,440 of equilibrium. 619 00:38:35,440 --> 00:38:38,030 And you see how it's right? 620 00:38:38,030 --> 00:38:43,230 It involves the A transpose C A, which we expect. 621 00:38:43,230 --> 00:38:45,960 Over here was the A transpose C b. 622 00:38:45,960 --> 00:38:51,760 Now, which problem, before networks, 623 00:38:51,760 --> 00:38:56,130 produced an A transpose b or an A transpose C b? 624 00:38:56,130 --> 00:38:57,750 That was least squares. 625 00:38:57,750 --> 00:39:01,540 And now, so that's the least squares, the b term. 626 00:39:01,540 --> 00:39:03,570 The b is there with a couple of matrices 627 00:39:03,570 --> 00:39:07,660 because b entered the problem just one step around. 628 00:39:07,660 --> 00:39:09,930 It had two more steps to go. 629 00:39:09,930 --> 00:39:13,160 It had a C step and then an A transpose step. 630 00:39:13,160 --> 00:39:16,040 Whereas f up here is at the very end and now 631 00:39:16,040 --> 00:39:19,310 it appears with a minus sign. 632 00:39:19,310 --> 00:39:22,810 That's different from springs and masses 633 00:39:22,810 --> 00:39:26,510 simply because the sign conventions, you could say. 634 00:39:26,510 --> 00:39:28,480 OK, there is the equation. 635 00:39:28,480 --> 00:39:30,890 OK, fine. 636 00:39:30,890 --> 00:39:34,090 So that's what you have to solve. 637 00:39:34,090 --> 00:39:36,760 And actually I think of that as the fundamental problem 638 00:39:36,760 --> 00:39:38,310 of numerical analysis. 639 00:39:38,310 --> 00:39:40,170 How to solve that equation. 640 00:39:40,170 --> 00:39:44,010 More effort, more thinking goes into that than probably 641 00:39:44,010 --> 00:39:46,560 any other single problem. 642 00:39:46,560 --> 00:39:48,150 In some form. 643 00:39:48,150 --> 00:39:52,030 OK, and here's some part of that thinking. 644 00:39:52,030 --> 00:39:55,100 Part of that thinking, and another important possibility, 645 00:39:55,100 --> 00:40:00,840 is to keep-- This was like the one equation, the one field 646 00:40:00,840 --> 00:40:06,470 problem, this corresponds to the displacement method. 647 00:40:06,470 --> 00:40:11,940 Can I use words that I'm not going to use seriously 648 00:40:11,940 --> 00:40:17,120 for another few weeks? 649 00:40:17,120 --> 00:40:20,030 This would correspond to the displacement method 650 00:40:20,030 --> 00:40:22,640 in finite elements. 651 00:40:22,640 --> 00:40:25,710 In FEM, FEM for finite element method. 652 00:40:25,710 --> 00:40:27,880 That's the displacement method, it's the method 653 00:40:27,880 --> 00:40:30,800 that that most people use. 654 00:40:30,800 --> 00:40:33,040 It's the standard method. 655 00:40:33,040 --> 00:40:33,910 OK. 656 00:40:33,910 --> 00:40:36,410 But it's not the only possibility, 657 00:40:36,410 --> 00:40:40,860 and let me show you a second one that involves two equations. 658 00:40:40,860 --> 00:40:44,380 Because that's also very important, 659 00:40:44,380 --> 00:40:47,860 with many other applications, that we will see but 660 00:40:47,860 --> 00:40:49,110 haven't seen yet. 661 00:40:49,110 --> 00:40:54,320 So my two equations, I really should say two systems, 662 00:40:54,320 --> 00:40:58,330 because one equation, that's a vector equation of course. 663 00:40:58,330 --> 00:41:01,480 So I have a system of two vector equations, that 664 00:41:01,480 --> 00:41:04,820 would go into a block matrix and you'll see it. 665 00:41:04,820 --> 00:41:11,170 OK, so what what two unknowns am I going to keep? 666 00:41:11,170 --> 00:41:12,880 u, I'm keeping. 667 00:41:12,880 --> 00:41:14,530 Displacement, I'm keeping. 668 00:41:14,530 --> 00:41:16,770 But I'm also going to keep what I 669 00:41:16,770 --> 00:41:20,120 think of as the other important unknown, w. 670 00:41:20,120 --> 00:41:22,500 So the other important unknown is w. 671 00:41:22,500 --> 00:41:25,810 So now I have two equations and one of them 672 00:41:25,810 --> 00:41:28,700 is just that, is just the current, 673 00:41:28,700 --> 00:41:32,110 is just the current law, the balance law A transpose w equal 674 00:41:32,110 --> 00:41:35,610 f. 675 00:41:35,610 --> 00:41:39,480 The only guy I'm eliminating is e. 676 00:41:39,480 --> 00:41:45,910 Initially you could say I've a three field system. u, e and w. 677 00:41:45,910 --> 00:41:50,090 Now, e and w are so easily connected 678 00:41:50,090 --> 00:41:53,850 that I'm going to eliminate e. e is c inverse w. 679 00:41:53,850 --> 00:41:56,240 I did it actually here. 680 00:41:56,240 --> 00:42:00,610 This w is C(b-Au), that's we know. 681 00:42:00,610 --> 00:42:06,680 If I multiply by the C inverse, then I have C inverse w is, 682 00:42:06,680 --> 00:42:11,900 and I bring the Au over to the far left and I have only the b 683 00:42:11,900 --> 00:42:12,670 left. 684 00:42:12,670 --> 00:42:19,200 Everybody saw that, I did a C inverse there 685 00:42:19,200 --> 00:42:26,330 to get e off by itself and then I substituted for e, 686 00:42:26,330 --> 00:42:29,420 I put in the u part so e's now gone, 687 00:42:29,420 --> 00:42:40,540 and the equation is C inverse w plus Au equals b. 688 00:42:40,540 --> 00:42:46,090 That's my two field system. 689 00:42:46,090 --> 00:42:50,920 Now, there's a matrix here. 690 00:42:50,920 --> 00:42:53,187 This is really nice. 691 00:42:53,187 --> 00:42:54,270 I just want to write that. 692 00:42:54,270 --> 00:42:57,520 I've got to what I want but now I want to look at it. 693 00:42:57,520 --> 00:43:04,190 So I think of a two by two block matrix multiplying [w, u] 694 00:43:04,190 --> 00:43:07,590 and giving me [b, f]. 695 00:43:07,590 --> 00:43:10,460 And I want to ask you about that matrix. 696 00:43:10,460 --> 00:43:17,290 So this is the matrix for when I've only eliminated e 697 00:43:17,290 --> 00:43:21,340 and I've still got w as well as u. 698 00:43:21,340 --> 00:43:26,850 OK, you can read off what's in that matrix. 699 00:43:26,850 --> 00:43:28,870 What goes up here? 700 00:43:28,870 --> 00:43:30,650 C inverse, of course. 701 00:43:30,650 --> 00:43:33,210 Positive diagonal, usually. 702 00:43:33,210 --> 00:43:34,060 Easy. 703 00:43:34,060 --> 00:43:37,980 What goes here is a rectangular, that guy is rectangular. 704 00:43:37,980 --> 00:43:41,830 A transpose is multiplying w, so it goes down here, 705 00:43:41,830 --> 00:43:47,750 and this equation has no u in it. 706 00:43:47,750 --> 00:43:55,190 That matrix is worth noticing. 707 00:43:55,190 --> 00:43:58,410 And let's spend the rest of this, the remaining minutes, 708 00:43:58,410 --> 00:44:00,320 just to think about that matrix. 709 00:44:00,320 --> 00:44:05,930 I just want to say, what if I keep w and u, 710 00:44:05,930 --> 00:44:08,710 this is an important possibility. 711 00:44:08,710 --> 00:44:12,820 And it's important in finite elements which as you know 712 00:44:12,820 --> 00:44:17,010 is just a terrific way to solve a whole lot of continuum 713 00:44:17,010 --> 00:44:18,100 problems. 714 00:44:18,100 --> 00:44:23,470 And what's it called when I have w and u together, 715 00:44:23,470 --> 00:44:27,040 both unknowns, not eliminating w now, 716 00:44:27,040 --> 00:44:29,020 it's called the mixed method. 717 00:44:29,020 --> 00:44:36,580 So this corresponds to the mixed method in finite elements. 718 00:44:36,580 --> 00:44:45,420 It corresponds to the possibility of keeping w and u. 719 00:44:45,420 --> 00:44:47,490 Well, and you might say, wait, isn't there 720 00:44:47,490 --> 00:44:50,690 a third possibility? 721 00:44:50,690 --> 00:44:52,670 And what would that be? 722 00:44:52,670 --> 00:44:56,430 Keep only w. 723 00:44:56,430 --> 00:44:59,670 Here we kept only u, here we've got them both, 724 00:44:59,670 --> 00:45:07,570 this is kind of the mother of all equilibrium equations. 725 00:45:07,570 --> 00:45:10,570 And another possibly would be to keep 726 00:45:10,570 --> 00:45:14,670 only the w's, to make the currents the primary unknowns. 727 00:45:14,670 --> 00:45:19,620 And that, in the finite element structural context, 728 00:45:19,620 --> 00:45:23,590 that would be saying make the stresses. 729 00:45:23,590 --> 00:45:25,885 So of course it'd be called the stress method. 730 00:45:25,885 --> 00:45:27,260 It'd be called the stress method, 731 00:45:27,260 --> 00:45:31,660 and Professor Pian in Course 16, now retired, 732 00:45:31,660 --> 00:45:35,000 was one of the major developers of the stress method. 733 00:45:35,000 --> 00:45:36,960 The difficulty with the stress method, 734 00:45:36,960 --> 00:45:41,330 the reason it didn't win big time, 735 00:45:41,330 --> 00:45:46,375 is that the w's, if you make them the unknowns you've got 736 00:45:46,375 --> 00:45:49,970 a constraint on them, Kirchhoff's-- Not all w's are 737 00:45:49,970 --> 00:45:52,230 allowed. 738 00:45:52,230 --> 00:45:55,510 Somehow over here all u's are allowed, 739 00:45:55,510 --> 00:46:00,830 and that made it much easier to set up the problem. 740 00:46:00,830 --> 00:46:05,320 So the displacement method is the 95 percent winner. 741 00:46:05,320 --> 00:46:10,400 But there are problems where maybe C inverse is complicated, 742 00:46:10,400 --> 00:46:12,530 or C is too complicated and you're 743 00:46:12,530 --> 00:46:18,540 better to-- We can see that. 744 00:46:18,540 --> 00:46:21,470 That's later in the book, but we want 745 00:46:21,470 --> 00:46:24,400 to see now about that matrix. 746 00:46:24,400 --> 00:46:27,970 Well, if I wrote that matrix down, 747 00:46:27,970 --> 00:46:32,080 and let me write just so you-- I want to ask you 748 00:46:32,080 --> 00:46:34,070 about that block matrix. 749 00:46:34,070 --> 00:46:36,840 What's its size? 750 00:46:36,840 --> 00:46:39,260 Now just focus entirely on that block matrix, 751 00:46:39,260 --> 00:46:41,460 because that's what I care about. 752 00:46:41,460 --> 00:46:46,300 What's the size of that matrix? 753 00:46:46,300 --> 00:46:50,790 Let's see, what's the size of C? m by m. 754 00:46:50,790 --> 00:46:53,740 What's the size of A? n by n. 755 00:46:53,740 --> 00:46:54,840 So what do I have here? 756 00:46:54,840 --> 00:46:58,470 I've got n rows and m plus n columns, 757 00:46:58,470 --> 00:46:59,680 and there's n more rows. 758 00:46:59,680 --> 00:47:01,310 It's of size m+n. 759 00:47:01,310 --> 00:47:05,880 760 00:47:05,880 --> 00:47:08,760 It's got the n u's and the m w's. 761 00:47:08,760 --> 00:47:10,910 Of course, m+n. 762 00:47:10,910 --> 00:47:12,890 And the natural size, right. 763 00:47:12,890 --> 00:47:15,500 So it's got more unknowns but we'll 764 00:47:15,500 --> 00:47:17,880 see, oh in optimization you bring 765 00:47:17,880 --> 00:47:22,050 in Lagrange multipliers, that's just exactly parallel to what 766 00:47:22,050 --> 00:47:23,070 we're doing here. 767 00:47:23,070 --> 00:47:26,080 You have more, you have extra bunch of unknowns. 768 00:47:26,080 --> 00:47:27,460 That's what we have. 769 00:47:27,460 --> 00:47:32,190 Now what else about that matrix? 770 00:47:32,190 --> 00:47:35,880 I was going to write down a very, very tiny model 771 00:47:35,880 --> 00:47:37,800 for that matrix. 772 00:47:37,800 --> 00:47:39,220 I'll just make it two by two. 773 00:47:39,220 --> 00:47:44,830 Here's a model for that matrix where C is just a one 774 00:47:44,830 --> 00:47:48,560 and A is just a one. 775 00:47:48,560 --> 00:47:51,000 I mean, it's kind of laughable, right? 776 00:47:51,000 --> 00:47:53,190 That model, this is the real thing. 777 00:47:53,190 --> 00:48:00,330 But it gives you an example to check against. 778 00:48:00,330 --> 00:48:04,250 OK, what's a property of that matrix? 779 00:48:04,250 --> 00:48:06,070 It's, again? 780 00:48:06,070 --> 00:48:06,880 Symmetric. 781 00:48:06,880 --> 00:48:07,610 Good. 782 00:48:07,610 --> 00:48:09,820 That's a symmetric matrix. 783 00:48:09,820 --> 00:48:13,360 Because what happens if I transpose that block matrix? 784 00:48:13,360 --> 00:48:18,700 That A block will flip over here as A transpose, 785 00:48:18,700 --> 00:48:21,310 the A transpose block will flip up there 786 00:48:21,310 --> 00:48:26,050 as A, what happens to the C inverse block? 787 00:48:26,050 --> 00:48:28,520 C is a symmetric guy. 788 00:48:28,520 --> 00:48:32,900 In fact, it was just diagonal in our imagination. 789 00:48:32,900 --> 00:48:37,110 The key point is it's symmetric, its inverse is symmetric, 790 00:48:37,110 --> 00:48:39,320 its transpose is the same. 791 00:48:39,320 --> 00:48:42,200 So that's a symmetric matrix. 792 00:48:42,200 --> 00:48:43,450 That's a good thing, right? 793 00:48:43,450 --> 00:48:49,270 Now we've got a matrix that's symmetric, square symmetric. 794 00:48:49,270 --> 00:48:53,490 OK, what's my other question about that matrix? 795 00:48:53,490 --> 00:49:00,570 Is it or is it not positive definite, right? 796 00:49:00,570 --> 00:49:03,510 We've got to answer that question. 797 00:49:03,510 --> 00:49:06,040 Have we got a positive definite matrix? 798 00:49:06,040 --> 00:49:08,830 Would all the pivots be positive? 799 00:49:08,830 --> 00:49:11,990 Would the eigenvalues be positive? 800 00:49:11,990 --> 00:49:15,970 What's your guess? 801 00:49:15,970 --> 00:49:16,790 No. 802 00:49:16,790 --> 00:49:19,160 That matrix is not positive. 803 00:49:19,160 --> 00:49:22,440 No way that a matrix with a zero there, 804 00:49:22,440 --> 00:49:25,740 a zero block, or that matrix with a zero number 805 00:49:25,740 --> 00:49:27,060 could be positive definite. 806 00:49:27,060 --> 00:49:28,210 No, no way. 807 00:49:28,210 --> 00:49:39,770 The energy in this guy, this u transpose Au, you remember, 808 00:49:39,770 --> 00:49:46,280 would be u_1 squared and u_1*u_2, twice. 809 00:49:46,280 --> 00:49:50,040 And no u_2 squareds. 810 00:49:50,040 --> 00:49:55,300 And that thing is definitely indefinite. 811 00:49:55,300 --> 00:49:59,050 Right? 812 00:49:59,050 --> 00:50:01,840 In the u_1 direction it looks good, 813 00:50:01,840 --> 00:50:03,800 that's things positive there. 814 00:50:03,800 --> 00:50:08,070 But if I took u_1 and u_2 to have opposite signs, 815 00:50:08,070 --> 00:50:11,470 and made u_2 big enough then of course 816 00:50:11,470 --> 00:50:12,650 this just brings it down. 817 00:50:12,650 --> 00:50:16,030 So the graph of that would be a saddle point. 818 00:50:16,030 --> 00:50:18,170 The graph of that would be a saddle. 819 00:50:18,170 --> 00:50:26,040 OK, and now here I have the same thing on an m+n size. 820 00:50:26,040 --> 00:50:26,920 So what do I have? 821 00:50:26,920 --> 00:50:28,890 Actually, you could see. 822 00:50:28,890 --> 00:50:34,120 The last exercise is mentally do elimination on that matrix. 823 00:50:34,120 --> 00:50:37,160 Mentally do elimination on that matrix. 824 00:50:37,160 --> 00:50:42,910 So start with the first m rows. 825 00:50:42,910 --> 00:50:45,000 We'll work with those first. 826 00:50:45,000 --> 00:50:48,090 What will elimination do, what will the pivots be like, 827 00:50:48,090 --> 00:50:51,460 what will happen at the beginning of elimination? 828 00:50:51,460 --> 00:50:55,790 When I start with this matrix? 829 00:50:55,790 --> 00:50:59,430 Well it meets C inverse right away, that diagonal matrix, 830 00:50:59,430 --> 00:51:00,850 and it's extremely happy. 831 00:51:00,850 --> 00:51:02,300 Those will be the pivots, right? 832 00:51:02,300 --> 00:51:03,740 They're sitting on the diagonals, 833 00:51:03,740 --> 00:51:05,510 zero off the diagonals. 834 00:51:05,510 --> 00:51:09,460 They'll be positive pivots, I'll have m positive pivots here. 835 00:51:09,460 --> 00:51:15,740 And then I get down to where A comes in the picture. 836 00:51:15,740 --> 00:51:20,800 So on the last board here, let me just copy this matrix, 837 00:51:20,800 --> 00:51:25,320 [C inverse, A; A transpose, 0]. 838 00:51:25,320 --> 00:51:29,210 An elimination is going to, it'll be very happy with that. 839 00:51:29,210 --> 00:51:35,570 But it's going to put, so it's happy with that row. 840 00:51:35,570 --> 00:51:36,660 Block row. 841 00:51:36,660 --> 00:51:41,130 It's going to do an elimination to get a bunch of zeroes there 842 00:51:41,130 --> 00:51:45,740 and what did it do? 843 00:51:45,740 --> 00:51:48,310 This was elimination, this was subtracting, 844 00:51:48,310 --> 00:51:50,700 yeah what did it subtract here? 845 00:51:50,700 --> 00:51:55,080 It multiplied these pivot rows by something 846 00:51:55,080 --> 00:52:01,270 and subtracted from these lower rows and got the zero block. 847 00:52:01,270 --> 00:52:04,130 And what did it multiply by? 848 00:52:04,130 --> 00:52:07,480 What do I multiply that block row, and this 849 00:52:07,480 --> 00:52:11,730 is a perfect, perfect exercise to see how blocks are just 850 00:52:11,730 --> 00:52:12,880 like numbers. 851 00:52:12,880 --> 00:52:14,110 You can deal with them. 852 00:52:14,110 --> 00:52:17,230 What do I multiply that block row by 853 00:52:17,230 --> 00:52:22,880 and subtract from the row below to get a zero. 854 00:52:22,880 --> 00:52:27,090 You said C A transpose, but I don't think that's it. 855 00:52:27,090 --> 00:52:31,100 A transpose C. You've got to multiply by A transpose C. 856 00:52:31,100 --> 00:52:34,690 First of all, C A transpose wouldn't be a possibility. 857 00:52:34,690 --> 00:52:35,970 Wrong shapes. 858 00:52:35,970 --> 00:52:42,210 A transpose C is the four by five, five by five guy. 859 00:52:42,210 --> 00:52:45,470 So you multiply A transpose C, that cancels that, 860 00:52:45,470 --> 00:52:48,720 leaves the A transpose, when you subtract it gives you a zero, 861 00:52:48,720 --> 00:52:51,100 and what does it give you there? 862 00:52:51,100 --> 00:52:55,310 What shows up there? 863 00:52:55,310 --> 00:53:00,710 A transpose C multiplies at A, subtracts 864 00:53:00,710 --> 00:53:04,780 so it's actually what shows up there is minus A transpose C 865 00:53:04,780 --> 00:53:08,200 A. Let me write it in there. 866 00:53:08,200 --> 00:53:11,980 Minus A transpose C A. So that matrix 867 00:53:11,980 --> 00:53:13,880 is exactly what comes from this one. 868 00:53:13,880 --> 00:53:16,870 It's exactly what we do when we eliminate w. 869 00:53:16,870 --> 00:53:18,250 That's what elimination is. 870 00:53:18,250 --> 00:53:21,400 I just eliminated w by getting a zero there. 871 00:53:21,400 --> 00:53:25,500 And I got only an equation, but notice the minus. 872 00:53:25,500 --> 00:53:32,030 So, final question, what are the signs of the last n pivots? 873 00:53:32,030 --> 00:53:35,370 The first m were all positive, and they were sitting 874 00:53:35,370 --> 00:53:38,120 on the diagonal already. 875 00:53:38,120 --> 00:53:42,430 The last n are not so easy to see, 876 00:53:42,430 --> 00:53:44,860 but we can see what sign they have. 877 00:53:44,860 --> 00:53:48,390 And what sign do the last n pivots have? 878 00:53:48,390 --> 00:53:50,090 Minus. 879 00:53:50,090 --> 00:53:53,160 Because they come from a negative definite. 880 00:53:53,160 --> 00:53:55,850 Minus A transpose C A is shown up there. 881 00:53:55,850 --> 00:53:58,630 So that's the saddle point. 882 00:53:58,630 --> 00:54:03,230 Saddle points are, when you have two-field problems, 883 00:54:03,230 --> 00:54:05,680 you're talking about saddle points, 884 00:54:05,680 --> 00:54:09,590 and the mixed method in finite elements is exactly that. 885 00:54:09,590 --> 00:54:17,420 And the tricky part is then with the mixed method, 886 00:54:17,420 --> 00:54:19,800 you're sort of not so perfectly guaranteed 887 00:54:19,800 --> 00:54:21,980 that the matrix is invertible. 888 00:54:21,980 --> 00:54:26,210 Because we have plus stuff and minus stuff. 889 00:54:26,210 --> 00:54:28,620 OK, thank you, that's great. 890 00:54:28,620 --> 00:54:33,830 And I'll see you Monday all about the exam and review, 891 00:54:33,830 --> 00:54:36,310 it's a great chance to think back.