## Blog

# The Rules of Matrix Multiplication: Multiplying two or more matrices.

- December 12, 2017
- Posted by: allexamshelps
- Category: Mathematics

1,475 total views, 1 views today

**For multiplying two or more matrices you have to understand when multiplying two or more matrices is allowed and when it is not allowed. **

##### The rule of Conformability in matrix multiplication:

**A={ \begin{bmatrix} \ddots & { Column }_{ 1 } & { Column }_{ 2 } & { Column }_{ 3 } \\ { Row }_{ 1 } & 2 & 7 & 1 \\ { Row }_{ 2 } & 4 & 1 & 3 \\ { Row }_{ 3 } & 6 & 3 & 8 \end{bmatrix} }_{ \quad \quad 3 (rows)\quad \times \quad 3(columns) }**

**M={ \begin{bmatrix} { a }_{ 11 } & { a }_{ 12 } \\ { a }_{ 21 } & { a }_{ 22 } \end{bmatrix} }_{ Rows\times columns }**

###### To now what is aij and why do we study matrix? Click* here.*

**As above, while writing the dimension (the number of rows and columns) of a matrix, we first write the number of rows and then the number of columns.**

**For multiplying two matrices, we first have to see whether the matrices are conformable or not. This conformability means the number of columns of matrix A has to be equal to the number of rows of matrix B.**

**A={ \begin{bmatrix} 2 & 7 & 1 \\ 4 & 1 & 3 \\ 6 & 3 & 8 \end{bmatrix} }_{ 3\times 3 }**

**B={ \begin{bmatrix} 6 & 4 \\ 1 & 2 \\ 4 & 9 \end{bmatrix} }_{ 3\times 2 }**

** For multiplying the above two matrices, we have to check whether the number of columns in matrix A (we will call it the premultiplication matrix) is equal to the number of rows of the matrix B (we will call it the postmultiplication matrix).**

**(Note: This means in AxB matrices, A is called the pre-multiplication matrix just because it is coming first; and the matrix B is called the post-multiplication matrix because it is coming after.)**

###### Since above two matrices are conformable, we can multiply them. How are matrices multiplied? click here

** AB={ \begin{bmatrix} 2 & 7 & 1 \\ 4 & 1 & 3 \\ 6 & 3 & 8 \end{bmatrix} }_{ 3\times 3 }\times { \begin{bmatrix} 6 & 4 \\ 1 & 2 \\ 4 & 9 \end{bmatrix} }_{ 3\times 2 }**

###### **But if you reverse the order of matrices i.e., BA then **

**BA={ \begin{bmatrix} 6 & 4 \\ 1 & 2 \\ 4 & 9 \end{bmatrix} }_{ 3\times 2 }{ \begin{bmatrix} 2 & 7 & 1 \\ 4 & 1 & 3 \\ 6 & 3 & 8 \end{bmatrix} }_{ 3\times 3 }**

**The two matrices cannot be multiplied because of the number of columns in matrix B, 2, is not equal to the number of rows of matrix A, 3, and hence they are not conformable.**

**(Note: Even if two matrices are conformable on reversing the order, the values of elements ({ a }_{ ij }****) in the product matrix will change. Because in matrix multiplication AB\neq BA.**

**This means the matrix multiplication does not follow the commutative property which means if you multiply two numbers i.e., 2x4=8 and if you reverse the order 4x2=8; the product is again the same. Changing the order of numbers and still getting the same product (answer) means the multiplication of numbers is commutative or changing the order of numbers does not change the answer in the product.**

**But as it has been said AB\neq BA, the product matrix will be altogether different.**

**In 2x3= 6; 6 is called the product.**

**If you multiply two matrices, the product matrix will be having the number of rows equal to the first matrix (pre-multiplication matrix) and the columns of the product matrix will be equal to the number of columns of the second matrix (post-multiplication matrix)**

**This means in the multiplication of two matrices A and B:**

**AB=C**

**{ \begin{bmatrix} 2 & 7 & 1 \\ 4 & 1 & 3 \\ 6 & 3 & 8 \end{bmatrix} }_{ 3\times 3 }\times { \begin{bmatrix} 6 & 4 \\ 1 & 2 \\ 4 & 9 \end{bmatrix} }_{ 3\times 2 }={ \begin{bmatrix} 23 & 31 \\ 37 & 45 \\ 71 & 102 \end{bmatrix} }_{ 3\times 2 }**

**The product matrix C will be having 3 rows ( the number of rows equal to the matrix A and 2 columns (the number columns equal to the matrix B).**

**For example if you are going to multiply 3 or more matrices having different dimensions (rows and columns), then the rule of conformability and the dimension of product matrix is determined as follows.**

**{ \begin{bmatrix} 2 & 7 & 1 \\ 4 & 1 & 3 \\ 6 & 3 & 8 \end{bmatrix} }_{ 3\times 3 }\times { \begin{bmatrix} 6 & 4 \\ 1 & 2 \\ 4 & 9 \end{bmatrix} }_{ 3\times 2 }\times { \begin{bmatrix} 3 & 4 & 7 \\ 5 & 1 & 2 \end{bmatrix} }_{ 2\times 3 }={ \begin{bmatrix} 224 & 123 & 223 \\ 336 & 193 & 349 \\ 723 & 386 & 701 \end{bmatrix} }_{ 3\times 3 }**

**Now firstly to check the rule of conformability, check the number of columns, 3, of the first matrix is equal to the number of rows, 3, of the second matrix and the number of columns, 2, of the second matrix is equal to the number of rows, 2, of the third matrix. This means the matrices are conformable with each other. **

**The rows and columns (dimension) of the product matrix will be equal to the rows of the first matrix, 3, and the columns, 3, of the last (third) matrix.That is the product matrix will be having 3 rows and 3 columns. **

**The same rule applies if you are having 4, 5 or n matrices. Firstly check the rule of conformability between the matrices: between the first and the second matrices, between **the second** and the third matrics and between third and forth matrics and so on.**

**After this, you will be having a product matrix **whose** rows are equal to the number of rows of the first matrix and its columns will be equal to the number of columns of the last matrix in the multiplication. **

### 1 Comment

### Leave a Reply Cancel reply

1,476 total views, 2 views today

What else can I do?