1 00:00:06,310 --> 00:00:07,350 LINAN CHEN: Hi everyone. 2 00:00:07,350 --> 00:00:08,300 I'm Linan. 3 00:00:08,300 --> 00:00:10,300 Welcome back to recitation. 4 00:00:10,300 --> 00:00:13,090 In recent lectures, we have studied the properties 5 00:00:13,090 --> 00:00:14,050 of the determinant. 6 00:00:14,050 --> 00:00:17,130 And we also derived the formula to compute it. 7 00:00:17,130 --> 00:00:19,280 Today we're going to put what we learned 8 00:00:19,280 --> 00:00:23,480 into practice by considering these two examples. 9 00:00:23,480 --> 00:00:27,630 So we want to find out the determinants of these two 5 10 00:00:27,630 --> 00:00:29,880 by 5 matrices. 11 00:00:29,880 --> 00:00:33,700 And as you can see, matrix A has x 12 00:00:33,700 --> 00:00:38,990 along this diagonal, and in the first four rows, y to the right 13 00:00:38,990 --> 00:00:41,750 of x, except for the last row. 14 00:00:41,750 --> 00:00:44,730 And zero entries everywhere else. 15 00:00:44,730 --> 00:00:49,040 And matrix B also has x along this diagonal 16 00:00:49,040 --> 00:00:52,220 and y everywhere else. 17 00:00:52,220 --> 00:00:55,910 Before starting, let me help you review what you 18 00:00:55,910 --> 00:00:58,740 can do to compute determinants. 19 00:00:58,740 --> 00:01:01,810 Of course, you can carry out elimination 20 00:01:01,810 --> 00:01:05,459 to transform your original matrix into upper triangular 21 00:01:05,459 --> 00:01:07,040 matrix. 22 00:01:07,040 --> 00:01:11,570 Or you can use this big summation formula. 23 00:01:11,570 --> 00:01:16,010 Another choice would be you can do it by cofactors. 24 00:01:16,010 --> 00:01:19,220 Namely, you can expand your original matrix 25 00:01:19,220 --> 00:01:23,090 along any row or any column, and then the determinant 26 00:01:23,090 --> 00:01:25,580 is simply given by the dot product 27 00:01:25,580 --> 00:01:30,150 of that row or that column with its cofactors. 28 00:01:30,150 --> 00:01:33,370 Why don't you pause the video now and try to work on them 29 00:01:33,370 --> 00:01:34,440 yourself. 30 00:01:34,440 --> 00:01:37,490 Whenever you're ready, I'll come back and show you my way. 31 00:01:46,990 --> 00:01:49,850 I hope you just had some fun with these two problems. 32 00:01:49,850 --> 00:01:52,290 Now let's look at them together. 33 00:01:52,290 --> 00:01:55,110 Let's look at matrix A first. 34 00:01:55,110 --> 00:01:59,370 As you can see, there are a lot of zero entries in matrix A. 35 00:01:59,370 --> 00:02:02,280 So perhaps you don't need elimination to introduce more 36 00:02:02,280 --> 00:02:04,270 0's. 37 00:02:04,270 --> 00:02:07,580 Furthermore, we observe this pattern of A, 38 00:02:07,580 --> 00:02:12,640 and you notice that if I cover the last row 39 00:02:12,640 --> 00:02:16,680 and the first column, so if this column and this row 40 00:02:16,680 --> 00:02:20,730 are not here, what is left over is simply a 4 by 4 41 00:02:20,730 --> 00:02:23,140 lower triangular matrix. 42 00:02:23,140 --> 00:02:27,530 And similarly, if you cover the first column 43 00:02:27,530 --> 00:02:33,140 and the first row, what is left over here is simply a 4 44 00:02:33,140 --> 00:02:36,030 by 4 upper triangular matrix. 45 00:02:36,030 --> 00:02:37,910 This is telling us that we should 46 00:02:37,910 --> 00:02:42,850 calculate the determinant of A by the third method. 47 00:02:42,850 --> 00:02:46,630 So we should expand along the first column of A, 48 00:02:46,630 --> 00:02:48,920 and we calculate the cofactors. 49 00:02:48,920 --> 00:02:51,020 Let's do it now. 50 00:02:51,020 --> 00:03:00,110 So determinant of A, is equal to the (1, 1) 51 00:03:00,110 --> 00:03:06,270 entry of A, which is x, times the cofactor 52 00:03:06,270 --> 00:03:10,690 of that spot, which is the determinant of the leftover 4 53 00:03:10,690 --> 00:03:13,080 by 4 matrix. 54 00:03:13,080 --> 00:03:16,200 And it's upper triangular, so its determinant is simply 55 00:03:16,200 --> 00:03:21,450 given by x to the power 4. 56 00:03:21,450 --> 00:03:26,260 Plus, the only other nonzero entry in that column 57 00:03:26,260 --> 00:03:28,860 is the y at the very bottom. 58 00:03:28,860 --> 00:03:32,530 So you put y here. 59 00:03:32,530 --> 00:03:35,390 And you multiply y by the cofactor 60 00:03:35,390 --> 00:03:40,290 of that spot, which is the determinant of the leftover 4 61 00:03:40,290 --> 00:03:42,130 by 4 matrix again. 62 00:03:42,130 --> 00:03:44,580 In this case, it's lower triangular 63 00:03:44,580 --> 00:03:47,660 and its determinant is y to the power 4. 64 00:03:47,660 --> 00:03:51,480 So I have a y to the power 4. 65 00:03:51,480 --> 00:03:53,520 But not quite. 66 00:03:53,520 --> 00:03:56,720 In principle, there should be another factor 67 00:03:56,720 --> 00:03:59,150 here indicating the sign. 68 00:03:59,150 --> 00:04:03,430 And the sign in this case, well because the y 69 00:04:03,430 --> 00:04:08,110 is the entry in the fifth row and the first column, 70 00:04:08,110 --> 00:04:11,190 so this factor should be negative 1 71 00:04:11,190 --> 00:04:14,670 to the power 5 plus 1. 72 00:04:14,670 --> 00:04:16,839 And of course, it's just 1. 73 00:04:16,839 --> 00:04:20,410 So the determinant of A is simply 74 00:04:20,410 --> 00:04:29,780 equal to x to the fifth power plus y to the fifth power. 75 00:04:29,780 --> 00:04:32,180 Did you get the correct answer? 76 00:04:32,180 --> 00:04:34,700 Well, the determinant of A is not too bad, 77 00:04:34,700 --> 00:04:37,310 because A has a lot of zero entries. 78 00:04:37,310 --> 00:04:42,060 Now let's look at the determinant of matrix B. 79 00:04:42,060 --> 00:04:45,320 I have another copy of B here. 80 00:04:45,320 --> 00:04:48,710 So B also has a very clear structure. 81 00:04:48,710 --> 00:04:53,080 It has x along its diagonal, and y everywhere else. 82 00:04:53,080 --> 00:04:57,520 But in general, B does not have any zero entry. 83 00:04:57,520 --> 00:05:02,630 So perhaps our first step should be carrying out elimination 84 00:05:02,630 --> 00:05:07,000 to introduce zero entries into matrix B. 85 00:05:07,000 --> 00:05:10,370 Of course, you can do it by the regular routine. 86 00:05:10,370 --> 00:05:13,080 You start with the first row, find a pivot, 87 00:05:13,080 --> 00:05:15,840 and eliminate the second row and the third row 88 00:05:15,840 --> 00:05:17,750 and so on and so forth. 89 00:05:17,750 --> 00:05:20,870 But in this case, there's a shortcut. 90 00:05:20,870 --> 00:05:24,630 If you compare two rows that are next to each other, 91 00:05:24,630 --> 00:05:28,920 for example, if we compare the fourth row and the fifth row, 92 00:05:28,920 --> 00:05:33,030 you notice that they have a lot of entries in common. 93 00:05:33,030 --> 00:05:37,450 And they're only different at these two spots. 94 00:05:37,450 --> 00:05:42,830 So imagine if I subtract the fourth row from the fifth row. 95 00:05:42,830 --> 00:05:48,360 So if I do the following operation-- 96 00:05:48,360 --> 00:05:54,620 so I subtract this row from the last row. 97 00:05:54,620 --> 00:06:00,290 Then the new fifth row should become the following. 98 00:06:00,290 --> 00:06:09,580 So this row will become 0, 0, 0, y minus x, x minus y. 99 00:06:12,860 --> 00:06:15,710 You see, just by this simple operation, 100 00:06:15,710 --> 00:06:18,830 I have introduced three zero entries at once. 101 00:06:22,420 --> 00:06:25,640 And it's similar with the fourth row and the third row. 102 00:06:25,640 --> 00:06:30,030 They have common entries here, here, and here. 103 00:06:30,030 --> 00:06:33,670 So you subtract the third row from the fourth row. 104 00:06:36,520 --> 00:06:46,410 You update the fourth row to 0, 0, y minus x, x minus y, 0. 105 00:06:46,410 --> 00:06:49,210 Again, three zero entries. 106 00:06:49,210 --> 00:06:52,990 And same thing happened to the second row and the third row. 107 00:06:52,990 --> 00:06:56,780 So you subtract the second row from the third row 108 00:06:56,780 --> 00:07:01,070 and your new third row will become 0, 109 00:07:01,070 --> 00:07:08,290 y minus x, x minus y, 0, 0. 110 00:07:08,290 --> 00:07:14,860 Finally, you subtract the first row from the second row, 111 00:07:14,860 --> 00:07:16,925 and then you update the second row 112 00:07:16,925 --> 00:07:25,210 to y minus x, x minus y, 0, 0, 0. 113 00:07:25,210 --> 00:07:27,190 Let's keep the first row unchanged. 114 00:07:27,190 --> 00:07:28,720 So I'm going to copy here. 115 00:07:33,990 --> 00:07:34,630 All right. 116 00:07:34,630 --> 00:07:38,920 By row elimination, we have introduced many zero entries 117 00:07:38,920 --> 00:07:42,540 to matrix B. Is there anything else 118 00:07:42,540 --> 00:07:46,640 that I can take advantage of? 119 00:07:46,640 --> 00:07:50,090 Let's observe the pattern of this new matrix. 120 00:07:50,090 --> 00:07:54,740 As you can see, in each row, you have two nonzero entries, 121 00:07:54,740 --> 00:07:56,420 except for the first row. 122 00:07:56,420 --> 00:07:58,850 And they're only different by a sign. 123 00:07:58,850 --> 00:08:02,760 So if, somehow, you can figure out a way to sum them up, 124 00:08:02,760 --> 00:08:05,540 you will get even more zero entries. 125 00:08:05,540 --> 00:08:06,900 So let's do it. 126 00:08:06,900 --> 00:08:10,930 That's going to involve the operations on column. 127 00:08:10,930 --> 00:08:13,880 So here is how I do it. 128 00:08:16,720 --> 00:08:21,310 I'm going to keep the last column unchanged. 129 00:08:21,310 --> 00:08:28,540 So the last column is y, 0, 0, 0, x minus y. 130 00:08:32,870 --> 00:08:37,620 What I will do is I will add a copy of the last column 131 00:08:37,620 --> 00:08:39,220 to the fourth column. 132 00:08:39,220 --> 00:08:41,230 So this is what I'm going to do. 133 00:08:41,230 --> 00:08:46,450 Add one copy of the last column to the fourth column. 134 00:08:46,450 --> 00:08:57,890 Now the new fourth column will become 2y, 0, 0, x minus y, 0. 135 00:08:57,890 --> 00:09:02,440 As you can see, by doing this, I have killed this spot. 136 00:09:02,440 --> 00:09:05,160 So I have introduced one more zero entry 137 00:09:05,160 --> 00:09:07,420 into my fourth column. 138 00:09:07,420 --> 00:09:11,870 If you continue, you may want to add the fourth column 139 00:09:11,870 --> 00:09:13,200 to the third column. 140 00:09:13,200 --> 00:09:15,840 Let's see what will happen if you do that. 141 00:09:15,840 --> 00:09:24,140 So if you add the fourth column to the third column, 142 00:09:24,140 --> 00:09:35,311 now what should appear here is 2y, 0, x minus y, 0, y minus x. 143 00:09:38,770 --> 00:09:42,770 But in this new third column, you still 144 00:09:42,770 --> 00:09:45,870 have two zero entries, which is the same 145 00:09:45,870 --> 00:09:48,470 as the original third column. 146 00:09:48,470 --> 00:09:50,960 So although you've killed this spot, 147 00:09:50,960 --> 00:09:55,070 but you've introduced a new nonzero entry. 148 00:09:55,070 --> 00:10:00,260 So is there a way that we can kill this spot too? 149 00:10:00,260 --> 00:10:06,000 You may have noticed that if you add a copy of the fifth column 150 00:10:06,000 --> 00:10:11,560 to this column again, then that spot will have been killed. 151 00:10:11,560 --> 00:10:12,780 So let's do it. 152 00:10:12,780 --> 00:10:15,800 If I add this column to this one-- 153 00:10:15,800 --> 00:10:18,140 I'm going to just update it here-- then 154 00:10:18,140 --> 00:10:24,470 the first entry should become 3y. 155 00:10:24,470 --> 00:10:27,060 These are unchanged. 156 00:10:27,060 --> 00:10:29,400 And the last spot becomes 0. 157 00:10:34,680 --> 00:10:38,190 It reflects here as you are adding 158 00:10:38,190 --> 00:10:42,540 a copy of the fourth column and a copy of the fifth column 159 00:10:42,540 --> 00:10:44,810 to the third column. 160 00:10:44,810 --> 00:10:46,560 Now you've got the idea. 161 00:10:46,560 --> 00:10:48,130 And you continue. 162 00:10:48,130 --> 00:10:51,050 What do you do with the second column? 163 00:10:51,050 --> 00:10:58,550 This time you will have to add a copy of the third column, 164 00:10:58,550 --> 00:11:02,020 a copy of the fourth column, and the copy of the fifth column. 165 00:11:06,030 --> 00:11:17,040 So you update the second column to be 4y, x minus y, 0, 0, 0. 166 00:11:19,630 --> 00:11:22,650 Eventually, what you will do to the first column 167 00:11:22,650 --> 00:11:29,770 would be you add everything to the first column. 168 00:11:29,770 --> 00:11:32,920 So a copy of each. 169 00:11:41,360 --> 00:11:43,710 Then the first column will become-- 170 00:11:43,710 --> 00:11:45,760 so I don't have enough spot here, 171 00:11:45,760 --> 00:11:50,870 so make it here-- x plus 4y. 172 00:11:50,870 --> 00:11:56,070 Then everything else is 0. 173 00:11:56,070 --> 00:11:57,290 This is fun. 174 00:11:57,290 --> 00:11:59,110 And the result's really nice. 175 00:11:59,110 --> 00:12:01,260 This is wonderful because this is simply 176 00:12:01,260 --> 00:12:03,080 upper triangular matrix. 177 00:12:03,080 --> 00:12:06,290 Now you tell me: what is the determinant of B? 178 00:12:06,290 --> 00:12:12,070 The determinant of B is the determinant 179 00:12:12,070 --> 00:12:14,240 of this upper triangular matrix. 180 00:12:14,240 --> 00:12:17,040 So you simply multiply everything together, 181 00:12:17,040 --> 00:12:27,100 that's x plus 4y times x minus y to the fourth power. 182 00:12:29,640 --> 00:12:33,480 So I hope you enjoyed these two examples. 183 00:12:33,480 --> 00:12:35,980 Maybe your method is different from mine, 184 00:12:35,980 --> 00:12:38,370 but at least these two examples teach us 185 00:12:38,370 --> 00:12:41,390 that you can be flexible in combining methods 186 00:12:41,390 --> 00:12:43,497 in calculating determinants. 187 00:12:43,497 --> 00:12:45,330 Thanks for watching, and I'm looking forward 188 00:12:45,330 --> 00:12:47,280 to see you soon.