CHAPTER 03.10: BINARY OPERATIONS: Linear combination of matrices Example



So in this segment we are going to talk about an example of finding a linear combination of matrices. So letís suppose the problem states as follows: if A1 matrix is given to you as 5, 6, 2, 3, 2, 1; another matrix B is given to you - or not maybe B letís call it A2 - is given to you as 2.1, 3, 2, 5, 1, 6; another matrix A3 is given to you and thatís 0, 2.2, 2, 3, 3.5, and 6. So letís suppose somebody gives you these three matrices says: hey I have to find this particular linear combination of these matrices, find A1+2A2-0.5A3. So itís pretty straight forward; all you have to do is to take this A1 matrix multiply it by one each element, take this A2 matrix multiply it by 2 each and every element, and take and take this A3 matrix and multiply each element by -0.5, and then simply add element to element.


So letís go and do that. So if I want to take the first matrix Iím going to multiply by 1 because thatís whatís in front of it and there is nothing there it will stay 5, 6 , 2, 3, 2, 1. Then Iím going to take the next matrix, Iím going to multiply each element by 2, so Iím putting the 2 here for the time being 5, 1, and 6 and then Iím going to take the last matrix which is given and Iím going to multiply by -0.5; and Iím putting the A3 matrix here 0, 2.2, 2, 3, 3.5, and 6. So letís go and see what we get here we get 5, 6, 2, 3, 2, 1; then we go to multiply each element of this matrix. Here there are 6 elements; here we will multiply by 2, so I get 4.2, 6, 4, 10, 2, 12, and then I take -0.5 and I add it to each of the elements and I get -0 doesnít matter -1.1, -1, -1.5, -1.75, and -3.


Thatís what I will get there and all you have to do is now is to do element by element addition. So for example, if I want to now find what is the resulting first row first column I will take the first row first column and get 5 then add it to 4.2 and then add it to -0 Iíll get 9.2. So thatís what you would do for each element. So the resulting matrix which you will get by adding all those three matrices is as follows youíll get 9.2, which we just calculated, 10.9, 5, 11.5, 2.25, and 10. So for example if youíre looking at this 10, how did I get this 10 its simply adding 1 to 12 is 13 13-3 is 10. And thatís where we get 10. And that is the end of this segment