0:00:05.050,0:00:09.190 In this video I'm going to[br]explain what is meant by a 0:00:09.190,0:00:12.640 matrix and introduce the[br]notation that we use when we're 0:00:12.640,0:00:16.780 working with matrices. So let's[br]start by looking at what we mean 0:00:16.780,0:00:20.575 by a matrix and matrix is a[br]rectangular pattern of numbers. 0:00:20.575,0:00:21.955 Let's have an example. 0:00:23.440,0:00:25.946 I'm writing down a[br]pattern of numbers. 0:00:28.790,0:00:33.564 4 -- 113 and 9 and you see they[br]form a rectangular pattern and 0:00:33.564,0:00:37.656 when we write down a matrix, we[br]usually enclose the numbers with 0:00:37.656,0:00:41.748 some round brackets like that.[br]So that's our first example of a 0:00:41.748,0:00:45.499 matrix. Let's have a look at[br]another example which has a 0:00:45.499,0:00:48.568 different size. So suppose we[br]have the numbers 12. 0:00:50.080,0:00:54.103 304 and again, this is a[br]rectangular pattern of 0:00:54.103,0:00:58.573 numbers. I'll put them in[br]round brackets like that, and 0:00:58.573,0:01:03.043 that's another example of a[br]matrix. Let's have some more. 0:01:05.560,0:01:07.250 71 0:01:08.560,0:01:12.208 minus three to four and four. 0:01:15.230,0:01:16.590 And a final example. 0:01:18.140,0:01:20.750 A half 00. 0:01:21.840,0:01:28.548 03000 and let's[br]say nought .7. 0:01:31.480,0:01:35.216 So here we have 4 examples[br]of matrices. 0:01:37.380,0:01:41.412 They all have different sizes,[br]so let's look a little bit more 0:01:41.412,0:01:45.780 about how we refer to the size[br]of a matrix. This first matrix 0:01:45.780,0:01:50.484 here has got two rows and two[br]columns and we describe it as a 0:01:50.484,0:01:55.188 two by two matrix. We write it[br]as two by two like that. That's 0:01:55.188,0:01:59.556 just the size. When we write[br]down the size of a matrix, we 0:01:59.556,0:02:03.252 always give the number of rows[br]first and the columns second. 0:02:03.252,0:02:05.940 So this has two rows and two[br]columns. 0:02:07.550,0:02:08.938 What about this matrix? 0:02:09.700,0:02:11.210 This is got one row. 0:02:12.220,0:02:14.959 And 1234 columns. 0:02:16.850,0:02:20.819 So this is a 1 by 4 matrix, one 0:02:20.819,0:02:23.188 row. And four columns. 0:02:25.860,0:02:29.208 This matrix has got 123 rows. 0:02:31.610,0:02:32.909 And two columns. 0:02:35.040,0:02:38.461 So it's a three by two[br]matrix and the final example 0:02:38.461,0:02:39.705 has got three rows. 0:02:42.610,0:02:46.482 Three columns, so this is a[br]three by three matrix, so 0:02:46.482,0:02:50.354 remember that we always give[br]the number of rows first and 0:02:50.354,0:02:51.058 column 2nd. 0:02:52.480,0:02:56.159 The other bit of notation that[br]we'll need is that we often use 0:02:56.159,0:02:59.555 a capital letter to denote a[br]matrix, so we might call this 0:02:59.555,0:03:00.687 first matrix here A. 0:03:02.100,0:03:04.188 We might call the second 1B. 0:03:05.380,0:03:06.508 This one C. 0:03:08.020,0:03:09.139 And this 1D. 0:03:10.870,0:03:14.830 So there we are four examples[br]of matrices, all of different 0:03:14.830,0:03:19.510 sizes and we now know how to[br]describe a matrix in terms of 0:03:19.510,0:03:23.470 the number of rows and the[br]number of columns that it 0:03:23.470,0:03:26.710 has. Now that we've seen for[br]examples of specific 0:03:26.710,0:03:30.670 matrices, let's look at how[br]we can write down a general 0:03:30.670,0:03:34.270 matrix. Let's suppose this[br]matrix has the symbol A and 0:03:34.270,0:03:38.950 let's suppose it's got M rows[br]and N columns, so it's an M 0:03:38.950,0:03:40.030 by N matrix. 0:03:42.820,0:03:47.000 The number that's in the first[br]row, first column of Matrix 0:03:47.000,0:03:51.560 Capital A will write using a[br]little A and some subscripts 11 0:03:51.560,0:03:56.880 where the first number refers to[br]the row label and the 2nd to the 0:03:56.880,0:04:00.300 column label. So this is first[br]row first column. 0:04:01.730,0:04:06.242 The second number will be a 12,[br]which corresponds to the first 0:04:06.242,0:04:11.506 row, second column, and so on.[br]The next one will be a 1 three. 0:04:12.500,0:04:18.467 And so on. Now in this matrix,[br]because it's an M by N matrix, 0:04:18.467,0:04:24.025 it's got N columns, so the last[br]number in this first row will be 0:04:24.025,0:04:26.804 a 1 N corresponding to 1st row. 0:04:27.480,0:04:28.510 And column. 0:04:30.990,0:04:35.644 What about the number in here?[br]Well, it's going to be in the 0:04:35.644,0:04:40.656 2nd row first column, so we'll[br]call it a 2 one. That's the 2nd 0:04:40.656,0:04:41.730 row, first column. 0:04:42.510,0:04:45.894 The one here will be second[br]row, second column. 0:04:47.180,0:04:51.674 2nd row, third column, and so on[br]until we get to the last number 0:04:51.674,0:04:57.225 in this row. Which will be a 2 N[br]which corresponds to 2nd row, 0:04:57.225,0:05:01.840 NTH column and so on. We can[br]build up the matrix like this. 0:05:01.840,0:05:06.810 We put all these numbers in as[br]we want to be 'cause this matrix 0:05:06.810,0:05:08.230 has got M rose. 0:05:08.820,0:05:15.268 The last row here will have a[br]number AM one corresponding to M 0:05:15.268,0:05:16.756 throw first column. 0:05:18.230,0:05:23.158 NTH Row, second column and so on[br]all the way along until the last 0:05:23.158,0:05:27.734 number here, which is in the M[br]throw and the NTH column. So 0:05:27.734,0:05:32.662 we'll call that a MN and that's[br]the format in which we can write 0:05:32.662,0:05:34.070 down a general matrix. 0:05:35.080,0:05:37.180 Each of these numbers in the 0:05:37.180,0:05:43.300 matrix. We call an element of[br]the matrix, so A1 one is the 0:05:43.300,0:05:48.030 element in the first row, first[br]column. In general, the element 0:05:48.030,0:05:54.050 AIJ will be the number that's in[br]the I throw and the J column. 0:05:55.250,0:05:58.352 Now some of the matrices that[br]will come across occur so 0:05:58.352,0:06:00.890 frequently or have special[br]properties that we give them 0:06:00.890,0:06:03.710 special names. Let's have a look[br]at some of those. 0:06:05.390,0:06:08.978 Let's go back and look again[br]at the Matrix A. We saw a 0:06:08.978,0:06:09.806 few minutes ago. 0:06:15.320,0:06:17.600 This matrix has got two rows. 0:06:18.290,0:06:20.621 And two columns. So it's a two 0:06:20.621,0:06:25.387 by two matrix. And a matrix[br]that's got the same number of 0:06:25.387,0:06:29.143 rows and columns like this one,[br]has we call for obvious reasons 0:06:29.143,0:06:33.306 a square matrix? So this is[br]the first example of a 0:06:33.306,0:06:33.960 square matrix. 0:06:41.640,0:06:43.890 Now we've already seen another[br]square matrix because the 0:06:43.890,0:06:46.890 matrix D that we saw a few[br]minutes ago, which was this 0:06:46.890,0:06:47.140 one. 0:06:56.240,0:06:59.410 He's also a square matrix. This[br]one's got three rows. 0:07:00.040,0:07:03.670 And three columns. It's a[br]three by three matrix, and 0:07:03.670,0:07:07.300 because it's got the same[br]number of rows and columns, 0:07:07.300,0:07:09.115 that's also a square matrix. 0:07:10.960,0:07:14.040 Another term I'd like to[br]introduce is what's called a 0:07:14.040,0:07:14.656 diagonal matrix. 0:07:21.730,0:07:26.994 If we look again at the matrix[br]D, we'll see that it has some 0:07:26.994,0:07:30.378 rather special property. This[br]diagonal, which runs from the 0:07:30.378,0:07:34.514 top left to the bottom right, is[br]called the leading diagonal. 0:07:41.970,0:07:45.457 And if you look carefully,[br]you'll see that all the elements 0:07:45.457,0:07:47.359 that are not on the leading 0:07:47.359,0:07:52.832 diagonal are zeros. 0000000 A[br]matrix for which all the 0:07:52.832,0:07:57.926 elements off the leading[br]diagonal are zero, is called 0:07:57.926,0:07:59.624 a diagonal matrix. 0:08:01.300,0:08:04.486 There's another special sort of[br]diagonal matrix I'll introduce 0:08:04.486,0:08:06.610 now. Let's call this one, I. 0:08:10.410,0:08:15.857 Suppose this is a two by two[br]matrix with ones on the leading 0:08:15.857,0:08:17.533 diagonal and zeros everywhere 0:08:17.533,0:08:20.345 else. So this is a square 0:08:20.345,0:08:24.478 matrix. It's diagonal because[br]everything off the leading 0:08:24.478,0:08:25.780 diagonal is 0. 0:08:26.400,0:08:29.832 And it's rather special because[br]on the leading diagonal, all the 0:08:29.832,0:08:34.556 elements are one. Now a matrix[br]which has this property is 0:08:34.556,0:08:36.024 called an identity matrix. 0:08:37.580,0:08:39.380 Or a unit matrix? 0:08:48.610,0:08:52.040 And when we're working with[br]matrices, it's usual to reserve 0:08:52.040,0:08:56.156 the letter I for an identity[br]matrix. Now suppose we have a 0:08:56.156,0:08:57.528 bigger identity matrix. Here's 0:08:57.528,0:09:02.086 another one. Suppose we have a[br]three by three identity matrix. 0:09:05.080,0:09:07.036 And again, notice that[br]it's square. 0:09:08.460,0:09:12.276 It's diagonal and there are ones[br]only on the leading diagonal, so 0:09:12.276,0:09:16.410 this is also an identity matrix.[br]But because this is a three by 0:09:16.410,0:09:21.180 three and this ones are two by[br]two and we might not want to mix 0:09:21.180,0:09:25.950 them up and might call this one[br]I2, because this is a two by two 0:09:25.950,0:09:30.402 matrix and I might call this one[br]I3. But in both cases these are 0:09:30.402,0:09:33.582 identity matrices and we'll see[br]that identity matrices have a 0:09:33.582,0:09:37.080 very important role to play when[br]we look at matrix multiplication 0:09:37.080,0:09:38.352 in a forthcoming video.