Multiplication of Matrices

Multiplication of Matrices

Multiplication of Matrices


Let A and B be two matrices. Then, the multiplication of matrices A and B i.e. product of A and B is denoted by AB if it is defined. The product AB can be defined or cannot be defined. It depends on the order of A and B.



********************


10 Math Problems officially announces the release of Quick Math Solver and 10 Math ProblemsApps on Google Play Store for students around the world.


Install Quick Math Solver



********************


Install 10 Math Problems




********************


Two matrices A and B are said to be conformable or compatible for the product AB if and only if the number of columns in A is equal to the number of rows in B. It means we can define the product AB only when the number of columns in A and number of rows in B are same. If this condition is not satisfied then the product of matrices A and B cannot be performed. In such a situation, matrices A and B are not conformable for multiplication.


If A and B are conformable for the product AB, then the number of rows in A followed by the number of columns in B gives the order of the product AB.


Let the order of A be m Ɨ n and that of B be n Ɨ p. Here, number of columns of A and the number of rows of B are the same. So, the matrices A and B are conformable for the product AB. Number of rows in A is m and number of columns in B is p. So, the order of product AB is m Ɨ p.


Order of the product of matrices A and B i.e. order of AB

If two matrices A and B are conformable or compatible for the product AB, it is not necessary that they are also conformable or compatible for the product BA. If A and B are square matrices of the same order, then they are conformable for the product AB as well as BA.


The element in row i and column j of the product AB is obtained by multiplying the elements in the ith row of A by the corresponding elements in jth column of B, and then by adding up the resulting products.

āˆ“ (i, j)th element of the product AB = Sum of the products of the elements of ith row of A with the corresponding elements of jth column of B.


Let A = (ā– (a_11&a_12@a_21&a_22 )) and B = (ā– (b_11&b_12@b_21&b_22 ))

Example: Order of the product of matrices A and B i.e. order of AB

Here, order of the product AB will be 2 Ɨ 2. If cij denotes the elements of the product matrix AB, then


AB = (ā– (c_11&c_12@c_21&c_22 )) Where, c11 = 1st row of A Ɨ 1st column of B       = a11b11 + a12b21 c12 = 1st row of A Ɨ 2nd column of B       = a11b12 + a12b22 c21 = 2nd row of A Ɨ 1st column of B       = a21b11 + a22b21 c22 = 2nd row of A Ɨ 2nd column of B       = a21b12 + a22b22 āˆ“ AB = (ā– (a_11 b_11+a_12 b_21&a_11 b_12+a_12 b_22@a_21 b_11+a_22 b_21&a_21 b_12+a_22 b_22 ))


Working Rule (Steps for multiplying matrices):

First of all guess the order of product AB and write down as follows:


AB = (ā– (a_11&a_12@a_21&a_22 ))(ā– (b_11&b_12@b_21&b_22 )) = (ā– ( ā€¦ā€¦&ā€¦ā€¦ @ ā€¦ā€¦&ā€¦ā€¦ )) Then follow the steps given below: Step 1: (ā– (a_11&a_12@a_21&a_22 ))(ā– (b_11&b_12@b_21&b_22 )) = (ā– (a_11 b_11+a_12 b_21&ā€¦ā€¦@ā€¦ā€¦&ā€¦ā€¦)) Step 2: (ā– (a_11&a_12@a_21&a_22 ))(ā– (b_11&b_12@b_21&b_22 )) = (ā– (a_11 b_11+a_12 b_21&a_11 b_12+a_12 b_22@ā€¦ā€¦&ā€¦ā€¦)) Step 3: (ā– (a_11&a_12@a_21&a_22 ))(ā– (b_11&b_12@b_21&b_22 )) = (ā– (a_11 b_11+a_12 b_21&a_11 b_12+a_12 b_22@a_21 b_11+a_22 b_21&ā€¦ā€¦)) Step 4: (ā– (a_11&a_12@a_21&a_22 ))(ā– (b_11&b_12@b_21&b_22 )) = (ā– (a_11 b_11+a_12 b_21&a_11 b_12+a_12 b_22@a_21 b_11+a_22 b_21&a_21 b_12+a_22 b_22 ))

