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