1 00:00:06,109 --> 00:00:07,900 PROFESSOR: Today, we're going to be solving 2 00:00:07,900 --> 00:00:10,110 a problem from a final exam. 3 00:00:10,110 --> 00:00:11,360 And here it is. 4 00:00:11,360 --> 00:00:16,800 It's about a matrix A, [1, 0, 1; 0, 1, 1; 1, 1, 0]. 5 00:00:16,800 --> 00:00:21,320 And we know that this matrix has two eigenvalues, 1 and 2. 6 00:00:21,320 --> 00:00:23,910 And we also know that if we do elimination, 7 00:00:23,910 --> 00:00:27,130 the first two pivots will be 1 and 1. 8 00:00:27,130 --> 00:00:31,020 And here are two questions about this matrix. 9 00:00:31,020 --> 00:00:35,270 The first one is find lambda_3 and d_3, the third eigenvalue 10 00:00:35,270 --> 00:00:36,870 and the third pivot. 11 00:00:36,870 --> 00:00:41,780 And the second one asks you, what is the smallest a_(3, 3)-- 12 00:00:41,780 --> 00:00:45,310 so if you can change this entry, what is the smallest number 13 00:00:45,310 --> 00:00:48,320 that you can put there that will make the matrix A positive 14 00:00:48,320 --> 00:00:49,660 semidefinite? 15 00:00:49,660 --> 00:00:55,820 And also, if instead of changing that entry, you do A plus c*I, 16 00:00:55,820 --> 00:00:58,850 what is the smallest number c that will make that matrix, 17 00:00:58,850 --> 00:01:02,160 A plus c*I, positive semidefinite? 18 00:01:02,160 --> 00:01:03,910 There's also a third part to the question, 19 00:01:03,910 --> 00:01:05,370 but we'll get to that later. 20 00:01:05,370 --> 00:01:08,024 Why don't you hit pause and work on these two parts? 21 00:01:08,024 --> 00:01:10,690 And when you're ready, come back and I'll show you how I did it. 22 00:01:18,920 --> 00:01:19,860 Hi. 23 00:01:19,860 --> 00:01:24,610 I hope you managed to do parts A and B. Let's work on it 24 00:01:24,610 --> 00:01:26,710 together. 25 00:01:26,710 --> 00:01:33,055 Part A. Well, we want to know what the third eigenvalue is. 26 00:01:33,055 --> 00:01:35,080 And you know what the first two are. 27 00:01:35,080 --> 00:01:38,510 What else do you know about eigenvalues and the matrix? 28 00:01:38,510 --> 00:01:41,720 You know that the sum of all the eigenvalues of the matrix 29 00:01:41,720 --> 00:01:44,260 is equal to the trace of the matrix. 30 00:01:44,260 --> 00:01:49,570 So lambda_1 plus lambda_2 plus lambda_3 31 00:01:49,570 --> 00:01:51,730 is equal to the trace of the matrix. 32 00:01:51,730 --> 00:01:56,750 In this case, you have 1 plus 2 plus lambda_3 33 00:01:56,750 --> 00:01:58,180 equals to the trace. 34 00:01:58,180 --> 00:02:01,285 The trace is the sum of the diagonal entries. 35 00:02:01,285 --> 00:02:03,290 So, come over here. 36 00:02:03,290 --> 00:02:05,720 The trace is 1 plus 1 plus 0. 37 00:02:05,720 --> 00:02:07,860 The trace is equal to 2. 38 00:02:07,860 --> 00:02:12,620 So we have 3 plus lambda_3 is equal to 2. 39 00:02:12,620 --> 00:02:19,800 So lambda_3 is equal to minus 1. 40 00:02:19,800 --> 00:02:23,800 On to the third pivot. 41 00:02:23,800 --> 00:02:25,890 We don't really want to do elimination. 42 00:02:25,890 --> 00:02:27,190 That would take too long. 43 00:02:27,190 --> 00:02:30,750 So there must be some trick that we can use. 44 00:02:30,750 --> 00:02:33,400 Well, we have the first two pivots, 45 00:02:33,400 --> 00:02:35,570 and we want to know the third. 46 00:02:35,570 --> 00:02:37,880 Remember, when you do elimination steps, that 47 00:02:37,880 --> 00:02:40,380 does not change the determinant of the matrix. 48 00:02:40,380 --> 00:02:43,410 And you're left with an upper triangular. 49 00:02:43,410 --> 00:02:47,820 So the determinant of that matrix 50 00:02:47,820 --> 00:02:50,310 will be d_1 times d_2 times d_3. 51 00:02:50,310 --> 00:02:52,800 And it will still be equal to the determinant 52 00:02:52,800 --> 00:02:58,240 of A. I guess there's a small caveat that I should point out. 53 00:02:58,240 --> 00:03:01,140 The pivots are not always the diagonal entries. 54 00:03:01,140 --> 00:03:04,960 It might be that one of the diagonal entries will be 0. 55 00:03:04,960 --> 00:03:07,180 That happens if the matrix is singular. 56 00:03:07,180 --> 00:03:11,820 But here, all my three eigenvalues are non-zero. 57 00:03:11,820 --> 00:03:14,270 They are 1, 2, and -1. 58 00:03:14,270 --> 00:03:15,330 So that won't happen. 59 00:03:15,330 --> 00:03:17,840 So this is actually possible to do. 60 00:03:17,840 --> 00:03:19,770 The product of the three pivots will 61 00:03:19,770 --> 00:03:23,060 be equal to the determinant of A. And the determinant of A 62 00:03:23,060 --> 00:03:28,920 is the product of the eigenvalues, 1 times 2 times 63 00:03:28,920 --> 00:03:29,840 -1. 64 00:03:29,840 --> 00:03:33,400 So it's equal to -2. 65 00:03:33,400 --> 00:03:39,060 1 times 1 times d_33 is equal to -2. 66 00:03:39,060 --> 00:03:41,880 Here is your third pivot, d_3. 67 00:03:41,880 --> 00:03:46,460 That finishes part A. Is that the result that you got? 68 00:03:46,460 --> 00:03:54,020 Let's do part B. What is the smallest a_(3,3) entry that 69 00:03:54,020 --> 00:03:57,520 would make the matrix positive semidefinite? 70 00:03:57,520 --> 00:04:02,290 Well, first of all, note that A is not positive semidefinite 71 00:04:02,290 --> 00:04:03,080 yet. 72 00:04:03,080 --> 00:04:07,280 The eigenvalues are 1, 2, and -1. 73 00:04:07,280 --> 00:04:10,500 -1 is negative, so the matrix is not positive definite and not 74 00:04:10,500 --> 00:04:12,410 even positive semidefinite. 75 00:04:12,410 --> 00:04:15,740 Positive semidefinite means that all the eigenvalues 76 00:04:15,740 --> 00:04:18,529 will be either positive or 0. 77 00:04:18,529 --> 00:04:20,850 That is, non-negative. 78 00:04:20,850 --> 00:04:30,430 So our matrix will be 1, 0, 1; 0, 1, 1; 1, 1, 79 00:04:30,430 --> 00:04:34,660 and we're allowed to change this third entry. 80 00:04:34,660 --> 00:04:40,410 How do we figure out if this matrix is positive semidefinite 81 00:04:40,410 --> 00:04:42,440 or not? 82 00:04:42,440 --> 00:04:44,700 Well, I was talking about the eigenvalues. 83 00:04:44,700 --> 00:04:50,100 But maybe the easiest way is to do the determinant test. 84 00:04:50,100 --> 00:04:52,800 The determinant of the small one by one 85 00:04:52,800 --> 00:04:56,720 left uppermost matrix is 1. 86 00:04:56,720 --> 00:05:00,380 The determinant of the two by two upper leftmost matrix 87 00:05:00,380 --> 00:05:05,950 is 1 times 1 minus 0 times 0, 1, also positive. 88 00:05:05,950 --> 00:05:09,410 So we need to check that the determinant of the whole matrix 89 00:05:09,410 --> 00:05:11,760 will also be non-negative. 90 00:05:11,760 --> 00:05:14,870 So what is the determinant of this matrix? 91 00:05:14,870 --> 00:05:17,490 It is equal to the three by three matrix. 92 00:05:17,490 --> 00:05:19,870 So do you know how to do it quickly? 93 00:05:19,870 --> 00:05:23,810 There's this way that only works for three by three and not 94 00:05:23,810 --> 00:05:24,940 for bigger. 95 00:05:24,940 --> 00:05:31,150 Which is, the determinant will be 1 times 1 times a_(3,3) plus 96 00:05:31,150 --> 00:05:33,495 0 times 1 times 1. 97 00:05:33,495 --> 00:05:34,990 That's 0. 98 00:05:34,990 --> 00:05:39,700 Plus 1 times 0 times 1 That's 0 again. 99 00:05:39,700 --> 00:05:48,560 Minus 1 times 1 times 1 minus 1 times 1 times 1 minus a_(3,3) 100 00:05:48,560 --> 00:05:49,720 times 0 times 0. 101 00:05:49,720 --> 00:05:51,320 That's 0. 102 00:05:51,320 --> 00:05:52,850 So this is the determinant. 103 00:05:52,850 --> 00:05:55,110 It's a_(3,3) minus 2. 104 00:05:55,110 --> 00:05:58,350 And I want it to be greater than or equal to 0. 105 00:05:58,350 --> 00:06:00,090 This will guarantee that the matrix 106 00:06:00,090 --> 00:06:01,990 is positive semidefinite. 107 00:06:01,990 --> 00:06:07,540 So a_(3,3) must be bigger than or equal to 2. 108 00:06:07,540 --> 00:06:11,820 The smallest value for a_(3,3) that will make the matrix 109 00:06:11,820 --> 00:06:16,900 positive semidefinite is 2. 110 00:06:16,900 --> 00:06:19,030 There's another part to the question still, 111 00:06:19,030 --> 00:06:23,900 which is what is the smallest c that will make the matrix A 112 00:06:23,900 --> 00:06:26,210 plus c*I positive semidefinite? 113 00:06:29,520 --> 00:06:31,620 How should we do this? 114 00:06:31,620 --> 00:06:38,060 The quickest way is to do the eigenvalue test. 115 00:06:38,060 --> 00:06:50,570 A has eigenvalues 1, 2, and -1. 116 00:06:50,570 --> 00:06:58,620 So A plus c*I has eigenvalues-- well, 117 00:06:58,620 --> 00:07:01,190 you're just adding c*I to the matrix. 118 00:07:01,190 --> 00:07:05,520 And in this particular case, you should know by now 119 00:07:05,520 --> 00:07:07,550 that that keeps the eigenvectors the same 120 00:07:07,550 --> 00:07:11,795 and adds the number c to each of the eigenvalues. 121 00:07:15,260 --> 00:07:18,830 And I want each one of these to be non-negative. 122 00:07:18,830 --> 00:07:21,730 For that to be true, I have to have 123 00:07:21,730 --> 00:07:26,470 c greater than or equal to 1. 124 00:07:26,470 --> 00:07:29,580 c greater than or equal to 1. 125 00:07:29,580 --> 00:07:32,480 So the smallest value that c can take that 126 00:07:32,480 --> 00:07:38,670 will make the matrix A positive semidefinite is 1. 127 00:07:38,670 --> 00:07:43,110 That solves parts A and B of this question. 128 00:07:43,110 --> 00:07:45,224 There is a part C to this question. 129 00:07:45,224 --> 00:07:46,140 Let me show it to you. 130 00:07:50,700 --> 00:07:54,960 It's says: starting with one of these three vectors, [3, 0, 0], 131 00:07:54,960 --> 00:08:01,490 [0, 3, 0], or [0, 0, 3], and with u_(k+1) equals to a half 132 00:08:01,490 --> 00:08:06,490 of A times u_k, what is the limit behavior of u_k as k goes 133 00:08:06,490 --> 00:08:09,300 to infinity? 134 00:08:09,300 --> 00:08:13,340 I've written the matrix one half of A here for your convenience. 135 00:08:13,340 --> 00:08:15,900 And now, you can hit pause and work on it. 136 00:08:15,900 --> 00:08:20,830 And when you're ready, we'll get back and solve it together. 137 00:08:30,910 --> 00:08:34,070 I hope you managed to solve this one. 138 00:08:34,070 --> 00:08:37,330 Now let's do it together. 139 00:08:37,330 --> 00:08:41,240 Well, if you've noticed, the matrix one half of A 140 00:08:41,240 --> 00:08:44,120 is a Markov matrix. 141 00:08:44,120 --> 00:08:50,000 So there are all these results about Markov matrices 142 00:08:50,000 --> 00:08:52,210 and steady states and so on. 143 00:08:52,210 --> 00:08:56,130 Usually, Markov matrices have a unique steady state, 144 00:08:56,130 --> 00:09:00,300 but that is only true when there are no non-zero entries. 145 00:09:00,300 --> 00:09:01,290 But here, there are. 146 00:09:01,290 --> 00:09:05,620 So we can't guarantee that there's a unique steady state. 147 00:09:05,620 --> 00:09:08,190 What we can do is look at the eigenvalues 148 00:09:08,190 --> 00:09:10,840 and see if this is still true nonetheless. 149 00:09:10,840 --> 00:09:14,540 What are the eigenvalues of A-- of one half of A? 150 00:09:14,540 --> 00:09:22,130 Well, if you remember from part A, the eigenvalues of A 151 00:09:22,130 --> 00:09:27,350 were 1, 2, and -1. 152 00:09:27,350 --> 00:09:32,630 So the eigenvalues of one half of A-- taking a multiple 153 00:09:32,630 --> 00:09:36,330 does not change the eigenvector, but it changes the eigenvalue 154 00:09:36,330 --> 00:09:38,266 by the same multiple. 155 00:09:38,266 --> 00:09:45,690 It would be 1/2, 2 divided by 2 is 1, and minus 1/2. 156 00:09:45,690 --> 00:09:48,200 So here are the eigenvalues of A. 157 00:09:48,200 --> 00:09:50,380 And there's only one eigenvalue that 158 00:09:50,380 --> 00:09:52,950 has absolute value equal to 1. 159 00:09:52,950 --> 00:09:57,050 So you actually still get a unique steady state vector. 160 00:09:57,050 --> 00:09:59,050 So everything is fine. 161 00:09:59,050 --> 00:10:01,620 We can proceed as usual. 162 00:10:01,620 --> 00:10:06,590 And the usual procedure is you find the eigenvector 163 00:10:06,590 --> 00:10:09,930 corresponding to that eigenvalue, 1. 164 00:10:09,930 --> 00:10:13,380 And that will be the limit behavior 165 00:10:13,380 --> 00:10:16,590 as k goes to infinity of u_k. 166 00:10:16,590 --> 00:10:18,980 So what is the eigenvector corresponding to 1? 167 00:10:21,540 --> 00:10:22,040 Eigenvector. 168 00:10:27,020 --> 00:10:30,130 Well, you already know how to do this, 169 00:10:30,130 --> 00:10:32,420 so I will just write the solution. 170 00:10:32,420 --> 00:10:38,300 It is [1, 1, 1]. 171 00:10:38,300 --> 00:10:44,620 That means that u_k, as k goes to infinity, 172 00:10:44,620 --> 00:10:52,470 will converge to some appropriate multiple 173 00:10:52,470 --> 00:10:56,180 of this eigenvector [1, 1, 1]. 174 00:10:56,180 --> 00:10:58,700 How do you know which multiple to use? 175 00:10:58,700 --> 00:11:01,690 Well, as usual in Markov matrices, 176 00:11:01,690 --> 00:11:04,290 when you do an iteration of the process, 177 00:11:04,290 --> 00:11:08,370 when you do u_(k+1) is equal to one half of A times u_k, 178 00:11:08,370 --> 00:11:13,170 that does not change the sum of the entries of the vector u_k. 179 00:11:13,170 --> 00:11:17,110 So whatever the sum was here, it will still be the same here. 180 00:11:17,110 --> 00:11:19,220 If you go all the way back and you 181 00:11:19,220 --> 00:11:23,850 start with u_0, whatever the sum of the entries was here, 182 00:11:23,850 --> 00:11:28,970 that's what it will be all the way through u_1, u_2, u_3, 183 00:11:28,970 --> 00:11:32,930 and so on, all the way to the steady state, u_infinity. 184 00:11:32,930 --> 00:11:38,240 So whatever the multiple of [1, 1, 1], 185 00:11:38,240 --> 00:11:45,850 it has to have the sum of these entries add up to 3. 186 00:11:45,850 --> 00:11:48,490 Well, that's already there. 187 00:11:48,490 --> 00:11:51,282 We already happened to pick the correct eigenvector, 188 00:11:51,282 --> 00:11:52,365 so that's very convenient. 189 00:11:56,510 --> 00:12:01,930 The correct multiple is simply the vector [1, 1, 1]. 190 00:12:01,930 --> 00:12:06,460 So the limit behavior of u_k as k goes to infinity 191 00:12:06,460 --> 00:12:13,180 is u_infinity equal to [1, 1, 1]. 192 00:12:13,180 --> 00:12:14,540 We're done. 193 00:12:14,540 --> 00:12:16,350 Thank you.