0:00:00.170,0:00:01.070 - [Instructor] In a previous video, 0:00:01.070,0:00:02.240 we saw that if you have a system 0:00:02.240,0:00:04.900 of three equations with[br]three unknowns like this, 0:00:04.900,0:00:08.360 you can represent it as[br]a matrix vector equation, 0:00:08.360,0:00:10.520 where this matrix right over here 0:00:10.520,0:00:13.740 is a three-by-three matrix. 0:00:13.740,0:00:16.180 That is essentially a coefficient matrix. 0:00:16.180,0:00:18.300 It has all of the coefficients of the Xs, 0:00:18.300,0:00:21.350 the Ys, and the Zs as its various columns. 0:00:21.350,0:00:24.660 and then you're going to[br]multiply that times this vector, 0:00:24.660,0:00:27.070 which is really the vector[br]of the unknown variables, 0:00:27.070,0:00:29.570 and this is a three-by-one vector. 0:00:29.570,0:00:30.830 And then you would result 0:00:30.830,0:00:35.450 in this other three-by-one[br]vector, which is a vector 0:00:35.450,0:00:40.050 that contains these constant[br]terms right over here. 0:00:40.050,0:00:42.160 What we're gonna do in[br]this video is recognize 0:00:42.160,0:00:44.570 that you can generalize this phenomenon. 0:00:44.570,0:00:46.340 It's not just true with a system 0:00:46.340,0:00:48.580 of three equations with three unknowns. 0:00:48.580,0:00:52.490 It actually generalizes to[br]N equations with N unknowns. 0:00:52.490,0:00:55.600 But just to appreciate that[br]that is indeed the case, 0:00:55.600,0:00:59.610 let us look at a system of two[br]equations with two unknowns. 0:00:59.610,0:01:04.020 So let's say you had 2x[br]plus y is equal to nine, 0:01:04.020,0:01:09.020 and we had 3x minus y is equal to five. 0:01:09.230,0:01:10.630 I encourage you, pause this video 0:01:10.630,0:01:12.610 and think about how that[br]would be represented 0:01:12.610,0:01:15.253 as a matrix vector equation. 0:01:16.520,0:01:19.520 All right, now let's[br]work on this together. 0:01:19.520,0:01:23.710 So this is a system of two[br]equations with two unknowns. 0:01:23.710,0:01:27.010 So the matrix that represents[br]the coefficients is going 0:01:27.010,0:01:29.390 to be a two-by-two matrix 0:01:29.390,0:01:31.680 and then that's going to be multiplied 0:01:31.680,0:01:35.200 by a vector that represents[br]the unknown variables. 0:01:35.200,0:01:37.090 We have two unknown variables over here. 0:01:37.090,0:01:40.120 So this is going to be[br]a two-by-one vector, 0:01:40.120,0:01:42.910 and then that's going[br]to be equal to a vector 0:01:42.910,0:01:45.520 that represents the constants[br]on the right-hand side, 0:01:45.520,0:01:46.810 and obviously we have two of those. 0:01:46.810,0:01:49.430 So that's going to be a[br]two-by-one vector as well. 0:01:49.430,0:01:51.870 And then we can do exactly what we did 0:01:51.870,0:01:54.410 in that previous example[br]in a previous video. 0:01:54.410,0:01:58.850 The coefficients on the[br]X terms, two and three, 0:01:58.850,0:02:02.570 and then we have the[br]coefficients on the Y terms. 0:02:02.570,0:02:04.530 This would be a positive one 0:02:04.530,0:02:06.930 and then this would be a negative one. 0:02:06.930,0:02:09.570 And then we multiply it times the vector 0:02:09.570,0:02:12.490 of the variables, X, Y, 0:02:12.490,0:02:14.700 and then last but not least, 0:02:14.700,0:02:19.200 you have this nine and this[br]five over here, nine and five. 0:02:19.200,0:02:22.040 And I encourage you and multiply this out. 0:02:22.040,0:02:25.390 Multiply this matrix times this vector. 0:02:25.390,0:02:28.560 And when you do that and you[br]still set up this equality, 0:02:28.560,0:02:30.620 you're going to see that[br]it essentially turns 0:02:30.620,0:02:32.770 into this exact same system 0:02:32.770,0:02:36.010 of two equations and two unknowns. 0:02:36.010,0:02:37.650 Now, what's interesting about this is 0:02:37.650,0:02:40.730 that we see a generalizable form. 0:02:40.730,0:02:43.860 In general, you can represent a system 0:02:43.860,0:02:47.890 of N equations and N unknowns in the form. 0:02:47.890,0:02:51.740 Sum N-by-N matrix A, 0:02:51.740,0:02:53.400 N by N, 0:02:53.400,0:02:58.340 times sum N-by-one vector X. 0:02:58.340,0:02:59.523 This isn't just the variable X. 0:02:59.523,0:03:03.950 This is a vector X that[br]has N dimensions to it. 0:03:03.950,0:03:08.610 So times sum N-by-one vector X is going 0:03:08.610,0:03:13.530 to be equal to sum N-by-one vector B. 0:03:14.480,0:03:17.360 These are the letters that[br]people use by convention. 0:03:17.360,0:03:19.030 This is going to be N by one. 0:03:19.030,0:03:21.890 And so you can see in[br]these different scenarios. 0:03:21.890,0:03:24.850 In that first one, this is[br]a three-by-three matrix. 0:03:24.850,0:03:26.870 We could call that A, 0:03:26.870,0:03:29.580 and then we could call this the vector X, 0:03:29.580,0:03:31.760 and then we could call this the vector B. 0:03:31.760,0:03:32.850 Now in that second scenario, 0:03:32.850,0:03:34.800 we could call this the matrix A, 0:03:34.800,0:03:36.850 we could call this the vector X, 0:03:36.850,0:03:39.320 and then we could call this the vector B, 0:03:39.320,0:03:42.820 but we can generalize[br]that to N dimensions. 0:03:42.820,0:03:44.760 And as I talked about[br]in the previous video, 0:03:44.760,0:03:47.880 what's interesting about this[br]is you could think about, 0:03:47.880,0:03:49.890 for example, in this[br]system of two equations 0:03:49.890,0:03:52.300 with two unknowns, as all[br]right, I have a line here, 0:03:52.300,0:03:53.490 I have a line here, 0:03:53.490,0:03:57.640 and X and Y represent the[br]intersection of those lines. 0:03:57.640,0:03:58.850 But when you represent it this way, 0:03:58.850,0:04:00.580 you could also imagine it as saying, 0:04:00.580,0:04:04.470 okay, I have some unknown[br]vector in the coordinate plane 0:04:04.470,0:04:07.460 and I'm transforming it using this matrix 0:04:07.460,0:04:10.030 to get this vector nine five. 0:04:10.030,0:04:12.410 And so I have to figure out what vector, 0:04:12.410,0:04:15.510 when transformed in this[br]way, gets us to nine five, 0:04:15.510,0:04:18.160 and we also thought about it[br]in the three-by-three case. 0:04:18.160,0:04:20.950 What three-dimensional vector,[br]when transformed in this way, 0:04:20.950,0:04:23.360 gets us to this vector right over here? 0:04:23.360,0:04:24.910 And so that hints, 0:04:24.910,0:04:27.410 that foreshadows where[br]we might be able to go. 0:04:27.410,0:04:30.530 If we can unwind this[br]transformation somehow, 0:04:30.530,0:04:33.850 then we can figure out what[br]these unknown vectors are. 0:04:33.850,0:04:37.270 And if we can do it in two[br]dimensions or three dimensions, 0:04:37.270,0:04:40.010 why not be able to do it in N dimensions? 0:04:40.010,0:04:41.980 Which you'll see is actually very useful 0:04:41.980,0:04:43.650 if you ever become a data scientist, 0:04:43.650,0:04:45.220 or you go into computer science, 0:04:45.220,0:04:47.670 or if you go into computer[br]graphics of some kind.