[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:04.96,0:00:08.11,Default,,0000,0000,0000,,One of the most important\Napplications of matrices is to Dialogue: 0,0:00:08.11,0:00:11.58,Default,,0000,0000,0000,,finding the solution of a pair\Nof simultaneous equations. So in Dialogue: 0,0:00:11.58,0:00:15.98,Default,,0000,0000,0000,,this video I'm going to show you\Nhow we can use matrices to do Dialogue: 0,0:00:15.98,0:00:19.14,Default,,0000,0000,0000,,just that. Let's look at this\Npair of simultaneous equations Dialogue: 0,0:00:19.14,0:00:23.54,Default,,0000,0000,0000,,here. X + 2 is four and three X\N-- 5 Y is 1. Dialogue: 0,0:00:24.45,0:00:27.46,Default,,0000,0000,0000,,Provided you understand how\Nmatrices are multiplied Dialogue: 0,0:00:27.46,0:00:32.19,Default,,0000,0000,0000,,together, you will be able to\Nwrite these equations in what's Dialogue: 0,0:00:32.19,0:00:34.34,Default,,0000,0000,0000,,called matrix form. I'll show Dialogue: 0,0:00:34.34,0:00:41.24,Default,,0000,0000,0000,,you how. Supposing we write down\Nthe Matrix 1, two, 3 -- 5, and Dialogue: 0,0:00:41.24,0:00:47.51,Default,,0000,0000,0000,,we multiply it by another matrix\NXY. Let's just see how we can do Dialogue: 0,0:00:47.51,0:00:53.44,Default,,0000,0000,0000,,that. So we have a two by two\Nmatrix here and I formed it from Dialogue: 0,0:00:53.44,0:00:57.30,Default,,0000,0000,0000,,the coefficients of X&Y in the\Nsimultaneous equations 1, two, 3 Dialogue: 0,0:00:57.30,0:01:03.41,Default,,0000,0000,0000,,-- 5. I've written this matrix\Nhere X&Y, which was which, Dialogue: 0,0:01:03.41,0:01:06.01,Default,,0000,0000,0000,,contains the unknowns in the Dialogue: 0,0:01:06.01,0:01:09.86,Default,,0000,0000,0000,,simultaneous equations. Now,\Nprovided you can understand how Dialogue: 0,0:01:09.86,0:01:13.28,Default,,0000,0000,0000,,to do matrix multiplication, you\Nrealize that these can be Dialogue: 0,0:01:13.28,0:01:16.70,Default,,0000,0000,0000,,multiplied together as follows.\NYou pair the Elements 1, two Dialogue: 0,0:01:16.70,0:01:20.46,Default,,0000,0000,0000,,with XY and multiply the paired\Nelements together and then add. Dialogue: 0,0:01:21.13,0:01:22.72,Default,,0000,0000,0000,,So it's 1 * X. Dialogue: 0,0:01:23.64,0:01:29.93,Default,,0000,0000,0000,,Which is X added to 2 *\Ny which is 2 Y. Dialogue: 0,0:01:29.93,0:01:34.61,Default,,0000,0000,0000,,And you'll notice that X + 2 Y\Nis the same as the quantity on Dialogue: 0,0:01:34.61,0:01:36.79,Default,,0000,0000,0000,,the left hand side of the first Dialogue: 0,0:01:36.79,0:01:41.76,Default,,0000,0000,0000,,equation. If we look at this\Nsecond row here and multiply it Dialogue: 0,0:01:41.76,0:01:47.25,Default,,0000,0000,0000,,by the X and the Y 3 * X\N-- 5 * y. Dialogue: 0,0:01:47.77,0:01:49.17,Default,,0000,0000,0000,,And you'll see what we have Dialogue: 0,0:01:49.17,0:01:52.95,Default,,0000,0000,0000,,here. Is the left hand side of\Nthe second equation in the Dialogue: 0,0:01:52.95,0:01:57.87,Default,,0000,0000,0000,,simultaneous equations? And then\Nwe can write. This lot is equal Dialogue: 0,0:01:57.87,0:02:03.02,Default,,0000,0000,0000,,to 4, one which is a matrix\Nformed by the right hand side Dialogue: 0,0:02:03.02,0:02:04.61,Default,,0000,0000,0000,,numbers in the simultaneous Dialogue: 0,0:02:04.61,0:02:07.56,Default,,0000,0000,0000,,equations. So you've really got\Nthe simultaneous equations Dialogue: 0,0:02:07.56,0:02:12.25,Default,,0000,0000,0000,,written down. In here you got X\N+ 2 Y's four and three X -- 5 Y Dialogue: 0,0:02:12.25,0:02:17.50,Default,,0000,0000,0000,,is 1. So these are the original\Nsimultaneous equations, but in Dialogue: 0,0:02:17.50,0:02:19.98,Default,,0000,0000,0000,,matrix form. If we call this Dialogue: 0,0:02:19.98,0:02:24.39,Default,,0000,0000,0000,,matrix A. And this matrix\Nof unknowns. Let's call Dialogue: 0,0:02:24.39,0:02:25.91,Default,,0000,0000,0000,,that capital X. Dialogue: 0,0:02:26.94,0:02:30.79,Default,,0000,0000,0000,,And this matrix on the right\Nhand side. Let's call that B. Dialogue: 0,0:02:31.33,0:02:38.22,Default,,0000,0000,0000,,This form now have here is\Nwhat we call the matrix form Dialogue: 0,0:02:38.22,0:02:40.51,Default,,0000,0000,0000,,of the simultaneous equations. Dialogue: 0,0:02:40.52,0:02:44.89,Default,,0000,0000,0000,,Let's think about which bits in\Nthis in this in this matrix Dialogue: 0,0:02:44.89,0:02:49.26,Default,,0000,0000,0000,,form. We know which bits we\Ndon't know. Well, the matrix A1, Dialogue: 0,0:02:49.26,0:02:53.99,Default,,0000,0000,0000,,two 3 -- 5 is known. It's just\Nthe matrix of coefficients of Dialogue: 0,0:02:53.99,0:02:58.36,Default,,0000,0000,0000,,X&Y in the original equations,\Nthe matrix be on the right is Dialogue: 0,0:02:58.36,0:03:02.72,Default,,0000,0000,0000,,this 141, which is just the\Nmatrix formed by the right hand Dialogue: 0,0:03:02.72,0:03:04.18,Default,,0000,0000,0000,,side of the simultaneous Dialogue: 0,0:03:04.18,0:03:07.91,Default,,0000,0000,0000,,equations. This quantity,\Ncapital X. This matrix here, Dialogue: 0,0:03:07.91,0:03:11.67,Default,,0000,0000,0000,,which stands for little X\Nlittle. Y that's the unknown. Dialogue: 0,0:03:11.67,0:03:15.81,Default,,0000,0000,0000,,That's the thing we're trying\Nto find, so this is the Dialogue: 0,0:03:15.81,0:03:16.94,Default,,0000,0000,0000,,matrix of unknowns. Dialogue: 0,0:03:18.13,0:03:21.72,Default,,0000,0000,0000,,So what we'd like to do is,\Nlike, we'd like to rearrange Dialogue: 0,0:03:21.72,0:03:24.71,Default,,0000,0000,0000,,this and get X equal to\Nsomething, because then we've Dialogue: 0,0:03:24.71,0:03:27.10,Default,,0000,0000,0000,,got the solution of the\Nsimultaneous equations. We've Dialogue: 0,0:03:27.10,0:03:31.29,Default,,0000,0000,0000,,got the unknown on its on its\Nown on the left hand side. Now Dialogue: 0,0:03:31.29,0:03:34.87,Default,,0000,0000,0000,,we can find this unknown matrix\NX the matrix of unknowns using Dialogue: 0,0:03:34.87,0:03:37.86,Default,,0000,0000,0000,,the inverse matrix. Let's see\Nhow we can do that. Dialogue: 0,0:03:38.71,0:03:42.96,Default,,0000,0000,0000,,So this is the matrix equation\Nwe want to solve. Now you might Dialogue: 0,0:03:42.96,0:03:48.52,Default,,0000,0000,0000,,be tempted to say if you want to\Nfind X, then X is B / A, but Dialogue: 0,0:03:48.52,0:03:51.79,Default,,0000,0000,0000,,remember there's no such thing\Nas matrix division. You can't Dialogue: 0,0:03:51.79,0:03:56.37,Default,,0000,0000,0000,,divide matrix be by a matrix A\Nand instead we make use of the Dialogue: 0,0:03:56.37,0:04:00.29,Default,,0000,0000,0000,,inverse matrix. What we'll do is\Nwe'll take this matrix form and Dialogue: 0,0:04:00.29,0:04:04.87,Default,,0000,0000,0000,,we multiply both sides of it by\Nthe inverse of matrix A. So I'm Dialogue: 0,0:04:04.87,0:04:09.12,Default,,0000,0000,0000,,going to take the left hand side\Nand multiply it by the inverse. Dialogue: 0,0:04:09.13,0:04:14.08,Default,,0000,0000,0000,,Of a. And do the same to the\Nright hand side. Dialogue: 0,0:04:14.36,0:04:17.84,Default,,0000,0000,0000,,So both sides of this equation\Nhave been multiplied by 8 to the Dialogue: 0,0:04:17.84,0:04:21.64,Default,,0000,0000,0000,,minus one. Now remember a very\Nimportant property of inverse Dialogue: 0,0:04:21.64,0:04:26.18,Default,,0000,0000,0000,,matrices is that when you take A\Nto the minus one and multiply it Dialogue: 0,0:04:26.18,0:04:27.80,Default,,0000,0000,0000,,by a, the result here. Dialogue: 0,0:04:28.35,0:04:33.49,Default,,0000,0000,0000,,Is an identity matrix, so ETA\Nminus one A is an identity Dialogue: 0,0:04:33.49,0:04:39.05,Default,,0000,0000,0000,,matrix, so even identity matrix\Ntimes X is A to the minus 1B. Dialogue: 0,0:04:39.13,0:04:42.53,Default,,0000,0000,0000,,And further property that you'll\Nneed to remember, which is very Dialogue: 0,0:04:42.53,0:04:46.55,Default,,0000,0000,0000,,important, is that if you take\Nany matrix X and you multiply it Dialogue: 0,0:04:46.55,0:04:50.25,Default,,0000,0000,0000,,by an identity matrix, it leaves\Nit identical to what it was Dialogue: 0,0:04:50.25,0:04:53.65,Default,,0000,0000,0000,,before, so the left hand side\Njust simplifies this simply to Dialogue: 0,0:04:53.65,0:04:58.86,Default,,0000,0000,0000,,X. So we've come to the\Nconclusion that if a X is B, Dialogue: 0,0:04:58.86,0:05:04.94,Default,,0000,0000,0000,,then the unknown X is the\Ninverse of a * B. So this is the Dialogue: 0,0:05:04.94,0:05:06.96,Default,,0000,0000,0000,,important result that will need Dialogue: 0,0:05:06.96,0:05:10.28,Default,,0000,0000,0000,,to use. To solve a pair of\Nsimultaneous equations, what Dialogue: 0,0:05:10.28,0:05:14.05,Default,,0000,0000,0000,,will need to do is find the\Ninverse of the matrix of Dialogue: 0,0:05:14.05,0:05:17.19,Default,,0000,0000,0000,,coefficients and multiply that\Nby the matrix formed by the Dialogue: 0,0:05:17.19,0:05:20.64,Default,,0000,0000,0000,,elements by the numbers on the\Nright hand side of the Dialogue: 0,0:05:20.64,0:05:24.10,Default,,0000,0000,0000,,simultaneous equations. So this\Nis the formula will need will do Dialogue: 0,0:05:24.10,0:05:25.67,Default,,0000,0000,0000,,that in an example now. Dialogue: 0,0:05:26.71,0:05:29.57,Default,,0000,0000,0000,,So let's continue with this\Nexample. Here are the Dialogue: 0,0:05:29.57,0:05:32.43,Default,,0000,0000,0000,,simultaneous equations that we\Nstarted with, and we've written Dialogue: 0,0:05:32.43,0:05:36.57,Default,,0000,0000,0000,,them in matrix form like this.\NThat's in the form ax is B. Dialogue: 0,0:05:36.57,0:05:38.48,Default,,0000,0000,0000,,Well, this is the matrix. A Dialogue: 0,0:05:38.48,0:05:42.17,Default,,0000,0000,0000,,matrix of coefficients. This is\Nthe matrix Capital X, the matrix Dialogue: 0,0:05:42.17,0:05:45.62,Default,,0000,0000,0000,,of unknowns and B is the matrix\Nformed by the elements on the Dialogue: 0,0:05:45.62,0:05:51.43,Default,,0000,0000,0000,,right hand side. What we need to\Ndo to solve this is we need to Dialogue: 0,0:05:51.43,0:05:55.81,Default,,0000,0000,0000,,find the inverse of a. So let's\Nstart by writing down the Dialogue: 0,0:05:55.81,0:05:59.82,Default,,0000,0000,0000,,inverse of this matrix here. Now\Nremember that the formula for Dialogue: 0,0:05:59.82,0:06:04.20,Default,,0000,0000,0000,,the inverse matrix is as\Nfollows. 1 / a D minus BC. Dialogue: 0,0:06:04.20,0:06:08.58,Default,,0000,0000,0000,,That's 1 * -- 5, which is minus\N5. Subtract VC's 2346. Dialogue: 0,0:06:09.33,0:06:13.92,Default,,0000,0000,0000,,We interchange the A and the D.\NSo minus five will go up there Dialogue: 0,0:06:13.92,0:06:18.51,Default,,0000,0000,0000,,and one will go down there and\Nwe change the sign of the other Dialogue: 0,0:06:18.51,0:06:22.12,Default,,0000,0000,0000,,two elements. So this is the\Ninverse of the matrix A. Dialogue: 0,0:06:23.11,0:06:28.75,Default,,0000,0000,0000,,Let's just tidy it up a little\Nbit, minus 5 -- 6 is minus 11, Dialogue: 0,0:06:28.75,0:06:31.01,Default,,0000,0000,0000,,so we've got minus and 11th. Dialogue: 0,0:06:31.52,0:06:35.58,Default,,0000,0000,0000,,Of the matrix minus 5 -- 2 -- 3\Nand one and I'm going to leave Dialogue: 0,0:06:35.58,0:06:39.14,Default,,0000,0000,0000,,it in that form. I don't need to\Nworry about taking the factor of Dialogue: 0,0:06:39.14,0:06:40.41,Default,,0000,0000,0000,,minus 1 / 11 inside. Dialogue: 0,0:06:41.04,0:06:46.09,Default,,0000,0000,0000,,Right, what we want to do now is\Nfind the matrix of unknowns X, Dialogue: 0,0:06:46.09,0:06:51.15,Default,,0000,0000,0000,,and remember that X is given by\NA to the minus 1 * B. Dialogue: 0,0:06:51.79,0:06:55.47,Default,,0000,0000,0000,,Eight of the minus one is now\Nminus and 11th. Dialogue: 0,0:06:55.98,0:07:02.74,Default,,0000,0000,0000,,Times minus 5 -- 2\N-- 3 one multiplied by Dialogue: 0,0:07:02.74,0:07:06.12,Default,,0000,0000,0000,,matrix B which was four Dialogue: 0,0:07:06.12,0:07:11.81,Default,,0000,0000,0000,,one. And you'll see that all we\Nneed to do now to finish this Dialogue: 0,0:07:11.81,0:07:15.23,Default,,0000,0000,0000,,off is debit of matrix\Nmultiplication. Let's leave the Dialogue: 0,0:07:15.23,0:07:16.37,Default,,0000,0000,0000,,minus 11 outside. Dialogue: 0,0:07:16.93,0:07:23.08,Default,,0000,0000,0000,,And over here we've got minus 5\N* 4, which is minus 20 added to Dialogue: 0,0:07:23.08,0:07:28.41,Default,,0000,0000,0000,,minus 2 * 1. That's added to\Nminus two, so you've got minus Dialogue: 0,0:07:28.41,0:07:33.10,Default,,0000,0000,0000,,22 there. And here pairing up\Nthis road with this column we've Dialogue: 0,0:07:33.10,0:07:38.11,Default,,0000,0000,0000,,got minus 3 * 4 is minus 12\Nadded to 1 * 1, which is minus Dialogue: 0,0:07:38.11,0:07:40.30,Default,,0000,0000,0000,,12 model on which is minus 11. Dialogue: 0,0:07:41.27,0:07:45.48,Default,,0000,0000,0000,,Finally, just to finish this\Noff, every element inside the Dialogue: 0,0:07:45.48,0:07:50.95,Default,,0000,0000,0000,,matrix has to be multiplied by\Nminus in 11th or in other words Dialogue: 0,0:07:50.95,0:07:56.43,Default,,0000,0000,0000,,divided by minus 11. And if we\Ndo that, this first entry will Dialogue: 0,0:07:56.43,0:08:00.22,Default,,0000,0000,0000,,be minus 22 / -- 11, which is 2. Dialogue: 0,0:08:00.81,0:08:06.56,Default,,0000,0000,0000,,And the second element is minus\N11 / -- 11, which is 1. So Dialogue: 0,0:08:06.56,0:08:11.08,Default,,0000,0000,0000,,that's the solution. This is the\Nmatrix X, which you'll remember Dialogue: 0,0:08:11.08,0:08:16.84,Default,,0000,0000,0000,,is the same as the matrix XY.\NThis means that our little X is Dialogue: 0,0:08:16.84,0:08:21.77,Default,,0000,0000,0000,,2 and our little wise one, and\Nthat's the solution of the Dialogue: 0,0:08:21.77,0:08:24.62,Default,,0000,0000,0000,,simultaneous equations. Those\Nare the solutions of the two Dialogue: 0,0:08:24.62,0:08:26.04,Default,,0000,0000,0000,,equations that we started with. Dialogue: 0,0:08:27.19,0:08:30.27,Default,,0000,0000,0000,,Rather than just leave it there\Nlike that, what you ought to do Dialogue: 0,0:08:30.27,0:08:33.12,Default,,0000,0000,0000,,to do is check that this\Nsolution is in fact correct by Dialogue: 0,0:08:33.12,0:08:35.96,Default,,0000,0000,0000,,substituting X is too. And why\Nis 1 into these equations just Dialogue: 0,0:08:35.96,0:08:38.57,Default,,0000,0000,0000,,to check it's right. So for\Nexample, if you protect this Dialogue: 0,0:08:38.57,0:08:41.88,Default,,0000,0000,0000,,two in here, you'll get two and\Ntwo ones are two there, two and Dialogue: 0,0:08:41.88,0:08:44.49,Default,,0000,0000,0000,,two is 4, so it satisfies the\Nfirst equation. You should Dialogue: 0,0:08:44.49,0:08:46.62,Default,,0000,0000,0000,,check that it satisfies the\Nsecond equation as well.