1 00:00:00,500 --> 00:00:01,720 GILBERT STRANG: OK, thanks. 2 00:00:01,720 --> 00:00:08,290 Here's a second video that involves the matrix 3 00:00:08,290 --> 00:00:10,040 exponential. 4 00:00:10,040 --> 00:00:13,650 But it has a new idea in it, a basic new idea. 5 00:00:13,650 --> 00:00:19,860 And that idea is two matrices being called "similar." 6 00:00:19,860 --> 00:00:23,520 So that word "similar" has a specific meaning, 7 00:00:23,520 --> 00:00:27,820 that a matrix A, is similar to another matrix 8 00:00:27,820 --> 00:00:33,420 B, if B comes from A this way. 9 00:00:33,420 --> 00:00:35,480 Notice this way. 10 00:00:35,480 --> 00:00:40,290 It means there's some matrix M-- could be any invertible matrix. 11 00:00:40,290 --> 00:00:43,240 So that I take A, multiply on the right 12 00:00:43,240 --> 00:00:45,920 by M and on the left by M inverse. 13 00:00:45,920 --> 00:00:48,130 That'd probably give me a new matrix. 14 00:00:48,130 --> 00:00:53,320 Call it B. That matrix is called "similar" to B. 15 00:00:53,320 --> 00:00:57,720 I'll show you examples of matrices that are similar. 16 00:00:57,720 --> 00:01:02,570 But first is to get this definition in mind. 17 00:01:02,570 --> 00:01:06,450 So in general, a lot of matrices are 18 00:01:06,450 --> 00:01:13,810 similar to-- if I have a certain matrix A, I can take any M, 19 00:01:13,810 --> 00:01:16,860 and I'll get a similar matrix B. So there 20 00:01:16,860 --> 00:01:18,900 are lots of similar matrices. 21 00:01:18,900 --> 00:01:22,510 And the point is all those similar matrices 22 00:01:22,510 --> 00:01:24,420 have the same eigenvalues. 23 00:01:24,420 --> 00:01:26,500 So there's a little family of matrices 24 00:01:26,500 --> 00:01:29,920 there, all similar to each other and all 25 00:01:29,920 --> 00:01:31,610 with the same eigenvalues. 26 00:01:31,610 --> 00:01:34,570 Why do they have the same eigenvalues? 27 00:01:34,570 --> 00:01:37,430 I'll just show you, one line. 28 00:01:37,430 --> 00:01:42,360 Suppose B has an eigenvalue of lambda. 29 00:01:42,360 --> 00:01:45,800 So B is M inverse AM. 30 00:01:45,800 --> 00:01:46,720 So I have this. 31 00:01:46,720 --> 00:01:49,560 M inverse AMx is lambda x. 32 00:01:49,560 --> 00:01:51,634 That's Bx. 33 00:01:51,634 --> 00:01:53,520 B has an eigenvalue of lambda. 34 00:01:53,520 --> 00:01:56,970 I want to show that A has an eigenvalue of lambda. 35 00:01:56,970 --> 00:01:57,590 OK. 36 00:01:57,590 --> 00:01:59,560 So I look at this. 37 00:01:59,560 --> 00:02:05,600 I multiply both sides by M. That cancels this. 38 00:02:05,600 --> 00:02:10,440 So when I multiply by M, this is gone, and I have AMx. 39 00:02:10,440 --> 00:02:12,890 But the M shows up on the right-hand side, 40 00:02:12,890 --> 00:02:14,120 I have lambda Mx. 41 00:02:17,100 --> 00:02:20,300 Now I would just look at that, and I say, yes. 42 00:02:20,300 --> 00:02:28,370 A has an eigenvector-- Mx with eigenvalue lambda. 43 00:02:28,370 --> 00:02:33,770 A times that vector is lambda times that vector. 44 00:02:33,770 --> 00:02:39,440 So lambda is an eigenvalue of A. It has a different eigenvector, 45 00:02:39,440 --> 00:02:40,620 of course. 46 00:02:40,620 --> 00:02:43,060 If matrices have the same eigenvalues 47 00:02:43,060 --> 00:02:47,100 and the same eigenvectors, that's the same matrix. 48 00:02:47,100 --> 00:02:51,920 But if I do this, allow an M matrix 49 00:02:51,920 --> 00:02:56,310 to get in there, that changes the eigenvectors. 50 00:02:56,310 --> 00:02:59,630 Here they were originally x for B. 51 00:02:59,630 --> 00:03:02,350 And now for A, they're M times x. 52 00:03:02,350 --> 00:03:06,930 It does not change the eigenvalues because of this M 53 00:03:06,930 --> 00:03:10,320 on both sides allowed me to bring M over 54 00:03:10,320 --> 00:03:13,175 to the right-hand side and make that work. 55 00:03:13,175 --> 00:03:13,675 OK. 56 00:03:16,310 --> 00:03:18,980 Here are some similar matrices. 57 00:03:18,980 --> 00:03:20,570 Let me take some. 58 00:03:20,570 --> 00:03:23,335 So these will be all similar. 59 00:03:26,930 --> 00:03:31,200 Say 2, 3, 0, 4. 60 00:03:31,200 --> 00:03:31,870 OK? 61 00:03:31,870 --> 00:03:36,580 That's a matrix A. I can see its eigenvalues are 2 and 4. 62 00:03:36,580 --> 00:03:43,170 Well, I know that it will be similar to the diagonal matrix. 63 00:03:43,170 --> 00:03:47,800 So there is some matrix M that connects this one 64 00:03:47,800 --> 00:03:52,050 with this one, connects this A with that B. Well, 65 00:03:52,050 --> 00:03:56,660 that B is really capital lambda. 66 00:03:56,660 --> 00:03:59,440 And we know what matrix connects the original A 67 00:03:59,440 --> 00:04:04,020 to its eigenvalue matrix. 68 00:04:04,020 --> 00:04:05,820 What is the M that does that? 69 00:04:05,820 --> 00:04:08,110 It's the eigenvector matrix. 70 00:04:08,110 --> 00:04:12,140 So to get this particular-- to get this guy, 71 00:04:12,140 --> 00:04:18,450 starting from here, I use M is V for this example 72 00:04:18,450 --> 00:04:21,220 to produce that. 73 00:04:21,220 --> 00:04:23,540 Then B is lambda. 74 00:04:23,540 --> 00:04:25,820 But there are other possibilities. 75 00:04:25,820 --> 00:04:27,520 So let me see. 76 00:04:27,520 --> 00:04:33,230 I think probably a matrix is-- there 77 00:04:33,230 --> 00:04:34,645 is the matrix, A transpose. 78 00:04:37,190 --> 00:04:39,170 Is that similar to A? 79 00:04:39,170 --> 00:04:41,030 Is A transpose similar to A? 80 00:04:41,030 --> 00:04:43,610 Well, answer-- yes. 81 00:04:43,610 --> 00:04:48,720 The transpose matrix has those same eigenvalues, 2 and 4, 82 00:04:48,720 --> 00:04:51,850 and different eigenvectors. 83 00:04:51,850 --> 00:04:58,600 And those eigenvectors would connect the original A 84 00:04:58,600 --> 00:05:02,610 and this A or that A transpose. 85 00:05:02,610 --> 00:05:06,040 So the transpose of a matrix is similar to the matrix. 86 00:05:06,040 --> 00:05:09,470 What about if I change the order? 87 00:05:09,470 --> 00:05:11,660 4, 0, 0, 2. 88 00:05:14,240 --> 00:05:18,084 So I've just flipped the 2 and the 4, 89 00:05:18,084 --> 00:05:20,083 but of course I haven't changed the eigenvalues. 90 00:05:22,700 --> 00:05:25,620 You could find the M that does that. 91 00:05:25,620 --> 00:05:29,180 You can find an M so that if I multiply on the right 92 00:05:29,180 --> 00:05:32,900 by M and on the left by M inverse, it flips those. 93 00:05:32,900 --> 00:05:35,060 So there's another matrix similar. 94 00:05:35,060 --> 00:05:37,270 Oh, there could be plenty more. 95 00:05:37,270 --> 00:05:41,580 All I want to do is have the eigenvalues be 4 and 2. 96 00:05:41,580 --> 00:05:43,700 Shall I just create some more? 97 00:05:43,700 --> 00:05:46,930 Here is a 0, 6. 98 00:05:46,930 --> 00:05:49,280 I wanted to get the trace right. 99 00:05:49,280 --> 00:05:52,210 4 plus 2 matches 0 plus 6. 100 00:05:52,210 --> 00:05:54,000 Now I have to get the determinant right. 101 00:05:54,000 --> 00:05:56,700 That has a determinant of 8. 102 00:05:56,700 --> 00:06:01,440 What about a 2 and a minus 4 there? 103 00:06:01,440 --> 00:06:04,430 I think I've got the trace correct-- 6. 104 00:06:04,430 --> 00:06:07,260 And I've got the determinant correct-- 8. 105 00:06:07,260 --> 00:06:08,890 And there the determinant is 8. 106 00:06:08,890 --> 00:06:10,620 So that would be a similar matrix. 107 00:06:10,620 --> 00:06:12,180 All similar matrices. 108 00:06:12,180 --> 00:06:17,610 A family of similar matrices with the eigenvalues 4 and 2. 109 00:06:17,610 --> 00:06:25,200 So I want to do another example of similar matrices. 110 00:06:25,200 --> 00:06:27,130 What will be different in this example 111 00:06:27,130 --> 00:06:29,900 is there'll be missing eigenvectors. 112 00:06:29,900 --> 00:06:36,060 So let me say, 2, 2, 0, 1. 113 00:06:36,060 --> 00:06:44,770 So that has eigenvalues 2 and 2 but only one eigenvector. 114 00:06:44,770 --> 00:06:48,940 Here is another matrix like that. 115 00:06:48,940 --> 00:06:52,420 Say, so the trace should be 4. 116 00:06:52,420 --> 00:06:54,660 The determinant should be 4. 117 00:06:54,660 --> 00:06:58,360 So maybe I put a 2 and a minus 2 there. 118 00:06:58,360 --> 00:07:01,510 I think that has the correct trace, 4, 119 00:07:01,510 --> 00:07:04,540 and the great determinant, also 4. 120 00:07:04,540 --> 00:07:11,260 So that will have eigenvalues 2 and 2 and only one eigenvector, 121 00:07:11,260 --> 00:07:12,560 so it's similar to this. 122 00:07:12,560 --> 00:07:14,250 Now here's the point. 123 00:07:14,250 --> 00:07:21,580 You might say, what about 2, 2, 0, 0. 124 00:07:21,580 --> 00:07:24,490 That has the correct eigenvalues, 125 00:07:24,490 --> 00:07:26,050 but it's not similar. 126 00:07:26,050 --> 00:07:31,040 There's no matrix M that connects that diagonal matrix 127 00:07:31,040 --> 00:07:34,250 with these other matrices. 128 00:07:34,250 --> 00:07:37,610 That matrix has no missing eigenvectors. 129 00:07:37,610 --> 00:07:40,770 These matrices have one missing eigenvector. 130 00:07:40,770 --> 00:07:43,380 What's called the Jordan form. 131 00:07:43,380 --> 00:07:44,860 The Jordan form. 132 00:07:48,110 --> 00:07:51,130 So that didn't belong. 133 00:07:51,130 --> 00:07:52,840 That's not in that family. 134 00:07:52,840 --> 00:07:58,620 The Jordan form is-- you could say-- well, 135 00:07:58,620 --> 00:08:01,070 that'll be the Jordan form. 136 00:08:01,070 --> 00:08:06,330 The most beautiful member of the family is the Jordan form. 137 00:08:06,330 --> 00:08:09,210 So I have a whole lot of matrices that are similar. 138 00:08:09,210 --> 00:08:12,960 That is the most beautiful, but it's not in the family. 139 00:08:12,960 --> 00:08:19,480 It's related but not in the family. 140 00:08:19,480 --> 00:08:21,470 It's not similar to those. 141 00:08:21,470 --> 00:08:23,210 And the best one would be this one. 142 00:08:23,210 --> 00:08:28,850 So the Jordan form would be that one with the eigenvalues 143 00:08:28,850 --> 00:08:30,920 on the diagonal. 144 00:08:30,920 --> 00:08:33,789 But because there's a missing eigenvector, 145 00:08:33,789 --> 00:08:36,429 there has to be a reason for that. 146 00:08:36,429 --> 00:08:40,820 And it's in the 1 there, and I can't have a 0 there. 147 00:08:40,820 --> 00:08:41,700 OK. 148 00:08:41,700 --> 00:08:44,860 So that's the idea of similar matrices. 149 00:08:44,860 --> 00:08:51,120 And now I do have one more important note, a caution 150 00:08:51,120 --> 00:08:54,180 about matrix exponentials. 151 00:08:54,180 --> 00:08:58,065 Can I just tell you this caution, this caution? 152 00:09:03,240 --> 00:09:08,340 If I look at e to the A times e to the B. 153 00:09:08,340 --> 00:09:11,920 The exponential of A times the exponential of B. 154 00:09:11,920 --> 00:09:22,130 My caution is that usually that is not e to the B, e to the A. 155 00:09:22,130 --> 00:09:24,890 If I put B and A in the opposite order, 156 00:09:24,890 --> 00:09:26,120 I get something different. 157 00:09:26,120 --> 00:09:32,780 And it's also not e to the A plus B. 158 00:09:32,780 --> 00:09:35,900 Those are all different. 159 00:09:35,900 --> 00:09:40,550 Which, if I had 1 by 1, just numbers here, of course, 160 00:09:40,550 --> 00:09:43,310 that's the great rule for exponentials. 161 00:09:43,310 --> 00:09:49,580 But for matrix exponentials, that rule doesn't work. 162 00:09:49,580 --> 00:09:53,480 That is not the same as e to the A plus B. 163 00:09:53,480 --> 00:09:55,380 And I can show you why. 164 00:09:55,380 --> 00:10:03,760 e to the A is I plus A plus 1/2 A squared and so on. 165 00:10:03,760 --> 00:10:10,790 e to the B is I plus B plus 1/2 B squared and so on. 166 00:10:10,790 --> 00:10:13,130 And I do that multiplication. 167 00:10:13,130 --> 00:10:22,100 And I get I. And I get an A. And I get a B times I. 168 00:10:22,100 --> 00:10:30,200 And now I get 1/2 B squared and an AB and 1/2 A squared. 169 00:10:30,200 --> 00:10:31,690 Can I put those down? 170 00:10:31,690 --> 00:10:36,680 1/2 A squared, and there's an A times a B. 171 00:10:36,680 --> 00:10:40,420 And there's a 1/2 B squared. 172 00:10:40,420 --> 00:10:42,210 OK. 173 00:10:42,210 --> 00:10:43,780 This makes the point. 174 00:10:43,780 --> 00:10:47,370 If I multiply the exponentials in this order, 175 00:10:47,370 --> 00:10:52,100 I get A times B. What if I multiply them 176 00:10:52,100 --> 00:10:54,960 in the other order, in that order? 177 00:10:54,960 --> 00:10:57,200 If I multiply e to the B times e to the A, 178 00:10:57,200 --> 00:11:01,500 then the B's will be out in front of the A's. 179 00:11:01,500 --> 00:11:08,190 And this would become a BA, which can be different. 180 00:11:08,190 --> 00:11:12,880 So already I see that the two are different. 181 00:11:12,880 --> 00:11:15,545 Here is e to the A, e to the B. It 182 00:11:15,545 --> 00:11:19,450 has A before B. If I do it this way, 183 00:11:19,450 --> 00:11:22,755 it'll have B before A. If I do it this way, 184 00:11:22,755 --> 00:11:23,630 it'll have a mixture. 185 00:11:29,210 --> 00:11:34,900 So e to the A plus B will have a I and an A 186 00:11:34,900 --> 00:11:40,050 and a B and a 1/2 A plus B squared. 187 00:11:40,050 --> 00:11:47,120 So that'll be 1/2 of A squared plus AB plus BA plus B squared. 188 00:11:50,260 --> 00:11:51,680 Different again. 189 00:11:51,680 --> 00:11:57,860 Now I have a sort of symmetric mixture of A and B. 190 00:11:57,860 --> 00:12:01,420 In this case, I had A before B. In this case, 191 00:12:01,420 --> 00:12:04,700 I had B on the left side of A. 192 00:12:04,700 --> 00:12:06,490 So all three of those are different, 193 00:12:06,490 --> 00:12:11,140 even in this term of the series that 194 00:12:11,140 --> 00:12:13,600 defines those exponentials. 195 00:12:13,600 --> 00:12:20,050 And that means that systems of equations, 196 00:12:20,050 --> 00:12:28,140 if the coefficients change over time, are definitely harder. 197 00:12:28,140 --> 00:12:33,520 We were able to solve dy dt equals, say, 198 00:12:33,520 --> 00:12:38,520 cosine of t times y. 199 00:12:38,520 --> 00:12:44,020 Do you remember how-- that this was solvable for a 1 by 1. 200 00:12:44,020 --> 00:12:49,450 We put the exponent-- the solution was y 201 00:12:49,450 --> 00:12:52,900 is e to the-- we integrated cosine t 202 00:12:52,900 --> 00:12:58,690 and got sine t times y of 0. 203 00:13:01,280 --> 00:13:04,340 e to the sine t-- 204 00:13:04,340 --> 00:13:06,590 Can I just think of putting that into the differential 205 00:13:06,590 --> 00:13:08,290 equation-- its derivative. 206 00:13:08,290 --> 00:13:13,720 The derivative of e to the sine t will be e to the sine t. 207 00:13:13,720 --> 00:13:15,590 I'm using the chain rule. 208 00:13:15,590 --> 00:13:19,430 The derivative of e to the sine t will be e to the sine t 209 00:13:19,430 --> 00:13:25,040 again, times the derivative of sine t, which is cos t, 210 00:13:25,040 --> 00:13:26,590 so it works. 211 00:13:26,590 --> 00:13:29,500 That's fine as a solution. 212 00:13:29,500 --> 00:13:34,000 But if I have matrices here-- if I have matrices, 213 00:13:34,000 --> 00:13:37,980 then the whole thing goes wrong. 214 00:13:37,980 --> 00:13:40,290 You could say that the chain rule goes wrong. 215 00:13:43,490 --> 00:13:47,590 You can't put the integral up there 216 00:13:47,590 --> 00:13:52,530 and then take the derivative and expect it to come back down. 217 00:13:52,530 --> 00:13:56,670 The chain rule will not work for matrix exponentials, 218 00:13:56,670 --> 00:13:58,180 the simple chain rule. 219 00:13:58,180 --> 00:14:01,380 And the fact is that we don't have 220 00:14:01,380 --> 00:14:06,640 nice formulas for the solutions to linear systems 221 00:14:06,640 --> 00:14:10,610 with time-varying coefficients. 222 00:14:10,610 --> 00:14:15,600 That has become a harder problem when we went from one equation 223 00:14:15,600 --> 00:14:18,010 to a system of an equation. 224 00:14:18,010 --> 00:14:25,770 So this is the caution slide about matrix exponentials. 225 00:14:25,770 --> 00:14:27,530 They're beautiful. 226 00:14:27,530 --> 00:14:31,120 They work perfectly if you just have one matrix A. 227 00:14:31,120 --> 00:14:33,670 But if somehow two matrices are in there 228 00:14:33,670 --> 00:14:36,250 or a bunch of different matrices, 229 00:14:36,250 --> 00:14:43,880 then you lose the good rules, and you lose the solution. 230 00:14:43,880 --> 00:14:44,380 OK. 231 00:14:44,380 --> 00:14:46,190 Thank you.