Examples:

1. Let A = (ā– (3&5@-1&2)) and B = (ā– (4@7)) be two matrices. Since A is of order 2 Ɨ 2 and B is of order 2 Ɨ 1, AB is defined and it is of order 2 Ɨ 1. AB = (ā– (3&5@-1&2))(ā– (4@7)) = (ā– (3.4+5.7@-1.4+2.7)) = (ā– (47@10)) Note that the matrix B is of order 2 Ɨ 1 and matrix A is of order 2 Ɨ 2, therefore, BA is not defined.  2. Let A = (ā– (1&5@2&0)) and B = (ā– (3&1@4&6)) be two matrices. Since A is of order 2 Ɨ 2 and B is of order 2 Ɨ 2, AB is defined and it is of order 2 Ɨ 2. AB = (ā– (1&5@2&0))(ā– (3&1@4&6)) = (ā– (1.3+5.4&1.1+5.6@2.3+0.4&2.1+0.6)) = (ā– (23&31@6&2)) BA = (ā– (3&1@4&6))(ā– (1&5@2&0)) = (ā– (3.1+1.2&3.5+1.0@4.1+6.2&4.5+6.0)) = (ā– (5&15@16&20)) Observe that AB ā‰  BA.


Properties of Matrix Multiplication

1.   Multiplication of matrices, generally, is not commutative, i.e. AB ā‰  BA, in general.


i.       When the matrix AB is defined, it not always necessary that BA can also be defined. For example, if the matrix A is m Ɨ n and the matrix B is n Ɨ p, AB exists whereas BA does not exist because p ā‰  m.

ii.      When both AB and BA are defined, it is not necessary that they should be of the same type. For example, if the matrix A is of order m Ɨ n and the matrix B is of order n Ɨ m, both the matrices AB and BA exist but AB is of order m Ɨ m while BA is of order n Ɨ n.

iii.    When A and B are the square matrices of same order, then both AB and BA exist, but they are not necessarily equal. For example,

Let, A = (ā– (1&2@3&4)) and B = (ā– (1&2@4&3)). Then,  AB = (ā– (1&2@3&4))(ā– (1&2@4&3)) = (ā– (1+8&2+6@3+16&6+12)) = (ā– (9&8@19&18)) BA = (ā– (1&2@4&3))(ā– (1&2@3&4)) = (ā– (1+6&2+8@4+9&8+12)) = (ā– (7&10@13&20)) Thus, AB ā‰  BA.

iv.    But, sometimes AB and BA are also equal. For example,

Let, A = (ā– (2&3@1&0)) and B = (ā– (0&-3@-1&2)). Then,  AB = (ā– (2&3@1&0))(ā– (0&-3@-1&2)) = (ā– (0-3&-6+6@0+0&-3+0)) = (ā– (-3&0@0&-3)) BA = (ā– (0&-3@-1&2))(ā– (2&3@1&0)) = (ā– (0-3&0+0@-2+2&-3+0)) = (ā– (-3&0@0&-3)) Thus, AB = BA.

Hence in general AB ā‰  BA.


2.   Multiplication of matrices is associative i.e. if matrices A, B and C are conformable for multiplication, then (AB)C = A(BC).

Let A = (ā– (1&3@-2&0)), B = (ā– (2&4@5&1)) and C = (ā– (-3&4@6&0)). Then, AB = (ā– (1&3@-2&0))(ā– (2&4@5&1)) = (ā– (2+15&4+3@-4+0&-8+0)) = (ā– (17&7@-4&-8)) (AB)C = (ā– (17&7@-4&-8))(ā– (-3&4@6&0)) = (ā– (-51+42&68+0@12-48&-16+0)) = (ā– (-9&68@-36&-16)) BC = (ā– (2&4@5&1))(ā– (-3&4@6&0)) = (ā– (-6+24&8+0@-15+6&20+0)) = (ā– (18&8@-9&20)) A(BC) = (ā– (1&3@-2&0))(ā– (18&8@-9&20)) = (ā– (18-27&8+60@-36+0&-16+0)) = (ā– (-9&68@-36&-16)) Thus, (AB)C = A(BC).

