1 00:00:00,040 --> 00:00:02,460 The following content is provided under a Creative 2 00:00:02,460 --> 00:00:03,870 Commons license. 3 00:00:03,870 --> 00:00:06,320 Your support will help MIT OpenCourseWare 4 00:00:06,320 --> 00:00:10,560 continue to offer high-quality educational resources for free. 5 00:00:10,560 --> 00:00:13,300 To make a donation or view additional materials 6 00:00:13,300 --> 00:00:17,210 from hundreds of MIT courses, visit MIT OpenCourseWare 7 00:00:17,210 --> 00:00:17,862 at ocw.mit.edu. 8 00:00:31,940 --> 00:00:32,862 PROFESSOR: Hi. 9 00:00:32,862 --> 00:00:34,320 I was just thinking of a story that 10 00:00:34,320 --> 00:00:37,490 came to mind about the woman who went on vacation. 11 00:00:37,490 --> 00:00:39,220 And she said, "We went to Majorca." 12 00:00:39,220 --> 00:00:41,120 And her friend said to her, "Where's that?" 13 00:00:41,120 --> 00:00:42,494 And she said, "How should I know? 14 00:00:42,494 --> 00:00:43,460 We flew." 15 00:00:43,460 --> 00:00:47,240 And today we're going to fly through matrix algebra. 16 00:00:47,240 --> 00:00:50,770 In other words, we're going to devote an entire lecture 17 00:00:50,770 --> 00:00:53,180 to the subject called matrix algebra, which 18 00:00:53,180 --> 00:00:55,930 is a rather fast pace from one point of view. 19 00:00:55,930 --> 00:00:58,620 From another point of view, it's a rather slow pace 20 00:00:58,620 --> 00:01:01,370 because hopefully, by this stage in the development 21 00:01:01,370 --> 00:01:03,660 of our course, we're pretty well familiar 22 00:01:03,660 --> 00:01:06,650 with what we mean by the game of mathematics. 23 00:01:06,650 --> 00:01:08,770 And hence, in particular, if we now 24 00:01:08,770 --> 00:01:12,650 try to make a structure out of matrices, 25 00:01:12,650 --> 00:01:14,480 we should be in pretty good position 26 00:01:14,480 --> 00:01:17,630 to generalize many of our early remarks. 27 00:01:17,630 --> 00:01:21,360 Let me say at the outset that whereas matrices in general 28 00:01:21,360 --> 00:01:26,580 can be m rows by n columns, the interesting case 29 00:01:26,580 --> 00:01:28,760 occurs when m and n are equal. 30 00:01:28,760 --> 00:01:30,560 In other words, the interesting case 31 00:01:30,560 --> 00:01:32,720 is when a matrix has the same number 32 00:01:32,720 --> 00:01:34,940 of rows as it has columns. 33 00:01:34,940 --> 00:01:37,510 And again, using as our motivation 34 00:01:37,510 --> 00:01:42,100 a system of equations, the easiest way to see this 35 00:01:42,100 --> 00:01:44,040 is that, for example, if you have 36 00:01:44,040 --> 00:01:46,230 a certain number of equations and a certain number 37 00:01:46,230 --> 00:01:48,860 of unknowns, the really interesting case 38 00:01:48,860 --> 00:01:51,340 occurs when you have just as many equations 39 00:01:51,340 --> 00:01:52,810 as you have unknowns. 40 00:01:52,810 --> 00:01:56,410 For example, if you have more unknowns than equations, 41 00:01:56,410 --> 00:01:58,800 you usually have quite a few degrees of freedom. 42 00:01:58,800 --> 00:02:00,480 In other words, a far-fetched case, 43 00:02:00,480 --> 00:02:04,090 suppose I have one equation with fifteen unknowns. 44 00:02:04,090 --> 00:02:05,630 Then you see, I can pick fourteen 45 00:02:05,630 --> 00:02:08,240 of the unknowns in general at random 46 00:02:08,240 --> 00:02:11,300 and solve for the fifteenth in terms 47 00:02:11,300 --> 00:02:13,760 of the specific choices of the fourteen 48 00:02:13,760 --> 00:02:15,470 that I picked at random. 49 00:02:15,470 --> 00:02:19,110 On the other hand, if I were to have fifteen equations and just 50 00:02:19,110 --> 00:02:22,810 one unknown, the chances are I would have some contradictions. 51 00:02:22,810 --> 00:02:25,480 Because after all, with only one unknown, 52 00:02:25,480 --> 00:02:27,800 I could only impose one condition. 53 00:02:27,800 --> 00:02:29,930 And therefore, given fifteen conditions-- 54 00:02:29,930 --> 00:02:32,540 unless they were all equivalent conditions-- 55 00:02:32,540 --> 00:02:34,550 I might wind up with a contradiction. 56 00:02:34,550 --> 00:02:37,690 So in general, the easiest way to summarize this 57 00:02:37,690 --> 00:02:40,910 is that when you have more unknowns than you 58 00:02:40,910 --> 00:02:44,900 have equations, you usually get too many answers to a problem. 59 00:02:44,900 --> 00:02:48,560 And if you have more equations then you have unknowns, 60 00:02:48,560 --> 00:02:51,930 you usually get too few answers, where by too few, 61 00:02:51,930 --> 00:02:53,230 you mean none. 62 00:02:53,230 --> 00:02:54,890 So the interesting case, as I say, 63 00:02:54,890 --> 00:02:58,330 is when you have the same number of unknowns as equations. 64 00:02:58,330 --> 00:03:00,970 Motivating matrices from this point of view, 65 00:03:00,970 --> 00:03:03,480 the game of matrices will be played in our course 66 00:03:03,480 --> 00:03:04,350 as follows. 67 00:03:04,350 --> 00:03:09,620 We will let the set S sub n denote the set of all n 68 00:03:09,620 --> 00:03:10,800 by n matrices. 69 00:03:10,800 --> 00:03:13,450 In other words, n could be 3. n could be 4. 70 00:03:13,450 --> 00:03:14,110 It could be 2. 71 00:03:14,110 --> 00:03:15,140 It could be 5. 72 00:03:15,140 --> 00:03:17,900 But whatever value we choose for n, for example, 73 00:03:17,900 --> 00:03:19,880 S sub 5 would be what? 74 00:03:19,880 --> 00:03:23,630 The set of all 5 by 5 matrices. 75 00:03:23,630 --> 00:03:25,720 So we're just gonna deal with a general n. 76 00:03:25,720 --> 00:03:29,270 By the way, I should point out that these computations 77 00:03:29,270 --> 00:03:30,440 get kind of sticky. 78 00:03:30,440 --> 00:03:32,780 So we will, for illustrative purposes, 79 00:03:32,780 --> 00:03:36,790 usually pick examples with n equals 2 or n equals 3 80 00:03:36,790 --> 00:03:38,690 just so that we can see what's going on. 81 00:03:38,690 --> 00:03:40,540 But the notation that we'll use is 82 00:03:40,540 --> 00:03:43,170 that if the matrix A is a member of S sub 83 00:03:43,170 --> 00:03:44,510 n, what does that mean? 84 00:03:44,510 --> 00:03:47,030 A belongs to S sub n means that A 85 00:03:47,030 --> 00:03:52,450 is an n by n matrix, which usually is written this way. 86 00:03:52,450 --> 00:03:55,140 And if you wish to abbreviate it, we just write what? 87 00:03:55,140 --> 00:04:00,810 The square brackets and a sub ij inside the brackets this way. 88 00:04:00,810 --> 00:04:04,540 Now again, keep in mind that to play any game, 89 00:04:04,540 --> 00:04:06,470 it's not enough to have the equipment. 90 00:04:06,470 --> 00:04:08,970 We have to have the rules which defines 91 00:04:08,970 --> 00:04:12,400 for us how the terms behave. 92 00:04:12,400 --> 00:04:15,110 So we're going to define equality of two matrices 93 00:04:15,110 --> 00:04:16,120 as follows. 94 00:04:16,120 --> 00:04:19,220 Given the two matrices A and B, we 95 00:04:19,220 --> 00:04:24,360 will define them to be equal if and only if entry by entry 96 00:04:24,360 --> 00:04:25,460 they happen to be equal. 97 00:04:25,460 --> 00:04:29,270 In other words, the term in the i-th row, 98 00:04:29,270 --> 00:04:31,840 j-th column of the first matrix has 99 00:04:31,840 --> 00:04:35,050 to be the same as the term in the i-th row, j-th column 100 00:04:35,050 --> 00:04:38,614 of the second matrix for all possible values of i and j. 101 00:04:38,614 --> 00:04:40,030 And again, if you want to motivate 102 00:04:40,030 --> 00:04:42,110 why we choose this kind of a definition-- 103 00:04:42,110 --> 00:04:45,530 even though definitions do not have to be defended-- notice 104 00:04:45,530 --> 00:04:48,140 that as soon as you change some of the coefficients-- 105 00:04:48,140 --> 00:04:51,370 if you change even one coefficient of an equation 106 00:04:51,370 --> 00:04:53,600 given n equations with n unknowns, 107 00:04:53,600 --> 00:04:55,710 as soon as you change one of the coefficients, 108 00:04:55,710 --> 00:04:58,410 you've changed the system of equations. 109 00:04:58,410 --> 00:05:02,280 Therefore, for these systems to be exactly equal you want what? 110 00:05:02,280 --> 00:05:04,590 Term by term equality. 111 00:05:04,590 --> 00:05:09,210 And correspondingly, to add two n by n matrices, 112 00:05:09,210 --> 00:05:13,110 in other words to add the matrix A to the matrix B, 113 00:05:13,110 --> 00:05:15,350 we define the rule to be what? 114 00:05:15,350 --> 00:05:17,820 That the sum of these two matrices 115 00:05:17,820 --> 00:05:21,520 is the matrix C where each element of C 116 00:05:21,520 --> 00:05:26,060 is obtained by the term by term addition of the elements in A 117 00:05:26,060 --> 00:05:30,670 and B. In other words, we add two matrices 118 00:05:30,670 --> 00:05:33,030 by adding them entry by entry. 119 00:05:33,030 --> 00:05:34,890 In other words, we add the two entries 120 00:05:34,890 --> 00:05:37,560 in the first row, first column to obtain 121 00:05:37,560 --> 00:05:39,820 the entry in the first row, first column 122 00:05:39,820 --> 00:05:41,040 of the sum, et cetera. 123 00:05:41,040 --> 00:05:43,950 In other words, we add term by term. 124 00:05:43,950 --> 00:05:46,930 As far as multiplication is concerned-- and again, 125 00:05:46,930 --> 00:05:49,580 this is the point I was making in the last lecture 126 00:05:49,580 --> 00:05:51,670 and which I like to keep re-emphasizing 127 00:05:51,670 --> 00:05:52,920 because it's very important. 128 00:05:52,920 --> 00:05:56,480 One would like to say something like, "Gee, it 129 00:05:56,480 --> 00:05:59,990 was very natural to add two matrices term by term. 130 00:05:59,990 --> 00:06:02,980 Why don't we multiply them term by term?" 131 00:06:02,980 --> 00:06:05,270 And the answer is certainly you could have made up 132 00:06:05,270 --> 00:06:09,110 a game of matrices in which the product of two matrices 133 00:06:09,110 --> 00:06:12,820 was obtained by multiplying the matrices term by term. 134 00:06:12,820 --> 00:06:15,810 However, if we keep in mind what problem we 135 00:06:15,810 --> 00:06:18,220 want matrix multiplication to solve-- in other words, 136 00:06:18,220 --> 00:06:22,480 notice now, we are playing the game of matrices the way 137 00:06:22,480 --> 00:06:25,010 the real-life scientist plays games, 138 00:06:25,010 --> 00:06:27,530 not the way the abstract mathematician plays games. 139 00:06:27,530 --> 00:06:29,340 You see, in mathematics what we essentially 140 00:06:29,340 --> 00:06:33,030 say is, let's make up the rules and we'll worry about models 141 00:06:33,030 --> 00:06:34,810 that obey the rules later. 142 00:06:34,810 --> 00:06:39,050 In real life we say, let's look at a model that we need, 143 00:06:39,050 --> 00:06:41,580 a physical, realistic model. 144 00:06:41,580 --> 00:06:44,720 And then based on the properties that this model has, 145 00:06:44,720 --> 00:06:48,410 let's make up the abstract rules that govern the system. 146 00:06:48,410 --> 00:06:50,230 And what we saw in the last lecture 147 00:06:50,230 --> 00:06:54,730 was that the sensible definition of matrix multiplication, 148 00:06:54,730 --> 00:06:58,680 in terms of a chain rule, was that to multiply two matrices, 149 00:06:58,680 --> 00:07:01,880 to get the term in the i-th row, j-th column, 150 00:07:01,880 --> 00:07:05,310 you dot the i-th row of the first matrix 151 00:07:05,310 --> 00:07:08,680 with the j-th column of the second matrix. 152 00:07:08,680 --> 00:07:12,000 And the way we write that-- and again, this notation may 153 00:07:12,000 --> 00:07:14,530 seem a little bit heavy to you. 154 00:07:14,530 --> 00:07:18,020 But all it does is it states symbolically what 155 00:07:18,020 --> 00:07:20,080 we said in words last time. 156 00:07:20,080 --> 00:07:22,840 What we're saying is that to dot the i-th row 157 00:07:22,840 --> 00:07:26,040 with the j-th column, notice that the i-th row is always 158 00:07:26,040 --> 00:07:29,510 prefixed by the first subscript being i. 159 00:07:29,510 --> 00:07:34,010 Whereas the second subscript k can run the whole gamut from 1 160 00:07:34,010 --> 00:07:34,560 through n. 161 00:07:34,560 --> 00:07:36,150 In other words, the second subscript 162 00:07:36,150 --> 00:07:38,210 can denote any column you want. 163 00:07:38,210 --> 00:07:40,440 Correspondingly, to indicate that you've 164 00:07:40,440 --> 00:07:45,270 stayed in the j-th column, the row can be arbitrary. 165 00:07:45,270 --> 00:07:48,230 And that means, again, that the subscript k, denoting 166 00:07:48,230 --> 00:07:52,410 the row of the B matrix, can run the full gamut from 1 to n. 167 00:07:52,410 --> 00:07:55,320 In other words, this formal set-up 168 00:07:55,320 --> 00:08:00,170 here simply says in mathematical, concise language 169 00:08:00,170 --> 00:08:02,560 the statement that we said verbally before. 170 00:08:02,560 --> 00:08:06,120 Namely, to find the i,j-th term in the product, 171 00:08:06,120 --> 00:08:10,390 dot the i-th row of the first matrix with the j-th column 172 00:08:10,390 --> 00:08:11,790 of the second matrix. 173 00:08:11,790 --> 00:08:13,930 And again, I suspect that the easiest 174 00:08:13,930 --> 00:08:15,680 way to see all of these things is 175 00:08:15,680 --> 00:08:18,100 in terms of a specific example. 176 00:08:18,100 --> 00:08:20,580 And again, the simplest example I can think of 177 00:08:20,580 --> 00:08:24,110 will involve the 2 by 2 case, n equals 2. 178 00:08:24,110 --> 00:08:26,710 So by means of illustration, let A 179 00:08:26,710 --> 00:08:30,930 be the 2 by 2 matrix all of whose entries are 1. 180 00:08:30,930 --> 00:08:35,480 Let B be the 2 by 2 matrix all whose entries are 1. 181 00:08:35,480 --> 00:08:40,760 Except in the first row, second column the entry will be a 2. 182 00:08:40,760 --> 00:08:42,970 Now, my first claim is that in terms 183 00:08:42,970 --> 00:08:45,450 of our definition of equality, matrix A 184 00:08:45,450 --> 00:08:49,050 is unequal to matrix B. Why is that? 185 00:08:49,050 --> 00:08:56,110 Well, notice that they differ in the what? 186 00:08:56,110 --> 00:08:58,190 First row, second entry. 187 00:08:58,190 --> 00:09:00,840 In other words a sub 1,2, the entry 188 00:09:00,840 --> 00:09:04,940 of A matrix in the first row, second column, is 1. 189 00:09:04,940 --> 00:09:07,710 Whereas the entry of the B matrix in the first row, 190 00:09:07,710 --> 00:09:09,980 second column is 2. 191 00:09:09,980 --> 00:09:12,140 Don't say, gee, they look equal almost 192 00:09:12,140 --> 00:09:14,900 because three out of the four match up. 193 00:09:14,900 --> 00:09:18,170 Remember, equality by definition says what? 194 00:09:18,170 --> 00:09:19,720 Entry by entry. 195 00:09:19,720 --> 00:09:21,860 Three out of four isn't good enough. 196 00:09:21,860 --> 00:09:23,360 It has to be all four. 197 00:09:23,360 --> 00:09:28,780 Therefore, this matrix A is not equal to matrix B. 198 00:09:28,780 --> 00:09:30,390 How do we add two matrices? 199 00:09:30,390 --> 00:09:32,010 Well, to add them, we said that we 200 00:09:32,010 --> 00:09:33,880 would add them entry by entry. 201 00:09:33,880 --> 00:09:38,280 Therefore, the first row, first column of the sum 202 00:09:38,280 --> 00:09:41,200 should be obtained by adding the first row, first column 203 00:09:41,200 --> 00:09:43,940 terms in each matrix together, et cetera. 204 00:09:43,940 --> 00:09:46,550 And just going through this quickly, we would get what? 205 00:09:46,550 --> 00:09:48,180 1 plus 1 is 2. 206 00:09:48,180 --> 00:09:50,330 1 plus 2 is 3. 207 00:09:50,330 --> 00:09:52,520 1 plus 1 is 2 again. 208 00:09:52,520 --> 00:09:55,230 1 plus 1 is still 2 over here. 209 00:09:55,230 --> 00:09:57,470 In other words A plus B in this case 210 00:09:57,470 --> 00:10:03,590 would be the two by two matrix [2, 3; 2, 2]. 211 00:10:03,590 --> 00:10:06,660 Now, how do we multiply the two matrices A and B? 212 00:10:06,660 --> 00:10:09,010 Remember what the rules were for multiplication. 213 00:10:09,010 --> 00:10:12,790 To multiply A by B, to find the term 214 00:10:12,790 --> 00:10:17,130 in the first row, first column, we dot the first row of A 215 00:10:17,130 --> 00:10:19,720 with the first column of B. That gives us 216 00:10:19,720 --> 00:10:23,860 1 times 1, which is 1, plus 1 times 1, which is also 1. 217 00:10:23,860 --> 00:10:25,610 The sum is therefore 2. 218 00:10:25,610 --> 00:10:29,180 So the entry in our first row, first column is a 2. 219 00:10:29,180 --> 00:10:30,820 To find the entry which turns out 220 00:10:30,820 --> 00:10:34,710 to be 3 in the first row, second column, how do we do that? 221 00:10:34,710 --> 00:10:36,625 We dot what? 222 00:10:36,625 --> 00:10:37,480 We want what? 223 00:10:37,480 --> 00:10:39,490 First row, second column. 224 00:10:39,490 --> 00:10:42,930 We dot the first row of A with the second column 225 00:10:42,930 --> 00:10:47,060 B. We get 1 times 2 plus 1 times 1. 226 00:10:47,060 --> 00:10:50,360 2 plus 1 is 3, et cetera. 227 00:10:50,360 --> 00:10:53,150 Carrying out the details, the matrix A 228 00:10:53,150 --> 00:10:55,510 multiplied by the matrix B in this case 229 00:10:55,510 --> 00:10:59,220 would be the matrix [2, 3] in the first row, [2, 3] 230 00:10:59,220 --> 00:11:00,940 in the second row. 231 00:11:00,940 --> 00:11:04,740 By the way, B times A would involve what? 232 00:11:04,740 --> 00:11:09,300 Writing the matrix B first followed by the matrix A. 233 00:11:09,300 --> 00:11:11,560 And leaving the details for you, just 234 00:11:11,560 --> 00:11:14,090 to check out for yourselves, notice-- well, 235 00:11:14,090 --> 00:11:15,690 let me just do one for you. 236 00:11:15,690 --> 00:11:17,810 Suppose I want to see what was in the first row, 237 00:11:17,810 --> 00:11:19,320 first column here. 238 00:11:19,320 --> 00:11:20,320 I would have to do what? 239 00:11:20,320 --> 00:11:25,730 Dot the first row of B with the first column of A, 240 00:11:25,730 --> 00:11:29,900 the first row of B with the first column of A. 241 00:11:29,900 --> 00:11:34,650 That gives me 1 times 1 plus 2 times 1, which is 3. 242 00:11:34,650 --> 00:11:37,740 And by the way, even if I went no further here, 243 00:11:37,740 --> 00:11:42,890 notice that already tells me, in this case at least, 244 00:11:42,890 --> 00:11:48,420 that A*B is unequal to B*A. Why is that? 245 00:11:48,420 --> 00:11:50,310 Because the entry in the first row, 246 00:11:50,310 --> 00:11:53,910 first column of A*B happens to be 2. 247 00:11:53,910 --> 00:11:57,920 The entry in the first row, first column of B*A happens 248 00:11:57,920 --> 00:11:59,300 to be 3. 249 00:11:59,300 --> 00:12:02,300 And we've already seen that for two matrices to be equal, 250 00:12:02,300 --> 00:12:04,740 they must be equal entry by entry. 251 00:12:04,740 --> 00:12:07,160 And they're already unequal in the entry 252 00:12:07,160 --> 00:12:09,110 in the first row, first column. 253 00:12:09,110 --> 00:12:12,790 So notice, by the way, that matrix multiplication need not 254 00:12:12,790 --> 00:12:13,670 be commutative. 255 00:12:13,670 --> 00:12:17,700 And you see this is a glaring distinction between matrix 256 00:12:17,700 --> 00:12:20,940 multiplication and numerical multiplication, where 257 00:12:20,940 --> 00:12:23,700 when we multiply two numbers, the product does not 258 00:12:23,700 --> 00:12:25,840 depend on the order in which they're written. 259 00:12:25,840 --> 00:12:28,020 But when we multiply two matrices, 260 00:12:28,020 --> 00:12:29,967 our definition is such that the product 261 00:12:29,967 --> 00:12:32,050 does depend on the order in which they're written. 262 00:12:32,050 --> 00:12:34,133 And you might say, well isn't that an awful thing? 263 00:12:34,133 --> 00:12:34,900 Well, maybe it is. 264 00:12:34,900 --> 00:12:37,960 But notice that once we pick the definition that we want, 265 00:12:37,960 --> 00:12:41,230 we have to let the properties fall where they will. 266 00:12:41,230 --> 00:12:43,290 And by the way, it is nice to notice-- 267 00:12:43,290 --> 00:12:45,370 and again, I will leave the details out. 268 00:12:45,370 --> 00:12:47,180 They are in the notes. 269 00:12:47,180 --> 00:12:50,670 You'll be checked on these in the exercises and the like. 270 00:12:50,670 --> 00:12:52,900 But the interesting point is that most 271 00:12:52,900 --> 00:12:55,220 of the rules of numerical arithmetic 272 00:12:55,220 --> 00:12:58,060 are obeyed by matrix arithmetic. 273 00:12:58,060 --> 00:12:59,980 And let me just go through a few of those 274 00:12:59,980 --> 00:13:03,740 with you, just mentioning what they are. 275 00:13:03,740 --> 00:13:06,550 Notice, again, the wording here. 276 00:13:06,550 --> 00:13:09,010 I call these properties of the game 277 00:13:09,010 --> 00:13:12,270 rather than, in terms of our usual game notation, 278 00:13:12,270 --> 00:13:13,940 the rules of the game. 279 00:13:13,940 --> 00:13:16,290 Notice that we sort of refer to things as being 280 00:13:16,290 --> 00:13:19,700 rules when you make up the game abstractly. 281 00:13:19,700 --> 00:13:22,000 On the other hand, when you start with a model 282 00:13:22,000 --> 00:13:24,770 and tell what addition, multiplication, and equality 283 00:13:24,770 --> 00:13:27,470 means, from these definitions you 284 00:13:27,470 --> 00:13:31,180 deduce properties of the system. 285 00:13:31,180 --> 00:13:35,200 So the properties of the game of matrices, meaning what? 286 00:13:35,200 --> 00:13:37,440 The properties based on the interpretation 287 00:13:37,440 --> 00:13:40,580 that we're giving this in terms of the calculus course, 288 00:13:40,580 --> 00:13:41,760 the systems of equations. 289 00:13:41,760 --> 00:13:44,190 You see, there are other ways of introducing matrices. 290 00:13:44,190 --> 00:13:46,210 For the calculus course, we elected 291 00:13:46,210 --> 00:13:48,660 to do it in terms of systems of equations. 292 00:13:48,660 --> 00:13:51,970 But at any rate, you can check the following things out 293 00:13:51,970 --> 00:13:53,060 quite easily. 294 00:13:53,060 --> 00:13:56,090 First of all, if A and B are any two matrices, 295 00:13:56,090 --> 00:14:00,390 A plus B is equal to B plus A. And that follows, of course, 296 00:14:00,390 --> 00:14:02,510 from the fact that when you add two matrices, 297 00:14:02,510 --> 00:14:05,250 you add them entry by entry, and the entries 298 00:14:05,250 --> 00:14:06,590 happen to be numbers. 299 00:14:06,590 --> 00:14:08,060 And the sum of two numbers does not 300 00:14:08,060 --> 00:14:10,360 depend on the order in which you write the numbers. 301 00:14:10,360 --> 00:14:13,390 In other words A plus B does equal B plus A. 302 00:14:13,390 --> 00:14:19,480 Similarly, if you add B plus C to A, 303 00:14:19,480 --> 00:14:23,140 it's the same thing as if you added C to A plus B. 304 00:14:23,140 --> 00:14:26,690 In other words, the addition of matrices is associative. 305 00:14:26,690 --> 00:14:29,300 The answer does not depend on the sum, does not 306 00:14:29,300 --> 00:14:31,080 depend on voice inflection. 307 00:14:31,080 --> 00:14:35,330 A plus (B plus C) is the same as (A plus B) 308 00:14:35,330 --> 00:14:39,330 plus C. Again, notice how this obeys the rules 309 00:14:39,330 --> 00:14:41,290 of ordinary arithmetic. 310 00:14:41,290 --> 00:14:44,470 Thirdly, if I define the zero matrix 311 00:14:44,470 --> 00:14:47,620 to be the matrix each of whose entries is 0, 312 00:14:47,620 --> 00:14:51,850 then I claim that if I add the zero matrix on to any matrix A, 313 00:14:51,850 --> 00:14:54,290 the result must still be the matrix A. 314 00:14:54,290 --> 00:14:57,210 And this is also a triviality to check. 315 00:14:57,210 --> 00:14:59,670 Namely, how do you add two matrices? 316 00:14:59,670 --> 00:15:01,590 You add them term by term. 317 00:15:01,590 --> 00:15:05,130 But every term in the zero matrix is 0, 318 00:15:05,130 --> 00:15:08,120 and adding 0 on to a number doesn't change the number. 319 00:15:08,120 --> 00:15:10,300 Consequently, if you, term by term, 320 00:15:10,300 --> 00:15:12,870 add 0 onto the entries in A, you still 321 00:15:12,870 --> 00:15:15,200 have the entries in A intact. 322 00:15:15,200 --> 00:15:17,840 So A plus 0 is A. 323 00:15:17,840 --> 00:15:20,520 And finally the rule of inverses. 324 00:15:20,520 --> 00:15:24,650 Namely, if A is the matrix each of those entries we'll call 325 00:15:24,650 --> 00:15:31,350 a sub i,j, then if I add minus A onto A, the result will be 0,. 326 00:15:31,350 --> 00:15:33,850 Where by minus A I mean what? 327 00:15:33,850 --> 00:15:38,470 The matrix each of whose entries is negative a_(i,j) The reason 328 00:15:38,470 --> 00:15:42,150 being, again, that when you add two matrices you add them term 329 00:15:42,150 --> 00:15:43,270 by term. 330 00:15:43,270 --> 00:15:46,900 Every time I add on the negative of a number to the number 331 00:15:46,900 --> 00:15:49,110 itself, I get the zero number. 332 00:15:49,110 --> 00:15:54,300 Consequently, every entry in the sum of A and negative A 333 00:15:54,300 --> 00:15:55,370 will be 0. 334 00:15:55,370 --> 00:15:59,030 And by definition, that's the zero matrix. 335 00:15:59,030 --> 00:16:01,920 Point I want to mention is to observe that with the zero 336 00:16:01,920 --> 00:16:04,400 matrix, defined as we've defined it, 337 00:16:04,400 --> 00:16:07,110 and the negative of a matrix defined 338 00:16:07,110 --> 00:16:11,490 as we have defined it, that the rules for matrix addition 339 00:16:11,490 --> 00:16:14,440 are exactly the same structurally as the rules 340 00:16:14,440 --> 00:16:16,510 for numerical addition. 341 00:16:16,510 --> 00:16:18,990 And that means that with respect to addition, 342 00:16:18,990 --> 00:16:23,560 we cannot distinguish matrix algebra from arithmetic 343 00:16:23,560 --> 00:16:26,520 algebra, numerical algebra. 344 00:16:26,520 --> 00:16:30,190 In fact, many of the rules of multiplication for matrices 345 00:16:30,190 --> 00:16:33,510 are the same as for numerical multiplication as well. 346 00:16:33,510 --> 00:16:37,350 Namely, one can show that if you multiply the matrix 347 00:16:37,350 --> 00:16:42,210 A by the product of the matrices B and C, 348 00:16:42,210 --> 00:16:44,870 that this is the same as multiplying A times 349 00:16:44,870 --> 00:16:48,190 B by the matrix C. These can be checked 350 00:16:48,190 --> 00:16:50,270 by longhand computation. 351 00:16:50,270 --> 00:16:53,360 I have you do some of these things in the exercises. 352 00:16:53,360 --> 00:16:56,590 Similarly, one can prove that matrix multiplication 353 00:16:56,590 --> 00:16:57,620 is distributive. 354 00:16:57,620 --> 00:17:01,030 That if you multiply a matrix by the sum of two matrices, 355 00:17:01,030 --> 00:17:07,020 A times (B plus C) is the same as A times B plus A times C. 356 00:17:07,020 --> 00:17:10,150 And another rule that's interesting, 357 00:17:10,150 --> 00:17:13,599 there is a matrix that plays the role of the number 1. 358 00:17:13,599 --> 00:17:16,430 And surprisingly enough, it's not the matrix 359 00:17:16,430 --> 00:17:18,790 all of whose entries are 1. 360 00:17:18,790 --> 00:17:20,640 It's the matrix all of whose entries 361 00:17:20,640 --> 00:17:26,480 are 1 on the main diagonal and 0's every place else. 362 00:17:26,480 --> 00:17:28,119 That may sound surprising. 363 00:17:28,119 --> 00:17:30,720 You say, "Gee, the zero matrix is when I had all zeroes, 364 00:17:30,720 --> 00:17:34,230 why shouldn't the unit matrix be when I have all 1's?" 365 00:17:34,230 --> 00:17:37,330 And the answer is, if we were to multiply two matrices term 366 00:17:37,330 --> 00:17:41,620 by term, then the unit matrix would've been all 1's. 367 00:17:41,620 --> 00:17:45,610 But remember, we agreed not to multiply matrices term by term. 368 00:17:45,610 --> 00:17:47,110 We agreed to do what? 369 00:17:47,110 --> 00:17:50,010 Dot the i-th row of the first with the j-th column 370 00:17:50,010 --> 00:17:50,960 of a second. 371 00:17:50,960 --> 00:17:53,100 And if we do that, like it or not, 372 00:17:53,100 --> 00:17:55,310 this is what the matrix has to look like. 373 00:17:55,310 --> 00:17:59,340 In other words, let me take the matrix in the 3 by 3 case, 374 00:17:59,340 --> 00:18:01,260 because that's complicated enough 375 00:18:01,260 --> 00:18:03,960 to have you see the overall picture and simple enough 376 00:18:03,960 --> 00:18:06,620 so it doesn't take pages of computation. 377 00:18:06,620 --> 00:18:09,630 Let me take the 3 by 3 matrix, which I'll just quickly write 378 00:18:09,630 --> 00:18:13,600 as [a, b, c; d, e, f; g, h, i] and multiply that 379 00:18:13,600 --> 00:18:18,270 by [1, 0, 0; 0, 1, 0; 0, 0, 1]. 380 00:18:18,270 --> 00:18:20,250 You see, that's the matrix that has what? 381 00:18:20,250 --> 00:18:24,900 1's in the main diagonal and 0's every place else. 382 00:18:24,900 --> 00:18:25,980 Look what happens. 383 00:18:25,980 --> 00:18:28,570 When I look, for example, for the term 384 00:18:28,570 --> 00:18:32,130 in the second row, third column-- 385 00:18:32,130 --> 00:18:34,720 second row, third column-- look what's going to happen? 386 00:18:34,720 --> 00:18:37,940 The d multiplies 0, that gives me zero. 387 00:18:37,940 --> 00:18:41,040 The e multiplies 0, that gives me 0. 388 00:18:41,040 --> 00:18:45,260 And the f multiplies 1, which gives me f. 389 00:18:45,260 --> 00:18:48,810 In other words, the term in the second row, third column 390 00:18:48,810 --> 00:18:53,890 is going to be f, which is exactly what it should 391 00:18:53,890 --> 00:18:56,950 be if we claim that the product matrix is going to be 392 00:18:56,950 --> 00:18:58,650 the same as the first matrix. 393 00:18:58,650 --> 00:19:00,920 In other words, notice that this set up 394 00:19:00,920 --> 00:19:04,240 is such that you're going to get 0's every place 395 00:19:04,240 --> 00:19:06,370 but when the term in question comes up. 396 00:19:06,370 --> 00:19:09,041 And I don't want to go through that in too much detail for you 397 00:19:09,041 --> 00:19:11,290 because I think that as you just play with this thing, 398 00:19:11,290 --> 00:19:12,415 you'll see it for yourself. 399 00:19:12,415 --> 00:19:14,260 Let me do just quickly one more. 400 00:19:14,260 --> 00:19:21,875 Suppose you wanted the term in the third row, second column. 401 00:19:21,875 --> 00:19:23,375 You see what's going to happen here. 402 00:19:23,375 --> 00:19:26,740 The g multiplies 0, which yields a 0. 403 00:19:26,740 --> 00:19:29,840 The h multiplies 1, which yields an h. 404 00:19:29,840 --> 00:19:32,630 And the i multiplies a 0, which yields a 0. 405 00:19:32,630 --> 00:19:37,580 So the dot product is just going to be h itself, 406 00:19:37,580 --> 00:19:38,730 as it should be. 407 00:19:38,730 --> 00:19:41,270 And so you see, what I'm saying is, 408 00:19:41,270 --> 00:19:44,280 by my definition of matrix multiplication, 409 00:19:44,280 --> 00:19:50,040 if I define the matrix I sub n to be the matrix each of whose 410 00:19:50,040 --> 00:19:52,700 entries is 0, except, on the main diagonal they're 411 00:19:52,700 --> 00:19:56,920 1-- another way of writing that is that the entries-- in fact, 412 00:19:56,920 --> 00:19:58,040 we could write this way. 413 00:19:58,040 --> 00:20:01,320 The entries, let's call this delta_(i,j). 414 00:20:04,390 --> 00:20:09,480 And what you're saying is that delta_(i,j) is 0 when i is 415 00:20:09,480 --> 00:20:10,960 unequal to j. 416 00:20:10,960 --> 00:20:15,630 And it's equal to 1 when i equals j. 417 00:20:15,630 --> 00:20:18,010 And what we're saying is that if you define 418 00:20:18,010 --> 00:20:23,500 I sub n to be that matrix, if you multiply A by I sub n, 419 00:20:23,500 --> 00:20:26,530 it's the same as multiplying I sub n by A. 420 00:20:26,530 --> 00:20:28,660 And the result will always be A. 421 00:20:28,660 --> 00:20:31,350 By the way, one of your first objections 422 00:20:31,350 --> 00:20:33,470 might be, isn't this redundant? 423 00:20:33,470 --> 00:20:37,830 Why do you have to write that A times I sub n is the same as I 424 00:20:37,830 --> 00:20:39,260 sub n times A? 425 00:20:39,260 --> 00:20:42,070 Well, recall that in our first example 426 00:20:42,070 --> 00:20:45,410 we showed that A times B did not have 427 00:20:45,410 --> 00:20:48,790 to be the same as B times A. In other words, 428 00:20:48,790 --> 00:20:52,410 note that this remark that A times I sub n 429 00:20:52,410 --> 00:20:55,470 equals I sub n times A is not redundant. 430 00:20:55,470 --> 00:20:58,230 In general, the product of two matrices 431 00:20:58,230 --> 00:21:00,680 depends on the order in which they're written. 432 00:21:00,680 --> 00:21:03,770 And that leads me, then, into my next subtopic. 433 00:21:03,770 --> 00:21:07,420 And that is, where is matrix algebra 434 00:21:07,420 --> 00:21:09,365 different from numerical algebra? 435 00:21:09,365 --> 00:21:11,140 In other words, what are the differences 436 00:21:11,140 --> 00:21:14,560 between matrix algebra and the usual algebra? 437 00:21:14,560 --> 00:21:16,750 We've already seen one difference. 438 00:21:16,750 --> 00:21:21,190 One difference is that A*B need not equal B*A. In other words, 439 00:21:21,190 --> 00:21:25,600 I could find A and B such that A times B equals B times A. 440 00:21:25,600 --> 00:21:28,570 But in general, given A and B at random, 441 00:21:28,570 --> 00:21:32,600 there is no reason to presuppose that A times B has to equal B 442 00:21:32,600 --> 00:21:36,070 times A. And again, there are plenty of drill exercises 443 00:21:36,070 --> 00:21:37,750 on this particular point. 444 00:21:37,750 --> 00:21:40,940 The second major difference between this 445 00:21:40,940 --> 00:21:45,090 and numerical arithmetic is the existence of inverses. 446 00:21:45,090 --> 00:21:50,020 In other words, given a matrix A which is not the zero matrix, 447 00:21:50,020 --> 00:21:53,640 the matrix called A inverse need not exist. 448 00:21:53,640 --> 00:21:55,540 Now what do you mean by A inverse? 449 00:21:55,540 --> 00:21:58,540 The inverse of a number means a number such 450 00:21:58,540 --> 00:22:01,710 that when you multiply it by that given number you get one. 451 00:22:01,710 --> 00:22:04,290 Therefore, inverse matrices would be what? 452 00:22:04,290 --> 00:22:06,980 An inverse would be that matrix such 453 00:22:06,980 --> 00:22:09,180 that when you multiply it by A, you 454 00:22:09,180 --> 00:22:12,820 get the identity matrix I sub n, in other words, the matrix that 455 00:22:12,820 --> 00:22:16,980 has 0's every place except 1's on the main diagonal. 456 00:22:16,980 --> 00:22:19,770 And what I'm saying is that whether we like it or not, 457 00:22:19,770 --> 00:22:23,140 it turns out that given the matrix A, 458 00:22:23,140 --> 00:22:27,850 you cannot always solve the matrix equation A times X 459 00:22:27,850 --> 00:22:30,020 equals I sub n. 460 00:22:30,020 --> 00:22:33,330 In other words, what it means in terms of equations 461 00:22:33,330 --> 00:22:36,170 is given n equations and n unknowns, 462 00:22:36,170 --> 00:22:39,750 you may not always be able to invert the equations. 463 00:22:39,750 --> 00:22:43,420 In other words, given the y's in terms of the x's, it's not 464 00:22:43,420 --> 00:22:46,830 always possible to solve uniquely for the x's in terms 465 00:22:46,830 --> 00:22:47,960 of the y's. 466 00:22:47,960 --> 00:22:50,840 Again, I'm just trying to give you an overview here. 467 00:22:50,840 --> 00:22:54,630 So a more detailed remark or an explanation 468 00:22:54,630 --> 00:22:57,730 about what I'm saying will be in the notes and in the exercises. 469 00:22:57,730 --> 00:23:03,120 But the key point is that not all matrices are invertible. 470 00:23:03,120 --> 00:23:05,490 And again, the easiest way to see this 471 00:23:05,490 --> 00:23:09,650 is to explicitly go into a 2 by 2 matrix and take a look. 472 00:23:09,650 --> 00:23:15,000 Let's take here as an example the 2 by 2 matrix [1, 2; 2, 4]. 473 00:23:15,000 --> 00:23:20,170 Let X be the matrix [x sub 1,1, x sub 1,2; x sub 2,1, 474 00:23:20,170 --> 00:23:21,870 x sub 2,2]. 475 00:23:21,870 --> 00:23:24,080 Now, I know how to multiply two matrices. 476 00:23:24,080 --> 00:23:28,450 I multiply A times X. I obtain the matrix written down 477 00:23:28,450 --> 00:23:34,030 over here: x sub 1,1 plus 2 x sub 2,1; 2 x sub 1,1 plus 4 478 00:23:34,030 --> 00:23:36,510 x sub 2,1; et cetera. 479 00:23:36,510 --> 00:23:41,210 I sub 2, by definition, is the matrix [1, 0; 0, 1]. 480 00:23:41,210 --> 00:23:44,340 And to say that A sub X equals I sub 2 481 00:23:44,340 --> 00:23:46,820 means that this matrix, term by term, 482 00:23:46,820 --> 00:23:48,950 must be the same as this matrix. 483 00:23:48,950 --> 00:23:51,410 In particular, if we just focus-- 484 00:23:51,410 --> 00:23:53,310 let me just get a piece of chalk over here-- 485 00:23:53,310 --> 00:23:58,330 if we just focus our attention on this having to be the same 486 00:23:58,330 --> 00:24:02,340 as this and this having to be the same as, this leads 487 00:24:02,340 --> 00:24:06,490 to the fact that (x sub 1,1) plus 2(x sub 2,1) has to equal 488 00:24:06,490 --> 00:24:07,430 1. 489 00:24:07,430 --> 00:24:12,310 This says that 2(x sub 1,1) plus 4(x sub 2,1) has to equal 0. 490 00:24:12,310 --> 00:24:16,190 And I claim that right away this shows that it's impossible 491 00:24:16,190 --> 00:24:20,280 for there to be numbers x_(1,1) and x_(2,1) that exist. 492 00:24:20,280 --> 00:24:24,910 Because, lookit, if we found two numbers x sub 1,1 493 00:24:24,910 --> 00:24:28,240 and x sub 2,1 that obeyed these two equations, 494 00:24:28,240 --> 00:24:29,910 we would have proved that 2 equals 495 00:24:29,910 --> 00:24:32,300 0, which as I told you before is only 496 00:24:32,300 --> 00:24:34,620 true for small values of zero, right. 497 00:24:34,620 --> 00:24:37,020 No, lookit, if this were true, just 498 00:24:37,020 --> 00:24:39,710 multiply both sides of this equation by 2. 499 00:24:39,710 --> 00:24:40,790 It would say what? 500 00:24:40,790 --> 00:24:46,450 That 2 times x sub 1,1 plus 4 times x sub 2,1 equals 2. 501 00:24:46,450 --> 00:24:50,690 But at the same time, that same quantity must equal 0. 502 00:24:50,690 --> 00:24:57,600 And since this is impossible, it means that this matrix does not 503 00:24:57,600 --> 00:24:58,100 exist. 504 00:24:58,100 --> 00:25:00,220 In other words, it is impossible-- we've just 505 00:25:00,220 --> 00:25:03,320 shown it-- to find numbers that I can plug in 506 00:25:03,320 --> 00:25:07,360 here such that when I multiply this matrix by this matrix, 507 00:25:07,360 --> 00:25:09,950 I get this matrix. 508 00:25:09,950 --> 00:25:12,280 That's the best proof that A inverse need not exist. 509 00:25:12,280 --> 00:25:13,090 Namely what? 510 00:25:13,090 --> 00:25:16,860 Show one matrix A for which A inverse doesn't exist. 511 00:25:16,860 --> 00:25:19,760 That's all you have to do to show that an inverse doesn't 512 00:25:19,760 --> 00:25:20,470 have to exist. 513 00:25:20,470 --> 00:25:22,260 Just show one case. 514 00:25:22,260 --> 00:25:25,360 One counterexample is all it takes, right. 515 00:25:25,360 --> 00:25:26,750 So what's the point? 516 00:25:26,750 --> 00:25:29,410 The point is we must beware of results 517 00:25:29,410 --> 00:25:31,950 which require A inverse. 518 00:25:31,950 --> 00:25:33,830 Well let's think back to ordinary arithmetic. 519 00:25:33,830 --> 00:25:37,120 What results required the existence of an inverse? 520 00:25:37,120 --> 00:25:39,720 Well, for example, in ordinary arithmetic, 521 00:25:39,720 --> 00:25:42,790 if the product of two numbers was 0, one of the factors 522 00:25:42,790 --> 00:25:43,650 had to be 0. 523 00:25:43,650 --> 00:25:45,990 And we proved that by multiplying both sides 524 00:25:45,990 --> 00:25:48,240 of the equation by A inverse. 525 00:25:48,240 --> 00:25:51,650 Well, we don't have inverses necessarily in matrix algebra. 526 00:25:51,650 --> 00:25:53,960 So for example, in matrix algebra, 527 00:25:53,960 --> 00:25:56,880 it's possible that the product of two matrices 528 00:25:56,880 --> 00:26:00,890 gives you the zero matrix, yet neither of the two matrices 529 00:26:00,890 --> 00:26:03,590 itself is the zero matrix. 530 00:26:03,590 --> 00:26:05,910 Or, another consequence of inverse, 531 00:26:05,910 --> 00:26:08,900 in matrix multiplication it's possible 532 00:26:08,900 --> 00:26:15,110 that A times B can equal A times C, yet A need not be 0 533 00:26:15,110 --> 00:26:18,300 nor B need equal C. In other words, 534 00:26:18,300 --> 00:26:23,350 we can have A times B equals A times C even though A is not 535 00:26:23,350 --> 00:26:26,620 the zero vector and B is not equal to C. 536 00:26:26,620 --> 00:26:28,690 Again, the beauty of an arithmetic course 537 00:26:28,690 --> 00:26:30,250 is that we don't have to hand wave. 538 00:26:30,250 --> 00:26:33,080 We can make the emotional, subjective statements, 539 00:26:33,080 --> 00:26:35,860 but we can back them up simply by showing 540 00:26:35,860 --> 00:26:37,530 the existence of examples. 541 00:26:37,530 --> 00:26:41,360 So to illustrate my claims here, let me just do this, as I say, 542 00:26:41,360 --> 00:26:43,500 by means of an example. 543 00:26:43,500 --> 00:26:45,820 Let's take the matrix that we took in example 2. 544 00:26:45,820 --> 00:26:49,050 Let A be the matrix [1, 2; 2, 4]. 545 00:26:49,050 --> 00:26:50,690 Is that the zero matrix? 546 00:26:50,690 --> 00:26:52,250 No, it's not the zero matrix. 547 00:26:52,250 --> 00:26:52,860 Why? 548 00:26:52,860 --> 00:26:55,320 Because the zero matrix must have zero entries 549 00:26:55,320 --> 00:26:59,090 every place, and this doesn't have zero entries every place. 550 00:26:59,090 --> 00:27:04,250 Let's just, out of the hat, pull out the matrix [2, 2; -1, -1]. 551 00:27:04,250 --> 00:27:07,040 And again, without going through every single detail here, 552 00:27:07,040 --> 00:27:10,040 if I multiply this matrix times this matrix, 553 00:27:10,040 --> 00:27:12,050 the result is the zero matrix. 554 00:27:12,050 --> 00:27:16,340 For example just by way of illustration, 1 times 2 is 2. 555 00:27:16,340 --> 00:27:18,530 2 times minus 1 is minus 2. 556 00:27:18,530 --> 00:27:20,630 2 plus minus 2 is 0. 557 00:27:20,630 --> 00:27:22,240 That accounts for the 0 here. 558 00:27:22,240 --> 00:27:24,030 If I check this whole thing through, 559 00:27:24,030 --> 00:27:27,070 I will find that every entry here must be 0. 560 00:27:27,070 --> 00:27:28,420 Therefore, I have what? 561 00:27:28,420 --> 00:27:32,100 Two matrices, neither of which is the zero matrix, 562 00:27:32,100 --> 00:27:36,010 yet their product is the zero matrix. 563 00:27:36,010 --> 00:27:38,470 On the other hand, let me now take the same matrix, 564 00:27:38,470 --> 00:27:41,960 [1 2; 2 4] and multiply that by another matrix 565 00:27:41,960 --> 00:27:44,260 that I pull out of the hat. 566 00:27:44,260 --> 00:27:48,600 The one I'm gonna pull out of the hat is [-2, -6; 1, 3]. 567 00:27:48,600 --> 00:27:51,470 And again, just to do a quick check over here, 568 00:27:51,470 --> 00:27:55,870 let's check the product in the second row, second column. 569 00:27:55,870 --> 00:27:56,840 It's what? 570 00:27:56,840 --> 00:27:58,950 2 times minus 6 is minus 12. 571 00:27:58,950 --> 00:28:00,630 4 times 3 is 12. 572 00:28:00,630 --> 00:28:03,690 Minus 12 plus 12 is 0. 573 00:28:03,690 --> 00:28:07,230 In other words, this times this, neither matrix here 574 00:28:07,230 --> 00:28:11,680 is the zero matrix, yet the product is a zero matrix. 575 00:28:11,680 --> 00:28:14,620 And by the way, before I make a further comment here, 576 00:28:14,620 --> 00:28:17,110 let me say I didn't really pull these out of the hat. 577 00:28:17,110 --> 00:28:19,900 I leave this as an exercise for you to do. 578 00:28:19,900 --> 00:28:22,370 But there are infinitely many matrices 579 00:28:22,370 --> 00:28:25,880 that I can multiply this matrix by and get the zero matrix. 580 00:28:25,880 --> 00:28:28,780 In fact, all I have to do is make sure 581 00:28:28,780 --> 00:28:31,210 that the matrix I multiply this by 582 00:28:31,210 --> 00:28:35,460 has the property that the first row is minus 583 00:28:35,460 --> 00:28:38,540 twice the second row. 584 00:28:38,540 --> 00:28:41,950 And if you don't know where I get that from, 585 00:28:41,950 --> 00:28:43,290 all I do is what? 586 00:28:43,290 --> 00:28:45,580 I solve, again, the matrix equation. 587 00:28:45,580 --> 00:28:48,040 I let X be the matrix I'm looking for. 588 00:28:48,040 --> 00:28:52,650 I take [1, 2; 2, 4], multiply it by X, equate it to 0, 589 00:28:52,650 --> 00:28:55,900 and see what conditions are imposed on my coefficients. 590 00:28:55,900 --> 00:28:58,740 Again, this is not the point of our overview here. 591 00:28:58,740 --> 00:29:01,350 You can do that in the homework exercises 592 00:29:01,350 --> 00:29:02,520 in the reading material. 593 00:29:02,520 --> 00:29:05,170 But the key point is, what I have done is what, 594 00:29:05,170 --> 00:29:06,750 as far as this is concerned? 595 00:29:06,750 --> 00:29:09,490 Look at these two examples. 596 00:29:09,490 --> 00:29:13,250 This matrix times this one is the zero matrix. 597 00:29:13,250 --> 00:29:15,960 This times this is the zero matrix. 598 00:29:15,960 --> 00:29:21,030 Therefore, this times this is the same as this times this. 599 00:29:21,030 --> 00:29:27,270 Notice that this term equals this term, right. 600 00:29:27,270 --> 00:29:30,750 And what I'm driving at is that here is a case where 601 00:29:30,750 --> 00:29:32,770 this is not the zero matrix. 602 00:29:32,770 --> 00:29:35,280 The second factors are not equal to each other. 603 00:29:35,280 --> 00:29:38,250 You see this matrix does not equal this matrix. 604 00:29:38,250 --> 00:29:40,900 Yet when I cancel this, I can not 605 00:29:40,900 --> 00:29:43,406 conclude that this matrix equals this matrix. 606 00:29:43,406 --> 00:29:44,780 In other words, here I have what? 607 00:29:44,780 --> 00:29:50,660 A times B equals A times C. Yet A is not the zero matrix, 608 00:29:50,660 --> 00:29:54,460 and the matrix B is not equal to the matrix C. 609 00:29:54,460 --> 00:29:55,900 And so what have I proven? 610 00:29:55,900 --> 00:29:59,150 I've proven that it is not necessarily true 611 00:29:59,150 --> 00:30:03,230 that for matrices, when it comes to cancellation of factors 612 00:30:03,230 --> 00:30:04,750 when you're multiplying, that you 613 00:30:04,750 --> 00:30:06,530 can take the same liberties that you 614 00:30:06,530 --> 00:30:08,770 can in numerical arithmetic. 615 00:30:08,770 --> 00:30:10,840 And this is a very troublesome thing. 616 00:30:10,840 --> 00:30:11,970 This bothers people. 617 00:30:11,970 --> 00:30:14,710 It means that we have to be particularly careful when 618 00:30:14,710 --> 00:30:17,970 we do the arithmetic of matrices to make sure 619 00:30:17,970 --> 00:30:19,230 that we're dealing with what? 620 00:30:19,230 --> 00:30:21,360 Invertible matrices. 621 00:30:21,360 --> 00:30:24,610 What it means, again, is that if the system of equations that 622 00:30:24,610 --> 00:30:28,620 the matrix is coding is such that the matrix does not have 623 00:30:28,620 --> 00:30:32,510 an inverse, it means that somehow or other we cannot 624 00:30:32,510 --> 00:30:35,180 invert the system of equations. 625 00:30:35,180 --> 00:30:38,260 And so what we do in the study of matrix algebra 626 00:30:38,260 --> 00:30:41,330 is we single out a particularly important subset 627 00:30:41,330 --> 00:30:42,600 of the matrices. 628 00:30:42,600 --> 00:30:46,890 Namely, we have a special interest in those matrices A 629 00:30:46,890 --> 00:30:50,400 for which A inverse exists. 630 00:30:50,400 --> 00:30:52,720 And because we have that special interest, what 631 00:30:52,720 --> 00:30:57,330 we do is we define a matrix, give it a special name 632 00:30:57,330 --> 00:30:58,800 if it has an inverse. 633 00:30:58,800 --> 00:31:00,580 Namely, a definition is what? 634 00:31:00,580 --> 00:31:03,710 The matrix A is called non-singular 635 00:31:03,710 --> 00:31:07,290 provided A inverse exists. 636 00:31:07,290 --> 00:31:09,940 Now what's the beauty of non-singular matrices? 637 00:31:09,940 --> 00:31:12,260 The beauty of non-singular matrices 638 00:31:12,260 --> 00:31:14,330 is if you happen to know that you're 639 00:31:14,330 --> 00:31:17,240 dealing with a non-singular matrix, 640 00:31:17,240 --> 00:31:19,780 then you can take the same arithmetic liberties 641 00:31:19,780 --> 00:31:21,170 that you could with numbers. 642 00:31:21,170 --> 00:31:25,100 For example, let me just give you an illustration here. 643 00:31:25,100 --> 00:31:29,430 Suppose I know that A*B equals A*C where A, B, 644 00:31:29,430 --> 00:31:30,810 and C are matrices. 645 00:31:30,810 --> 00:31:35,160 And I happen to also know that A is non-singular, in other words 646 00:31:35,160 --> 00:31:36,760 that A inverse exists. 647 00:31:36,760 --> 00:31:39,480 I claim that with this extra piece of information, 648 00:31:39,480 --> 00:31:41,770 provided I know that A is non-singular, 649 00:31:41,770 --> 00:31:44,540 I claim that from A*B equals A*C, 650 00:31:44,540 --> 00:31:48,900 I can conclude that B equals C. Not only can I conclude it, 651 00:31:48,900 --> 00:31:52,750 but I can conclude it as a corollary to numerical 652 00:31:52,750 --> 00:31:53,300 arithmetic. 653 00:31:53,300 --> 00:31:56,710 Because remember, how did we prove in numerical arithmetic 654 00:31:56,710 --> 00:31:58,580 that you could have cancellation? 655 00:31:58,580 --> 00:32:01,390 All it required was that the number being canceled 656 00:32:01,390 --> 00:32:02,850 had to have an inverse. 657 00:32:02,850 --> 00:32:05,290 I can parrot the proof word for word. 658 00:32:05,290 --> 00:32:09,880 Namely, I'm given that A*B equals A*C. I say, OK, 659 00:32:09,880 --> 00:32:13,050 I will therefore multiply both sides of the equation by A 660 00:32:13,050 --> 00:32:13,870 inverse. 661 00:32:13,870 --> 00:32:16,460 How do I know I could multiply by A inverse? 662 00:32:16,460 --> 00:32:20,330 Well, all I need to know is that A inverse exists. 663 00:32:20,330 --> 00:32:22,580 But how do I know then that A inverse does exist? 664 00:32:22,580 --> 00:32:24,740 Well, I said that A is non-singular 665 00:32:24,740 --> 00:32:28,440 and by definition that means that A inverse exists. 666 00:32:28,440 --> 00:32:31,300 So I multiply both sides by A inverse. 667 00:32:31,300 --> 00:32:34,330 Now, I also know that multiplication is associative. 668 00:32:34,330 --> 00:32:36,210 That's one of my rules of the game. 669 00:32:36,210 --> 00:32:39,890 So I switch the voice inflection, the parentheses. 670 00:32:39,890 --> 00:32:41,840 In other words, the fact that this is true 671 00:32:41,840 --> 00:32:43,450 means that this is true. 672 00:32:43,450 --> 00:32:46,470 See, I just switched the voice inflection. 673 00:32:46,470 --> 00:32:50,210 But by definition, what property does A inverse have? 674 00:32:50,210 --> 00:32:53,600 It has the property that A inverse multiplied by A 675 00:32:53,600 --> 00:32:56,310 gives you the identity matrix, I sub n. 676 00:32:56,310 --> 00:32:58,290 In other words, from this statement 677 00:32:58,290 --> 00:33:03,340 I can conclude that I sub n times B equals I sub n times C. 678 00:33:03,340 --> 00:33:05,520 But what property does I sub n have? 679 00:33:05,520 --> 00:33:08,040 It has the property that when it multiplies any matrix, 680 00:33:08,040 --> 00:33:09,870 it does not change that matrix. 681 00:33:09,870 --> 00:33:12,060 Therefore I sub n times B is just 682 00:33:12,060 --> 00:33:16,510 B. I sub n times C is just C. And I've concluded what? 683 00:33:16,510 --> 00:33:19,930 That, as a theorem, it follows inescapably in other words, 684 00:33:19,930 --> 00:33:24,350 that if A is non-singular, then if A*B equals A*C, 685 00:33:24,350 --> 00:33:29,190 B must equal C. And this is step by step the same proof that we 686 00:33:29,190 --> 00:33:32,410 used for numbers, except that we had to use what? 687 00:33:32,410 --> 00:33:34,340 I sub n instead of 1. 688 00:33:34,340 --> 00:33:37,030 If we just recopy this, this is what? 689 00:33:37,030 --> 00:33:40,330 Structurally, we cannot distinguish the proof here from 690 00:33:40,330 --> 00:33:44,240 the proof that we gave in numerical arithmetic. 691 00:33:44,240 --> 00:33:45,770 Now the question that comes up is, 692 00:33:45,770 --> 00:33:49,560 how do you determine whether a matrix is non-singular or not? 693 00:33:49,560 --> 00:33:51,490 Are there any cute recipes. 694 00:33:51,490 --> 00:33:55,050 And we've already, in this course, for different reasons, 695 00:33:55,050 --> 00:33:58,670 talked about 2 by 2 determinants and 3 by 3 determinants. 696 00:33:58,670 --> 00:34:02,320 Determinants get messy when you go up to higher than 3 by 3. 697 00:34:02,320 --> 00:34:04,910 Worse then messy, they become deceptive 698 00:34:04,910 --> 00:34:07,800 because the obvious recipes turn out to be false. 699 00:34:07,800 --> 00:34:10,389 And the correct recipes turn out to be ones 700 00:34:10,389 --> 00:34:13,219 that you rebel against using because somehow you're not 701 00:34:13,219 --> 00:34:15,030 used to them and like to believe there's 702 00:34:15,030 --> 00:34:16,730 a simpler way of doing it. 703 00:34:16,730 --> 00:34:20,199 I am going to save the precise study of determinants 704 00:34:20,199 --> 00:34:21,739 for a later block of material. 705 00:34:21,739 --> 00:34:24,590 But I just want to mention one interesting thing in terms 706 00:34:24,590 --> 00:34:27,699 of determinants and why determinants come up 707 00:34:27,699 --> 00:34:29,920 in the studies of systems of linear equations. 708 00:34:29,920 --> 00:34:31,780 And that is, the role of determinants 709 00:34:31,780 --> 00:34:34,080 is this-- and more details will be supplied 710 00:34:34,080 --> 00:34:37,870 in a later block-- the matrix A is non-singular if 711 00:34:37,870 --> 00:34:40,880 and only if its determinant is not 0. 712 00:34:40,880 --> 00:34:43,960 In other words, the existence of A inversed 713 00:34:43,960 --> 00:34:47,900 is equivalent to the fact that the determinant of the given 714 00:34:47,900 --> 00:34:50,020 matrix is not 0. 715 00:34:50,020 --> 00:34:51,750 Now this is a messy proof. 716 00:34:51,750 --> 00:34:55,780 So I will restrict the proof to that case when n equals 2. 717 00:34:55,780 --> 00:34:57,470 Because in the case n equals 2, it's 718 00:34:57,470 --> 00:34:59,940 rather easy to multiply these matrices together. 719 00:34:59,940 --> 00:35:04,236 For example, let's suppose I take the matrix [a, b; c, d]. 720 00:35:04,236 --> 00:35:06,110 In other words, we'll call this the matrix A. 721 00:35:06,110 --> 00:35:08,790 And I want to see, what should I multiply that matrix by 722 00:35:08,790 --> 00:35:10,080 to get the identity matrix? 723 00:35:10,080 --> 00:35:11,925 In other words, under what conditions can 724 00:35:11,925 --> 00:35:14,650 I invert the matrix [a, b; c, d]? 725 00:35:14,650 --> 00:35:19,690 Well, what that means is I want to find [x 1, x2; y 1, y 2] 726 00:35:19,690 --> 00:35:22,460 such that when I multiply these two matrices together, 727 00:35:22,460 --> 00:35:23,930 I get this matrix. 728 00:35:23,930 --> 00:35:25,490 Now, notice what this leads to. 729 00:35:25,490 --> 00:35:29,240 For example, this times this is what? 730 00:35:29,240 --> 00:35:34,240 It's a*x_1 plus b*y_1, but that must equal 1. 731 00:35:34,240 --> 00:35:40,630 Similarly, this times this is c*x_1 plus d*y_1, 732 00:35:40,630 --> 00:35:43,830 and that must equal this, which is 0. 733 00:35:43,830 --> 00:35:45,630 And that means what? 734 00:35:45,630 --> 00:35:49,640 To find x_1 and y_1, I have to be able to solve the system 735 00:35:49,640 --> 00:35:53,280 of equations a*x_1 plus b*y_1 equals 1. 736 00:35:53,280 --> 00:35:56,460 c*x_1 plus d*y_1 equals 0. 737 00:35:56,460 --> 00:35:58,960 Oh, similarly, it also has to be true 738 00:35:58,960 --> 00:36:02,090 that when I multiply the first row by the second column, 739 00:36:02,090 --> 00:36:03,600 I have to get 0. 740 00:36:03,600 --> 00:36:06,400 The second row here by the second column here, 741 00:36:06,400 --> 00:36:07,580 I have to get 1. 742 00:36:07,580 --> 00:36:09,960 That also gives me this system of equations. 743 00:36:09,960 --> 00:36:13,090 Notice by the way, that the matrix of coefficients 744 00:36:13,090 --> 00:36:15,940 on both of these two systems is the same. 745 00:36:15,940 --> 00:36:18,240 The matrix of coefficients is what? 746 00:36:18,240 --> 00:36:23,360 In both cases, the matrix of coefficients is [a, b; c, d]. 747 00:36:23,360 --> 00:36:25,390 Now here's the point. 748 00:36:25,390 --> 00:36:28,530 In order to get a unique solution here-- remember, 749 00:36:28,530 --> 00:36:31,320 both of these two equations, each of these two equations 750 00:36:31,320 --> 00:36:33,650 represents the equation of a straight line. 751 00:36:33,650 --> 00:36:36,677 The only way you can get one and only one solution 752 00:36:36,677 --> 00:36:38,510 is when the straight lines are not parallel. 753 00:36:38,510 --> 00:36:40,920 You see, if the two straight lines are parallel, 754 00:36:40,920 --> 00:36:42,420 if they're different straight lines, 755 00:36:42,420 --> 00:36:43,850 there are no intersections. 756 00:36:43,850 --> 00:36:45,590 And if they happen to coincide, you 757 00:36:45,590 --> 00:36:48,060 have infinitely many intersections. 758 00:36:48,060 --> 00:36:50,720 So the only time you're in trouble here 759 00:36:50,720 --> 00:36:53,100 is if these two lines happen to be parallel. 760 00:36:53,100 --> 00:36:55,070 Algebraically, that says what? 761 00:36:55,070 --> 00:36:59,460 That the ratio b over a is the same as the ratio d over c. 762 00:36:59,460 --> 00:37:01,320 In other words, the unique solubility 763 00:37:01,320 --> 00:37:05,550 of these systems of equations requires only that b over a 764 00:37:05,550 --> 00:37:07,360 be unequal to d over c. 765 00:37:07,360 --> 00:37:09,700 Well, another way of saying that is what? 766 00:37:09,700 --> 00:37:14,910 That a times d minus b times c be unequal to 0. 767 00:37:14,910 --> 00:37:18,240 But what is a*d minus b*c? 768 00:37:18,240 --> 00:37:27,070 a*d minus b*c is the determinant of the matrix [a, b; c, d]. 769 00:37:27,070 --> 00:37:29,000 In other words, in the two by two case, 770 00:37:29,000 --> 00:37:31,780 the matrix is invertible if and only 771 00:37:31,780 --> 00:37:35,650 if its determinant of coefficients is not 0. 772 00:37:35,650 --> 00:37:37,940 At least that proves it for the two by two case. 773 00:37:37,940 --> 00:37:41,320 Let's check it out in a couple of examples. 774 00:37:41,320 --> 00:37:44,680 Let's go back again to our old friend from examples 2 and 3. 775 00:37:44,680 --> 00:37:48,050 Let A be the matrix [1, 2; 2, 4]. 776 00:37:48,050 --> 00:37:50,670 The determinant of coefficients is 1 times 777 00:37:50,670 --> 00:37:54,820 4, which is 4, minus 2 times 2, which is also 4. 778 00:37:54,820 --> 00:37:56,680 4 minus 4 is 0. 779 00:37:56,680 --> 00:37:58,600 The determinant A is 0. 780 00:37:58,600 --> 00:38:03,550 Therefore, according to our theorem A is singular. 781 00:38:03,550 --> 00:38:05,680 By the way, I guess I've slipped here. 782 00:38:05,680 --> 00:38:07,570 I haven't defined what singular means. 783 00:38:07,570 --> 00:38:09,100 I think it's rather obvious. 784 00:38:09,100 --> 00:38:13,120 Singular is an abbreviation for non-non-singular. 785 00:38:13,120 --> 00:38:16,250 In other words, if it's false that the matrix is 786 00:38:16,250 --> 00:38:19,540 non-singular, then we call it singular. 787 00:38:19,540 --> 00:38:23,050 In other words, A does not have an inverse 788 00:38:23,050 --> 00:38:25,190 because its determinant is 0. 789 00:38:25,190 --> 00:38:27,500 And this checks with our previous result 790 00:38:27,500 --> 00:38:31,080 when we showed that A inverse didn't exist. 791 00:38:31,080 --> 00:38:31,780 OK. 792 00:38:31,780 --> 00:38:35,920 Let me pick one more example to conclude today's lesson with. 793 00:38:35,920 --> 00:38:38,230 Let's take the matrix A now to be 794 00:38:38,230 --> 00:38:41,910 the matrix whose first row is [5, 4] and whose second row 795 00:38:41,910 --> 00:38:43,960 is [7, 6]. 796 00:38:43,960 --> 00:38:45,880 Then, how do we find the determinant again? 797 00:38:45,880 --> 00:38:51,700 It's 5 times 6, which is 30, minus 7 times 4, which is 28. 798 00:38:51,700 --> 00:38:53,060 30 minus 28. 799 00:38:53,060 --> 00:38:54,210 Well, it happens to be 2. 800 00:38:54,210 --> 00:38:56,580 But the key factor is that it's not 0. 801 00:38:56,580 --> 00:38:59,840 In other words, the determinant of A is not 0. 802 00:38:59,840 --> 00:39:02,240 Therefore, according to our general theory, 803 00:39:02,240 --> 00:39:03,970 A inverse exists. 804 00:39:03,970 --> 00:39:07,830 And now, we come to why I have to give a second lecture 805 00:39:07,830 --> 00:39:08,980 on this particular topic. 806 00:39:08,980 --> 00:39:11,250 You see, what I have done now is I 807 00:39:11,250 --> 00:39:15,650 have finished matrix algebra as far as the qualitative overview 808 00:39:15,650 --> 00:39:16,650 is concerned. 809 00:39:16,650 --> 00:39:19,680 But the major problem in working with matrices, 810 00:39:19,680 --> 00:39:22,970 and the one which I will solve next time, is the following. 811 00:39:22,970 --> 00:39:26,230 If I'm given a matrix A, and I know somehow 812 00:39:26,230 --> 00:39:29,190 or other the determinant is not 0, 813 00:39:29,190 --> 00:39:35,420 or equivalently, somebody tells me that the A inverse exists, 814 00:39:35,420 --> 00:39:38,940 the question is, knowing that A inverse exists, 815 00:39:38,940 --> 00:39:44,020 how do we actually determine the value of A inverse? 816 00:39:44,020 --> 00:39:46,560 You see, there's two problems here. 817 00:39:46,560 --> 00:39:49,230 One is, given a system of equations, 818 00:39:49,230 --> 00:39:54,550 say you have n equations with n unknowns where y_1 up to y_n 819 00:39:54,550 --> 00:39:59,300 are expressed in terms of x_1 up to x_n, the first question is, 820 00:39:59,300 --> 00:40:03,630 is it possible to solve for the x's in terms of the y's. 821 00:40:03,630 --> 00:40:06,850 Now, if the answer to that question is no, we quit. 822 00:40:06,850 --> 00:40:09,500 But if the answer is yes, the next question-- 823 00:40:09,500 --> 00:40:11,300 and from a practical point of view 824 00:40:11,300 --> 00:40:13,720 this is often crucial-- the next question is, 825 00:40:13,720 --> 00:40:17,240 knowing that we can solve for the x's in terms of the y's, 826 00:40:17,240 --> 00:40:20,700 how do we actually carry out this computation? 827 00:40:20,700 --> 00:40:22,530 And the matrix equivalence is this. 828 00:40:22,530 --> 00:40:26,300 Given the matrix A, A inverse need not exist. 829 00:40:26,300 --> 00:40:31,500 But if A inverse does exist, how do we compute it? 830 00:40:31,500 --> 00:40:34,970 And that will be the subject of our lecture next time, 831 00:40:34,970 --> 00:40:36,730 how to compute A inverse. 832 00:40:36,730 --> 00:40:39,210 And a corollary to this will be, how 833 00:40:39,210 --> 00:40:42,040 is this related to solutions of systems of n 834 00:40:42,040 --> 00:40:43,990 equations in n unknowns? 835 00:40:43,990 --> 00:40:46,480 But we'll talk more about that next time. 836 00:40:46,480 --> 00:40:48,190 And until next time, good bye. 837 00:40:52,210 --> 00:40:54,590 Funding for the publication of this video 838 00:40:54,590 --> 00:40:59,460 was provided by the Gabrielle and Paul Rosenbaum Foundation. 839 00:40:59,460 --> 00:41:03,630 Help OCW continue to provide free and open access to MIT 840 00:41:03,630 --> 00:41:08,048 courses by making a donation at ocw.mit.edu/donate.