0:00:00.735,0:00:01.806 Voiceover:In the last video we saw 0:00:01.806,0:00:03.561 that we could take a[br]system of two equations 0:00:03.561,0:00:05.786 with two unknowns and represent it 0:00:05.786,0:00:09.119 as a matrix equation where the matrix A's 0:00:09.119,0:00:11.792 are the coefficients here[br]on the left-hand side. 0:00:11.792,0:00:13.669 The column vector X has our two 0:00:13.669,0:00:16.610 unknown variables, S and T. 0:00:16.610,0:00:17.845 Then the column vector B is essentially 0:00:17.845,0:00:20.529 representing the[br]right-hand side over here. 0:00:20.529,0:00:21.646 What was interesting about it, 0:00:21.646,0:00:23.386 then that would be the equation A, 0:00:23.386,0:00:25.230 the matrix A times the column vector X 0:00:25.230,0:00:27.605 being equal to the column vector B. 0:00:27.605,0:00:29.900 What was interesting about that is we saw 0:00:29.900,0:00:30.640 well, look, if A is invertible, 0:00:30.640,0:00:34.331 we can multiply both the[br]left and the right-hand sides 0:00:34.331,0:00:35.540 of the equation, 0:00:35.540,0:00:37.410 and we have to multiply[br]them on the left-hand sides 0:00:37.410,0:00:39.440 of their respective sides by A inverse 0:00:39.440,0:00:40.878 because remember matrix, 0:00:40.878,0:00:43.123 when matrix multiplication order matters, 0:00:43.123,0:00:44.911 we're multiplying the left-hand side 0:00:44.911,0:00:46.666 of both sides of the equation. 0:00:46.666,0:00:49.197 If we do that then we[br]can get to essentially 0:00:49.197,0:00:52.680 solving for the unknown column vector. 0:00:52.680,0:00:53.549 If we know what column vector X is, 0:00:53.549,0:00:55.980 then we know what S and T are. 0:00:55.980,0:00:57.300 Then we've essentially solved 0:00:57.300,0:00:59.379 this system of equations. 0:00:59.379,0:01:00.913 Now let's actually do that. 0:01:00.913,0:01:03.531 Let's actually figure[br]out what A inverse is 0:01:03.531,0:01:05.533 and multiply that times[br]the column vector B 0:01:05.533,0:01:07.980 to figure out what the column vector X is, 0:01:07.980,0:01:10.119 and what S and T are. 0:01:10.119,0:01:15.501 A inverse, A inverse is equal to 0:01:15.501,0:01:17.847 one over the determinant of A, 0:01:17.847,0:01:21.771 the determinant of A for a two-by-two here 0:01:21.771,0:01:26.780 is going to be two times[br]four minus negative 0:01:26.780,0:01:28.416 two times negative five. 0:01:28.416,0:01:32.559 It's going to be eight minus positive 10, 0:01:32.559,0:01:34.381 eight minus positive 10, 0:01:34.381,0:01:36.031 which would be negative two. 0:01:36.031,0:01:39.290 This would become negative[br]two right over here. 0:01:39.343,0:01:42.114 Once again, two times four is eight minus 0:01:42.114,0:01:44.700 negative two times negative five 0:01:44.700,0:01:48.960 so minus positive 10 which[br]gets us negative two. 0:01:48.960,0:01:50.117 You multiply one over the determinant 0:01:50.117,0:01:54.871 times what is sometimes[br]called the adjoint of A 0:01:54.871,0:01:57.905 which is essentially swapping the top left 0:01:57.905,0:02:00.847 and bottom right or at least[br]for a two-by-two matrix. 0:02:00.847,0:02:03.641 This would be a four. 0:02:03.641,0:02:05.639 This would be a two. 0:02:05.639,0:02:06.920 Notice I just swapped these, 0:02:06.920,0:02:08.291 and making these two negative, 0:02:08.291,0:02:10.443 the negative of what they already are. 0:02:10.443,0:02:11.919 This is from a negative two this is 0:02:11.919,0:02:13.501 going to become a positive two, 0:02:13.501,0:02:14.627 and this right over[br]here is going to become 0:02:14.627,0:02:16.237 a positive five. 0:02:16.237,0:02:18.963 If all of this looks[br]completely unfamiliar to you, 0:02:18.963,0:02:21.530 you might want to review the tutorial 0:02:21.530,0:02:22.693 on inverting matrices 0:02:22.693,0:02:25.240 because that's all I'm doing here. 0:02:25.240,0:02:28.551 So A inverse is going to be equal to, 0:02:28.551,0:02:31.920 A inverse is going to be equal to, 0:02:31.920,0:02:35.720 let's see, this is negative 1/2 times four 0:02:35.720,0:02:36.773 is negative two. 0:02:36.773,0:02:42.705 Negative 1/2, negative 1/2 times five 0:02:42.705,0:02:48.309 is negative 2.5, negative 2.5. 0:02:48.309,0:02:52.810 And negative 1/2 times[br]two is negative one. 0:02:52.810,0:02:55.180 Negative 1/2 times two is negative one. 0:02:55.180,0:02:56.986 So that's A inverse right over here. 0:02:56.986,0:02:59.371 Now let's multiply A inverse times 0:02:59.371,0:03:01.720 our column vector, seven, negative six. 0:03:01.720,0:03:03.710 Let's do that. 0:03:03.710,0:03:05.175 This is A inverse. I'll rewrite it. 0:03:05.175,0:03:09.433 Negative two, negative 2.5, negative one, 0:03:09.433,0:03:15.157 negative one times seven and negative six. 0:03:15.157,0:03:17.963 Times, I'll just write[br]them all in white here now. 0:03:17.963,0:03:19.680 Seven, negative six. 0:03:19.680,0:03:23.861 We've had a lot of practice[br]multiplying matrices. 0:03:23.861,0:03:26.395 So what is this going to be equal to? 0:03:26.395,0:03:28.120 The first entry is[br]going to be negative two 0:03:28.120,0:03:33.520 times seven which is negative 14 plus 0:03:33.520,0:03:38.548 negative 2.5 times negative six. 0:03:38.548,0:03:40.780 Let's see. That's going to be positive. 0:03:40.780,0:03:43.751 That's going to be 12 plus another 3. 0:03:43.751,0:03:45.666 That's going to be plus 15. 0:03:45.666,0:03:47.703 Plus 15. 0:03:47.703,0:03:49.887 Negative 2.5 times negative six 0:03:49.887,0:03:52.131 is positive 15. 0:03:52.131,0:03:54.143 Then we're going to have negative one 0:03:54.143,0:03:57.686 times seven which is negative seven plus 0:03:57.686,0:04:00.130 negative one times negative six. 0:04:00.130,0:04:02.697 Well, that is positive six. 0:04:02.697,0:04:06.530 So the product A inverse B 0:04:06.530,0:04:08.812 which is the same things[br]as a column vector X 0:04:08.812,0:04:09.999 is equal to, 0:04:09.999,0:04:11.840 we deserve a little[br]bit of a drum roll now, 0:04:11.840,0:04:15.716 the column vector one, negative one. 0:04:15.716,0:04:18.914 We have just shown that this is equal to 0:04:18.914,0:04:22.249 one, negative one or that X is equal to 0:04:22.249,0:04:23.852 one, negative one, 0:04:23.852,0:04:27.891 or we could even say[br]that the column vector, 0:04:27.891,0:04:32.720 the column vector ST, 0:04:32.720,0:04:36.772 column vector with the[br]entries S and T is equal to, 0:04:36.772,0:04:43.306 is equal to one, negative one, 0:04:43.306,0:04:46.596 is equal to one, negative one 0:04:46.596,0:04:47.593 which is another way of saying 0:04:47.593,0:04:49.250 that S is equal to one 0:04:49.250,0:04:51.411 and T is equal to negative one. 0:04:51.411,0:04:52.470 I know what you're saying. 0:04:52.470,0:04:53.539 I said this in the last video 0:04:53.539,0:04:54.808 and I'll say it again in this video. 0:04:54.808,0:04:56.172 You're like, "Well, you[br]know, it was so much easier 0:04:56.172,0:04:58.115 "to just solve this system directly 0:04:58.115,0:05:01.127 "just with using elimination[br]or using substitution." 0:05:01.127,0:05:05.910 I agree with you, but[br]this is a useful technique 0:05:05.910,0:05:07.664 because when you are doing problems 0:05:07.664,0:05:10.125 in computation there may be situations 0:05:10.125,0:05:12.111 where you have the left-hand side 0:05:12.111,0:05:14.800 of this system stays the same, 0:05:14.800,0:05:16.362 but there's many, many,[br]many different values 0:05:16.362,0:05:18.274 for the right-hand side of the system. 0:05:18.274,0:05:20.426 So it might be easier to just compute 0:05:20.426,0:05:23.907 the inverse once and[br]just keep multiplying, 0:05:23.907,0:05:26.266 keep multiplying this inverse times 0:05:26.266,0:05:29.885 the different what we have[br]on the right-hand side. 0:05:29.885,0:05:32.132 You probably are familiar with some types, 0:05:32.132,0:05:33.869 you have graphics processors, 0:05:33.869,0:05:35.600 and graphics cards on computers 0:05:35.600,0:05:37.780 and they talk about[br]special graphic processors. 0:05:37.780,0:05:39.397 What these are really all about 0:05:39.397,0:05:41.875 are the hardware that is special-purposed 0:05:41.875,0:05:45.480 for really fast matrix multiplication 0:05:45.480,0:05:47.553 because when you're[br]doing graphics processing 0:05:47.553,0:05:48.864 when you're thinking about modeling things 0:05:48.864,0:05:49.879 in three dimensions, 0:05:49.879,0:05:51.387 and you're doing all[br]these transformations, 0:05:51.387,0:05:52.841 you're really just doing a lot of 0:05:52.841,0:05:55.285 matrix multiplications[br]really, really, really fast 0:05:55.285,0:05:57.693 in real time so that to[br]the user playing the game 0:05:57.693,0:05:59.480 or whatever they're doing, 0:05:59.480,0:06:00.836 it feels like they're in some type 0:06:00.836,0:06:03.866 of a 3D, real-time reality. 0:06:03.866,0:06:05.761 Anyway, I just want to point that out. 0:06:05.761,0:06:09.979 This wouldn't be, if I[br]saw this just randomly 0:06:09.979,0:06:13.297 my instincts would be to[br]solve this with elimination, 0:06:13.297,0:06:16.930 but this ability to think of this 0:06:16.930,0:06:21.642 as a matrix equation is a[br]very, very useful concept, 0:06:21.642,0:06:23.240 one actually not just in computation, 0:06:23.240,0:06:26.560 but also as you go into[br]higher level sciences 0:06:26.560,0:06:28.878 especially physics, you will see a lot of 0:06:28.878,0:06:31.826 matrix vector equations like this 0:06:31.826,0:06:33.356 that kind of speak in generalities. 0:06:33.356,0:06:34.571 It's really important to think about 0:06:34.571,0:06:36.508 what these actually represent 0:06:36.508,0:06:39.270 and how they can actually be solved.