CHAPTER 03.02: BINARY OPERATIONS:
Adding two matrices Example In
this segment we will take an example of how we add 2 matrices. Let’s suppose somebody says find [A]+[B] where [A] is given as -5, 7, 2, 3, 2.1, 5 and b is
given to you b matrix is given to you as [B] 6, 3, -9, 2, 4, 11. So the 2
matrices are given to you and you are asked to find out what the addition of
2 matrices so the C matrix which would be the addition of the [A]+[B] matrix. So the first thing which you have to
recognize or show that the size of A and B is exactly the same. So here we
have A which has 2 rows and 3 columns. So this is a 2 row 3 column matrix and
this is also a 2 row 3 column matrix; so we have 2 rows and 3 columns here
and 2 rows and 3 columns there. So we should be able to add the 2 matrices
because they are of the same size. So in order to calculate what the value of
C is we need to understand there are 6 elements, because the 2x3 matrix, so
there are 6 elements in our resulting C matrix. And those are done element by
element. So
if I do the first row first column here and the first row fist column here and
add the 2 I’ll get 1 because -5 + 6 will be equal to 1. If I do the first row
second column here and the first row second column here, add the two elements,
I’ll get 10 first row third column here, first row third column here the
addition is -7. Assumedly I’ll get 5 here 6.1 here and 16 here, and this
particular matrix is also 2 rows and three columns; and that’s how the
addition of 2 matrices is done. And that’s the end of this segment |