In this video we look at the
subjective addition and
subtraction of matrices, and we
also look at scalar
multiplication of matrices. To
do that, we're going to need
some matrices, so here are some
matrices that I've already
prepared, and you'll see we've
got four matrices here, and
they've all got different sizes.
So the first thing we need to do
is just remind ourselves as to
how we look at the size of a
matrix, so we count up the
number of rows and the number of
columns. So this matrix A.
We say is a two by two matrix
because it's got two rows and
two columns. Matrix B's got
three rows and two columns, so
that's a three by two matrix.
And we can clearly see that
matrix C is a two by three
matrix, two rows and three
columns, and matrix D is a three
by two matrix with three rows
and two columns.
Now, when it comes to adding and
subtracting matrices, we can
only do it when the two matrices
have the same size. That is,
when they got this both got the
same number of rows and the same
number of columns and two
matrices that have the same size
are said to be compatible, and
when they're compatible we can
add them and subtract them.
So if we return to our four
matrices. We see that of these
four matrices, the only two that
are compatible or matrix B and
matrix D. They have the same
size 3 rows and two columns. So
what that means is that we can
find B + D and we can find
B -- D and we can find D
-- B. So we can add and subtract
matrices, B&D because they have
the same size.
Because they're compatible, we
can't add A&B because they have
different sizes. We can't add
C&A because they have different
sizes. Might be worth noting
that where we define the matrix
C transpose. C transpose. That's
where the rows become columns
would have. Two columns, because
each row would turn into a
column, it would have three
rows, so C transpose would be a
three by two matrix. So C
transpose is also compatible
with B&D. So we can add C
transpose to be or today, but we
can't add C to be or today.
Once we found two matrices that
are compatible that these two
matrices that have got the same
size, then we need to know how
to actually add them up. So we
look at our matrices B&D and see
how we go through this process.
So here's our Matrix B and
here's our Matrix D and I've
written them with a plus sign
between them and underneath I've
written them out again with a
minus sign. So this is B + D and
this is B -- D. So how do we do
the addition? Well, it's quite
straightforward. All we do
is we were adding we add the
elements that are in the
same position. We call that
the corresponding position.
So because the five is in the
first row on the 1st column and
the two is in the first row and
the first column, they get added
together. So we do 5 + 2 which
is 7 and that gives us the entry
in the first row and the first
column of our answer.
We do the same with all the
elements, so the minus one is in
the 2nd row and the first
column. So we add that to the
zero in the 2nd row and the
first column. So we do minus 1 +
0, which gives us minus one and
we can continue to do that for
all six elements of the matrix.
So 1 + 4 because the one and
four are in corresponding
positions gives us 5 -- 2 + --
2. Gives us minus four and that
goes up here because it's in the
first row and the second column
first row on the second column
for three and the one get added
to give us four and the nought
and the minus one get added to
give us minus one.
And so that's how we do matrix
addition. So just to recap, we
have to have two matrices that
have the same size and then when
we have two matrices at the same
size we add them by adding the
elements that are in
corresponding positions. And so
the answer we get is the same
size as the two matrices that
we've added together.
Now the principles of
subtraction are exactly the
same. We deal with elements that
are in the corresponding
positions, but obviously this
time we subtract rather than add
them. So we do 5 -- 2 to get
three, we do minus 1 -- 0 to get
minus one. We do 1 -- 4 to
get minus three. That's done the
elements in the first column
with the elements in the second
column minus 2 -- -- 2 becomes
minus 2 + 2, which is 0.
3 -- 1 gives us 2
and 0 -- -- 1 is 0
+ 1 which is 1.
And there's our answer. So
when we do B -- D, This is the
answer. Again, a matrix of the
same size as B&D, so that
illustrates how we do matrix
addition and subtraction. We
have to have two matrices
which have the same size in
order to be compatible. And
then what we do is we add or
subtract the elements that are
in the same positions. We call
corresponding elements.
Now Matrix obviously has the
same size itself, so we can
always add a matrix to itself,
and we're going to do that now
with the Matrix A. So we're
going to add matrix A to
itself, so into a plus a. So
here's Matrix A and what adding
matrix a onto it. And because
it's the same matrix, clearly
it's not the same size that
both 2 by two matrices, so we
go through the standard
procedure.
When we add elements that are
in corresponding positions, so
the four gets added to the
four, which gives us 8, the
three gets added to the three
to give us 6 not getting to
nought, which gives us nought
and minus one gets added to
minus one. To give this minus
2.
So matrix a + A is this matrix
here with entries 860 and minus
two and we used to writing A
plus a in a shorthand form as a
+ A = 2 A.
One lot of a there's another lot
of a gives us two lots of a.
So this matrix that we found
here, we can refer to as 2A.
And if we look at the entries in
this matrix and compare them
with the entries of a, we see
that each of the entries is just
twice the entries of a 2 * 4 is
eight 2 * 3 or 6 two times
naughties nought 2 * -- 1 is
minus two, and so this process
illustrates how we do we call
scalar multiplication. We take a
matrix and we multiply it by a
number. All that happens is that
every element inside the matrix.
Gets multiplied by the number,
so in this case the number was
two and we'll do some examples
now, but we use a different
number. So we've seen how we can
do scalar multiplication by
simply multiplying every element
inside our matrix by the number.
The scalar that we're trying to
multiply by. So we'll do a
couple more examples now, so
we're going to workout is going
to five times the matrix B and
I'm going to do 1/2 times the
matrix D. So all I've done is
I've written down what matrix B
is. I'm going to do five times
this matrix. So remember the
rule for scalar multiplication
is the scalar, the number that
we're trying to multiply by
multiplies every entry inside
the matrix. So we get 5
* 5 is 20 five 5 * --
1 is minus five. 5 * 1 is
5. 5 * -- 2 is minus
ten. 5 * 3 is 15 and 5
* 0 is 0.
So this is our answer. This is
the matrix 5B or scalar five
times matrix B. Notice that the
matrix we get to that answer has
the same size, the same order as
the matrix we started from, and
that's fairly obvious. That must
be the case because all we do is
we multiply every element inside
the matrix by the scalar
outside. So we are not creating
any new entries in the Matrix
and we're not losing any. So the
matrix that we get must have the
same size. So when we
started with.
Here's another example. We don't
have to just multiply by whole
numbers or two previous
examples. We did 2 * A and 5 *
B, but we can multiply by any
number, and in this case I'm
choosing to multiply the
fraction or half. So I'm going
to do half times matrix D.
So here it is written out.
Here's matrix D. We do 1/2 times
that number. All we have to do
is do 1/2 times every element
inside the matrix.
So we do 1/2 * 2, which gives us
one 1/2 * 0, which gives us
nought 1/2. Times 4, which gives
us two. That's not the first
column and 1/2 * -- 2, giving us
minus 1/2 * 1, giving us a half
and 1/2 * -- 1, giving us minus
1/2. And so here's our product
matrix and not surprisingly, it
ended up with some fractions.
Then, because we were
multiplying by a fraction to
start off with.
That concludes the video on
addition and subtraction of
matrices and on scalar
multiplication.