WEBVTT 00:00:05.550 --> 00:00:08.770 In this video we look at the subjective addition and 00:00:08.770 --> 00:00:11.668 subtraction of matrices, and we also look at scalar 00:00:11.668 --> 00:00:14.888 multiplication of matrices. To do that, we're going to need 00:00:14.888 --> 00:00:18.108 some matrices, so here are some matrices that I've already 00:00:18.108 --> 00:00:21.328 prepared, and you'll see we've got four matrices here, and 00:00:21.328 --> 00:00:25.514 they've all got different sizes. So the first thing we need to do 00:00:25.514 --> 00:00:30.022 is just remind ourselves as to how we look at the size of a 00:00:30.022 --> 00:00:34.208 matrix, so we count up the number of rows and the number of 00:00:34.208 --> 00:00:35.818 columns. So this matrix A. 00:00:35.900 --> 00:00:41.318 We say is a two by two matrix because it's got two rows and 00:00:41.318 --> 00:00:46.684 two columns. Matrix B's got three rows and two columns, so 00:00:46.684 --> 00:00:49.360 that's a three by two matrix. 00:00:50.220 --> 00:00:55.095 And we can clearly see that matrix C is a two by three 00:00:55.095 --> 00:00:59.595 matrix, two rows and three columns, and matrix D is a three 00:00:59.595 --> 00:01:02.970 by two matrix with three rows and two columns. 00:01:03.620 --> 00:01:06.920 Now, when it comes to adding and subtracting matrices, we can 00:01:06.920 --> 00:01:10.820 only do it when the two matrices have the same size. That is, 00:01:10.820 --> 00:01:15.020 when they got this both got the same number of rows and the same 00:01:15.020 --> 00:01:18.320 number of columns and two matrices that have the same size 00:01:18.320 --> 00:01:21.620 are said to be compatible, and when they're compatible we can 00:01:21.620 --> 00:01:23.120 add them and subtract them. 00:01:23.840 --> 00:01:25.891 So if we return to our four 00:01:25.891 --> 00:01:31.733 matrices. We see that of these four matrices, the only two that 00:01:31.733 --> 00:01:37.169 are compatible or matrix B and matrix D. They have the same 00:01:37.169 --> 00:01:43.511 size 3 rows and two columns. So what that means is that we can 00:01:43.511 --> 00:01:50.759 find B + D and we can find B -- D and we can find D 00:01:50.759 --> 00:01:56.648 -- B. So we can add and subtract matrices, B&D because they have 00:01:56.648 --> 00:01:58.007 the same size. 00:01:58.120 --> 00:02:03.240 Because they're compatible, we can't add A&B because they have 00:02:03.240 --> 00:02:08.360 different sizes. We can't add C&A because they have different 00:02:08.360 --> 00:02:13.130 sizes. Might be worth noting that where we define the matrix 00:02:13.130 --> 00:02:18.594 C transpose. C transpose. That's where the rows become columns 00:02:18.594 --> 00:02:23.582 would have. Two columns, because each row would turn into a 00:02:23.582 --> 00:02:27.998 column, it would have three rows, so C transpose would be a 00:02:27.998 --> 00:02:31.678 three by two matrix. So C transpose is also compatible 00:02:31.678 --> 00:02:36.830 with B&D. So we can add C transpose to be or today, but we 00:02:36.830 --> 00:02:39.406 can't add C to be or today. 00:02:40.970 --> 00:02:44.402 Once we found two matrices that are compatible that these two 00:02:44.402 --> 00:02:48.458 matrices that have got the same size, then we need to know how 00:02:48.458 --> 00:02:52.826 to actually add them up. So we look at our matrices B&D and see 00:02:52.826 --> 00:02:56.570 how we go through this process. So here's our Matrix B and 00:02:56.570 --> 00:03:00.314 here's our Matrix D and I've written them with a plus sign 00:03:00.314 --> 00:03:03.746 between them and underneath I've written them out again with a 00:03:03.746 --> 00:03:09.674 minus sign. So this is B + D and this is B -- D. So how do we do 00:03:09.674 --> 00:03:11.234 the addition? Well, it's quite 00:03:11.234 --> 00:03:15.280 straightforward. All we do is we were adding we add the 00:03:15.280 --> 00:03:18.660 elements that are in the same position. We call that 00:03:18.660 --> 00:03:19.674 the corresponding position. 00:03:20.960 --> 00:03:25.342 So because the five is in the first row on the 1st column and 00:03:25.342 --> 00:03:29.724 the two is in the first row and the first column, they get added 00:03:29.724 --> 00:03:34.732 together. So we do 5 + 2 which is 7 and that gives us the entry 00:03:34.732 --> 00:03:38.175 in the first row and the first column of our answer. 00:03:39.060 --> 00:03:44.086 We do the same with all the elements, so the minus one is in 00:03:44.086 --> 00:03:48.753 the 2nd row and the first column. So we add that to the 00:03:48.753 --> 00:03:54.138 zero in the 2nd row and the first column. So we do minus 1 + 00:03:54.138 --> 00:03:59.164 0, which gives us minus one and we can continue to do that for 00:03:59.164 --> 00:04:04.190 all six elements of the matrix. So 1 + 4 because the one and 00:04:04.190 --> 00:04:08.498 four are in corresponding positions gives us 5 -- 2 + -- 00:04:08.498 --> 00:04:13.360 2. Gives us minus four and that goes up here because it's in the 00:04:13.360 --> 00:04:17.320 first row and the second column first row on the second column 00:04:17.320 --> 00:04:21.940 for three and the one get added to give us four and the nought 00:04:21.940 --> 00:04:25.570 and the minus one get added to give us minus one. 00:04:26.810 --> 00:04:31.282 And so that's how we do matrix addition. So just to recap, we 00:04:31.282 --> 00:04:35.754 have to have two matrices that have the same size and then when 00:04:35.754 --> 00:04:40.570 we have two matrices at the same size we add them by adding the 00:04:40.570 --> 00:04:43.322 elements that are in corresponding positions. And so 00:04:43.322 --> 00:04:47.794 the answer we get is the same size as the two matrices that 00:04:47.794 --> 00:04:48.826 we've added together. 00:04:50.120 --> 00:04:53.200 Now the principles of subtraction are exactly the 00:04:53.200 --> 00:04:57.050 same. We deal with elements that are in the corresponding 00:04:57.050 --> 00:05:00.900 positions, but obviously this time we subtract rather than add 00:05:00.900 --> 00:05:07.830 them. So we do 5 -- 2 to get three, we do minus 1 -- 0 to get 00:05:07.830 --> 00:05:14.186 minus one. We do 1 -- 4 to get minus three. That's done the 00:05:14.186 --> 00:05:18.729 elements in the first column with the elements in the second 00:05:18.729 --> 00:05:24.511 column minus 2 -- -- 2 becomes minus 2 + 2, which is 0. 00:05:25.340 --> 00:05:31.268 3 -- 1 gives us 2 and 0 -- -- 1 is 0 00:05:31.268 --> 00:05:33.548 + 1 which is 1. 00:05:34.570 --> 00:05:39.666 And there's our answer. So when we do B -- D, This is the 00:05:39.666 --> 00:05:44.034 answer. Again, a matrix of the same size as B&D, so that 00:05:44.034 --> 00:05:47.310 illustrates how we do matrix addition and subtraction. We 00:05:47.310 --> 00:05:51.314 have to have two matrices which have the same size in 00:05:51.314 --> 00:05:56.046 order to be compatible. And then what we do is we add or 00:05:56.046 --> 00:06:00.050 subtract the elements that are in the same positions. We call 00:06:00.050 --> 00:06:00.778 corresponding elements. 00:06:01.910 --> 00:06:05.430 Now Matrix obviously has the same size itself, so we can 00:06:05.430 --> 00:06:09.590 always add a matrix to itself, and we're going to do that now 00:06:09.590 --> 00:06:13.430 with the Matrix A. So we're going to add matrix A to 00:06:13.430 --> 00:06:17.590 itself, so into a plus a. So here's Matrix A and what adding 00:06:17.590 --> 00:06:21.110 matrix a onto it. And because it's the same matrix, clearly 00:06:21.110 --> 00:06:25.270 it's not the same size that both 2 by two matrices, so we 00:06:25.270 --> 00:06:26.870 go through the standard procedure. 00:06:28.690 --> 00:06:31.910 When we add elements that are in corresponding positions, so 00:06:31.910 --> 00:06:35.774 the four gets added to the four, which gives us 8, the 00:06:35.774 --> 00:06:39.960 three gets added to the three to give us 6 not getting to 00:06:39.960 --> 00:06:43.502 nought, which gives us nought and minus one gets added to 00:06:43.502 --> 00:06:45.756 minus one. To give this minus 2. 00:06:47.240 --> 00:06:53.274 So matrix a + A is this matrix here with entries 860 and minus 00:06:53.274 --> 00:06:59.739 two and we used to writing A plus a in a shorthand form as a 00:06:59.739 --> 00:07:01.894 + A = 2 A. 00:07:02.720 --> 00:07:06.260 One lot of a there's another lot of a gives us two lots of a. 00:07:06.960 --> 00:07:11.302 So this matrix that we found here, we can refer to as 2A. 00:07:12.110 --> 00:07:16.816 And if we look at the entries in this matrix and compare them 00:07:16.816 --> 00:07:21.884 with the entries of a, we see that each of the entries is just 00:07:21.884 --> 00:07:28.038 twice the entries of a 2 * 4 is eight 2 * 3 or 6 two times 00:07:28.038 --> 00:07:32.744 naughties nought 2 * -- 1 is minus two, and so this process 00:07:32.744 --> 00:07:36.726 illustrates how we do we call scalar multiplication. We take a 00:07:36.726 --> 00:07:41.432 matrix and we multiply it by a number. All that happens is that 00:07:41.432 --> 00:07:43.242 every element inside the matrix. 00:07:43.360 --> 00:07:47.596 Gets multiplied by the number, so in this case the number was 00:07:47.596 --> 00:07:51.832 two and we'll do some examples now, but we use a different 00:07:51.832 --> 00:07:56.120 number. So we've seen how we can do scalar multiplication by 00:07:56.120 --> 00:07:59.320 simply multiplying every element inside our matrix by the number. 00:07:59.320 --> 00:08:03.160 The scalar that we're trying to multiply by. So we'll do a 00:08:03.160 --> 00:08:06.680 couple more examples now, so we're going to workout is going 00:08:06.680 --> 00:08:11.160 to five times the matrix B and I'm going to do 1/2 times the 00:08:11.160 --> 00:08:16.830 matrix D. So all I've done is I've written down what matrix B 00:08:16.830 --> 00:08:21.270 is. I'm going to do five times this matrix. So remember the 00:08:21.270 --> 00:08:24.970 rule for scalar multiplication is the scalar, the number that 00:08:24.970 --> 00:08:28.300 we're trying to multiply by multiplies every entry inside 00:08:28.300 --> 00:08:35.662 the matrix. So we get 5 * 5 is 20 five 5 * -- 00:08:35.662 --> 00:08:39.470 1 is minus five. 5 * 1 is 00:08:39.470 --> 00:08:47.156 5. 5 * -- 2 is minus ten. 5 * 3 is 15 and 5 00:08:47.156 --> 00:08:49.052 * 0 is 0. 00:08:50.080 --> 00:08:54.448 So this is our answer. This is the matrix 5B or scalar five 00:08:54.448 --> 00:08:58.816 times matrix B. Notice that the matrix we get to that answer has 00:08:58.816 --> 00:09:03.184 the same size, the same order as the matrix we started from, and 00:09:03.184 --> 00:09:07.552 that's fairly obvious. That must be the case because all we do is 00:09:07.552 --> 00:09:10.912 we multiply every element inside the matrix by the scalar 00:09:10.912 --> 00:09:14.944 outside. So we are not creating any new entries in the Matrix 00:09:14.944 --> 00:09:19.648 and we're not losing any. So the matrix that we get must have the 00:09:19.648 --> 00:09:22.020 same size. So when we started with. 00:09:23.540 --> 00:09:27.049 Here's another example. We don't have to just multiply by whole 00:09:27.049 --> 00:09:31.196 numbers or two previous examples. We did 2 * A and 5 * 00:09:31.196 --> 00:09:35.343 B, but we can multiply by any number, and in this case I'm 00:09:35.343 --> 00:09:38.533 choosing to multiply the fraction or half. So I'm going 00:09:38.533 --> 00:09:40.447 to do half times matrix D. 00:09:41.130 --> 00:09:45.771 So here it is written out. Here's matrix D. We do 1/2 times 00:09:45.771 --> 00:09:50.412 that number. All we have to do is do 1/2 times every element 00:09:50.412 --> 00:09:51.483 inside the matrix. 00:09:52.550 --> 00:09:59.206 So we do 1/2 * 2, which gives us one 1/2 * 0, which gives us 00:09:59.206 --> 00:10:04.690 nought 1/2. Times 4, which gives us two. That's not the first 00:10:04.690 --> 00:10:12.002 column and 1/2 * -- 2, giving us minus 1/2 * 1, giving us a half 00:10:12.002 --> 00:10:15.658 and 1/2 * -- 1, giving us minus 00:10:15.658 --> 00:10:20.510 1/2. And so here's our product matrix and not surprisingly, it 00:10:20.510 --> 00:10:23.768 ended up with some fractions. Then, because we were 00:10:23.768 --> 00:10:26.664 multiplying by a fraction to start off with. 00:10:27.830 --> 00:10:32.501 That concludes the video on addition and subtraction of 00:10:32.501 --> 00:10:35.096 matrices and on scalar multiplication.