3.   Multiplication of matrices is distributive with respect to addition, i.e if matrices A, B and C are compatible for the requisite addition and multiplication, then A(B + C) = AB + AC and (A + B)C = AC + BC.

Let A = (ā– (1&1@2&1@1&2)), B = (ā– (0&-1@1&2)) and C = (ā– (1&0@2&1)). Then, B + C = (ā– (0&-1@1&2)) + (ā– (1&0@2&1)) = (ā– (1&-1@3&3)) A(B + C) = (ā– (1&1@2&1@1&2))(ā– (1&-1@3&3)) = (ā– (1+3&-1+3@2+3&-2+3@1+6&-1+6)) = (ā– (4&2@5&1@7&5)) ā€¦ā€¦ā€¦ā€¦.(i) AB = (ā– (1&1@2&1@1&2))(ā– (0&-1@1&2)) = (ā– (0+1&-1+2@0+1&-2+2@0+2&-1+4)) = (ā– (1&1@1&0@2&3)) AC = (ā– (1&1@2&1@1&2))(ā– (1&0@2&1)) = (ā– (1+2&0+1@2+2&0+1@1+4&0+2)) = (ā– (3&1@4&1@5&2)) AB + AC = (ā– (1&1@1&0@2&3)) + (ā– (3&1@4&1@5&2)) = (ā– (4&2@5&1@7&5)) ā€¦ā€¦ā€¦ā€¦ā€¦ā€¦ā€¦...(ii) From (i) and (ii), we get, A(B + C) = AB + AC. Similarly, we can verify that, (A + B)C = AC + BC.

4.   If A is a square matrix and I is an identity matrix of same order, then AI = IA = A.

Let A = (ā– (1&2@3&4)) and I = (ā– (1&0@0&1)). Then, AI = (ā– (1&2@3&4))(ā– (1&0@0&1)) = (ā– (1+0&0+2@3+0&0+4)) = (ā– (1&2@3&4)) IA = (ā– (1&0@0&1))(ā– (1&2@3&4)) = (ā– (1+0&2+0@0+3&0+4)) = (ā– (1&2@3&4)) āˆ“ AI = IA = A. Here, matrix I is called multiplicative identity.

Note: Multiplication of matrices gives us some results which are different from the results obtained in the case of numbers. Some of these results illustrated in the following examples:

i.     If AB is a null matrix, it does not imply that at least one of the matrices A or B must be a zero matrix. For example,

Let A = (ā– (1&1@1&1)) and B = (ā– (1&0@-1&0)). Then, AB = (ā– (1&1@1&1))(ā– (1&0@-1&0)) = (ā– (1-1&0+0@1-1&0+0)) = (ā– (0&0@0&0)) Thus, AB is a zero matrix though neither A nor B is zero matrix.

ii.    Cancellation law may not hold in matrix multiplication. For example,

Let A = (ā– (1&-1@2&-2)), B = (ā– (4&5@3&3)) and C = (ā– (2&7@1&5)). Then, AB = (ā– (1&-1@2&-2))(ā– (4&5@3&3)) = (ā– (4-3&5-3@8-6&10-6)) = (ā– (1&2@2&4)) ā€¦ā€¦ā€¦ā€¦..(i) AC = (ā– (1&-1@2&-2))(ā– (2&7@1&5)) = (ā– (2-1&7-5@4-2&14-10)) = (ā– (1&2@2&4)) ā€¦ā€¦..ā€¦..(ii) From (i) and (ii) above, we get that AB = AC. But we have B ā‰  C. Thus, cancellation law for the multiplication of matrices may not hold.


Worked Out Examples


Example 1: If A = (ā– (1&-4@7&3)) and B = (ā– (-1&2@3&0)), find AB. Does BA defined? If BA defined, find BA and show that AB ā‰  BA. Solution: Here, A = (ā– (1&-4@7&3)) and B = (ā– (-1&2@3&0)). Since A and B both are square matrices of order 2, both AB and BA are defined. AB = (ā– (1&-4@7&3))(ā– (-1&2@3&0)) = (ā– (-1-12&2+0@-7+9&14+0)) = (ā– (-13&2@2&14)) and, BA = (ā– (-1&2@3&0))(ā– (1&-4@7&3)) = (ā– (-1+14&4+6@3+0&-12+0)) = (ā– (13&10@3&-12)) āˆ“ AB ā‰  BA.


