Monday, 3 December 2012

Matrix Multiplication


  Matrix Multiplication involves the multiplication of two Matrices in a particular order. One important point regarding Matrix Multiplication is that it is not commutative. If A and B are matrices which can be multiplied to get the resultant Matrix as AB. Then in general AB ≠ BA. Some times BA may not even exist. The program given here has a time complexity of O(n3). In order to multiply two matrices the following condition should hold valid. 

    Matrix Multiplication is possible only if the Column Size of the first Matrix is equal to the Row size of the second matrix. The Product Matrix will have as many number of rows as the first Matrix and as many number of Columns as the second Matrix. 

  If A is a Matrix of order 1 X 3 and B is a Matrix of order 3 X 1. Then both AB and BA exists. But AB is a 1 X 1 Matrix, Where as BA is a 3 X 3 Matrix. 


Click here to download the C Program to perform Matrix Multiplication.
Click here to download the C++ Program to perform Matrix Multiplication.


No comments:

Post a Comment