1 00:00:09,870 --> 00:00:14,850 OK, here's linear algebra lecture seven. 2 00:00:14,850 --> 00:00:19,540 I've been talking about vector spaces 3 00:00:19,540 --> 00:00:24,050 and specially the null space of a matrix 4 00:00:24,050 --> 00:00:26,320 and the column space of a matrix. 5 00:00:26,320 --> 00:00:28,210 What's in those spaces. 6 00:00:28,210 --> 00:00:32,940 Now I want to actually describe them. 7 00:00:32,940 --> 00:00:36,050 How do you describe all the vectors 8 00:00:36,050 --> 00:00:37,200 that are in those spaces? 9 00:00:37,200 --> 00:00:39,570 How do you compute these things? 10 00:00:39,570 --> 00:00:46,380 So this is the, turning the idea, the definition, 11 00:00:46,380 --> 00:00:48,590 into an algorithm. 12 00:00:48,590 --> 00:00:53,410 What's the algorithm for solving A x =0? 13 00:00:53,410 --> 00:00:56,920 So that's the null space that I'm interested in. 14 00:00:56,920 --> 00:01:01,630 So can I take a particular matrix A and describe 15 00:01:01,630 --> 00:01:06,840 the natural algorithm, and I'll execute it for that matrix -- 16 00:01:06,840 --> 00:01:08,740 here we go. 17 00:01:08,740 --> 00:01:12,740 So let me take the matrix as an example. 18 00:01:12,740 --> 00:01:16,560 So we're definitely talking rectangular matrices in this 19 00:01:16,560 --> 00:01:17,350 chapter. 20 00:01:17,350 --> 00:01:22,050 So I'll make, I'll have four columns. 21 00:01:22,050 --> 00:01:24,190 And three rows. 22 00:01:24,190 --> 00:01:29,050 Two four six eight and three six eight ten. 23 00:01:32,960 --> 00:01:33,460 OK. 24 00:01:36,450 --> 00:01:42,330 If I just look at those columns, and rows, well, 25 00:01:42,330 --> 00:01:45,010 I notice right away that column two 26 00:01:45,010 --> 00:01:47,860 is a multiple of column one. 27 00:01:47,860 --> 00:01:50,710 It's in the same direction as column one. 28 00:01:50,710 --> 00:01:52,840 It's not independent. 29 00:01:52,840 --> 00:01:56,380 I'll expect to discover that in the process. 30 00:01:56,380 --> 00:02:01,360 Actually, with rows, I notice that that row plus this row 31 00:02:01,360 --> 00:02:03,770 gives the third row. 32 00:02:03,770 --> 00:02:07,500 So the third row is not independent. 33 00:02:07,500 --> 00:02:12,600 So, all that should come out of elimination. 34 00:02:12,600 --> 00:02:14,620 So now what I -- 35 00:02:14,620 --> 00:02:19,590 my algorithm is elimination, but extended now 36 00:02:19,590 --> 00:02:23,420 to the rectangular case, where we 37 00:02:23,420 --> 00:02:30,320 have to continue even if there's zeros in the pivot position, 38 00:02:30,320 --> 00:02:31,690 we go on. 39 00:02:31,690 --> 00:02:36,880 OK, so let me execute elimination for that matrix. 40 00:02:36,880 --> 00:02:42,160 My goal is always, while I'm doing elimination -- 41 00:02:42,160 --> 00:02:44,650 I'm not changing the null space. 42 00:02:44,650 --> 00:02:46,520 That's very important, right? 43 00:02:46,520 --> 00:02:50,840 I'm solving A x equals zero by elimination, 44 00:02:50,840 --> 00:02:53,960 and when I do these operations that you already know, 45 00:02:53,960 --> 00:02:56,120 when I subtract a multiple of one 46 00:02:56,120 --> 00:03:02,330 equation from another equation, I'm not changing the solutions. 47 00:03:02,330 --> 00:03:04,850 So I'm not changing the null space. 48 00:03:04,850 --> 00:03:08,850 Actually, I changing the column space, as you'll see. 49 00:03:08,850 --> 00:03:10,130 So you have to pay attention. 50 00:03:10,130 --> 00:03:13,270 What does elimination leave unchanged? 51 00:03:13,270 --> 00:03:18,310 And the answer is the solutions to the system are not changed 52 00:03:18,310 --> 00:03:20,890 because I'm doing the same thing to -- 53 00:03:20,890 --> 00:03:24,620 I'm doing a legitimate operations on the equations. 54 00:03:24,620 --> 00:03:27,130 Of course, on the right hand side it's always zero, 55 00:03:27,130 --> 00:03:30,860 and I don't plan to write zero all the time. 56 00:03:30,860 --> 00:03:33,340 OK, so I'm really just working on the left side, 57 00:03:33,340 --> 00:03:39,330 but the right side is, is keeping up always zeros. 58 00:03:39,330 --> 00:03:41,750 OK, so what's elimination? 59 00:03:41,750 --> 00:03:44,470 Well, you know where the first pivot is 60 00:03:44,470 --> 00:03:46,060 and you know what to do 61 00:03:46,060 --> 00:03:46,560 with it. 62 00:03:46,560 --> 00:03:51,580 So can I just take the first step below here? 63 00:03:51,580 --> 00:03:55,940 So that pivot row is fine. 64 00:03:55,940 --> 00:04:00,300 I take two times that row away from this one and I get zero 65 00:04:00,300 --> 00:04:01,140 zero. 66 00:04:01,140 --> 00:04:03,570 That's signaling a difficulty. 67 00:04:03,570 --> 00:04:07,660 Two, two twos away from the six leaves me with a two. 68 00:04:07,660 --> 00:04:10,740 Two twos away from the eight leaves me with a four. 69 00:04:10,740 --> 00:04:13,040 And now three of those away from here 70 00:04:13,040 --> 00:04:17,630 is zero, again another zero, three twos away 71 00:04:17,630 --> 00:04:20,260 from that eight is the two, three twos away 72 00:04:20,260 --> 00:04:22,200 from that ten is a four. 73 00:04:22,200 --> 00:04:23,250 OK. 74 00:04:23,250 --> 00:04:26,780 That's the first stage of elimination. 75 00:04:26,780 --> 00:04:31,150 I've got the first column straight. 76 00:04:31,150 --> 00:04:35,530 So of course I move on to the second column. 77 00:04:35,530 --> 00:04:39,710 I look in that position, I see a zero. 78 00:04:39,710 --> 00:04:43,500 I look below it, hoping for a non-zero 79 00:04:43,500 --> 00:04:44,980 that I can do a row exchange. 80 00:04:44,980 --> 00:04:47,720 But it's zero below. 81 00:04:47,720 --> 00:04:53,330 So that's telling me that that column is -- well, 82 00:04:53,330 --> 00:04:56,320 what it's really going to be telling me is that that column 83 00:04:56,320 --> 00:04:59,840 is a combination of the earlier columns. 84 00:04:59,840 --> 00:05:04,080 It's that second column is dependent on the earlier 85 00:05:04,080 --> 00:05:04,670 columns. 86 00:05:04,670 --> 00:05:09,280 But I don't stop to think here. 87 00:05:09,280 --> 00:05:11,680 In that column there's nothing to do. 88 00:05:11,680 --> 00:05:12,970 I go on to the next. 89 00:05:12,970 --> 00:05:15,240 So here's the next pivot. 90 00:05:15,240 --> 00:05:18,080 So there's the first pivot and there's the second pivot, 91 00:05:18,080 --> 00:05:22,660 and I just keep this elimination going downwards. 92 00:05:22,660 --> 00:05:30,720 So, so the next step keeps the first row, 93 00:05:30,720 --> 00:05:34,600 keeps the second row with its pivot, 94 00:05:34,600 --> 00:05:40,510 so I've got my two pivots, and does elimination 95 00:05:40,510 --> 00:05:44,730 to clear out the column below that pivot. 96 00:05:44,730 --> 00:05:47,530 So actually you see the multiplier is one. 97 00:05:47,530 --> 00:05:50,100 It subtracts row two from row three 98 00:05:50,100 --> 00:05:53,480 and produces a row of zeros. 99 00:05:53,480 --> 00:05:54,190 OK. 100 00:05:54,190 --> 00:05:59,050 That I would call that matrix U, right? 101 00:05:59,050 --> 00:06:01,870 That's our upper -- 102 00:06:01,870 --> 00:06:05,140 well, I can't quite say upper triangular. 103 00:06:05,140 --> 00:06:08,260 Maybe upper -- I don't know -- upper something. 104 00:06:12,680 --> 00:06:17,150 It's in this so-called echelon form. 105 00:06:17,150 --> 00:06:21,700 The word echelon means, like, staircase form. 106 00:06:21,700 --> 00:06:25,960 It's the, the non-zeros come in that staircase form. 107 00:06:25,960 --> 00:06:30,720 If there was another pivot here, then the staircase 108 00:06:30,720 --> 00:06:32,260 would include that. 109 00:06:32,260 --> 00:06:37,870 But here's a case where we have two pivots only. 110 00:06:37,870 --> 00:06:41,320 OK, so actually we've already discovered the most important 111 00:06:41,320 --> 00:06:44,210 number about this matrix. 112 00:06:44,210 --> 00:06:48,540 The number of pivots is two. 113 00:06:48,540 --> 00:06:51,930 That number we will call the rank of the matrix. 114 00:06:51,930 --> 00:06:54,520 So let me put immediately. 115 00:06:54,520 --> 00:06:58,696 The rank of A -- 116 00:06:58,696 --> 00:07:00,070 so I'm telling you what this word 117 00:07:00,070 --> 00:07:04,280 rank means in the algorithm. 118 00:07:04,280 --> 00:07:08,650 It's equal to the number of pivots. 119 00:07:08,650 --> 00:07:12,900 And in this case, two. 120 00:07:12,900 --> 00:07:17,320 OK, for me that number two is the crucial number. 121 00:07:17,320 --> 00:07:22,310 OK, now I go to -- you remember I'm always solving A x equals 122 00:07:22,310 --> 00:07:26,240 zero, but now I can solve U x equals zero, right? 123 00:07:26,240 --> 00:07:29,650 Same solution, same null space. 124 00:07:29,650 --> 00:07:30,150 OK. 125 00:07:30,150 --> 00:07:32,830 So I could stop here -- 126 00:07:32,830 --> 00:07:36,810 why don't I stop here and do the back substitution. 127 00:07:36,810 --> 00:07:42,750 So now I have to ask you, how do I describe the solutions? 128 00:07:42,750 --> 00:07:45,880 There are solutions, right, to A x equals zero. 129 00:07:45,880 --> 00:07:47,070 I knew there would be. 130 00:07:47,070 --> 00:07:50,110 I had three equations in four unknowns. 131 00:07:50,110 --> 00:07:52,850 I certainly expected some solutions. 132 00:07:52,850 --> 00:07:55,240 Now I want to see what are they. 133 00:07:55,240 --> 00:07:56,800 OK, here's the critical step. 134 00:07:59,920 --> 00:08:04,860 I refer to it up here as separating out 135 00:08:04,860 --> 00:08:09,990 the pivot variables, the pivot columns, which are these two. 136 00:08:09,990 --> 00:08:13,080 Here I have two pivot columns. 137 00:08:13,080 --> 00:08:15,530 Those, obviously, they're the columns with the pivots. 138 00:08:15,530 --> 00:08:18,736 So I have two pivot columns. 139 00:08:22,110 --> 00:08:27,750 And I have the other columns, I'll call free. 140 00:08:27,750 --> 00:08:30,235 These are free columns, OK. 141 00:08:32,950 --> 00:08:35,470 Why do I use those words? 142 00:08:35,470 --> 00:08:38,110 Why do I use that word free? 143 00:08:38,110 --> 00:08:43,289 Because now I want to write, I want to find the solutions to U 144 00:08:43,289 --> 00:08:45,210 x equals zero. 145 00:08:45,210 --> 00:08:48,090 Here is the way I do it. 146 00:08:48,090 --> 00:08:58,040 These free columns I can assign any number freely to those -- 147 00:08:58,040 --> 00:09:03,900 to the variables x2 and x4, the ones that multiply 148 00:09:03,900 --> 00:09:06,570 columns two and four. 149 00:09:06,570 --> 00:09:10,620 So I can assign anything I like to x2 and x4. 150 00:09:10,620 --> 00:09:17,430 And then I can solve the equations for x1 and x3. 151 00:09:17,430 --> 00:09:19,450 Let me say that again. 152 00:09:19,450 --> 00:09:22,390 If I give -- let me, let me assign. 153 00:09:22,390 --> 00:09:29,320 So, so one particular x is to assign, say, the value one 154 00:09:29,320 --> 00:09:33,640 to the, to x2, and zero to x4. 155 00:09:33,640 --> 00:09:35,850 Those are -- that was a free choice, 156 00:09:35,850 --> 00:09:38,031 but it's a convenient choice. 157 00:09:38,031 --> 00:09:38,530 OK. 158 00:09:38,530 --> 00:09:41,140 Now I want to solve U x equals zero 159 00:09:41,140 --> 00:09:47,780 and find numbers one and three, complete the solution. 160 00:09:47,780 --> 00:09:49,481 Can I write down -- 161 00:09:49,481 --> 00:09:49,980 let's see. 162 00:09:49,980 --> 00:09:50,480 OK. 163 00:09:50,480 --> 00:09:53,220 Shall we just remember what U x equals zero represents? 164 00:09:53,220 --> 00:09:54,730 What are my equations? 165 00:09:54,730 --> 00:10:00,900 That first equation is x1 plus just -- 166 00:10:00,900 --> 00:10:05,770 I'm just saying what are these matrices meaning. 167 00:10:05,770 --> 00:10:07,580 That's the first equation. 168 00:10:07,580 --> 00:10:14,040 And the second equation was 2x3 + 4x4=0. 169 00:10:14,040 --> 00:10:16,330 Those are my two equations. 170 00:10:16,330 --> 00:10:17,020 OK. 171 00:10:17,020 --> 00:10:24,600 Now the point is I can find x1 and x3 by back substitution. 172 00:10:24,600 --> 00:10:27,500 So we're building on what we already know. 173 00:10:27,500 --> 00:10:31,970 The new thing is that there were some free variables that I 174 00:10:31,970 --> 00:10:34,120 could give any numbers to. 175 00:10:34,120 --> 00:10:38,260 And I'm systematically going to make a choice like this, Now 176 00:10:38,260 --> 00:10:38,760 what is x3? 177 00:10:38,760 --> 00:10:39,920 1 and 0. 178 00:10:39,920 --> 00:10:42,970 Let's, let's go backwards, back up. 179 00:10:42,970 --> 00:10:45,360 I look at the last equation. 180 00:10:45,360 --> 00:10:50,740 x3 is zero, from the last equation, 181 00:10:50,740 --> 00:10:55,790 because, because x4 we've set x4 to zero, 182 00:10:55,790 --> 00:10:58,180 and then we get x3 as zero. 183 00:10:58,180 --> 00:10:58,680 OK. 184 00:10:58,680 --> 00:11:03,400 Now we set x2 to be one, so what is x1? 185 00:11:03,400 --> 00:11:06,050 Negative two, right? 186 00:11:06,050 --> 00:11:10,150 So then I have negative two plus two, zero and zero, 187 00:11:10,150 --> 00:11:11,400 correctly giving zero. 188 00:11:11,400 --> 00:11:14,810 There is a vector in the null space. 189 00:11:14,810 --> 00:11:17,530 There is a solution to A x equals zero. 190 00:11:17,530 --> 00:11:19,740 In fact, what solution is that? 191 00:11:19,740 --> 00:11:24,360 That simply says that minus two times the first column 192 00:11:24,360 --> 00:11:28,502 plus one times the second column is the zero column. 193 00:11:28,502 --> 00:11:29,460 Of course that's right. 194 00:11:29,460 --> 00:11:33,310 Minus two of that column plus one of that, or minus two 195 00:11:33,310 --> 00:11:35,580 of that plus one of that. 196 00:11:35,580 --> 00:11:39,620 That solution is -- that, that's just what we saw immediately, 197 00:11:39,620 --> 00:11:43,690 that the second column is twice as big as the first column. 198 00:11:43,690 --> 00:11:48,400 OK, tell me some more vectors in the null space. 199 00:11:48,400 --> 00:11:51,580 I found one. 200 00:11:51,580 --> 00:11:58,030 Tell me, how to get a bunch more immediately out of that one. 201 00:11:58,030 --> 00:11:59,620 Just take multiples of it. 202 00:11:59,620 --> 00:12:01,440 Any multiple of -- 203 00:12:01,440 --> 00:12:04,200 I could multiply this by anything. 204 00:12:04,200 --> 00:12:08,430 I might as well call it, I could say, C, some multiple of this. 205 00:12:08,430 --> 00:12:10,380 So let me -- 206 00:12:10,380 --> 00:12:14,890 so X could be any multiple of this one. 207 00:12:14,890 --> 00:12:17,700 OK, that, that describes now a line, 208 00:12:17,700 --> 00:12:23,430 an infinitely long line in four dimensional space. 209 00:12:23,430 --> 00:12:26,720 But -- which is in the null space. 210 00:12:26,720 --> 00:12:29,390 Is that the whole null space? 211 00:12:29,390 --> 00:12:30,460 No. 212 00:12:30,460 --> 00:12:34,220 I've got two free variables here. 213 00:12:34,220 --> 00:12:37,330 I made this choice, one and zero, for the free variables, 214 00:12:37,330 --> 00:12:40,090 but I could have made another choice. 215 00:12:40,090 --> 00:12:44,420 Let me make the other choice zero and one. 216 00:12:44,420 --> 00:12:47,140 You see my system. 217 00:12:47,140 --> 00:12:48,580 So let me repeat the system. 218 00:12:48,580 --> 00:12:54,087 This is the algorithm that you, you just learned to do. 219 00:12:56,890 --> 00:12:59,100 Do elimination. 220 00:12:59,100 --> 00:13:01,060 Decide which are the pivot columns 221 00:13:01,060 --> 00:13:02,420 and which are the free columns. 222 00:13:02,420 --> 00:13:05,600 That tells you that, that variables one and three 223 00:13:05,600 --> 00:13:09,760 are pivot variables, two and four are free variables. 224 00:13:09,760 --> 00:13:14,800 Then those free variables, you assign them -- 225 00:13:14,800 --> 00:13:17,870 you give one of them the value one and the others the value 226 00:13:17,870 --> 00:13:22,070 zero -- in this case, we had a one and a zero -- 227 00:13:22,070 --> 00:13:24,080 and complete the solution. 228 00:13:24,080 --> 00:13:28,550 And you do -- you give the other one the value one and zero. 229 00:13:28,550 --> 00:13:30,160 And now complete the solution. 230 00:13:30,160 --> 00:13:32,310 So let's complete that solution. 231 00:13:32,310 --> 00:13:35,790 I'm looking for a vector in the null space, 232 00:13:35,790 --> 00:13:38,550 and it's absolutely going to be different from this guy, 233 00:13:38,550 --> 00:13:42,350 because, because any multiple of that zero 234 00:13:42,350 --> 00:13:43,920 is never going to give the one. 235 00:13:43,920 --> 00:13:46,050 So I have somebody new in the null space, 236 00:13:46,050 --> 00:13:46,930 and let me finish it 237 00:13:46,930 --> 00:13:47,430 out. 238 00:13:47,430 --> 00:13:50,140 What's x3 here? 239 00:13:50,140 --> 00:13:52,360 So we're going by back substitution, 240 00:13:52,360 --> 00:13:53,790 looking at this equation. 241 00:13:53,790 --> 00:13:59,680 Now x4 we've changed, we're doing the other possibility, 242 00:13:59,680 --> 00:14:02,870 where x2 is zero and x4 is one. 243 00:14:02,870 --> 00:14:06,590 So x3 will happen to be minus two. 244 00:14:06,590 --> 00:14:10,510 And now what do I get for that first equation? 245 00:14:10,510 --> 00:14:12,420 x1 -- let's see. 246 00:14:12,420 --> 00:14:19,430 Two x3s is minus four plus two -- do I get a two there? 247 00:14:19,430 --> 00:14:20,270 Perhaps, yeah. 248 00:14:20,270 --> 00:14:25,500 Two for x1, minus four, and two. 249 00:14:25,500 --> 00:14:26,020 OK. 250 00:14:26,020 --> 00:14:28,360 That's in the null space. 251 00:14:28,360 --> 00:14:32,220 What does that say about the columns? 252 00:14:32,220 --> 00:14:37,320 That says that two of this column minus two 253 00:14:37,320 --> 00:14:41,900 of this column plus this column gives zero, which it does. 254 00:14:41,900 --> 00:14:46,090 Two of that minus two of that and one of that 255 00:14:46,090 --> 00:14:47,520 gives the zero column. 256 00:14:47,520 --> 00:14:52,420 OK, now, now I've found another vector in the null space. 257 00:14:52,420 --> 00:14:55,880 Now we're ready to tell me the whole null space. 258 00:14:55,880 --> 00:15:00,160 What are all the solutions to Ax=0? 259 00:15:00,160 --> 00:15:05,660 I've got this guy and when I have him, 260 00:15:05,660 --> 00:15:10,660 what else is, goes into the null space along with that? 261 00:15:10,660 --> 00:15:13,760 These are my two special solutions. 262 00:15:13,760 --> 00:15:14,710 I call them special -- 263 00:15:14,710 --> 00:15:16,250 I just invented that name. 264 00:15:16,250 --> 00:15:18,110 Special solutions. 265 00:15:18,110 --> 00:15:21,180 What's special about them is the special numbers 266 00:15:21,180 --> 00:15:27,360 I gave to the free variables, the values zero and one 267 00:15:27,360 --> 00:15:29,300 for the free variables. 268 00:15:29,300 --> 00:15:32,560 I could have given the free variables any values 269 00:15:32,560 --> 00:15:35,440 and got vectors in the null space. 270 00:15:35,440 --> 00:15:40,210 But this was a good way to be sure I got t- got everybody. 271 00:15:40,210 --> 00:15:45,480 OK, so once I have him, I also have any multiple, right? 272 00:15:45,480 --> 00:15:48,700 So I could take any multiple of that 273 00:15:48,700 --> 00:15:50,910 and it's in the null space. 274 00:15:50,910 --> 00:15:52,150 And now what else -- 275 00:15:52,150 --> 00:15:55,090 I left a little space for what? 276 00:15:55,090 --> 00:15:58,910 What -- a plus sign. 277 00:15:58,910 --> 00:16:00,580 I can take any combination. 278 00:16:00,580 --> 00:16:04,050 Here is a line of vectors in the null space. 279 00:16:04,050 --> 00:16:06,110 A bunch of solutions. 280 00:16:06,110 --> 00:16:09,540 Would you rather I say in the null space or would you rather 281 00:16:09,540 --> 00:16:13,330 I say, OK, I'm solving Ax=0? 282 00:16:13,330 --> 00:16:15,545 Well, really I'm solving Ux=0. 283 00:16:19,540 --> 00:16:23,290 Well, OK, let me put in that crucial plus sign. 284 00:16:23,290 --> 00:16:29,420 I'm taking all the combinations of my two special solutions. 285 00:16:29,420 --> 00:16:32,140 That's my conclusion there. 286 00:16:32,140 --> 00:16:37,300 The null space contains, contains exactly 287 00:16:37,300 --> 00:16:42,270 all the combinations of the special solutions. 288 00:16:42,270 --> 00:16:46,020 And how many special solutions are there? 289 00:16:46,020 --> 00:16:49,650 There's one for every free variable. 290 00:16:49,650 --> 00:16:51,330 And how many free variables are there? 291 00:16:51,330 --> 00:16:54,860 Oh, I mean, we can see all the whole picture now. 292 00:16:54,860 --> 00:16:59,830 If the rank R was two, this is the, 293 00:16:59,830 --> 00:17:04,260 this is the number of pivot variables, right, 294 00:17:04,260 --> 00:17:05,569 because it counted the pivots. 295 00:17:08,800 --> 00:17:11,960 So how many free variables? 296 00:17:11,960 --> 00:17:14,970 Well, you know it's two, right? 297 00:17:14,970 --> 00:17:20,260 What is it in -- for a matrix that's m rows, n columns, 298 00:17:20,260 --> 00:17:25,010 n variables that means, with rank r? 299 00:17:25,010 --> 00:17:28,420 How many free variables have we got left? 300 00:17:28,420 --> 00:17:34,440 If r of the variables are pivot variables, we have n-r -- 301 00:17:34,440 --> 00:17:38,400 in this case four minus two -- free variables. 302 00:17:38,400 --> 00:17:53,390 Do you see that first of all we get clean answers here? 303 00:17:53,390 --> 00:17:59,300 We get r pivot variables -- so there really were r equations 304 00:17:59,300 --> 00:18:00,170 here. 305 00:18:00,170 --> 00:18:01,990 There looked like three equations, 306 00:18:01,990 --> 00:18:05,730 but there were really only two independent equations. 307 00:18:05,730 --> 00:18:11,820 And there were n-r variables that we could choose freely, 308 00:18:11,820 --> 00:18:16,400 and we gave them those special zero one values, 309 00:18:16,400 --> 00:18:19,180 and we got the special solutions. 310 00:18:19,180 --> 00:18:19,680 OK. 311 00:18:22,260 --> 00:18:25,710 For me -- we could stop at that point. 312 00:18:25,710 --> 00:18:28,580 That gives you a complete algorithm 313 00:18:28,580 --> 00:18:34,690 for finding all the solutions to A x equals zero. 314 00:18:34,690 --> 00:18:35,190 OK. 315 00:18:38,300 --> 00:18:41,720 Again, you do elimination -- 316 00:18:41,720 --> 00:18:46,050 going onward when a column, when there's nothing 317 00:18:46,050 --> 00:18:50,570 to be done on one column, you just continue. 318 00:18:50,570 --> 00:18:55,360 There's this number r, the number of pivots, is crucial, 319 00:18:55,360 --> 00:19:01,150 and it leaves n-r free variables, which you 320 00:19:01,150 --> 00:19:03,100 give values zero and one to. 321 00:19:03,100 --> 00:19:05,390 I would like to take one more step. 322 00:19:08,210 --> 00:19:12,020 I would like to clean up this matrix even more. 323 00:19:12,020 --> 00:19:14,930 So now I'm going to go to -- this is in its, 324 00:19:14,930 --> 00:19:20,420 this is in echelon form, upper triangular if you like. 325 00:19:20,420 --> 00:19:25,660 I want to go one more step to make it as good as it can be. 326 00:19:25,660 --> 00:19:31,310 OK, so now I'm going to speak about the reduced row echelon 327 00:19:31,310 --> 00:19:32,200 form. 328 00:19:32,200 --> 00:19:35,540 OK, so now I'm going to speak about the matrix R, which is 329 00:19:35,540 --> 00:19:44,680 the reduced row echelon form. 330 00:19:44,680 --> 00:19:46,700 So what does that mean? 331 00:19:46,700 --> 00:19:49,470 That means I just -- 332 00:19:49,470 --> 00:19:52,370 I can, I can work harder on U. 333 00:19:52,370 --> 00:19:55,310 So let me start, let me suppose I got as far 334 00:19:55,310 --> 00:19:58,125 as U, which was good. 335 00:20:08,230 --> 00:20:11,450 Notice how that row of zeros appeared. 336 00:20:11,450 --> 00:20:15,360 I didn't comment on that, but I should have. 337 00:20:15,360 --> 00:20:20,630 That row of zeros up here is because row three was 338 00:20:20,630 --> 00:20:23,060 a combination of rows one and two, 339 00:20:23,060 --> 00:20:27,390 and elimination discovered that fact. 340 00:20:27,390 --> 00:20:32,610 When we get a row of zeros, that's telling us that the -- 341 00:20:32,610 --> 00:20:38,580 original row that was there was a combination of other rows, 342 00:20:38,580 --> 00:20:42,630 and elimination knocked it out. 343 00:20:42,630 --> 00:20:44,710 OK, so we got this far. 344 00:20:44,710 --> 00:20:47,260 Now how can I clean that up further? 345 00:20:47,260 --> 00:20:51,430 I can do, elimination upwards. 346 00:20:51,430 --> 00:20:54,390 I can get zero above the pivots. 347 00:20:54,390 --> 00:20:58,740 So this reduced row echelon form has zeros 348 00:20:58,740 --> 00:21:05,745 above and below the pivots. 349 00:21:08,530 --> 00:21:11,460 So let me do that. 350 00:21:11,460 --> 00:21:14,940 So now I'll subtract one of this from the row above. 351 00:21:14,940 --> 00:21:20,150 That will leave a zero and a minus two in there. 352 00:21:20,150 --> 00:21:22,540 And that's good. 353 00:21:26,670 --> 00:21:30,710 OK, and I can clean it up even one more step. 354 00:21:30,710 --> 00:21:33,400 I can make the pivots -- 355 00:21:33,400 --> 00:21:37,300 the pivots I'm going to make equal to one, because I can 356 00:21:37,300 --> 00:21:41,380 divide equation two by the pivot. 357 00:21:41,380 --> 00:21:44,110 That won't change the solutions. 358 00:21:44,110 --> 00:21:45,940 So let me do that. 359 00:21:45,940 --> 00:21:46,870 And then I really -- 360 00:21:46,870 --> 00:21:47,910 I'm ready to stop. 361 00:21:47,910 --> 00:21:53,230 One, two, zero, minus two, zero, zero, one, two. 362 00:21:53,230 --> 00:21:58,000 I divided the second equation by two, 363 00:21:58,000 --> 00:22:05,560 because now I have a one in the pivot and zeros below. 364 00:22:05,560 --> 00:22:06,060 OK. 365 00:22:06,060 --> 00:22:14,790 This is my matrix R. 366 00:22:14,790 --> 00:22:17,810 I guess I'm hoping that you could now 367 00:22:17,810 --> 00:22:21,710 execute the whole algorithm. 368 00:22:21,710 --> 00:22:27,518 Matlab will do it immediately with the command -- 369 00:22:30,870 --> 00:22:34,490 reduced row echelon form of A. 370 00:22:34,490 --> 00:22:37,630 So if I input that original matrix A 371 00:22:37,630 --> 00:22:43,360 and then I write, then I type that command, press return, 372 00:22:43,360 --> 00:22:46,210 that matrix will appear. 373 00:22:46,210 --> 00:22:49,140 That's the reduced row echelon form, 374 00:22:49,140 --> 00:23:00,140 and it's got all the information as clear as can be. 375 00:23:00,140 --> 00:23:01,890 What, what information has it got? 376 00:23:01,890 --> 00:23:04,000 Well, of course it immediately tells me 377 00:23:04,000 --> 00:23:08,530 the pivot rows, pivot rows, one and two, 378 00:23:08,530 --> 00:23:11,490 pivot columns, one and three. 379 00:23:11,490 --> 00:23:15,240 And in fact it's got the identity matrix in there, 380 00:23:15,240 --> 00:23:18,820 It's, it's got zeros above and below the pivots, right? 381 00:23:18,820 --> 00:23:22,460 and the pivots are one, so it's, so it's got a -- 382 00:23:22,460 --> 00:23:30,180 so notice the two by two identity matrix that's sitting 383 00:23:30,180 --> 00:23:33,370 in the pivot rows and pivot columns. 384 00:23:33,370 --> 00:23:42,710 it's I in the pivot rows and columns. 385 00:23:46,590 --> 00:23:48,930 It's got zero rows below. 386 00:23:52,120 --> 00:23:56,580 Those are always indicating that original rows were, 387 00:23:56,580 --> 00:23:58,740 were combinations of other rows. 388 00:23:58,740 --> 00:24:02,100 So we really only had two rows there. 389 00:24:02,100 --> 00:24:05,740 And now it also -- so there's the identity. 390 00:24:05,740 --> 00:24:10,740 Now it's also got its free columns. 391 00:24:10,740 --> 00:24:17,160 And, they're cleaned up as much as possible. 392 00:24:17,160 --> 00:24:21,720 Actually, actually it's now so cleaned up that the special 393 00:24:21,720 --> 00:24:26,070 solutions, I can read off -- you remember I went through 394 00:24:26,070 --> 00:24:30,220 the steps of computing this -- 395 00:24:30,220 --> 00:24:32,760 doing back substitution? 396 00:24:32,760 --> 00:24:37,390 Let me, let me, instead of that system, 397 00:24:37,390 --> 00:24:39,600 let me take this improved system. 398 00:24:39,600 --> 00:24:43,850 So I'm going to use these numbers, right. 399 00:24:43,850 --> 00:24:45,850 In these equations, what did I do? 400 00:24:45,850 --> 00:24:52,820 I divided this equation by two and, oh yeah 401 00:24:52,820 --> 00:24:54,540 and I had subtracted two of this, 402 00:24:54,540 --> 00:24:58,290 which knocked out this guy and made that a minus sign. 403 00:24:58,290 --> 00:25:01,500 Is that what -- 404 00:25:01,500 --> 00:25:04,570 I've now written Rx equals zero. 405 00:25:10,350 --> 00:25:14,570 Now I guess I'm hoping everybody in this room understands 406 00:25:14,570 --> 00:25:19,150 the solutions to the original A x equals zero, 407 00:25:19,150 --> 00:25:23,050 the midway, halfway, U x equals zero, 408 00:25:23,050 --> 00:25:27,980 and the final R x equals zero are all the same. 409 00:25:27,980 --> 00:25:30,900 Because going from one of those to another one 410 00:25:30,900 --> 00:25:33,330 I didn't mess up. 411 00:25:33,330 --> 00:25:36,280 I just multiplied equations and subtracted 412 00:25:36,280 --> 00:25:39,840 from other equations, which I'm allowed to do. 413 00:25:39,840 --> 00:25:40,340 OK. 414 00:25:40,340 --> 00:25:47,530 But my point is that now if I do this free variables 415 00:25:47,530 --> 00:25:52,410 and back substitution, it's just, the numbers are there. 416 00:25:52,410 --> 00:26:01,040 When I let x -- so in this guy, I let x2 be one and x4 be zero. 417 00:26:01,040 --> 00:26:04,380 I, I guess, what I seeing here? 418 00:26:04,380 --> 00:26:07,070 Let me, let me sort of separate this out here. 419 00:26:07,070 --> 00:26:12,100 I'm seeing in the pivot, in the pivot columns, 420 00:26:12,100 --> 00:26:16,910 if I, if I put the pivot columns here, I'm seeing those. 421 00:26:16,910 --> 00:26:21,970 And I'm -- in the free columns I'm seeing -- 422 00:26:21,970 --> 00:26:23,570 what I seeing in the free columns? 423 00:26:23,570 --> 00:26:29,030 A two, zero in that first free column, the x2 column, 424 00:26:29,030 --> 00:26:33,920 and a minus two, two in the fourth column, 425 00:26:33,920 --> 00:26:36,010 the other free column. 426 00:26:36,010 --> 00:26:41,750 And the row of zeros below, which of course have no -- 427 00:26:41,750 --> 00:26:43,860 that equation is zero equals zero. 428 00:26:43,860 --> 00:26:46,080 That's satisfied. 429 00:26:46,080 --> 00:26:48,530 Here's my point. 430 00:26:48,530 --> 00:26:51,220 That when I do back substitution, 431 00:26:51,220 --> 00:26:55,700 these numbers are exactly what shows up -- 432 00:26:55,700 --> 00:26:58,480 oh, their signs get switched. 433 00:26:58,480 --> 00:27:01,550 I was going to say those numbers, two, minus two, zero, 434 00:27:01,550 --> 00:27:06,240 two, can I just circle the -- this is the free part 435 00:27:06,240 --> 00:27:07,120 of the matrix. 436 00:27:07,120 --> 00:27:10,220 This is the identity part. 437 00:27:10,220 --> 00:27:14,710 This is the free part, maybe I'll call it F. 438 00:27:14,710 --> 00:27:18,650 This, of course, I call I, because it's the identity. 439 00:27:18,650 --> 00:27:25,020 The free part is a, I mean, I'm just doing back substitution. 440 00:27:25,020 --> 00:27:29,340 And those free numbers will show up, with a minus sign, 441 00:27:29,340 --> 00:27:32,040 because they pop onto the other side of the equation -- 442 00:27:32,040 --> 00:27:35,870 so I see minus two, zero, and I see two, minus two. 443 00:27:39,670 --> 00:27:41,310 So that wasn't magic. 444 00:27:41,310 --> 00:27:43,540 It had to happen. 445 00:27:43,540 --> 00:27:48,240 Let me, show you clearly why it happened. 446 00:27:48,240 --> 00:27:50,340 OK, so that's -- 447 00:27:50,340 --> 00:27:53,290 this is what I'm interested in here. 448 00:27:53,290 --> 00:27:59,410 And now let me, let me just, like, do it, do it for -- 449 00:27:59,410 --> 00:28:04,530 let's suppose we've, we've got to -- 450 00:28:07,750 --> 00:28:11,940 let's suppose we've got this system already in, 451 00:28:11,940 --> 00:28:18,200 in rref form. 452 00:28:18,200 --> 00:28:22,580 So my matrix R is -- what does it look like? 453 00:28:22,580 --> 00:28:25,130 OK, and I'll -- 454 00:28:25,130 --> 00:28:30,570 let me pretend that the pivot columns come first 455 00:28:30,570 --> 00:28:33,220 and then whatever's in the free columns. 456 00:28:33,220 --> 00:28:37,970 And there might be some zero rows below. 457 00:28:37,970 --> 00:28:40,600 There's a typical -- 458 00:28:40,600 --> 00:28:45,750 a pretty typical reduced row echelon form. 459 00:28:49,450 --> 00:28:51,510 You see what's typical. 460 00:28:51,510 --> 00:28:55,430 It's got -- this is r by r. 461 00:28:55,430 --> 00:28:57,950 This is r pivot rows. 462 00:29:02,610 --> 00:29:06,050 This is r pivot columns. 463 00:29:09,780 --> 00:29:16,290 And here are n-r free columns. 464 00:29:16,290 --> 00:29:17,480 OK. 465 00:29:17,480 --> 00:29:21,650 Tell me what are the special solutions? 466 00:29:21,650 --> 00:29:23,350 What are the -- 467 00:29:23,350 --> 00:29:24,060 what's x? 468 00:29:24,060 --> 00:29:27,440 If I want to solve R x equals zero -- 469 00:29:27,440 --> 00:29:31,170 in fact, let me -- 470 00:29:31,170 --> 00:29:36,110 I'm really going to, do the whole -- since these -- 471 00:29:36,110 --> 00:29:39,030 this is now block matrices, I might as well do all 472 00:29:39,030 --> 00:29:41,300 of the special solutions at once. 473 00:29:41,300 --> 00:29:44,740 So I want to solve R x equals zero, 474 00:29:44,740 --> 00:29:49,660 and I'll have some special solutions. 475 00:29:49,660 --> 00:29:52,830 Let me, actually -- 476 00:29:52,830 --> 00:29:54,780 can I do them all at once? 477 00:29:54,780 --> 00:30:00,750 I'm going to create a null space matrix, OK. 478 00:30:00,750 --> 00:30:01,790 A matrix. 479 00:30:04,970 --> 00:30:13,130 Its, its, its columns are the special -- 480 00:30:13,130 --> 00:30:15,085 the columns are the special solutions. 481 00:30:19,080 --> 00:30:21,070 This is, I'm making it sound harder, 482 00:30:21,070 --> 00:30:22,670 it's going to be totally easy. 483 00:30:22,670 --> 00:30:25,800 N will be this null space matrix. 484 00:30:25,800 --> 00:30:31,070 I want R N to be the zero matrix. 485 00:30:31,070 --> 00:30:33,830 These columns of N are supposed to multipl- 486 00:30:33,830 --> 00:30:37,300 to get multiplied by R and give zero columns. 487 00:30:37,300 --> 00:30:40,100 So what N will do the job? 488 00:30:40,100 --> 00:30:41,450 Let me put -- 489 00:30:41,450 --> 00:30:45,290 I'm going to put the identity in the free variable part 490 00:30:45,290 --> 00:30:54,020 and then minus F will show up in the pivot variables, just 491 00:30:54,020 --> 00:30:55,980 the way it did in that example. 492 00:30:55,980 --> 00:30:58,970 There we had the identity and F. 493 00:30:58,970 --> 00:31:02,160 Here -- in the special solution. 494 00:31:02,160 --> 00:31:05,400 So these columns are -- there's the matrix of special 495 00:31:05,400 --> 00:31:06,430 solutions. 496 00:31:06,430 --> 00:31:09,460 And actually, there -- so there's a Matlab command 497 00:31:09,460 --> 00:31:14,360 or a teaching code command, NULL -- 498 00:31:14,360 --> 00:31:19,460 N equal, so this is the -- 499 00:31:19,460 --> 00:31:24,710 produces the null basis, the null space matrix, NULL of A, 500 00:31:24,710 --> 00:31:26,230 and there it is. 501 00:31:30,450 --> 00:31:33,630 And how does that command actually work? 502 00:31:33,630 --> 00:31:38,590 It uses Matlab to compute R, then 503 00:31:38,590 --> 00:31:43,100 it picks out the pivot variables, the free variables, 504 00:31:43,100 --> 00:31:47,980 puts, puts ones and zeros in for the free variables, 505 00:31:47,980 --> 00:31:51,850 and copies out the pivot variables. 506 00:31:51,850 --> 00:31:54,760 It, it does back substitution, but back substitution 507 00:31:54,760 --> 00:31:57,180 for this system is totally simple. 508 00:31:57,180 --> 00:32:00,070 What is this system? 509 00:32:00,070 --> 00:32:03,030 R x equals zero. 510 00:32:03,030 --> 00:32:11,620 So this is R is I F, and x is the pivot variables 511 00:32:11,620 --> 00:32:18,240 and the free variables, and it's supposed to give zero. 512 00:32:18,240 --> 00:32:20,240 So what does that mean? 513 00:32:20,240 --> 00:32:24,960 That means that the pivot variables plus F 514 00:32:24,960 --> 00:32:28,640 times the free variables give zero. 515 00:32:28,640 --> 00:32:31,950 So let me put F times the free variables on the other side. 516 00:32:31,950 --> 00:32:37,950 I get minus F times the free variables. 517 00:32:37,950 --> 00:32:43,530 There's my, equation, as simple as it can be. 518 00:32:43,530 --> 00:32:45,840 That's what back substitution comes 519 00:32:45,840 --> 00:32:49,280 to when I've reduced and reduced and reduced this system 520 00:32:49,280 --> 00:32:52,090 to the, to the best form, OK. 521 00:32:52,090 --> 00:32:56,680 And, then if the free variables, I 522 00:32:56,680 --> 00:33:00,070 make this special choice of the identity, 523 00:33:00,070 --> 00:33:02,570 then the pivot variables are 524 00:33:02,570 --> 00:33:08,710 minus F. OK, can I do, another example? 525 00:33:08,710 --> 00:33:10,180 Could you do another example? 526 00:33:10,180 --> 00:33:12,300 Can I -- let me just take another matrix 527 00:33:12,300 --> 00:33:17,330 and, and let's go through this algorithm once more, OK. 528 00:33:17,330 --> 00:33:19,180 Here we go. 529 00:33:19,180 --> 00:33:25,100 Here's a blackboard for another matrix, OK. 530 00:33:25,100 --> 00:33:31,180 So I'll call the matrix A again, but let me make it -- 531 00:33:31,180 --> 00:33:33,680 yeah, how big shall we make it this time? 532 00:33:36,480 --> 00:33:38,620 Why don't I do this? 533 00:33:38,620 --> 00:33:39,920 Just for the heck of it. 534 00:33:39,920 --> 00:33:44,860 Let me take the transpose of this A and see what happens to 535 00:33:44,860 --> 00:33:45,670 that. 536 00:33:45,670 --> 00:33:55,820 Two four six eight and three six eight ten. 537 00:34:00,250 --> 00:34:06,380 Before we do the calculations, tell me what's coming? 538 00:34:06,380 --> 00:34:12,170 How many pivot variables do you expect here? 539 00:34:12,170 --> 00:34:16,900 How many columns are going to have pivots? 540 00:34:16,900 --> 00:34:22,060 How many -- we have three columns in that matrix, 541 00:34:22,060 --> 00:34:25,739 but are we going to, are we going to have three pivots? 542 00:34:25,739 --> 00:34:31,429 No, because this third columns is the sum of the first two 543 00:34:31,429 --> 00:34:32,100 columns. 544 00:34:32,100 --> 00:34:38,350 I'm totally expecting, totally expecting that these will be 545 00:34:38,350 --> 00:34:41,000 pivot columns -- 546 00:34:41,000 --> 00:34:45,949 because they're independent, but that this third guy, 547 00:34:45,949 --> 00:34:49,659 the third column, which is dependent on the first two, 548 00:34:49,659 --> 00:34:52,219 is going to be a free column. 549 00:34:52,219 --> 00:34:54,889 Elimination better discover that. 550 00:34:54,889 --> 00:34:58,270 And elimination will also straighten out 551 00:34:58,270 --> 00:35:05,170 the rows, dependent rows and some independent rows. 552 00:35:05,170 --> 00:35:09,510 What's the, what's the row reduced echelon form for this? 553 00:35:09,510 --> 00:35:11,970 Let's just do it, OK. 554 00:35:11,970 --> 00:35:16,710 So, so that's the first pivot. 555 00:35:16,710 --> 00:35:20,360 Two times that away from that gives me a row of zeros. 556 00:35:20,360 --> 00:35:24,970 Two times that away from that gives me a zero two two. 557 00:35:24,970 --> 00:35:28,865 And two times that away from that gives me a zero four four. 558 00:35:32,300 --> 00:35:35,750 OK, first column is straight. 559 00:35:35,750 --> 00:35:37,780 First variable is a pivot variable. 560 00:35:37,780 --> 00:35:39,010 No problem. 561 00:35:39,010 --> 00:35:40,370 On to the second column. 562 00:35:40,370 --> 00:35:43,880 I look at the second pivot, it's a zero. 563 00:35:43,880 --> 00:35:45,430 I look below it. 564 00:35:45,430 --> 00:35:46,740 There's a two. 565 00:35:46,740 --> 00:35:47,890 OK, I do a row exchange. 566 00:35:50,530 --> 00:35:53,630 So this zero is now there. 567 00:35:53,630 --> 00:35:58,710 I now have a perfectly good pivot, and I use it. 568 00:35:58,710 --> 00:36:03,030 OK, and I subtract two of that row away from this row. 569 00:36:03,030 --> 00:36:05,630 All right if I do it like that? 570 00:36:05,630 --> 00:36:08,310 I've got to the form U now. 571 00:36:08,310 --> 00:36:10,460 This was my A. 572 00:36:10,460 --> 00:36:17,260 Now there's my U. I can see now -- 573 00:36:17,260 --> 00:36:18,630 I have to stop, right? 574 00:36:18,630 --> 00:36:20,340 I would go on to the third column. 575 00:36:20,340 --> 00:36:22,650 I should have tried. 576 00:36:22,650 --> 00:36:24,120 I quit, but without trying. 577 00:36:24,120 --> 00:36:25,440 I shouldn't have done that. 578 00:36:25,440 --> 00:36:28,810 On to the third column, look at the pivot position. 579 00:36:28,810 --> 00:36:30,100 It's got a zero in it. 580 00:36:30,100 --> 00:36:32,300 Look below, all zeros. 581 00:36:32,300 --> 00:36:35,660 Now I'm entitled to stop, OK. 582 00:36:35,660 --> 00:36:37,445 So the rank is two again. 583 00:36:45,860 --> 00:36:48,440 What about the null space? 584 00:36:48,440 --> 00:36:52,450 How many special solutions are there this time? 585 00:36:52,450 --> 00:36:56,990 How many special solutions for this matrix? 586 00:36:56,990 --> 00:36:59,600 I've got -- and which are the free variables and which are 587 00:36:59,600 --> 00:37:01,400 the pivot variables and so on? 588 00:37:01,400 --> 00:37:04,610 Pivot columns, I've got two pivot columns, 589 00:37:04,610 --> 00:37:06,890 and that's no accident. 590 00:37:06,890 --> 00:37:11,200 The number of pivot columns for a matrix A, that's 591 00:37:11,200 --> 00:37:16,120 a great fact, that the number of pivot columns for A 592 00:37:16,120 --> 00:37:19,250 and A transpose are the same. 593 00:37:19,250 --> 00:37:21,680 And then I have a free column. 594 00:37:21,680 --> 00:37:24,240 There's a free column. 595 00:37:24,240 --> 00:37:30,330 One free column, because the count is three minus two. 596 00:37:30,330 --> 00:37:33,990 Three minus two gives me one free column. 597 00:37:37,760 --> 00:37:47,410 OK, so now let me solve, what's in the null space. 598 00:37:47,410 --> 00:37:49,390 OK, so how do I -- 599 00:37:49,390 --> 00:37:50,530 let's see. 600 00:37:50,530 --> 00:37:52,800 These vectors have length three. 601 00:37:52,800 --> 00:37:54,480 They only have three components. 602 00:37:54,480 --> 00:37:58,200 I'm making too much space for the, to write x. 603 00:37:58,200 --> 00:38:03,320 x has just got three components, and what are they? 604 00:38:03,320 --> 00:38:06,340 I'm looking for the null space. 605 00:38:09,660 --> 00:38:12,430 OK, so how do I start? 606 00:38:12,430 --> 00:38:17,710 I give the free variable some convenient value. 607 00:38:17,710 --> 00:38:20,290 And what's that? 608 00:38:20,290 --> 00:38:23,000 I set it to one. 609 00:38:23,000 --> 00:38:24,970 I set the free variable to one. 610 00:38:24,970 --> 00:38:28,520 If I set the free variable to zero and solve 611 00:38:28,520 --> 00:38:33,300 for the pivot variables, I'll get all zeros: no progress. 612 00:38:33,300 --> 00:38:36,430 But by setting the free variable to one -- 613 00:38:36,430 --> 00:38:39,680 you see w- my two equations now are -- 614 00:38:39,680 --> 00:38:45,230 my equations are x1+ 2x2+ 3 x3 is zero, 615 00:38:45,230 --> 00:38:47,200 that's my first equation. 616 00:38:47,200 --> 00:38:51,130 And my second equation is now 2x2+2x3 equals zero. 617 00:38:51,130 --> 00:38:56,110 And, OK. 618 00:38:56,110 --> 00:39:02,400 So if x3 is one, then x2 is minus one. 619 00:39:02,400 --> 00:39:07,430 And if x3 is one and x2 is minus one, then maybe x1 620 00:39:07,430 --> 00:39:08,510 is minus one. 621 00:39:12,080 --> 00:39:14,360 And actually I go back to check now. 622 00:39:14,360 --> 00:39:17,410 I don't, like -- 623 00:39:17,410 --> 00:39:19,410 I did a quick calculation mentally. 624 00:39:19,410 --> 00:39:21,570 Can I mentally do a quick check? 625 00:39:21,570 --> 00:39:24,180 That matrix, that solution x says 626 00:39:24,180 --> 00:39:28,710 that minus this column minus this column plus this one 627 00:39:28,710 --> 00:39:31,560 is the zero column. 628 00:39:31,560 --> 00:39:32,860 And it is. 629 00:39:32,860 --> 00:39:35,510 Minus that minus that plus that is zero. 630 00:39:35,510 --> 00:39:37,720 So that's in the null space. 631 00:39:37,720 --> 00:39:40,790 And now you can tell me what else is in the null space. 632 00:39:40,790 --> 00:39:44,080 What's, what's the whole null space now? 633 00:39:44,080 --> 00:39:46,570 I multiply by C, right. 634 00:39:46,570 --> 00:39:51,720 The whole null space is a line. 635 00:39:51,720 --> 00:39:52,970 So that's the description. 636 00:39:52,970 --> 00:39:57,520 You know, if I ask you on a homework or a quiz or the final 637 00:39:57,520 --> 00:40:01,630 what -- give me, describe, tell me the null space, 638 00:40:01,630 --> 00:40:04,410 find the null space of this matrix, 639 00:40:04,410 --> 00:40:07,340 you can take those steps. 640 00:40:07,340 --> 00:40:10,790 And that's the answer I'm looking for. 641 00:40:10,790 --> 00:40:15,190 And I'm looking for that C too, because that's telling me 642 00:40:15,190 --> 00:40:18,360 that you're remembering that it's a whole space and not 643 00:40:18,360 --> 00:40:20,640 just one vector. 644 00:40:20,640 --> 00:40:23,960 Later I will ask you for a basis for the null space. 645 00:40:23,960 --> 00:40:26,850 Then I just want this vector. 646 00:40:26,850 --> 00:40:28,840 But if I ask for the whole null space, 647 00:40:28,840 --> 00:40:31,510 then there's the whole line through that vector. 648 00:40:31,510 --> 00:40:36,340 OK, now one more natural thing to do with this example, right, 649 00:40:36,340 --> 00:40:43,300 is keep going to the reduced matrix, R. 650 00:40:43,300 --> 00:40:46,180 So can I push onwards to R? 651 00:40:46,180 --> 00:40:49,340 That should be quick, but let's just practice. 652 00:40:49,340 --> 00:40:54,000 Let me keep going to R. OK, so what do I do here? 653 00:40:54,000 --> 00:40:55,970 I subtract -- 654 00:40:55,970 --> 00:40:57,830 I clear out above the pivot, so I 655 00:40:57,830 --> 00:41:02,870 subtract that from that, that's one zero one is left, right? 656 00:41:02,870 --> 00:41:04,740 When I subtracted this row from this 657 00:41:04,740 --> 00:41:07,390 it produced a zero above this pivot. 658 00:41:07,390 --> 00:41:12,070 And now I want that pivot to be a one. 659 00:41:12,070 --> 00:41:18,160 So for the R matrix, I'll divide this equation by two, 660 00:41:18,160 --> 00:41:23,270 and of course these zero, zeros are great, they don't change. 661 00:41:23,270 --> 00:41:24,700 There's R. 662 00:41:24,700 --> 00:41:27,370 That's R. 663 00:41:27,370 --> 00:41:28,430 You see what R is? 664 00:41:28,430 --> 00:41:32,100 You see the identity matrix sitting up here? 665 00:41:32,100 --> 00:41:36,370 You see the free part F, the F part here? 666 00:41:36,370 --> 00:41:38,370 And you see the zeros below. 667 00:41:38,370 --> 00:41:42,460 This is I F zero zero. 668 00:41:42,460 --> 00:41:45,180 And what's the x? 669 00:41:45,180 --> 00:41:48,660 The x has the identity -- 670 00:41:48,660 --> 00:41:51,460 well, it's only a single number one, 671 00:41:51,460 --> 00:41:56,090 but it's the identity matrix in the free, in the free part. 672 00:41:56,090 --> 00:42:00,770 And what does it have in the pivot variables? 673 00:42:00,770 --> 00:42:03,620 What did back substitution give? 674 00:42:03,620 --> 00:42:06,910 It gave minus these guys. 675 00:42:06,910 --> 00:42:11,160 You see that what this is is any multiple of -- 676 00:42:11,160 --> 00:42:14,360 this is the identity there, and this is minus F here. 677 00:42:19,190 --> 00:42:24,710 This is our null space matrix N for this. 678 00:42:24,710 --> 00:42:28,490 Our, our null space matrix is the guy whose columns 679 00:42:28,490 --> 00:42:30,680 are the special solutions. 680 00:42:30,680 --> 00:42:33,570 So their free variables have the special values 681 00:42:33,570 --> 00:42:39,510 one and, pivot variables have minus F. 682 00:42:39,510 --> 00:42:42,210 So do you see, though, how the minus F just 683 00:42:42,210 --> 00:42:45,540 automatically shows up in the special solutions. 684 00:42:49,390 --> 00:42:50,389 That's it really. 685 00:42:50,389 --> 00:42:51,930 I don't think there's anything more I 686 00:42:51,930 --> 00:42:55,980 can say about A x equals zero. 687 00:42:55,980 --> 00:42:59,640 There's more I can say about A x equal b, 688 00:42:59,640 --> 00:43:03,080 but that'll be on Friday. 689 00:43:03,080 --> 00:43:05,370 OK, so that's, that's the null space. 690 00:43:05,370 --> 00:43:06,920 Thanks.