Example 2: If A = (ā– (1&2@3&1)), show that A2 ā€“ 2A ā€“ 5I = O, where I and O are identity and zero matrices of order 2 Ɨ 2. Solution: Here,  A = (ā– (1&2@3&1)), I = (ā– (1&0@0&1)) and O = (ā– (0&0@0&0)).  Now, A2 = (ā– (1&2@3&1))(ā– (1&2@3&1)) = (ā– (1+6&2+2@3+3&6+1)) = (ā– (7&4@6&7)) āˆ“ A2 ā€“ 2A ā€“ 5I = (ā– (7&4@6&7)) - 2(ā– (1&2@3&1)) - 5(ā– (1&0@0&1))                         = (ā– (7&4@6&7)) - (ā– (2&4@6&2)) - (ā– (5&0@0&5)) 	            = (ā– (7-2-5&4-4-0@6-6-0&7-2-5))                         = (ā– (0&0@0&0)) = O. Proved.
Example 3: If A = (ā– (2&-3@p&q)), find p and q so that A2 = I, where I is identity matrix of order 2 Ɨ 2. Solution: Here, A = (ā– (2&-3@p&q)) We have, A2 = I i.e.	A Ɨ A = I i.e.	(ā– (2&-3@p&q))(ā– (2&-3@p&q)) = (ā– (1&0@0&1)) or,	(ā– (4-3p&-6-3q@2p+pq&-3p+q^2 )) = (ā– (1&0@0&1)) Equating corresponding elements, we get 4 ā€“ 3p = 1 ā€¦ā€¦ā€¦ā€¦ā€¦ā€¦.(i) -6 ā€“ 3q = 0 ā€¦ā€¦ā€¦ā€¦ā€¦..(ii) Solving (i) and (ii), we get,  p = 1 and q = -2


Example 4: If A = (ā– (1&2@-3&0)), find a matrix X such that AX = (ā– (5&6@-3&0)). Solution: Here, A = (ā– (1&2@-3&0)) and AX = (ā– (5&6@-3&0)). Here, A is a 2Ɨ2 matrix and the matrix on the right hand side is also a 2Ɨ2 matrix, so X must be a 2Ɨ2 matrix. Let, X = (ā– (a&b@c&d)). Given that, AX = (ā– (5&6@-3&0)) i.e.	(ā– (1&2@-3&0))(ā– (a&b@c&d)) = (ā– (5&6@-3&0)) or, 	(ā– (a+2c&b+2d@-3a+0&-3b+0)) = (ā– (5&6@-3&0)) or, 	(ā– (a+2c&b+2d@-3a&-3b)) = (ā– (5&6@-3&0)) Equating corresponding elements, we get -3a = -3       	āˆ“ a = 1 -3b = 0        	āˆ“ b = 0 a + 2c = 5    	āˆ“ c = 2 and, b + 2d = 6  	āˆ“ d = 3 āˆ“ X = (ā– (1&0@2&3))


Example 5: If (ā– (7x+1@6y-2)) = (ā– (2&3@-1&8))(ā– (0@2)), find the values of x and y. Solution: We have, 	(ā– (7x+1@6y-2)) = (ā– (2&3@-1&8))(ā– (0@2)) or,	(ā– (7x+1@6y-2)) = (ā– (0+6@0+16)) or, 	(ā– (7x+1@6y-2)) = (ā– (6@16)) Now, equating corresponding elements,  we have 7x + 1 = 6 or,  7x = 6 ā€“ 1  or,  7x = 5 or,  x = 5/7 And, 6y ā€“ 2 = 16 or,  6y = 16 + 2 or,  6y = 18 or,  y = 18/6 or,  y = 3 Hence, x = 5/7 and y = 3.

Do you have any questions regarding the multiplication of matrices?


You can ask your questions or problems here, in the comment section below.

0 comments: