MATRIX and its features (II) [Prerequisite for MATLAB software ] | Multiplication |


Matrix multiplication: 

- So we will take two [2x2] matrices A=  | 1  2 |     and  B= | 3  4 |
                                                                      | 3  4 |                    | 5  6 |
-Firstly,  A=  | 1  2 |     and  B= | 3  4 |
                         | 3  4 |                   | 6 |

Take first row of Matrix A and first column of matrix B , now do this :
       X1 =  A(1,1)*B(1,1)+A(1,2)*B(2,1)
       X1= 1*3 + 2*5 = 3+ 10 = 13

-Now, A=  | 1  2 |     and  B= | 3  4 |
                    | 3  4 |                    | 5  6 |

Take first row of Matrix A and second column of matrix B , now do this :
       X2 =  A(1,1)*B(1,2)+A(1,2)*B(2,2)
       X2 = 1*4 + 2*6 = 4+ 12 = 16

-After that, A=  | 1  2 |     and  B= | 3  4 |
                              | 3  4 |                   | 5  6 |

Take second row of Matrix A and first column of matrix B , now do this :
       X3 =  A(2,1)*B(1,1)+A(2,2)*B(2,1)
       X3 = 3*3 + 4*5 = 9 + 20 = 29

-Lastly , A=  | 1  2 |     and  B= | 3  |
                        | 3  4 |                    | 5  |

Take first row of Matrix A and second column of matrix B , now do this :
       X4 =  A(2,1)*B(1,2)+A(2,2)*B(2,2)
       X4 = 3*4 + 4*6 = 12+ 24 = 36

Now, we got 4 values X1, X2, X3 and  X4
Thus, A*B =| X1   X2|
                       | X3  X4|

       i.e A*B =| 13   16|
                        | 29  36|
 
For 3x3 matrix concept is same but the calculation becomes a bit long , so I am mentioning the formula or general syntax on how to multiply two 3x3 matrices.


Now, as you all have learned how we can multiply 2 matrices , let them be of any size. 
 
We cannot multiply ever matrix as order[m*n] plays a very important role in multiplication of matrices.
Lets take 2 matrices A(m x n) and B (q x r)
Rule 1:

A x B is not necessarily equal to B x A. Order of multiplication can change our answers

Rule 2:

We can perform matrix multiplication only when:
    -> n = q [ For AxB multiplication]
or
   - > r = m [For BxA multiplication]

Rule 3:

The final matrix obtained my multiplication should have order 
 - >  [ m x  r ] for A x B
or
- >  [q x n] for B x A.

That is it, for multiplication part. 

Other concepts would be covered in next tutorials.

Bye Bye.. 
 

Comments