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.

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 situation the 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.

You can comment your questions or problems regarding the multiplication of matrices here.

No comments:

Powered by Blogger.