1 00:00:00,500 --> 00:00:01,730 GILBERT STRANG: OK. 2 00:00:01,730 --> 00:00:07,780 So this is a "prepare the way" video about symmetric matrices 3 00:00:07,780 --> 00:00:11,000 and complex matrices. 4 00:00:11,000 --> 00:00:16,850 We'll see symmetric matrices in second order systems 5 00:00:16,850 --> 00:00:18,580 of differential equations. 6 00:00:18,580 --> 00:00:21,410 Symmetric matrices are the best. 7 00:00:21,410 --> 00:00:23,440 They have special properties, and we 8 00:00:23,440 --> 00:00:28,700 want to see what are the special properties of the eigenvalues 9 00:00:28,700 --> 00:00:29,920 and the eigenvectors? 10 00:00:29,920 --> 00:00:32,540 And I guess the title of this lecture 11 00:00:32,540 --> 00:00:34,630 tells you what those properties are. 12 00:00:34,630 --> 00:00:36,860 So if a matrix is symmetric-- and I'll 13 00:00:36,860 --> 00:00:40,670 use capital S for a symmetric matrix-- 14 00:00:40,670 --> 00:00:44,730 the first point is the eigenvalues are real, 15 00:00:44,730 --> 00:00:46,330 which is not automatic. 16 00:00:46,330 --> 00:00:49,490 But it's always true if the matrix is symmetric. 17 00:00:49,490 --> 00:00:52,210 And the second, even more special point 18 00:00:52,210 --> 00:00:56,890 is that the eigenvectors are perpendicular to each other. 19 00:00:56,890 --> 00:00:59,600 Different eigenvectors for different eigenvalues 20 00:00:59,600 --> 00:01:01,360 come out perpendicular. 21 00:01:01,360 --> 00:01:03,290 Those are beautiful properties. 22 00:01:03,290 --> 00:01:04,030 They pay off. 23 00:01:07,400 --> 00:01:11,070 So that's the symmetric matrix, and that's what I just said. 24 00:01:11,070 --> 00:01:13,980 Real lambda, orthogonal x. 25 00:01:13,980 --> 00:01:17,990 Also, we could look at antisymmetric matrices. 26 00:01:17,990 --> 00:01:21,010 The transpose is minus the matrix. 27 00:01:21,010 --> 00:01:24,140 In that case, we don't have real eigenvalues. 28 00:01:24,140 --> 00:01:28,770 In fact, we are sure to have pure, imaginary eigenvalues. 29 00:01:28,770 --> 00:01:33,770 I times something on the imaginary axis. 30 00:01:33,770 --> 00:01:38,060 But again, the eigenvectors will be orthogonal. 31 00:01:38,060 --> 00:01:42,810 However, they will also be complex. 32 00:01:42,810 --> 00:01:47,720 When we have antisymmetric matrices, 33 00:01:47,720 --> 00:01:49,480 we get into complex numbers. 34 00:01:49,480 --> 00:01:52,810 Can't help it, even if the matrix is real. 35 00:01:52,810 --> 00:01:59,110 And then finally is the family of orthogonal matrices. 36 00:01:59,110 --> 00:02:04,460 And those matrices have eigenvalues of size 1, 37 00:02:04,460 --> 00:02:06,280 possibly complex. 38 00:02:06,280 --> 00:02:09,180 But the magnitude of the number is 1. 39 00:02:09,180 --> 00:02:12,050 And again, the eigenvectors are orthogonal. 40 00:02:12,050 --> 00:02:19,280 This is the great family of real, imaginary, and unit 41 00:02:19,280 --> 00:02:22,300 circle for the eigenvalues. 42 00:02:22,300 --> 00:02:23,230 OK. 43 00:02:23,230 --> 00:02:25,440 I want to do examples. 44 00:02:25,440 --> 00:02:27,620 So I'll just have an example of every one. 45 00:02:30,590 --> 00:02:33,350 So there's a symmetric matrix. 46 00:02:33,350 --> 00:02:36,610 There's a antisymmetric matrix. 47 00:02:36,610 --> 00:02:40,130 If I transpose it, it changes sign. 48 00:02:40,130 --> 00:02:45,420 Here is a combination, not symmetric, not antisymmetric, 49 00:02:45,420 --> 00:02:47,150 but still a good matrix. 50 00:02:47,150 --> 00:02:52,680 And there is an orthogonal matrix, orthogonal columns. 51 00:02:52,680 --> 00:02:55,560 And those columns have length 1. 52 00:02:55,560 --> 00:02:59,160 That's why I've got the square root of 2 in there. 53 00:02:59,160 --> 00:03:03,170 So these are the special matrices here. 54 00:03:03,170 --> 00:03:06,830 Can I just draw a little picture of the complex plane? 55 00:03:06,830 --> 00:03:09,340 There is the real axis. 56 00:03:09,340 --> 00:03:10,965 Here is the imaginary axis. 57 00:03:13,660 --> 00:03:22,900 And here's the unit circle, not greatly circular but close. 58 00:03:22,900 --> 00:03:28,810 Now-- eigenvalues are on the real axis 59 00:03:28,810 --> 00:03:34,180 when S transpose equals S. They're on the imaginary axis 60 00:03:34,180 --> 00:03:40,420 when A transpose equals minus A. And they're on the unit circle 61 00:03:40,420 --> 00:03:44,980 when Q transpose Q is the identity. 62 00:03:44,980 --> 00:03:48,450 Q transpose is Q inverse in this case. 63 00:03:48,450 --> 00:03:50,590 Q transpose is Q inverse. 64 00:03:50,590 --> 00:03:52,630 Here the transpose is the matrix. 65 00:03:52,630 --> 00:03:54,920 Here the transpose is minus the matrix. 66 00:03:54,920 --> 00:03:56,790 And you see the beautiful picture 67 00:03:56,790 --> 00:04:00,100 of eigenvalues, where they are. 68 00:04:00,100 --> 00:04:04,400 And the eigenvectors for all of those are orthogonal. 69 00:04:04,400 --> 00:04:05,960 Let me find them. 70 00:04:05,960 --> 00:04:13,500 Here that symmetric matrix has lambda as 2 and 4. 71 00:04:13,500 --> 00:04:15,700 The trace is 6. 72 00:04:15,700 --> 00:04:17,329 The determinant is 8. 73 00:04:17,329 --> 00:04:18,769 That's the right answer. 74 00:04:18,769 --> 00:04:20,680 Lambda equal 2 and 4. 75 00:04:20,680 --> 00:04:28,130 And x would be 1 and minus 1 for 2. 76 00:04:28,130 --> 00:04:32,940 And for 4, it's 1 and 1. 77 00:04:32,940 --> 00:04:35,300 Orthogonal. 78 00:04:35,300 --> 00:04:39,520 Orthogonal eigenvectors-- take the dot product of those, 79 00:04:39,520 --> 00:04:42,520 you get 0 and real eigenvalues. 80 00:04:42,520 --> 00:04:43,920 What about A? 81 00:04:46,530 --> 00:04:49,080 Antisymmetric. 82 00:04:49,080 --> 00:04:55,355 The equation I-- when I do determinant of lambda minus A, 83 00:04:55,355 --> 00:05:00,930 I get lambda squared plus 1 equals 0 for this one. 84 00:05:00,930 --> 00:05:04,730 That leads me to lambda squared plus 1 equals 0. 85 00:05:04,730 --> 00:05:11,260 So that gives me lambda is i and minus i, as promised, 86 00:05:11,260 --> 00:05:14,140 on the imaginary axis. 87 00:05:14,140 --> 00:05:18,460 And I guess that that matrix is also an orthogonal matrix. 88 00:05:18,460 --> 00:05:21,090 And those eigenvalues, i and minus i, 89 00:05:21,090 --> 00:05:23,320 are also on the circle. 90 00:05:23,320 --> 00:05:26,730 So that A is also a Q. OK. 91 00:05:26,730 --> 00:05:29,780 What are the eigenvectors for that? 92 00:05:29,780 --> 00:05:32,030 I think that the eigenvectors turn out 93 00:05:32,030 --> 00:05:36,370 to be 1 i and 1 minus i. 94 00:05:39,940 --> 00:05:41,050 Oh. 95 00:05:41,050 --> 00:05:42,700 Those are orthogonal. 96 00:05:42,700 --> 00:05:45,970 I'll have to tell you about orthogonality 97 00:05:45,970 --> 00:05:48,210 for complex vectors. 98 00:05:48,210 --> 00:05:50,630 Let me complete these examples. 99 00:05:50,630 --> 00:05:53,470 What about the eigenvalues of this one? 100 00:05:53,470 --> 00:05:55,880 Well, that's an easy one. 101 00:05:55,880 --> 00:06:00,060 Can you connect that to A? 102 00:06:00,060 --> 00:06:04,570 B is just A plus 3 times the identity-- 103 00:06:04,570 --> 00:06:06,670 to put 3's on the diagonal. 104 00:06:06,670 --> 00:06:09,500 So I'm expecting here the lambdas 105 00:06:09,500 --> 00:06:13,340 are-- if here they were i and minus i. 106 00:06:13,340 --> 00:06:17,460 All I've done is add 3 times the identity, so I'm just adding 3. 107 00:06:17,460 --> 00:06:19,270 I'm shifting by 3. 108 00:06:19,270 --> 00:06:23,560 I'll have 3 plus i and 3 minus i. 109 00:06:23,560 --> 00:06:24,960 And the same eigenvectors. 110 00:06:29,380 --> 00:06:32,210 So that's a complex number. 111 00:06:32,210 --> 00:06:37,020 That matrix was not perfectly antisymmetric. 112 00:06:37,020 --> 00:06:39,250 It's not perfectly symmetric. 113 00:06:39,250 --> 00:06:43,850 So that gave me a 3 plus i somewhere not on the axis 114 00:06:43,850 --> 00:06:45,750 or that axis or the circle. 115 00:06:45,750 --> 00:06:49,660 Out there-- 3 plus i and 3 minus i. 116 00:06:49,660 --> 00:06:55,860 And finally, this one, the orthogonal matrix. 117 00:06:55,860 --> 00:06:57,425 What are the eigenvalues of that? 118 00:07:01,320 --> 00:07:02,650 Let's see. 119 00:07:02,650 --> 00:07:06,830 I can see-- here I've added 1 times the identity, just added 120 00:07:06,830 --> 00:07:11,140 the identity to minus 1, 1. 121 00:07:11,140 --> 00:07:14,990 So again, I have this minus 1, 1 plus the identity. 122 00:07:14,990 --> 00:07:24,430 So I would have 1 plus i and 1 minus i from the matrix. 123 00:07:24,430 --> 00:07:28,330 And now I've got a division by square root of 2, 124 00:07:28,330 --> 00:07:31,730 square root of 2. 125 00:07:31,730 --> 00:07:36,560 And those numbers lambda-- you recognize 126 00:07:36,560 --> 00:07:42,150 that when you see that number, that is on the unit circle. 127 00:07:42,150 --> 00:07:43,770 Where is it on the unit circle? 128 00:07:43,770 --> 00:07:45,440 1 plus i. 129 00:07:45,440 --> 00:07:48,440 1 plus i over square root of 2. 130 00:07:48,440 --> 00:07:50,540 Square root of 2 brings it down there. 131 00:07:50,540 --> 00:07:51,740 There's 1. 132 00:07:51,740 --> 00:07:53,230 There's i. 133 00:07:53,230 --> 00:07:54,770 Divide by square root of 2. 134 00:07:54,770 --> 00:07:56,560 That puts us on the circle. 135 00:07:56,560 --> 00:08:00,960 That's 1 plus i over square root of 2. 136 00:08:00,960 --> 00:08:08,950 And here is 1 plus i, 1 minus i over square root of two. 137 00:08:08,950 --> 00:08:09,775 Complex conjugates. 138 00:08:13,950 --> 00:08:16,990 When I say "complex conjugate," that means 139 00:08:16,990 --> 00:08:21,300 I change every i to a minus i. 140 00:08:21,300 --> 00:08:23,750 I flip across the real axis. 141 00:08:23,750 --> 00:08:25,500 I'd want to do that in a minute. 142 00:08:25,500 --> 00:08:29,000 So are there more lessons to see for these examples? 143 00:08:29,000 --> 00:08:33,559 Again, real eigenvalues and real eigenvectors-- no problem. 144 00:08:33,559 --> 00:08:36,340 Here, imaginary eigenvalues. 145 00:08:36,340 --> 00:08:38,510 Here, complex eigenvalues. 146 00:08:38,510 --> 00:08:42,350 Here, complex eigenvalues on the circle. 147 00:08:42,350 --> 00:08:43,730 On the circle. 148 00:08:43,730 --> 00:08:44,760 OK. 149 00:08:44,760 --> 00:08:48,970 And each of those facts that I just 150 00:08:48,970 --> 00:08:52,470 said about the location of the eigenvalues-- 151 00:08:52,470 --> 00:08:57,000 it has a short proof, but maybe I won't give the proof here. 152 00:08:57,000 --> 00:08:59,890 It's the fact that you want to remember. 153 00:08:59,890 --> 00:09:03,910 Can I bring down again, just for a moment, these main facts? 154 00:09:03,910 --> 00:09:08,210 Real, from symmetric-- imaginary, 155 00:09:08,210 --> 00:09:14,810 from antisymmetric-- magnitude 1, from orthogonal. 156 00:09:14,810 --> 00:09:15,520 OK. 157 00:09:15,520 --> 00:09:20,620 Now I feel I've talking about complex numbers, 158 00:09:20,620 --> 00:09:27,850 and I really should say-- I should pay attention to that. 159 00:09:27,850 --> 00:09:29,530 Complex numbers. 160 00:09:29,530 --> 00:09:32,950 So I have lambda as a plus ib. 161 00:09:35,690 --> 00:09:38,630 What do I mean by the "magnitude" of that number? 162 00:09:38,630 --> 00:09:41,810 What's the magnitude of lambda is a plus ib? 163 00:09:41,810 --> 00:09:47,600 Again, I go along a, up b. 164 00:09:47,600 --> 00:09:54,770 Here is the lambda, the complex number. 165 00:09:54,770 --> 00:09:56,630 And I want to know the length of that. 166 00:09:56,630 --> 00:09:59,250 Well, everybody knows the length of that. 167 00:09:59,250 --> 00:10:04,310 Thank goodness Pythagoras lived, or his team lived. 168 00:10:04,310 --> 00:10:07,890 It's the square root of a squared plus b squared. 169 00:10:11,080 --> 00:10:19,060 And notice what that-- how do I get that number from this one? 170 00:10:19,060 --> 00:10:20,510 It's important. 171 00:10:20,510 --> 00:10:25,110 If I multiply a plus ib times a minus 172 00:10:25,110 --> 00:10:32,180 ib-- so I have lambda-- that's a plus ib-- times lambda 173 00:10:32,180 --> 00:10:37,040 conjugate-- that's a minus ib-- if I multiply those, that gives 174 00:10:37,040 --> 00:10:38,520 me a squared plus b squared. 175 00:10:38,520 --> 00:10:41,030 So I take the square root, and this 176 00:10:41,030 --> 00:10:45,020 is what I would call the "magnitude" of lambda. 177 00:10:45,020 --> 00:10:50,080 So the magnitude of a number is that positive length. 178 00:10:50,080 --> 00:10:52,890 And it can be found-- you take the complex number 179 00:10:52,890 --> 00:10:54,940 times its conjugate. 180 00:10:54,940 --> 00:10:58,010 That gives you a squared plus b squared, and then 181 00:10:58,010 --> 00:11:00,410 take the square root. 182 00:11:00,410 --> 00:11:02,700 Basic facts about complex numbers. 183 00:11:02,700 --> 00:11:03,200 OK. 184 00:11:03,200 --> 00:11:05,970 What about complex vectors? 185 00:11:05,970 --> 00:11:08,220 What is the dot product? 186 00:11:08,220 --> 00:11:11,710 What is the correct x transpose x? 187 00:11:11,710 --> 00:11:13,850 Well, it's not x transpose x. 188 00:11:13,850 --> 00:11:23,280 Suppose x is the vector 1 i, as we saw that as an eigenvector. 189 00:11:23,280 --> 00:11:25,750 What's the length of that vector? 190 00:11:25,750 --> 00:11:30,850 The length of that vector is not 1 squared plus i squared. 191 00:11:30,850 --> 00:11:36,000 1 squared plus i squared would be 1 plus minus 1 would be 0. 192 00:11:36,000 --> 00:11:40,390 The length of that vector is the size of this squared 193 00:11:40,390 --> 00:11:45,330 plus the size of this squared, square root. 194 00:11:45,330 --> 00:11:46,220 Here we go. 195 00:11:46,220 --> 00:11:51,920 The length of x squared-- the length of the vector squared-- 196 00:11:51,920 --> 00:11:54,565 will be the vector. 197 00:11:57,330 --> 00:12:04,850 As always, I can find it from a dot product. 198 00:12:04,850 --> 00:12:11,802 But I have to take the conjugate of that. 199 00:12:11,802 --> 00:12:14,440 If I want the length of x, I have 200 00:12:14,440 --> 00:12:18,722 to take-- I would usually take x transpose x, right? 201 00:12:18,722 --> 00:12:23,780 If I have a real vector x, then I find its dot product 202 00:12:23,780 --> 00:12:26,170 with itself, and Pythagoras tells me 203 00:12:26,170 --> 00:12:27,740 I have the length squared. 204 00:12:27,740 --> 00:12:32,840 But if the things are complex-- I want minus i times i. 205 00:12:32,840 --> 00:12:37,320 I want to get lambda times lambda bar. 206 00:12:37,320 --> 00:12:40,870 I want to get a positive number. 207 00:12:40,870 --> 00:12:44,200 Minus i times i is plus 1. 208 00:12:44,200 --> 00:12:47,520 Minus i times i is plus 1. 209 00:12:47,520 --> 00:12:49,970 So I must, must do that. 210 00:12:52,570 --> 00:12:55,030 So that's really what "orthogonal" would mean. 211 00:12:59,290 --> 00:13:03,280 "Orthogonal complex vectors" mean-- 212 00:13:03,280 --> 00:13:13,140 "orthogonal vectors" mean that x conjugate transpose y is 0. 213 00:13:13,140 --> 00:13:18,780 That's what I mean by "orthogonal eigenvectors" 214 00:13:18,780 --> 00:13:20,830 when those eigenvectors are complex. 215 00:13:20,830 --> 00:13:24,100 I must remember to take the complex conjugate. 216 00:13:24,100 --> 00:13:26,830 And I also do it for matrices. 217 00:13:26,830 --> 00:13:30,815 So if I have a symmetric matrix-- S transpose S. 218 00:13:30,815 --> 00:13:31,925 I know what that means. 219 00:13:35,630 --> 00:13:38,280 But suppose S is complex. 220 00:13:38,280 --> 00:13:39,780 Suppose S is complex. 221 00:13:39,780 --> 00:13:48,400 Then for a complex matrix, I would look at S bar transpose 222 00:13:48,400 --> 00:13:52,100 equal S. 223 00:13:52,100 --> 00:13:55,990 Every time I transpose, if I have complex numbers, 224 00:13:55,990 --> 00:13:57,820 I should take the complex conjugate. 225 00:13:57,820 --> 00:13:59,930 MATLAB does that automatically. 226 00:13:59,930 --> 00:14:07,920 If you ask for x prime, it will produce-- not just 227 00:14:07,920 --> 00:14:11,460 it'll change a column to a row with that transpose, 228 00:14:11,460 --> 00:14:12,870 that prime. 229 00:14:12,870 --> 00:14:15,800 And it will take the complex conjugate. 230 00:14:15,800 --> 00:14:18,731 So we must remember always to do that. 231 00:14:18,731 --> 00:14:19,230 Yeah. 232 00:14:19,230 --> 00:14:24,210 And in fact, if S was a complex matrix 233 00:14:24,210 --> 00:14:28,440 but it had that property-- let me give an example. 234 00:14:28,440 --> 00:14:32,740 So here's an S, an example of that. 235 00:14:32,740 --> 00:14:38,500 1, 2, i, and minus i. 236 00:14:38,500 --> 00:14:41,020 So I have a complex matrix. 237 00:14:41,020 --> 00:14:45,340 And if I transpose it and take complex conjugates, 238 00:14:45,340 --> 00:14:49,390 that brings me back to S. And this 239 00:14:49,390 --> 00:15:00,860 is called a "Hermitian matrix" among other possible names. 240 00:15:00,860 --> 00:15:04,340 Hermite was a important mathematician. 241 00:15:04,340 --> 00:15:08,490 He studied this complex case, and he 242 00:15:08,490 --> 00:15:14,020 understood to take the conjugate as well as the transpose. 243 00:15:14,020 --> 00:15:19,730 And sometimes I would write it as SH in his honor. 244 00:15:19,730 --> 00:15:24,460 So if I want one symbol to do it-- SH. 245 00:15:24,460 --> 00:15:29,230 In engineering, sometimes S with a star tells me, 246 00:15:29,230 --> 00:15:33,980 take the conjugate when you transpose a matrix. 247 00:15:33,980 --> 00:15:38,830 So that's main facts about-- let me bring those main facts down 248 00:15:38,830 --> 00:15:45,730 again-- orthogonal eigenvectors and location of eigenvalues. 249 00:15:45,730 --> 00:15:48,310 Now I'm ready to solve differential equations. 250 00:15:48,310 --> 00:15:50,030 Thank you.