1 00:00:00,000 --> 00:00:00,760 2 00:00:00,760 --> 00:00:04,280 In the last video we saw how a matrix and figuring out its 3 00:00:04,280 --> 00:00:06,730 inverse can be used to solve a system of equations. 4 00:00:06,730 --> 00:00:07,790 And we did a 2 by 2. 5 00:00:07,790 --> 00:00:09,199 And in the future, we'll do 3 by 3's. 6 00:00:09,199 --> 00:00:11,169 We won't do 4 by 4's because those take too long. 7 00:00:11,169 --> 00:00:13,740 But you'll see it applies to kind of an n by n matrix. 8 00:00:13,740 --> 00:00:17,309 And that is probably the application of matrices that 9 00:00:17,309 --> 00:00:20,419 you learn if you learn this in your Algebra 2 class, or your 10 00:00:20,420 --> 00:00:22,190 Algebra 1 class. 11 00:00:22,190 --> 00:00:23,720 And you often wonder, well why even do the 12 00:00:23,719 --> 00:00:25,119 whole matrix thing? 13 00:00:25,120 --> 00:00:28,570 Now I will show you another application of matrices that 14 00:00:28,570 --> 00:00:31,920 actually you're more likely to see in your linear algebra 15 00:00:31,920 --> 00:00:34,200 class when you take it in college. 16 00:00:34,200 --> 00:00:37,030 But the really neat thing here is, and I think this will 17 00:00:37,030 --> 00:00:40,219 really hit the point home, that the matrix representation 18 00:00:40,219 --> 00:00:43,359 is just one way of representing multiple types of 19 00:00:43,359 --> 00:00:45,549 problems. And what's really cool is that if different 20 00:00:45,549 --> 00:00:47,589 problems can be represented the same way, it kind of tells 21 00:00:47,590 --> 00:00:48,920 you that they're the same problem. 22 00:00:48,920 --> 00:00:50,550 And that's called an isomorphism in math. 23 00:00:50,549 --> 00:00:53,239 That if you can reduce one problem into another problem, 24 00:00:53,240 --> 00:00:54,450 then all the work you did with one of them 25 00:00:54,450 --> 00:00:55,570 applies to the other. 26 00:00:55,570 --> 00:00:58,329 But anyway, let's figure out a new way that 27 00:00:58,329 --> 00:01:00,579 matrices can be used. 28 00:01:00,579 --> 00:01:03,119 So I'm going to draw some vectors. 29 00:01:03,119 --> 00:01:06,879 Let's say I have the vector-- Let's call this vector a. 30 00:01:06,879 --> 00:01:12,920 31 00:01:12,920 --> 00:01:14,920 And I'm going to just write this is as a column vector. 32 00:01:14,920 --> 00:01:16,780 And all of this is just convention. 33 00:01:16,780 --> 00:01:18,079 These are just human invented things. 34 00:01:18,079 --> 00:01:19,319 I could have written this diagonally. 35 00:01:19,319 --> 00:01:20,639 I could have written this however. 36 00:01:20,640 --> 00:01:31,120 But if I say vector a is 3, negative 6. 37 00:01:31,120 --> 00:01:33,265 And I view this as the x component of the vector, and 38 00:01:33,265 --> 00:01:35,329 this is equal to the y component of the vector. 39 00:01:35,329 --> 00:01:36,689 And then I have vector b. 40 00:01:36,689 --> 00:01:41,920 41 00:01:41,920 --> 00:01:57,810 Vector b is equal to 2, 6. 42 00:01:57,810 --> 00:02:04,329 And I want to know are there some combinations of vectors a 43 00:02:04,329 --> 00:02:08,949 and b-- where you can say, 5 times vector a, plus 3 times 44 00:02:08,949 --> 00:02:13,350 vector b, or 10 times victor a minus 6 times vector b-- some 45 00:02:13,349 --> 00:02:19,419 combination of vector a and b, where I can get vector c. 46 00:02:19,419 --> 00:02:31,250 And vector c is the vector 7, 6. 47 00:02:31,250 --> 00:02:33,205 So let me see if I can visually draw this problem. 48 00:02:33,205 --> 00:02:35,560 So let me draw the coordinate axes. 49 00:02:35,560 --> 00:02:36,300 Let's see this one. 50 00:02:36,300 --> 00:02:37,490 3, negative 6. 51 00:02:37,490 --> 00:02:39,439 That'll be in quadrant-- these are both 52 00:02:39,439 --> 00:02:40,180 in the first quadrant. 53 00:02:40,180 --> 00:02:42,840 So I just want to figure out how much of the 54 00:02:42,840 --> 00:02:43,900 axes I need to draw. 55 00:02:43,900 --> 00:02:47,580 So let's see-- Let me do a different color. 56 00:02:47,580 --> 00:02:52,640 57 00:02:52,639 --> 00:02:53,669 That's my y-axis. 58 00:02:53,669 --> 00:02:56,159 I'm not drawing the second or third quadrants, because I 59 00:02:56,159 --> 00:02:58,139 don't think our vectors show up there. 60 00:02:58,139 --> 00:03:01,384 And then this is the x-axis. 61 00:03:01,384 --> 00:03:03,909 62 00:03:03,909 --> 00:03:05,365 Let me draw each of these vectors. 63 00:03:05,365 --> 00:03:08,270 64 00:03:08,270 --> 00:03:11,130 So first I'll do vector a. 65 00:03:11,129 --> 00:03:13,310 That's 3, negative 6. 66 00:03:13,310 --> 00:03:17,770 1, 2, 3, and then negative 6. 67 00:03:17,770 --> 00:03:24,170 1, 2, 3, 4, 5, 6. 68 00:03:24,169 --> 00:03:26,969 So it's there. 69 00:03:26,969 --> 00:03:31,009 So if I wanted to draw it as a vector, usually 70 00:03:31,009 --> 00:03:32,259 start at the origin. 71 00:03:32,259 --> 00:03:34,893 72 00:03:34,894 --> 00:03:36,980 And it doesn't have to start at the origin like that. 73 00:03:36,979 --> 00:03:37,729 I'm just choosing to. 74 00:03:37,729 --> 00:03:39,989 You can move around a vector. 75 00:03:39,990 --> 00:03:42,189 It just has to have the same orientation 76 00:03:42,189 --> 00:03:45,680 and the same magnitude. 77 00:03:45,680 --> 00:03:52,620 So that is vector a for the green. 78 00:03:52,620 --> 00:03:56,670 Now let me do in magenta, I'll do vector b. 79 00:03:56,669 --> 00:03:59,049 That is 2, 6. 80 00:03:59,050 --> 00:04:04,280 1, 2, 3, 4, 5, 6. 81 00:04:04,280 --> 00:04:12,629 So 2, 6 is right over there. 82 00:04:12,629 --> 00:04:14,740 And that's vector b. 83 00:04:14,740 --> 00:04:22,160 84 00:04:22,160 --> 00:04:25,300 So it'll look like this. 85 00:04:25,300 --> 00:04:27,370 That's vector b. 86 00:04:27,370 --> 00:04:30,629 And then let me write down vector a down there. 87 00:04:30,629 --> 00:04:32,790 That's vector a. 88 00:04:32,790 --> 00:04:35,210 And I want to take some combination of 89 00:04:35,209 --> 00:04:36,719 vectors a and b. 90 00:04:36,720 --> 00:04:38,400 And add them up and get vector c. 91 00:04:38,399 --> 00:04:39,689 So what does vector c look like? 92 00:04:39,689 --> 00:04:41,620 It's 7, 6. 93 00:04:41,620 --> 00:04:43,290 Let me do that in purple. 94 00:04:43,290 --> 00:04:50,390 So 1, 2, 3, 4, 5, 6, 7. 95 00:04:50,389 --> 00:04:52,240 Comma 6. 96 00:04:52,240 --> 00:04:55,939 So 7, 6 is right over there. 97 00:04:55,939 --> 00:04:57,189 That's vector c. 98 00:04:57,189 --> 00:05:00,399 99 00:05:00,399 --> 00:05:02,144 Vector c looks like that. 100 00:05:02,144 --> 00:05:09,000 101 00:05:09,000 --> 00:05:10,730 I'm going to draw it like that. 102 00:05:10,730 --> 00:05:14,640 And that's vector c. 103 00:05:14,639 --> 00:05:16,009 So what was the original problem I said? 104 00:05:16,009 --> 00:05:19,459 I said I want to add some multiple of vector a to some 105 00:05:19,459 --> 00:05:21,889 multiple of vector b, and get vector c. 106 00:05:21,889 --> 00:05:24,000 And I want to see what those multiples are. 107 00:05:24,000 --> 00:05:25,649 So let's say the multiple that I multiply 108 00:05:25,649 --> 00:05:27,649 times vector a is x. 109 00:05:27,649 --> 00:05:29,209 And the multiple of vector b is y. 110 00:05:29,209 --> 00:05:33,379 So I essentially want to say that-- let me do it in another 111 00:05:33,379 --> 00:05:42,329 neutral color-- that vector ax-- that's how much of vector 112 00:05:42,329 --> 00:05:49,740 a I'm contributing-- plus vector by-- that's how much of 113 00:05:49,740 --> 00:05:54,920 vector b I'm contributing-- is equal to vector c. 114 00:05:54,920 --> 00:05:56,199 And you know, maybe I can't. 115 00:05:56,199 --> 00:05:59,469 Maybe there's no combinations of vector a and b when you add 116 00:05:59,470 --> 00:06:00,830 them together equal vector c. 117 00:06:00,829 --> 00:06:03,120 But let's see if we can solve this. 118 00:06:03,120 --> 00:06:03,829 So how do we solve? 119 00:06:03,829 --> 00:06:05,899 So let's expand out vectors a and b. 120 00:06:05,899 --> 00:06:06,709 Vector a is what? 121 00:06:06,709 --> 00:06:07,859 3, negative 6. 122 00:06:07,860 --> 00:06:17,210 So vector a, we could write as 3, minus 6 times x. 123 00:06:17,209 --> 00:06:20,120 That just tells us how much vector a we're contributing. 124 00:06:20,120 --> 00:06:22,120 Plus vector b, which is 2, 6. 125 00:06:22,120 --> 00:06:26,790 126 00:06:26,790 --> 00:06:29,240 And then y is how much vector b we're contributing. 127 00:06:29,240 --> 00:06:33,960 And that is equal to 7, 6. 128 00:06:33,959 --> 00:06:36,919 Vector c. 129 00:06:36,920 --> 00:06:41,439 Now this right here, this problem can be rewritten just 130 00:06:41,439 --> 00:06:43,990 based on how we've defined matrix multiplication, et 131 00:06:43,990 --> 00:06:47,150 cetera, et cetera, as this. 132 00:06:47,149 --> 00:07:07,779 As 3, minus 6, 2, 6, times x, y, is equal to 7, 6. 133 00:07:07,779 --> 00:07:09,149 Now how does that work out? 134 00:07:09,149 --> 00:07:11,849 Well think about how matrix multiplication works out. 135 00:07:11,850 --> 00:07:16,530 The way we learned matrix multiplication, we said, 3 136 00:07:16,529 --> 00:07:25,250 times x, plus 2 times y is equal to 7. 137 00:07:25,250 --> 00:07:28,740 3 times x plus 2 times y is equal to 7. 138 00:07:28,740 --> 00:07:30,800 That's how we learned matrix multiplication. 139 00:07:30,800 --> 00:07:31,699 That's the same thing here. 140 00:07:31,699 --> 00:07:37,170 3 times x, plus 2 times y, is going to be equal to 7. 141 00:07:37,170 --> 00:07:39,270 These x and y here are just scalar numbers. 142 00:07:39,269 --> 00:07:41,379 So 3 times x plus 2 times y is equal to 7. 143 00:07:41,379 --> 00:07:45,629 And then matrix multiplication here, minus 6 times x plus 6 144 00:07:45,629 --> 00:07:47,029 times y is equal to 6. 145 00:07:47,029 --> 00:07:49,079 That's just traditional matrix multiplication that we learned 146 00:07:49,079 --> 00:07:50,329 several videos ago. 147 00:07:50,329 --> 00:07:51,120 That's the same thing here. 148 00:07:51,120 --> 00:07:54,389 Minus 6x plus 6y is equal to 6. 149 00:07:54,389 --> 00:07:56,560 These x's and y's are just numbers. 150 00:07:56,560 --> 00:07:57,410 They're just scalar numbers. 151 00:07:57,410 --> 00:07:58,380 They're not vectors or anything. 152 00:07:58,379 --> 00:08:01,639 We would just multiply them times both of these numbers. 153 00:08:01,639 --> 00:08:03,709 So hopefully you see that this problem is the exact same 154 00:08:03,709 --> 00:08:04,579 thing as this problem. 155 00:08:04,579 --> 00:08:08,029 And you've maybe had an a-ha moment now, if you watched the 156 00:08:08,029 --> 00:08:08,699 previous video. 157 00:08:08,699 --> 00:08:16,069 Because this matrix also represented the problem, where 158 00:08:16,069 --> 00:08:18,209 do we find the intersection of two lines? 159 00:08:18,209 --> 00:08:20,219 Where the two lines-- I'm just going to do it on the side 160 00:08:20,220 --> 00:08:24,290 here-- the intersection of the two lines, 3x plus 161 00:08:24,290 --> 00:08:26,210 2y is equal to 7. 162 00:08:26,209 --> 00:08:31,799 And minus 6x plus 6y is equal to 6. 163 00:08:31,800 --> 00:08:33,408 And so, I had drawn two lines. 164 00:08:33,408 --> 00:08:34,899 And we said, what's the point of intersection, 165 00:08:34,899 --> 00:08:35,600 et cetera, et cetera. 166 00:08:35,600 --> 00:08:37,538 And it was represented by this problem. 167 00:08:37,538 --> 00:08:39,860 But here, we have-- well I won't say a completely 168 00:08:39,860 --> 00:08:41,139 different problem, because we're learning they're 169 00:08:41,139 --> 00:08:43,580 actually very similar-- but here I'm doing a problem of, 170 00:08:43,580 --> 00:08:46,870 I'm trying to find what combination of the matrices a 171 00:08:46,870 --> 00:08:49,570 and b add up to the matrix c. 172 00:08:49,570 --> 00:08:53,340 But it got reduced to the same matrix representation. 173 00:08:53,340 --> 00:08:56,430 And so we can solve this the same exactly way we solved 174 00:08:56,429 --> 00:08:57,750 this problem. 175 00:08:57,750 --> 00:09:02,570 If we call this the matrix a, let's figure out a inverse. 176 00:09:02,570 --> 00:09:06,190 So we get a inverse is equal to what? 177 00:09:06,190 --> 00:09:08,222 It equals 1 over the determinant of a. 178 00:09:08,221 --> 00:09:10,740 The determinant of a is 3 times 6. 179 00:09:10,740 --> 00:09:13,850 18 minus minus 12. 180 00:09:13,850 --> 00:09:18,560 So that's 18 plus 12, which is 1/30. 181 00:09:18,559 --> 00:09:19,849 And we did this in the previous video. 182 00:09:19,850 --> 00:09:21,170 You swap these two numbers. 183 00:09:21,169 --> 00:09:23,149 So you get 6 and 3. 184 00:09:23,149 --> 00:09:25,120 And then you make these two negatives. 185 00:09:25,120 --> 00:09:28,600 So you get 6 and minus 2. 186 00:09:28,600 --> 00:09:29,730 That's a inverse. 187 00:09:29,730 --> 00:09:32,590 And now to solve for x and y, we can multiply both sides of 188 00:09:32,590 --> 00:09:34,210 this equation by a inverse. 189 00:09:34,210 --> 00:09:37,340 If you multiply a inverse times a, this cancels out. 190 00:09:37,340 --> 00:09:45,790 So you get x, y is equal to a inverse times this. 191 00:09:45,789 --> 00:09:53,740 It's equal to 1/30 times 6, minus 2, 6, 3. 192 00:09:53,740 --> 00:09:55,330 Times 7, 6. 193 00:09:55,330 --> 00:09:58,250 And remember, with matrices, the order that 194 00:09:58,250 --> 00:09:59,830 you multiply matters. 195 00:09:59,830 --> 00:10:01,830 So on this side, we multiplied a inverse on 196 00:10:01,830 --> 00:10:03,250 this side of the equation. 197 00:10:03,250 --> 00:10:06,580 So we have to do a inverse on the left side on this side of 198 00:10:06,580 --> 00:10:07,530 this equation. 199 00:10:07,529 --> 00:10:08,360 So that's why did it here. 200 00:10:08,360 --> 00:10:11,570 If we did it the other way, all bets are off. 201 00:10:11,570 --> 00:10:13,310 So what does this equal? 202 00:10:13,309 --> 00:10:17,859 This is equal to 1/30 times-- and we did this the previous 203 00:10:17,860 --> 00:10:21,060 problem-- 6 times 7 is 42, minus 12. 204 00:10:21,059 --> 00:10:22,250 30. 205 00:10:22,250 --> 00:10:23,409 6 times 7, 42. 206 00:10:23,409 --> 00:10:24,219 Plus 18. 207 00:10:24,220 --> 00:10:26,170 60. 208 00:10:26,169 --> 00:10:30,799 So that equals 1, 2. 209 00:10:30,799 --> 00:10:32,169 So what does this tell us? 210 00:10:32,169 --> 00:10:37,129 This tells us that if we have 1 times vector a, plus 2 211 00:10:37,129 --> 00:10:38,610 times vector b. 212 00:10:38,610 --> 00:10:43,360 1 times-- this is 1-- and 2 times vector b. 213 00:10:43,360 --> 00:10:46,419 So 1 times vector a plus 2 times vector b is 214 00:10:46,419 --> 00:10:47,684 equal to vector c. 215 00:10:47,684 --> 00:10:49,089 And let's confirm that visually. 216 00:10:49,090 --> 00:10:50,820 So 1 times vector a. 217 00:10:50,820 --> 00:10:52,140 Well that's vector a right there. 218 00:10:52,139 --> 00:10:55,409 So if we add 2 vector b's to it, we should get vector c. 219 00:10:55,409 --> 00:10:57,299 So let's see if we can do that. 220 00:10:57,299 --> 00:11:01,149 So if we just shift vector b over this way, well vector 221 00:11:01,149 --> 00:11:03,329 let's see, vector b is over 2 and up 6. 222 00:11:03,330 --> 00:11:08,020 So over 2 and up 6 would get us there. 223 00:11:08,019 --> 00:11:12,230 So 1, vector b-- just doing heads to tail visual method of 224 00:11:12,230 --> 00:11:16,240 adding vectors-- would get us there. 225 00:11:16,240 --> 00:11:17,270 1, 2, 3. 226 00:11:17,270 --> 00:11:18,520 Good. 227 00:11:18,520 --> 00:11:20,819 228 00:11:20,820 --> 00:11:23,250 No, let me see. 229 00:11:23,250 --> 00:11:26,779 1, 2, 3. 230 00:11:26,779 --> 00:11:30,339 And then vector b goes over two more. 231 00:11:30,340 --> 00:11:33,139 two more. 232 00:11:33,139 --> 00:11:35,240 So it'll get us up 6. 233 00:11:35,240 --> 00:11:36,860 It's like that. 234 00:11:36,860 --> 00:11:40,409 So that's 1, vector b. 235 00:11:40,409 --> 00:11:43,549 And then if we add another-- but we want 2 times vector b. 236 00:11:43,549 --> 00:11:45,179 We essentially need two vector b's. 237 00:11:45,179 --> 00:11:47,819 So we had one, and then we add another one. 238 00:11:47,820 --> 00:11:51,395 I think visually you see that it does actually-- I didn't 239 00:11:51,394 --> 00:11:52,159 want to do it like that. 240 00:11:52,159 --> 00:11:55,240 I wanted to use the line tool so it looks neat. 241 00:11:55,240 --> 00:11:56,830 So you add another vector b. 242 00:11:56,830 --> 00:11:59,840 And there you have it. 243 00:11:59,840 --> 00:12:01,320 That's a vector b. 244 00:12:01,320 --> 00:12:02,680 So it's 2 times vector b. 245 00:12:02,679 --> 00:12:05,529 So it's the same direction as vector b, but it's two times 246 00:12:05,529 --> 00:12:06,269 the length. 247 00:12:06,269 --> 00:12:07,610 So we visually showed it. 248 00:12:07,610 --> 00:12:10,529 We solved it algabraically. 249 00:12:10,529 --> 00:12:13,990 But the real learning, and the big real discovery of this 250 00:12:13,990 --> 00:12:18,730 whole video, is to show you that the matrix representation 251 00:12:18,730 --> 00:12:23,720 can represent multiple different problems. This was a 252 00:12:23,720 --> 00:12:26,210 finding the combinations of a vector problem. 253 00:12:26,210 --> 00:12:28,360 And the previous one it was figure out if 254 00:12:28,360 --> 00:12:30,090 two lines can intersect. 255 00:12:30,090 --> 00:12:32,420 But what it tells you is that these two problems are 256 00:12:32,419 --> 00:12:33,979 connected in some deep way. 257 00:12:33,980 --> 00:12:37,830 That if we take the veneer of reality, that underlying it, 258 00:12:37,830 --> 00:12:39,259 they are the same thing. 259 00:12:39,259 --> 00:12:41,889 And frankly, that's why math is so interesting. 260 00:12:41,889 --> 00:12:45,480 Because when you realize that two problems are really the 261 00:12:45,480 --> 00:12:48,539 same thing, it takes all of the superficial human veneer 262 00:12:48,539 --> 00:12:49,779 away from things. 263 00:12:49,779 --> 00:12:52,279 Because our brains are kind of wired to perceive the world in 264 00:12:52,279 --> 00:12:52,789 a certain way. 265 00:12:52,789 --> 00:12:56,329 But it tells us that there's some fundamental truth, 266 00:12:56,330 --> 00:13:00,050 independent of our perception, that is tying all of these 267 00:13:00,049 --> 00:13:01,349 different concepts together. 268 00:13:01,350 --> 00:13:03,800 But anyway, I don't want to get all mystical on you. 269 00:13:03,799 --> 00:13:05,779 But if you do see the mysticism in 270 00:13:05,779 --> 00:13:07,309 math, all the better. 271 00:13:07,309 --> 00:13:10,889 But hopefully you found that pretty interesting. 272 00:13:10,889 --> 00:13:12,659 And actually, I know I'm going over time, but I think this 273 00:13:12,659 --> 00:13:15,819 is-- A lot of people take linear algebra, they learn how 274 00:13:15,820 --> 00:13:17,500 to do all of the things, and they say, well what is the 275 00:13:17,500 --> 00:13:18,179 whole point of this? 276 00:13:18,179 --> 00:13:20,019 But this is kind of an interesting 277 00:13:20,019 --> 00:13:22,250 thing to think about. 278 00:13:22,250 --> 00:13:27,070 We had this had vector a and we had this vector b. 279 00:13:27,070 --> 00:13:29,310 And we were able to say, well there's some combinations of 280 00:13:29,309 --> 00:13:31,599 the vectors a and b, that when we added it up, 281 00:13:31,600 --> 00:13:34,399 we got vector c. 282 00:13:34,399 --> 00:13:38,250 So an interesting question is, what are all the vectors that 283 00:13:38,250 --> 00:13:42,389 I could get to by adding combinations of 284 00:13:42,389 --> 00:13:43,220 vectors a and b. 285 00:13:43,220 --> 00:13:44,600 Or adding or subtracting. 286 00:13:44,600 --> 00:13:46,279 Or you could say, I could multiply 287 00:13:46,279 --> 00:13:47,089 them by negative numbers. 288 00:13:47,090 --> 00:13:47,730 But either way. 289 00:13:47,730 --> 00:13:51,259 What are all of the vectors that I can get by taking 290 00:13:51,259 --> 00:13:53,490 linear combinations of vectors a and b? 291 00:13:53,490 --> 00:13:57,600 And that's actually called the vector space spanned by the 292 00:13:57,600 --> 00:13:58,360 vectors a and b. 293 00:13:58,360 --> 00:14:01,060 And we'll do more of that in linear algebra. 294 00:14:01,059 --> 00:14:02,459 And here we're dealing with a two 295 00:14:02,460 --> 00:14:04,450 dimensional Euclidean space. 296 00:14:04,450 --> 00:14:06,160 We could have had three dimensional vectors. 297 00:14:06,159 --> 00:14:07,740 We could've had n dimensional vectors. 298 00:14:07,740 --> 00:14:09,990 So it gets really, really, really abstract. 299 00:14:09,990 --> 00:14:14,389 But this is, I think, a really good toe dipping for linear 300 00:14:14,389 --> 00:14:14,980 algebra as well. 301 00:14:14,980 --> 00:14:17,110 So hopefully I haven't confused or overwhelmed you. 302 00:14:17,110 --> 00:14:19,430 And I'll see you in the next video. 303 00:14:19,429 --> 00:14:19,500