1 00:00:07 --> 00:00:07 Okay. 2 00:00:07 --> 00:00:09.05 This is it. 3 00:00:09.05 --> 00:00:16 The second lecture in linear algebra, and I've put below my 4 00:00:16 --> 00:00:18 main topics for today. 5 00:00:18 --> 00:00:25 I put right there a system of equations that's going to be our 6 00:00:25 --> 00:00:29 example to work with. 7 00:00:29 --> 00:00:32 But what are we going to do with it? 8 00:00:32 --> 00:00:33 We're going to solve it. 9 00:00:33 --> 00:00:37 And the method of solution will not be determinants. 10 00:00:37 --> 00:00:41.28 Determinants are something that will come later. 11 00:00:41.28 --> 00:00:44 The method we'll use is called elimination. 12 00:00:44 --> 00:00:49 And it's the way every software package solves equations. 13 00:00:49 --> 00:00:53.75 And elimination, well, if it succeeds, 14 00:00:53.75 --> 00:00:55.93 it gets the answer. 15 00:00:55.93 --> 00:00:59 And normally it does succeed. 16 00:00:59 --> 00:01:05 If the matrix A that's coming into that system is a good 17 00:01:05 --> 00:01:13 matrix, and I think this one is, then elimination will work. 18 00:01:13 --> 00:01:15 We'll get the answer in an efficient way. 19 00:01:15 --> 00:01:18 But why don't we, as long as we're sort of seeing 20 00:01:18 --> 00:01:22 how elimination works -- it's always good to ask how could it 21 00:01:22 --> 00:01:22 fail? 22 00:01:22 --> 00:01:25 So at the same time, we'll see how elimination 23 00:01:25 --> 00:01:29 decides whether the matrix is a good one or has problems. 24 00:01:29 --> 00:01:34 Then to complete the answer, there's an obvious step of back 25 00:01:34 --> 00:01:36 substitution. 26 00:01:36 --> 00:01:40 In fact, the idea of elimination is -- you would have 27 00:01:40 --> 00:01:42 thought of it, right? 28 00:01:42 --> 00:01:45 I mean Gauss thought of it before we did, 29 00:01:45 --> 00:01:50 but only because he was born earlier. 30 00:01:50 --> 00:01:54 It's a natural idea... and died earlier, 31 00:01:54 --> 00:01:55 too. 32 00:01:55 --> 00:01:58 Okay, and you've seen the idea. 33 00:01:58 --> 00:02:05 But now, the part that I want to show you is elimination 34 00:02:05 --> 00:02:13 expressed in matrix language, because the whole course -- 35 00:02:13 --> 00:02:18 all the key ideas get expressed as matrix operations, 36 00:02:18 --> 00:02:20 not as words. 37 00:02:20 --> 00:02:25 And one of the operations, of course, that we'll meet is 38 00:02:25 --> 00:02:29 how do we multiply matrices and why? 39 00:02:29 --> 00:02:33 Okay, so there's a system of equations. 40 00:02:33 --> 00:02:38 Three equations and three unknowns. 41 00:02:38 --> 00:02:42 And there's the matrix, the three by three matrix -- so 42 00:02:42 --> 00:02:44 this is the system Ax = b. 43 00:02:44 --> 00:02:49 This is our system to solve, Ax equal -- and the right-hand 44 00:02:49 --> 00:02:51 side is that vector 2, 12, 2. 45 00:02:51 --> 00:02:52 Okay. 46 00:02:52 --> 00:02:56 Now, when I describe elimination -- it gets to be a 47 00:02:56 --> 00:03:02 pain to keep writing the equal signs and the pluses and so on. 48 00:03:02 --> 00:03:05 It's that matrix that totally matters. 49 00:03:05 --> 00:03:08 Everything is in that matrix. 50 00:03:08 --> 00:03:12 But behind it is those equations. 51 00:03:12 --> 00:03:15.12 So what does elimination do? 52 00:03:15.12 --> 00:03:18.86 What's the first step of elimination? 53 00:03:18.86 --> 00:03:23 We accept the first equation, it's okay. 54 00:03:23 --> 00:03:28 I'm going to multiply that equation by the right number, 55 00:03:28 --> 00:03:32 the right multiplier and I'm going to subtract it from the 56 00:03:32 --> 00:03:33.85 second equation. 57 00:03:33.85 --> 00:03:35 With what purpose? 58 00:03:35 --> 00:03:39 So that will decide what the multiplier should be. 59 00:03:39 --> 00:03:43 Our purpose is to knock out the x part of equation two. 60 00:03:43 --> 00:03:47.47 So our purpose is to eliminate x. 61 00:03:47.47 --> 00:03:53 So what do I multiply -- and again, I'll do it with this 62 00:03:53 --> 00:03:57 matrix, because I can do it short. 63 00:03:57 --> 00:04:00 What's the multiplier here? 64 00:04:00 --> 00:04:06 What do I multiply -- equation one and subtract. 65 00:04:06 --> 00:04:08 Notice I'm saying that word subtract. 66 00:04:08 --> 00:04:10 I'd like to stick to that convention. 67 00:04:10 --> 00:04:12 I'll do a subtraction. 68 00:04:12 --> 00:04:16 First of all this is the key number that I'm starting with. 69 00:04:16 --> 00:04:18.04 And that's called the pivot. 70 00:04:18.04 --> 00:04:21 I'll put a box around it and write its name down. 71 00:04:21 --> 00:04:23 That's the first pivot. 72 00:04:23 --> 00:04:25 The first pivot. 73 00:04:25 --> 00:04:25 Okay. 74 00:04:25 --> 00:04:31 So I'm going to use -- that's sort of like the key number in 75 00:04:31 --> 00:04:32 that equation. 76 00:04:32 --> 00:04:35 And now what's the multiplier? 77 00:04:35 --> 00:04:39.28 So I'm going to -- my first row won't change, 78 00:04:39.28 --> 00:04:42 that's the pivot row. 79 00:04:42 --> 00:04:46 But I'm going to use it -- and now, finally, 80 00:04:46 --> 00:04:49 let me ask you what the multiplier is. 81 00:04:49 --> 3. Yes? 82 3. --> 00:04:50 83 00:04:50 --> 00:04:54 3 times that first equation will knock out that 3. 84 00:04:54 --> 00:04:55 Okay. 85 00:04:55 --> 00:04:57 So what will it leave? 86 00:04:57 --> 00:05:02 So the multiplier is 3. 3 times that will make that 0. 87 00:05:02 --> 00:05:07.1 That was our purpose. 3 2s away from the 8 will leave 88 00:05:07.1 --> 00:05:11 a 2 and three 1s away from 1 will leave a minus 2. 89 00:05:11 --> 00:05:13.23 And this guy didn't change. 90 00:05:13.23 --> 00:05:13 Okay. 91 00:05:13 --> 00:05:18.15 Now the next step -- this is forward elimination and that 92 00:05:18.15 --> 00:05:20 step's completed. 93 00:05:20 --> 00:05:24 Oh, well, you could say wait a minute, what about the right 94 00:05:24 --> 00:05:24 hand side? 95 00:05:24 --> 00:05:28 Shall I carry -- the right-hand side gets carried along. 96 00:05:28 --> 00:05:32 Actually MatLab finishes up with the left side before -- and 97 00:05:32 --> 00:05:35 then just goes back to do the right side. 98 00:05:35 --> 00:05:39 Maybe I'll be MatLab for a moment and do that. 99 00:05:39 --> 00:05:40 Okay. 100 00:05:40 --> 00:05:45 I'm leaving a room for a column of b, the right-hand side. 101 00:05:45 --> 00:05:48 But I'll fill it in later. 102 00:05:48 --> 00:05:48.52 Okay. 103 00:05:48.52 --> 00:05:53 Now the next step of elimination is what? 104 00:05:53 --> 00:05:58 Well, strictly speaking... this position that I cleaned up 105 00:05:58 --> 00:06:01 was like the 2, 1 position, row 2, 106 00:06:01 --> 00:06:02 column 1. 107 00:06:02 --> 00:06:05 So I got a 0 in the 2, 1 position. 108 00:06:05 --> 00:06:10 I'll use 2,1 as the index of that step. 109 00:06:10 --> 00:06:16 The next step should be to finish the column and get a 0 in 110 00:06:16 --> 00:06:17 that position. 111 00:06:17 --> 00:06:23.06 So the next step is really the 3,1 step, row three, 112 00:06:23.06 --> 00:06:24 column one. 113 00:06:24 --> 00:06:27 But of course, I already have 0. 114 00:06:27 --> 00:06:27 Okay. 115 00:06:27 --> 00:06:30 So the multiplier is 0. 116 00:06:30 --> 00:06:37 I take 0 of this equation away from this one and I'm all set. 117 00:06:37 --> 00:06:41 So I won't repeat that, but there was a step there 118 00:06:41 --> 00:06:46 which, MatLab would have to look -- it would look at this number 119 00:06:46 --> 00:06:50 and, do that step, unless you told it in advance 120 00:06:50 --> 00:06:51 that it was 0. 121 00:06:51 --> 00:06:51 Okay. 122 00:06:51 --> 00:06:52 Now what? 123 00:06:52 --> 00:06:57 Now we can see the second pivot, which is what? 124 00:06:57 --> 00:07:01 The second pivot -- see, we've eliminated -- x is now 125 00:07:01 --> 00:07:04 gone from this equation, right? 126 00:07:04 --> 00:07:07 We're down to two equations in y and z. 127 00:07:07 --> 00:07:09.97 And so now I just do it again. 128 00:07:09.97 --> 00:07:15 Like, everything's very cursive at this -- this is like -- 129 00:07:15 --> 00:07:18 such a basic algorithm and you've seen it, 130 00:07:18 --> 00:07:21 but carry me through one last step. 131 00:07:21 --> 00:07:24.11 So this is still the first pivot. 132 00:07:24.11 --> 00:07:28 Now the second pivot is this guy, who has appeared there. 133 00:07:28 --> 00:07:33 And what's the multiplier, the appropriate multiplier now? 134 00:07:33 --> 00:07:36 And what's my purpose? 135 00:07:36 --> 00:07:41 Is it to wipe out the 3, 2 position, right? 136 00:07:41 --> 00:07:44 This was the 2, 1 step. 137 00:07:44 --> 00:07:49 And now I'm going to take the 3, 2 step. 138 00:07:49 --> 00:07:55.79 So this all stays the same, 1 2 1, 0 2 -1 and the pivots 139 00:07:55.79 --> 00:07:58 are there. 140 00:07:58 --> 00:08:04 Now I'm using this pivot, so what's the multiplier? 141 00:08:04 --> 2. 142 2. --> 00:08:06 2 times this equation, 143 00:08:06 --> 00:08:13 this row, gets subtracted from this row and makes that a 0. 144 00:08:13 --> 00:08:16 So it's 0, 0 and is it a 5? 145 00:08:16 --> 00:08:22 Yeah, I guess it's a 5, is that right? 146 00:08:22 --> 00:08:28 Because I have a one there and I'm subtracting twice of twice 147 00:08:28 --> 00:08:31 this, so I think it's a 5 there. 148 00:08:31 --> 00:08:33 There's the third pivot. 149 00:08:33 --> 00:08:37 So let me put a box around all three pivots. 150 00:08:37 --> 00:08:42 Is there a -- oh, did I just invent a negative 151 00:08:42 --> 00:08:42.83 one? 152 00:08:42.83 --> 00:08:48 I'm sorry that the tape can't, correct that as easily as I 153 00:08:48 --> 00:08:50 can. 154 00:08:50 --> 00:08:50 Okay. 155 00:08:50 --> 00:08:53 Thank you very much. 156 00:08:53 --> 00:08:58 You get an A in the course now. 157 00:08:58 --> 00:09:01.27 Is that correct? 158 00:09:01.27 --> 00:09:04 Is it correct now? 159 00:09:04 --> 00:09:04 Okay. 160 00:09:04 --> 00:09:14 So the three pivots are there -- I know right away a lot about 161 00:09:14 --> 00:09:17 this matrix. 162 00:09:17 --> 00:09:22 This elimination step from A -- this matrix I'm going to call U. 163 00:09:22 --> 00:09:23 U for upper triangular. 164 00:09:23 --> 00:09:27 So the whole purpose of elimination was to get from A to 165 00:09:27 --> 00:09:28 U. 166 00:09:28 --> 00:09:30 And, literally, that's the most common 167 00:09:30 --> 00:09:33.37 calculation in scientific computing. 168 00:09:33.37 --> 00:09:37 And people think of how could I do that faster? 169 00:09:37 --> 00:09:40 Because it's a major, major thing. 170 00:09:40 --> 00:09:44 But we're doing it the straightforward way. 171 00:09:44 --> 00:09:48.05 We found three pivots, and by the way, 172 00:09:48.05 --> 00:09:51 I didn't say this, pivots can't be 0. 173 00:09:51 --> 00:09:54 I don't accept 0 as a pivot. 174 00:09:54 --> 00:09:56 And I didn't get 0. 175 00:09:56 --> 00:09:58 So this matrix is great. 176 00:09:58 --> 00:10:01 It gave me three pivots, I didn't have to do anything 177 00:10:01 --> 00:10:05 special, I just followed the rules and, and the pivots are 1, 178 00:10:05 --> 00:10:06.24 2 and 5. 179 00:10:06.24 --> 00:10:09 By the way, just because I always anticipate stuff from a 180 00:10:09 --> 00:10:13 later day, if I wanted to know the determinant of this matrix 181 00:10:13 --> 00:10:17 -- which I never do want to know, 182 00:10:17 --> 00:10:21.76 but I would just multiply the pivots. 183 00:10:21.76 --> 00:10:24 The determinant is 10. 184 00:10:24 --> 00:10:28 So even things like the determinant are here. 185 00:10:28 --> 00:10:29 Okay. 186 00:10:29 --> 00:10:34 Now -- oh, let me talk about failure for a moment, 187 00:10:34 --> 00:10:40 and then -- and then come back to success. 188 00:10:40 --> 00:10:44 How could this have failed? 189 00:10:44 --> 00:10:51.45 How could -- by fail, I mean to come up with three 190 00:10:51.45 --> 00:10:52 pivots. 191 00:10:52 --> 00:10:58 I mean, there are a couple of points. 192 00:10:58 --> 00:11:02 I would have already been in trouble if this very first 193 00:11:02 --> 00:11:04 number here was 0. 194 00:11:04 --> 00:11:08 If it was a 0 there -- suppose that had been a 0, 195 00:11:08 --> 00:11:12.74 there were no Xs in that equation -- first equation. 196 00:11:12.74 --> 00:11:16 Does that mean I can't solve the problem? 197 00:11:16 --> 00:11:17 Does that mean I quit? 198 00:11:17 --> 00:11:19 No. 199 00:11:19 --> 00:11:19 What do I do? 200 00:11:19 --> 00:11:20 I switch rows. 201 00:11:20 --> 00:11:21 I exchange rows. 202 00:11:21 --> 00:11:24 So in case of a 0, I will not say 0 pivot. 203 00:11:24 --> 00:11:28 I will never be heard to utter those words, 0 pivot. 204 00:11:28 --> 00:11:32 But if there's a 0 in the pivot position, maybe I can say that, 205 00:11:32 --> 00:11:36 I would try to exchange for a lower equation and get a proper 206 00:11:36 --> 00:11:37 pivot up there. 207 00:11:37 --> 00:11:38 Okay. 208 00:11:38 --> 00:11:43 Now, for example, this second pivot came out two. 209 00:11:43 --> 00:11:46.04 Could it have come out 0? 210 00:11:46.04 --> 00:11:50.63 What -- actually, if I change that 8 a little 211 00:11:50.63 --> 00:11:55 bit, I would have got a little trouble. 212 00:11:55 --> 00:12:02 What should I change that 8 to so that I run into trouble? 213 00:12:02 --> 00:12:02 A 6. 214 00:12:02 --> 00:12:08 If that had been a 6, then this would have been 0 and 215 00:12:08 --> 00:12:13 I couldn't have used that as the pivot. 216 00:12:13 --> 00:12:17 But I could have exchanged again. 217 00:12:17 --> 00:12:19 In this case. 218 00:12:19 --> 00:12:23 In this case, because when can I get out of 219 00:12:23 --> 00:12:24 trouble? 220 00:12:24 --> 00:12:29 I can get out of trouble if there's a non-0 below this 221 00:12:29 --> 00:12:31.36 troublesome 0. 222 00:12:31.36 --> 00:12:33 And there is here. 223 00:12:33 --> 00:12:37 So I would be okay in this case. 224 00:12:37 --> 00:12:40 If this was a 6, I would survive by a row 225 00:12:40 --> 00:12:40 exchange. 226 00:12:40 --> 00:12:44 Now -- of course, it might have happened that I 227 00:12:44 --> 00:12:47.96 couldn't do the row, that -- that there was 0s below 228 00:12:47.96 --> 00:12:49 it, but here there wasn't. 229 00:12:49 --> 00:12:54 Now, I could also have got in trouble if this number 1 was a 230 00:12:54 --> 00:12:55 little different. 231 00:12:55 --> 00:12:59 See, that 1 became a 5, I guess, by the end. 232 00:12:59 --> 00:13:05 So can you see what number there would have got me trouble 233 00:13:05 --> 00:13:09 that I really couldn't get out of? 234 00:13:09 --> 00:13:16 Trouble that I couldn't get out of would mean if 0 is in the 235 00:13:16 --> 00:13:22 pivot position and I've got no place to exchange. 236 00:13:22 --> 00:13:28 So there must be some number which if I had had here it would 237 00:13:28 --> 00:13:30 have meant failure. 238 00:13:30 --> 00:13:32 Negative 4, good. 239 00:13:32 --> 00:13:37 If it was a negative 4 here -- if it happened to be a negative 240 00:13:37 --> 00:13:41.89 4, I'll temporarily put it up here. 241 00:13:41.89 --> 00:13:46 If this had been a negative 4 z, then I would have gone 242 00:13:46 --> 00:13:47 through the same steps. 243 00:13:47 --> 00:13:52 This would have been a minus 4, it still would have been a 244 00:13:52 --> 00:13:52 minus 4. 245 00:13:52 --> 00:13:56 But at the last minute it would have become 0. 246 00:13:56 --> 00:14:00 And there wouldn't have been a third pivot. 247 00:14:00 --> 00:14:03 The matrix would have not been invertible. 248 00:14:03 --> 00:14:06 Well, of course, the inverse of a matrix is 249 00:14:06 --> 00:14:09 coming next week, but, you've heard these words 250 00:14:09 --> 00:14:09 before. 251 00:14:09 --> 00:14:12 So, that's how we identify failure. 252 00:14:12 --> 00:14:17 There's temporary failure when we can do a row exchange -- 253 00:14:17 --> 00:14:21.26 and get out of it, or there's complete failure 254 00:14:21.26 --> 00:14:26 when we get a 0 and -- and there's nothing below that we 255 00:14:26 --> 00:14:27 can use. 256 00:14:27 --> 00:14:27 Okay. 257 00:14:27 --> 00:14:31 Let's stay with -- back to success now. 258 00:14:31 --> 00:14:36 In fact, I guess the next topic is back substitution. 259 00:14:36 --> 00:14:39 So what's back substitution? 260 00:14:39 --> 00:14:44.57 Well, now I'd better bring the right-hand side in. 261 00:14:44.57 --> 00:14:49 So what would MatLab do and what should we do? 262 00:14:49 --> 00:14:54 Let me bring in the right-hand side as an extra column. 263 00:14:54 --> 00:14:56 So there comes B. 264 00:14:56 --> 2. So it's 2, 12, 265 2. --> 00:14:58 266 00:14:58 --> 00:15:02 I would call this the augmented matrix. 267 00:15:02 --> 00:15:06 "Augment" means you've tacked something on. 268 00:15:06 --> 00:15:09 I've tacked on this extra column. 269 00:15:09 --> 00:15:15 Because, when I'm working with equations, I do the same thing 270 00:15:15 --> 00:15:17.76 to both sides. 271 00:15:17.76 --> 00:15:21 So, at this step, I subtracted 2 of the first 272 00:15:21 --> 00:15:26 equation away from the second equation so that this augmented 273 00:15:26 --> 00:15:32 -- I even brought some colored chalk, but I don't know if it 274 00:15:32 --> 00:15:32 shows up. 275 00:15:32 --> 00:15:36 So this is like the augmented -- no! 276 00:15:36 --> 00:15:38 Damn, circled the wrong thing. 277 00:15:38 --> 00:15:40 Okay. 278 00:15:40 --> 00:15:40.75 Here is b. 279 00:15:40.75 --> 00:15:42 Okay, that's the extra column. 280 00:15:42 --> 00:15:42 Okay. 281 00:15:42 --> 00:15:46 So what happened to that extra column, the right-hand side of 282 00:15:46 --> 00:15:49 the equations, when I did the first step? 283 00:15:49 --> 00:15:53 So that was 3 of this away from this, so it took -- the 2 stayed 284 00:15:53 --> 00:15:56 the same, but three 2s got taken away from 12, 285 00:15:56 --> 00:15:59 leaving 6, and that 2 stayed the same. 286 00:15:59 --> 00:16:04 So this is how it's looking halfway along. 287 00:16:04 --> 00:16:09 And let me just carry to the end. 288 00:16:09 --> 00:16:16 The 2 and the 6 stay the same, but -- what do I have here? 289 00:16:16 --> 00:16:17.86 Oh, gosh. 290 00:16:17.86 --> 00:16:19 Help me out, now. 291 00:16:19 --> 00:16:25 What -- so now I'm -- This is still like forward 292 00:16:25 --> 00:16:26 elimination. 293 00:16:26 --> 00:16:29 I got to this point, which I think is right, 294 00:16:29 --> 00:16:32.04 and now what did I do at this step? 295 00:16:32.04 --> 00:16:36 I multiplied that pivot by 2 or that whole equation by 2 and 296 00:16:36 --> 00:16:39 subtracted from that, so I think I take two 6s, 297 00:16:39 --> 00:16:42.07 which is 12, away from the 2. 298 00:16:42.07 --> 00:16:47 Do you think minus 10 is my final right-hand side -- the 299 00:16:47 --> 00:16:54.63 right-hand side that goes with U, and let me call that once and 300 00:16:54.63 --> 00:16:56 forever the vector c. 301 00:16:56 --> 00:17:02 So c is what happens to b, and U is what happens to A. 302 00:17:02 --> 00:17:03 Okay. 303 00:17:03 --> 00:17:06 There you've seen elimination clean. 304 00:17:06 --> 00:17:07 Okay. 305 00:17:07 --> 00:17:11 Oh, what's back substitution? 306 00:17:11 --> 00:17:16 So what are my final equations, then? 307 00:17:16 --> 00:17:23 Can I copy these equations? x+2y+z=2 is still there and 308 00:17:23 --> 00:17:27 2y-2z=6 is there, and 5z=-10. 309 00:17:27 --> 00:17:28 Okay. 310 00:17:28 --> 00:17:36 Those are the equations that these numbers are telling me 311 00:17:36 --> 00:17:38 about. 312 00:17:38 --> 00:17:42 Those are the equations U x equals c. 313 00:17:42 --> 00:17:45 Okay, how do I solve them? 314 00:17:45 --> 00:17:49 What one do I solve for first? z. 315 00:17:49 --> 00:17:56 I see immediately that the correct value of z is negative 316 00:17:56 --> 2. 317 2. --> 00:17:56 318 00:17:56 --> 00:17:59 And what do I do next? 319 00:17:59 --> 00:18:02 I go back upwards. 320 00:18:02 --> 00:18:04 I now know z here. 321 00:18:04 --> 00:18:08 So, if z is negative 2, that's 4 there, 322 00:18:08 --> 00:18:10 is that right? 323 00:18:10 --> 00:18:14.63 And so 2 y plus a 4 is 6, maybe y is 1. 324 00:18:14.63 --> 00:18:18 Going -- this is back substitution. 325 00:18:18 --> 00:18:23.62 We're doing it on the fly because it's so easy. 326 00:18:23.62 --> 00:18:29 And then x is -- so x -- 2y is 2 minus 2, 327 00:18:29 --> 00:18:30 maybe x is 2? 328 00:18:30 --> 00:18:34 So you see what back substitution is. 329 00:18:34 --> 00:18:40 It's the simple step solving the equations in reverse order 330 00:18:40 --> 00:18:43 because the system is triangular. 331 00:18:43 --> 00:18:43 Okay. 332 00:18:43 --> 00:18:44 Good. 333 00:18:44 --> 00:18:48 So that's elimination and back substitution, 334 00:18:48 --> 00:18:53 and I kept the right-hand side along. 335 00:18:53 --> 00:19:00 Okay, now what do I -- that, like, is first piece of the 336 00:19:00 --> 00:19:00 lecture. 337 00:19:00 --> 00:19:03.57 What's the second piece? 338 00:19:03.57 --> 00:19:06.8 Matrices are going to get in. 339 00:19:06.8 --> 00:19:11 So I wrote stuff with x, y-s and z-s in there, 340 00:19:11 --> 00:19:17 then I really, got the right shorthand, 341 00:19:17 --> 00:19:23 just writing the matrix entries, and now I want to write 342 00:19:23 --> 00:19:28 the operations that I did in matrices, right? 343 00:19:28 --> 00:19:34 I've carried the matrices along, but I haven't said the 344 00:19:34 --> 00:19:41 operation those elimination steps, I now want to express as 345 00:19:41 --> 00:19:43.67 matrices. 346 00:19:43.67 --> 00:19:44 Okay. 347 00:19:44 --> 00:19:46 Here they come. 348 00:19:46 --> 00:19:52 So now this is elimination matrices. 349 00:19:52 --> 00:19:53 Okay. 350 00:19:53 --> 00:20:02 Let me take that first step, which took me from 1 2 1 3 8 1 351 00:20:02 --> 00:20:03 0 4 1. 352 00:20:03 --> 00:20:14 I want to operate on that -- I want to do elimination on that. 353 00:20:14 --> 00:20:14 Okay. 354 00:20:14 --> 00:20:20 Okay, now I'm remembering a point I want to single out as 355 00:20:20 --> 00:20:23 especially important. 356 00:20:23 --> 00:20:26 Let me move the board up for that. 357 00:20:26 --> 00:20:32 Because when we do matrix operations, we've got to, 358 00:20:32 --> 00:20:37 like, be able to see the big picture. 359 00:20:37 --> 00:20:37 Okay. 360 00:20:37 --> 00:20:43 Last time, I spoke about the big picture of -- when I 361 00:20:43 --> 00:20:47 multiply a matrix by a right-hand side. 362 00:20:47 --> 00:20:52 If I have some matrix there and I multiply it by 3 4 5, 363 00:20:52 --> 00:20:57 let's say -- so here's a matrix -- 364 00:20:57 --> 00:21:01 what did I say -- well, I guess I only said it on the 365 00:21:01 --> 00:21:06 videotape, but -- do you remember how I look at that 366 00:21:06 --> 00:21:08 matrix multiplication? 367 00:21:08 --> 00:21:13 The result of multiplying a matrix by some vector is a 368 00:21:13 --> 00:21:17 combination of the columns of the matrix. 369 00:21:17 --> 00:21:19 It's 3 times the first column. 370 00:21:19 --> 00:21:25 It's 3 times column one plus 4 times column two plus 5 times 371 00:21:25 --> 00:21:27 column three. 372 00:21:27 --> 00:21:28 Okay. 373 00:21:28 --> 00:21:34 I'm going to come back to that multiple times. 374 00:21:34 --> 00:21:43 What I wanted to do now was to emphasize the parallel thing 375 00:21:43 --> 00:21:44 with rows. 376 00:21:44 --> 00:21:45 Why? 377 00:21:45 --> 00:21:54 Because all our operations here for this two weeks of the course 378 00:21:54 --> 00:21:58 are row operations. 379 00:21:58 --> 00:22:04 So this isn't what I need for row operations. 380 00:22:04 --> 00:22:08 Let me do a row operation. 381 00:22:08 --> 00:22:16 Suppose I have my matrix again and suppose I multiply on the 382 00:22:16 --> 00:22:20 left by some -- let's say 1 2 7. 383 00:22:20 --> 00:22:27 Again, I'm just, like, saying what the result 384 00:22:27 --> 00:22:28.78 is. 385 00:22:28.78 --> 00:22:35 And then we'll say how matrix multiplication works and we'll 386 00:22:35 --> 00:22:37 see that it's true. 387 00:22:37 --> 00:22:37 Okay. 388 00:22:37 --> 00:22:44 But maybe already I'm making -- I'm sort of bringing up -- the 389 00:22:44 --> 00:22:50 central idea of linear algebra is how these matrices work by 390 00:22:50 --> 00:22:54 rows as well as by columns. 391 00:22:54 --> 00:22:54 Okay. 392 00:22:54 --> 00:22:57 How does it work by rows? 393 00:22:57 --> 00:23:01 What -- so that's a row vector. 394 00:23:01 --> 00:23:06 I could say that's a one by three matrix, 395 00:23:06 --> 00:23:12 a row vector multiplying a three by three matrix. 396 00:23:12 --> 00:23:14.57 What's the output? 397 00:23:14.57 --> 00:23:20 What's the product of a row times a matrix? 398 00:23:20 --> 00:23:23 And -- okay, it's a row. 399 00:23:23 --> 00:23:26 A row -- a column -- I'm sorry. 400 00:23:26 --> 00:23:30 A matrix times a column is a column. 401 00:23:30 --> 00:23:33 So matrix times a -- yeah. 402 00:23:33 --> 00:23:36 Matrix times a column is a column. 403 00:23:36 --> 00:23:39 And we know what column it is. 404 00:23:39 --> 00:23:45 Over here, I'm doing a row times a matrix. 405 00:23:45 --> 00:23:47 And what's the answer? 406 00:23:47 --> 00:23:54 It's one of that first row, so it's 1 times -- 1 times row 407 00:23:54 --> 00:24:00 one, plus 2 times row two plus 7 times row three. 408 00:24:00 --> 00:24:04 When -- as we do matrix multiplication, 409 00:24:04 --> 00:24:11 keep your eye on what it's doing with whole vectors. 410 00:24:11 --> 00:24:17 And what it's doing -- what it's doing in this case is it's 411 00:24:17 --> 00:24:19.38 combining the rows. 412 00:24:19.38 --> 00:24:24 And we have a combination, a linear combination of the 413 00:24:24 --> 00:24:25 rows. 414 00:24:25 --> 00:24:27 Okay, I want to use that. 415 00:24:27 --> 00:24:33 Okay, so my question is what's the matrix that does this first 416 00:24:33 --> 00:24:39 step, that takes -- subtracts 3 of equation one from equation 417 00:24:39 --> 00:24:40 two? 418 00:24:40 --> 00:24:44 That's what I want to do. 419 00:24:44 --> 00:24:52 So this is going to be a matrix that's going to subtract 3 times 420 00:24:52 --> 00:24:59 row one from row two, and leaves the other rows the 421 00:24:59 --> 00:24:59 same. 422 00:24:59 --> 00:25:07 Just in -- I mean, the answer is going to be that. 423 00:25:07 --> 00:25:10 So whatever matrix this is -- and you're going to, 424 00:25:10 --> 00:25:15 like, tell me what matrix will do it, it's the matrix that 425 00:25:15 --> 00:25:19 leaves the first row unchanged, leaves the last row unchanged, 426 00:25:19 --> 00:25:23 but takes 3 of these away from this so it puts a 0 there, 427 00:25:23 --> 00:25:25 a 2 there and a minus 2. 428 00:25:25 --> 00:25:26 Good. 429 00:25:26 --> 00:25:28.63 What matrix will do it? 430 00:25:28.63 --> 00:25:29 It's these. 431 00:25:29 --> 00:25:34.97 It should be a pretty simple matrix, because we're doing a 432 00:25:34.97 --> 00:25:36 very simple step. 433 00:25:36 --> 00:25:40 We're just doing this step that changes row two. 434 00:25:40 --> 00:25:44 So actually, row one is not changing. 435 00:25:44 --> 00:25:48 So tell me how the matrix should begin. 436 00:25:48 --> 00:25:54 One -- the first row of the matrix will be 1 0 0, 437 00:25:54 --> 00:26:00 because that's just the right thing that takes one of that row 438 00:26:00 --> 00:26:06 and none of the other rows, and that's what we want. 439 00:26:06 --> 00:26:11 What's the last row of the matrix? 440 00:26:11 --> 00:26:15 0 0 1, because that takes one of the third row and none of the 441 00:26:15 --> 00:26:17 other rows, that's great. 442 00:26:17 --> 00:26:18 Okay. 443 00:26:18 --> 00:26:22 Now, suppose I didn't want to do anything at all. 444 00:26:22 --> 00:26:26 Suppose my row -- well, I guess maybe I had a case here 445 00:26:26 --> 00:26:31 when I already had a 0 and, didn't have to do anything. 446 00:26:31 --> 00:26:36.94 What matrix does nothing, like, just leaves you where you 447 00:26:36.94 --> 00:26:37 were? 448 00:26:37 --> 00:26:43 If I put in -- if I put in 0 1 0, that would be -- that would 449 00:26:43 --> 00:26:48 be -- that's the matrix -- what's the name of that matrix? 450 00:26:48 --> 00:26:52 The identity matrix, right. 451 00:26:52 --> 00:26:54 So it does absolutely nothing. 452 00:26:54 --> 00:26:58 It just multiplies everything and leaves it where it is. 453 00:26:58 --> 00:27:01 It's like a one, like the number one, 454 00:27:01 --> 00:27:02.1 for matrices. 455 00:27:02.1 --> 00:27:06 But that's not what we want, because we want to change this 456 00:27:06 --> 00:27:09 row to -- so what's the correct -- 457 00:27:09 --> 00:27:14 what should I put in here now to do it right? 458 00:27:14 --> 00:27:17 I want to get -- what do I want? 459 00:27:17 --> 00:27:23 What I -- I'm after -- I want 3 of row one to get subtracted 460 00:27:23 --> 00:27:23 off. 461 00:27:23 --> 00:27:29 So what's the right matrix, finish that matrix for me. 462 00:27:29 --> 00:27:31 Negative 3 goes here? 463 00:27:31 --> 00:27:33 And what goes here? 464 00:27:33 --> 00:27:34 That 1. 465 00:27:34 --> 00:27:35 And what goes here? 466 00:27:35 --> 00:27:36 The 0. 467 00:27:36 --> 00:27:38 That's the good matrix. 468 00:27:38 --> 00:27:43 That's the matrix that takes minus 3 of row one plus the row 469 00:27:43 --> 00:27:46 two and gives the new row 2. 470 00:27:46 --> 00:27:50 Should we just, like, check some particular 471 00:27:50 --> 00:27:50 entry? 472 00:27:50 --> 00:27:55 How do I check a particular entry of a matrix in matrix 473 00:27:55 --> 00:27:58 multiplication? 474 00:27:58 --> 00:28:05 Like, suppose I wanted to check the entry here that's in row 475 00:28:05 --> 00:28:07 two, column three. 476 00:28:07 --> 00:28:14 So where does the entry in row two, column three come from? 477 00:28:14 --> 00:28:21 I would look at row two of this guy and column three of this one 478 00:28:21 --> 00:28:24 to get that number. 479 00:28:24 --> 00:28:29 That number comes from the second row and the third column 480 00:28:29 --> 00:28:35 and I just take this dot product minus 3 -- I'm multiplying -- 481 00:28:35 --> 00:28:38 minus 3 plus 1 and 0 gives the minus 2. 482 00:28:38 --> 00:28:39 Yeah. 483 00:28:39 --> 00:28:39 It works. 484 00:28:39 --> 00:28:44 So we got various ways to multiply matrices now. 485 00:28:44 --> 00:28:47 We're sort of, like -- informally. 486 00:28:47 --> 00:28:50 We've got by columns, we've got -- well, 487 00:28:50 --> 00:28:55 we will have by columns, by rows, by each entry at a 488 00:28:55 --> 00:28:55 time. 489 00:28:55 --> 00:28:59 But it's good to see that matrix multiplication when one 490 00:28:59 --> 00:29:02 of the matrices is so simple. 491 00:29:02 --> 00:29:06 So this guy is our elementary matrix. 492 00:29:06 --> 00:29:10 Let's call it E for elementary or elimination. 493 00:29:10 --> 00:29:16.61 And let me put the indexes 2 1, because it's the matrix that we 494 00:29:16.61 --> 00:29:19.59 needed to fix the 2 1 position. 495 00:29:19.59 --> 00:29:25 It's the matrix that we needed to get this 2 1 position to be 496 00:29:25 --> 0. 497 0. --> 00:29:25 498 00:29:25 --> 00:29:26.03 Okay. 499 00:29:26.03 --> 00:29:28 Good enough. 500 00:29:28 --> 00:29:30 So what do I do next? 501 00:29:30 --> 00:29:33 I need another matrix, right? 502 00:29:33 --> 00:29:37 I need to -- there's another step here. 503 00:29:37 --> 00:29:44 And I want to express the whole elimination process in matrix 504 00:29:44 --> 00:29:45 language. 505 00:29:45 --> 00:29:49 So tell me what -- so next step, step two, 506 00:29:49 --> 00:29:52 which was what? 507 00:29:52 --> 00:29:59 Subtract -- what was -- what was the actual step that we did? 508 00:29:59 --> 00:30:03 I think I subtracted -- do you remember? 509 00:30:03 --> 00:30:10 I had a 2 in the pivot and a 4 below it, so I subtracted two 510 00:30:10 --> 00:30:14.52 times -- times row two from row three. 511 00:30:14.52 --> 00:30:16.19 From row three. 512 00:30:16.19 --> 00:30:21 Tell me the matrix that will do that. 513 00:30:21 --> 00:30:23.49 And tell me its name. 514 00:30:23.49 --> 00:30:28 Okay, it's going to be E, for elementary or elimination 515 00:30:28 --> 00:30:34 matrix and what's the index number that I used to tell me 516 00:30:34 --> 00:30:36 what E -- 3, 2, right? 517 00:30:36 --> 00:30:40 Because it's fixing this 3 2 position. 518 00:30:40 --> 00:30:43.69 And what's the matrix, now? 519 00:30:43.69 --> 00:30:48 Okay, you remember -- so E 3 2 is supposed to multiply my guy 520 00:30:48 --> 00:30:52 that I have and it's supposed to produce the right result, 521 00:30:52 --> 00:30:57 which was -- it leaves -- it's supposed to leave the first row, 522 00:30:57 --> 00:31:02 it's supposed to leave the second row and it's supposed to 523 00:31:02 --> 00:31:05 straighten out that third row to this. 524 00:31:05 --> 00:31:09 And what's the matrix that does that? 525 00:31:09 --> 00:31:11 1 0 0, right? 526 00:31:11 --> 00:31:17 Because we don't change the first row and the next row we 527 00:31:17 --> 00:31:23 don't change either, and the last row is the one we 528 00:31:23 --> 00:31:24 do change. 529 00:31:24 --> 00:31:26 And what do I do? 530 00:31:26 --> 00:31:33 Let's see, I subtract two times -- so what's this row? 531 00:31:33 --> 00:31:37 What's this here? 0, right, because the first 532 00:31:37 --> 00:31:39 row's not involved. 533 00:31:39 --> 00:31:42 It's just in the 3 2 position, isn't it? 534 00:31:42 --> 00:31:47 This the key number is this minus the multiplier that goes 535 00:31:47 --> 00:31:51 -- sitting there in that 3 2 position. 536 00:31:51 --> 00:31:58 Is it a minus 2 to subtract 2 and then this is a 1 so that -- 537 00:31:58 --> 00:32:05 the overall effect is to take minus 2 of this row plus 1 of 538 00:32:05 --> 00:32:05 that. 539 00:32:05 --> 00:32:06 Okay. 540 00:32:06 --> 00:32:11 So, I've now given you the pieces, the elimination 541 00:32:11 --> 00:32:19 matrices, the elementary matrices that take each step. 542 00:32:19 --> 00:32:20 So now what? 543 00:32:20 --> 00:32:25.91 Now the next point in the lecture is to put those steps 544 00:32:25.91 --> 00:32:31 together into a matrix that does it all and see how it all 545 00:32:31 --> 00:32:32 happens. 546 00:32:32 --> 00:32:39 So now I'm going to express the whole -- everything we did today 547 00:32:39 --> 00:32:45 so far on A was to start with A, we multiplied it by E 2 1, 548 00:32:45 --> 00:32:52 that was the first step -- and then we multiplied that 549 00:32:52 --> 00:33:00 result by E 3 2 and that led us to this thing and what was that 550 00:33:00 --> 00:33:01 matrix? 551 00:33:01 --> 00:33:01.8 U. 552 00:33:01.8 --> 00:33:08.57 You see why I like matrix notation, because there in, 553 00:33:08.57 --> 00:33:16 like, little space -- a few bits when its compressed on the 554 00:33:16 --> 00:33:23 web -- is everything -- is this whole lecture. 555 00:33:23 --> 00:33:23 Okay. 556 00:33:23 --> 00:33:28 Now there -- there are important facts about matrix 557 00:33:28 --> 00:33:30 multiplication. 558 00:33:30 --> 00:33:34 And we're close to maybe the most important. 559 00:33:34 --> 00:33:36 And that is this. 560 00:33:36 --> 00:33:39 Suppose I ask you this question. 561 00:33:39 --> 00:33:45 Suppose I start with a matrix A and I want to end with a matrix 562 00:33:45 --> 00:33:52 U and I want to say what matrix does the whole job? 563 00:33:52 --> 00:33:59.12 What matrix takes me from A to U, using the letters I've got? 564 00:33:59.12 --> 00:34:01 And the answer is simple. 565 00:34:01 --> 00:34:07 I'm not asking this as -- but it's highly important. 566 00:34:07 --> 00:34:14 How would I create the matrix that does the whole job at once, 567 00:34:14 --> 00:34:20 that does all of elimination in one shot? 568 00:34:20 --> 00:34:24 It would be -- I would just put these together, 569 00:34:24 --> 00:34:25 right? 570 00:34:25 --> 00:34:28 In other words, this is the thing I'm 571 00:34:28 --> 00:34:30 struggling to say. 572 00:34:30 --> 00:34:32 I can move those parentheses. 573 00:34:32 --> 00:34:38 If I keep the matrices in order -- I can't mess around with the 574 00:34:38 --> 00:34:44 order of the matrices, but I can change the order that 575 00:34:44 --> 00:34:46 I do the multiplications. 576 00:34:46 --> 00:34:51 I can multiply these two first -- in other words, 577 00:34:51 --> 00:34:55.64 you see what those parentheses are doing? 578 00:34:55.64 --> 00:35:01 It's saying -- multiply the Es first and that gives you the 579 00:35:01 --> 00:35:05 matrix that does everything at once. 580 00:35:05 --> 00:35:06 Okay. 581 00:35:06 --> 00:35:09 So this fact, that this is automatically the 582 00:35:09 --> 00:35:14 same as this -- for every matrix multiplication, 583 00:35:14 --> 00:35:19 which I'm conscious of still not telling you in every detail, 584 00:35:19 --> 00:35:24.42 but, like, you're seeing how it works -- and this is highly 585 00:35:24.42 --> 00:35:28 important -- and maybe tell me the long word 586 00:35:28 --> 00:35:33 that describes this law for matrices, that you can move the 587 00:35:33 --> 00:35:34 parentheses? 588 00:35:34 --> 00:35:37 It's called the associative law. 589 00:35:37 --> 00:35:39 I think you can now forget that. 590 00:35:39 --> 00:35:41 But don't forget the law. 591 00:35:41 --> 00:35:46 I mean, like, forget the word associative. 592 00:35:46 --> 00:35:47 I don't know. 593 00:35:47 --> 00:35:50 But don't forget the law. 594 00:35:50 --> 00:35:56 Because actually, we'll see so many steps in 595 00:35:56 --> 00:35:59 linear algebra, so many proofs, 596 00:35:59 --> 00:36:07 even, of main fact come from just moving the parentheses. 597 00:36:07 --> 00:36:12 And it's not that easy to prove that this is correct, 598 00:36:12 --> 00:36:16 you have to go into the gory details of matrix 599 00:36:16 --> 00:36:20 multiplication, do it both ways and see that 600 00:36:20 --> 00:36:22 you come out the same. 601 00:36:22 --> 00:36:25 Maybe I'll leave the author to do that. 602 00:36:25 --> 00:36:26 Okay. 603 00:36:26 --> 00:36:28 So there we go. 604 00:36:28 --> 00:36:34 So there's a single matrix, I could call it E -- while 605 00:36:34 --> 00:36:40 we're talking about these matrices, tell me one other -- 606 00:36:40 --> 00:36:45 there's another type of elementary matrix, 607 00:36:45 --> 00:36:50 and we already said why we might need it. 608 00:36:50 --> 00:36:53 We didn't need it in this case. 609 00:36:53 --> 00:36:56 But it's the matrix that exchanges two rows. 610 00:36:56 --> 00:36:59 It's called a permutation matrix. 611 00:36:59 --> 00:37:02.55 Can you just, like, tell me what that would 612 00:37:02.55 --> 00:37:02 be? 613 00:37:02 --> 00:37:06 So I'm just -- like, this is a slight digression and 614 00:37:06 --> 00:37:11 we'll -- yes, so let me get some -- let 615 00:37:11 --> 00:37:17 me figure out where I'm going to put a permutation matrix. 616 00:37:17 --> 00:37:21 You'll see I'm always squeezing stuff in. 617 00:37:21 --> 00:37:23.44 So permutation. 618 00:37:23.44 --> 00:37:29 Or, in fact this one you'll, like, exchange rows -- shall I 619 00:37:29 --> 00:37:35 exchange rows one and two, just to make life easy? 620 00:37:35 --> 00:37:42 So if I had my matrix -- no, let -- let me just do two by 621 00:37:42 --> 00:37:44 two. |a b; c d|. 622 00:37:44 --> 00:37:50.04 Suppose I want to find the matrix that exchanges those 623 00:37:50.04 --> 00:37:50.61 rows. 624 00:37:50.61 --> 00:37:51 What is it? 625 00:37:51 --> 00:37:58 So the matrix that exchanges those rows -- the row I want is 626 00:37:58 --> 00:38:02 c d and it's there. 627 00:38:02 --> 00:38:04 So I better take one of it. 628 00:38:04 --> 00:38:09 And the row I want here is up top, so I'll take one of that. 629 00:38:09 --> 00:38:12.43 So actually, I'm just -- the easy way -- 630 00:38:12.43 --> 00:38:16 this is my matrix that I'll call P, for permutation. 631 00:38:16 --> 00:38:21 It's the matrix -- actually, the easy way to find it is just 632 00:38:21 --> 00:38:25 do the thing to the identity matrix. 633 00:38:25 --> 00:38:29 Exchange the rows of the identity matrix and then that's 634 00:38:29 --> 00:38:33 the matrix that will do row exchanges for you. 635 00:38:33 --> 00:38:36.99 Suppose I wanted to exchange columns instead. 636 00:38:36.99 --> 00:38:40 Columns have hardly got into today's lecture, 637 00:38:40 --> 00:38:44.61 but they certainly are going to be around. 638 00:38:44.61 --> 00:38:49 How could I -- if I started with this matrix |a b; 639 00:38:49 --> 00:38:55 c d| then I wouldn't -- I'm not even going to write this down, 640 00:38:55 --> 00:39:00 I'm just going to ask you, because in elimination, 641 00:39:00 --> 00:39:03 we're doing rows. 642 00:39:03 --> 00:39:07 But suppose we wanted to exchange the columns of a 643 00:39:07 --> 00:39:08 matrix. 644 00:39:08 --> 00:39:10 How would I do that? 645 00:39:10 --> 00:39:14 What matrix multiplication would do that job? 646 00:39:14 --> 00:39:16.23 Actually, why not? 647 00:39:16.23 --> 00:39:18 I'll write it down. 648 00:39:18 --> 00:39:23 So this is -- I'll write it under here and then hide it 649 00:39:23 --> 00:39:24.71 again. 650 00:39:24.71 --> 00:39:25 Okay. 651 00:39:25 --> 00:39:32 Suppose I had my matrix |a b; c d| and I want to get to a c 652 00:39:32 --> 00:39:35 over here and b d here. 653 00:39:35 --> 00:39:39 What matrix does that job? 654 00:39:39 --> 00:39:46 Can I multiply -- can I cook up some matrix that produces that 655 00:39:46 --> 00:39:47 answer? 656 00:39:47 --> 00:39:55 You can see from where I put my hand I was really asking can I 657 00:39:55 --> 00:40:04 put a matrix here on the left that will exchange columns? 658 00:40:04 --> 00:40:06 And the answer is no. 659 00:40:06 --> 00:40:12 I'm just bringing out again this point that when I multiply 660 00:40:12 --> 00:40:16 on the left, I'm doing row operations. 661 00:40:16 --> 00:40:23 So if I want to do a column operation, where do I put that 662 00:40:23 --> 00:40:26 permutation matrix? 663 00:40:26 --> 00:40:27 On the right. 664 00:40:27 --> 00:40:30 If I put it here, where I just barely left room 665 00:40:30 --> 00:40:35 for it -- so I'll exchange the two columns of the identity. 666 00:40:35 --> 00:40:39 Then it comes out right, because now I'm multiplying a 667 00:40:39 --> 00:40:41 column at a time. 668 00:40:41 --> 00:40:45 This is the first column and says take one -- 669 00:40:45 --> 00:40:50 take none of that column, one of this one and then you 670 00:40:50 --> 00:40:50 got it. 671 00:40:50 --> 00:40:55 Over here, take one of this one, none of this one and you've 672 00:40:55 --> 00:40:56 got a c. 673 00:40:56 --> 00:40:58 So, in short, to do column operations, 674 00:40:58 --> 00:41:02 the matrix multiplies on the right. 675 00:41:02 --> 00:41:08 To do row operations, it multiplies on the left. 676 00:41:08 --> 00:41:14 Okay, okay, and it's row operations that we're really 677 00:41:14 --> 00:41:14 doing. 678 00:41:14 --> 00:41:15 Okay. 679 00:41:15 --> 00:41:19.99 And of course, I mentioned in passing, 680 00:41:19.99 --> 00:41:26 but I better say it very clearly that you can't exchange 681 00:41:26 --> 00:41:30 the orders of matrices. 682 00:41:30 --> 00:41:35 And that's just the point I was making again here. 683 00:41:35 --> 00:41:39.75 A times B is not the same as B times A. 684 00:41:39.75 --> 00:41:46 You have to keep these matrices in their Gauss given order here, 685 00:41:46 --> 00:41:47 right? 686 00:41:47 --> 00:41:51 But you can move the parentheses, so that, 687 00:41:51 --> 00:41:56 in other words, the commutative law, 688 00:41:56 --> 00:42:03 which would allow you to take it in the other order is false. 689 00:42:03 --> 00:42:08 So we have to keep it in that order. 690 00:42:08 --> 00:42:08 Okay. 691 00:42:08 --> 00:42:10 So what next? 692 00:42:10 --> 00:42:14 I could do this multiplication. 693 00:42:14 --> 00:42:15 I could do E 32. 694 00:42:15 --> 00:42:22 So let me come back to see what that was. 695 00:42:22 --> 00:42:24 Here was E 2 1. 696 00:42:24 --> 00:42:26 And here is E 3 2. 697 00:42:26 --> 00:42:35 And if I multiply those two matrices together -- E 3 2 and 698 00:42:35 --> 00:42:43 then E 2 1, I'll get a single matrix that does elimination. 699 00:42:43 --> 00:42:52 I don't want to do it that -- if I do that multiplication -- 700 00:42:52 --> 00:42:57 there -- there's a better way to do this. 701 00:42:57 --> 00:43:03 And so in this last few minutes of today's lecture, 702 00:43:03 --> 00:43:06 can I anticipate that better way? 703 00:43:06 --> 00:43:13 The better way is to think not how do I get from A to U, 704 00:43:13 --> 00:43:16 but how do I get from U back to A? 705 00:43:16 --> 00:43:22 So reversing steps is going to come in. 706 00:43:22 --> 00:43:26 Inverse -- I'll use the word inverse here. 707 00:43:26 --> 00:43:26.96 Okay. 708 00:43:26.96 --> 00:43:32 So let me make the first step at what's the inverse matrix? 709 00:43:32 --> 00:43:37.55 All the matrices you've seen on this board have inverses. 710 00:43:37.55 --> 00:43:40 I didn't write any bad matrices down. 711 00:43:40 --> 00:43:45 We spoke about possible failure, and for a moment, 712 00:43:45 --> 00:43:49 we put in a matrix that would fail. 713 00:43:49 --> 00:43:53 But right now, all these matrices are good, 714 00:43:53 --> 00:43:55 they're all invertible. 715 00:43:55 --> 00:44:00 And let's take the inverse -- well, let me say first what does 716 00:44:00 --> 00:44:03 the inverse mean and find it? 717 00:44:03 --> 00:44:03 Okay. 718 00:44:03 --> 00:44:07 So we're getting a little leg up on inverses. 719 00:44:07 --> 00:44:12 Okay, so this is the final moments of today. 720 00:44:12 --> 00:44:15 Sorry, he's still there. 721 00:44:15 --> 00:44:16 Okay. 722 00:44:16 --> 00:44:18 Inverses. 723 00:44:18 --> 00:44:27 Okay, and I'm just going to take one example and then we're 724 00:44:27 --> 00:44:28 done. 725 00:44:28 --> 00:44:33 The example I'll take will be that E. 726 00:44:33 --> 00:44:39 So my matrix is 1 0 0 minus 3 1 0 0 0 1. 727 00:44:39 --> 00:44:49 And I want to find the matrix that undoes that step. 728 00:44:49 --> 00:44:52 So what was that step? 729 00:44:52 --> 00:44:58 The step was subtract 3 times row one from row two. 730 00:44:58 --> 00:45:02 So what matrix will get me back? 731 00:45:02 --> 00:45:09.73 What matrix will bring back -- you know, if I started with a 2 732 00:45:09.73 --> 00:45:16 12 2 and I changed it to a 2 6 2 because of this guy, 733 00:45:16 --> 2. I want to get back to the 2 12 734 2. --> 00:45:21 735 00:45:21 --> 00:45:27 I want to find the matrix which -- which undoes elimination, 736 00:45:27 --> 00:45:32 the matrix which multiplies this to give the identity. 737 00:45:32 --> 00:45:37 And you can tell me what I should do in words first, 738 00:45:37 --> 00:45:43 and then we'll write down the matrix that does it. 739 00:45:43 --> 00:45:49 If this step subtracted 3 times row 1 from row 2, 740 00:45:49 --> 00:45:52 what's the inverse step? 741 00:45:52 --> 00:45:56 I add 3 times row one to row two, right? 742 00:45:56 --> 00:45:58 I add it back. 743 00:45:58 --> 00:46:03 The -- what I subtracted away, I add back. 744 00:46:03 --> 00:46:08.94 So the inverse matrix in this case is -- 745 00:46:08.94 --> 00:46:13 I now want to add 3 times row one to row two, 746 00:46:13 --> 00:46:20.17 so I won't change row one, I won't change row three and 747 00:46:20.17 --> 00:46:24 I'll add 3 times row one to row two. 748 00:46:24 --> 00:46:28 That's a case where the inverse is clear. 749 00:46:28 --> 00:46:35 It's clear in words what to do, because what this did was 750 00:46:35 --> 00:46:38 simple to express. 751 00:46:38 --> 00:46:42 It just changed row two by subtracting 3 of row one. 752 00:46:42 --> 00:46:44 So to invert it, I go that way. 753 00:46:44 --> 00:46:47 And if you -- if we do that calculation, 3 times this row 754 00:46:47 --> 00:46:51 plus 1 times this row, comes out the right row of the 755 00:46:51 --> 00:46:52 identity. 756 00:46:52 --> 00:46:56 Okay, so inverses are an -- so if this matrix was E and this 757 00:46:56 --> 00:46:59.98 matrix is I for identity, then what's the notation for 758 00:46:59.98 --> 00:47:01 this guy? 759 00:47:01 --> 00:47:02 E to the minus one. 760 00:47:02 --> 00:47:03 E inverse. 761 00:47:03 --> 00:47:03 Okay. 762 00:47:03 --> 00:47:05 Let's stop there for today. 763 00:47:05 --> 00:47:09 That's a little jump on what's coming on Monday. 764 00:47:09 --> 00:47:12 So, see you Monday.