You are on page 1of 10

Unit 2

Chapter 3
Dot Product and Matrix Multiplication

In this section we will study the application of matrix multiplication. Unlike matrix
addition, matrix multiplication has some properties that distinguish it from multiplication
of real numbers.

Definitions:
b11 
b 
 21 
The dot or inner product of the vectors a  [a11 a12 .... a1n ]andb   . 
 . 
b 
 n1 

As a.b  a11b11  a12b21  ...........  a1n bn1

 
Shows the product between the row vector aij and the column vector [bij ] , where
1  i  n and 1  j  n .

Example-01

2
3
The dot product of u  [1  2 3 4]andv    is
  2
 
1 
u.v  (1 2)  (2  3)  (3  2)  (4 1)  6

Example-02

 4
Let a  [ x 2 3]andb  1 . If a.b = -4. find x.
2
Here, a.b  ( x  4)  (2  1)  (3  2)  4 x  8.

But, a.b = -4 = 4x + 8.
 x  3

Matrix Multiplication:

Definition:

1
If A  aij in an m  p matrix and B  bij is a p  n matrix, then the product of A and
B denoted AB, is the m n matrix C  [cij ] .

p
Where cij  ai1b1 j  ai 2 b2 j  ..............  aip b pj   aik bkj (1  i  m,1  j  n).
k 1

We should note that the product of A and B is defined only when the number of rows of
B is exactly the same as the number of columns of A,
ie- A B = AB
m p p n m n

Example-3

2 1  3 5
Let A  and B   
0  2   2 1

(2  3)  (1  2) (2  5)  (1  1) 
Then, AB   
(0  3)  (2  2) (0  5)  (2  1)

8 11 
= 
  4  2
Here, A22 and B22 and their product AB22 .

Let us look at the product BA.

B A = BA
2 2 2 2 23

(3  2)  (0  5) (3  1)  (5  2)
BA   
(2  2)  (0  1) (2  1)  (1  2) 

6  7 
= 
4 0 
We can see that AB  BA though AB 22 and BA 22 .
Example-04

 2 5
1 2  1
Let, A=   and B  4  3
3 1 4  23 2 1  32

2
Then the product AB  C22 .

 
And if AB = C = cij , then
c11  1st  row of A  1st  column of B.
= 1 2  2  4   1 2
= 4.
 4  2
Thus, C   
6 16 
Example- 05

2 
1 x 3   
Let, A  
  and B  4 
 2 1 1  y 
12
If, AB    , find x and y.
6 

2 
1 x 3    (1  2)  ( x  4)  (3  y )  2  4 x  3 y 
AB    .4  =   =  
2  1 1 23  y  (2  2)  (1  4)  (1  y ) 4 y  21
  31

12 2  4 x  3 y 
Since, AB      
6   y 

Shows that y = 6 and x = -2.


We have seen in example 3 the products AB and BA and have understood the difference
of the products taken between two matrices is not same as the product of two real
numbers.

Example-6

Let us take the matrices A and B in Example 4, where A23 , B32 and
 4  2
AB  C    .
6 16  22

What is the order of the product BA?

Now, B A = BA matrix of order 3 3


3 2 23 3 3
Again if A23 and B31 then

3
A B = C is possible while
2  3 3 1 2 1

B A is not possible.
3 1 2  3

Properties of Matrix Multiplication:

If A is an m  p matrix and B is an p  n matrix then,

a. BA may not be defined; this will take place if n  m .


b. If BA is defined, which means that m = n, then BA is p  p while A is m m ;
thus if m  p , AB and BA are of different sizes.
c. If AB and BA are both of the same size, they may be equal or unequal.

Example-07:

Pesticides are sprayed on plants to eliminate harmful insects. However, some of the
pesticide is absorbed by the plant. The pesticides are absorbed by herbivores when they
eat the plants that have been sprayed. To determine the amount of pesticide absorbed by a
Herbivore, we proceed as follows. Suppose that we have three pesticides and four plants.
Let aij denote the amount of pesticides i (in milligrams) that has been absorbed by
plant. This information can be represented by the matrix.

 plant1 plant 2 plant 3


A   2 3 4  pesticide1
 3 2 2  pesticide 2

Now, suppose that we have three harbivores, and let b ij


denote the number of plants of
type i that a harbivore of type; eats per month. This information can be represented by
the martix.

 Herbivore1 Herbivore2
 21 12  plant1
B  
 28 15  plant 2
 
 30 12  plant 3
 Herbivore1 Herbivore2
Then, AB   246 117  Pesticide 1

 179 90  Pesticide 2

4
Now, in matrix AB22 the entry ab 21
is

ab 21
 (3  21)  (2  28)  (2  30)  179

The amount 179 mg of pesticide 2 is absorbed by the herbivore 1.


So, the (i, j ) entry of AB gives the amount of pesticide of type i that animal j has
absorbed.

If we now take a data of p carnivores (such as man) who eat the harbivores, we can repeat
the analyses to find out how much of each pesticide has been absorbed by each carnivore.

Further properties of matrix multiplication:

If A, B, and C are of appropriate sizes, then

a. A(BC) = (AB)C.
b. A(B+C) = AB + AC.
c. (A+B)C = AC + BC.
d. A p Aq  A p q
e. ( A p ) q  A pq
f. ( AB) p  A p B p
g. ( AB )T  B T AT

Example-08

1 3
Let A    then A4  (A2 ) 2 .
5 7

1 3 1 3  (1  1)  (3  5) (1  3)  (3  7)  16 24
A 2  AA      
5 7 5 7 (5  7)  (7  5) (3  5)  (7  7) 40 64

16 24 16 24  (16  16)  (24  40) (16  24)  (24  64)  1216 1920 
A4  ( A2 ) 2      
40 64 40 64 (40  16)  (64  40) (40  24)  (64  64) 3200 5056

Example-09

1 2   2
Let, A    andB   
3 4 5

5
1 2  2  8 
So, AB       
3 4  5  14

( AB) T  8 14

1 3
Now, AT    andB   2 5
T

 2 4 

We must notice that here AT B T is not possible


1 3
and B T AT   2 5 is possible and is 8 14
2 4

No. # 02

Exercies 03

01. Compute a.b for the following:

4
a. a  1 2, b   
 1

1
b. a   3  2, b   
  2

1
c. a  4 2  1, b  3
6

1
d. a  1 1 0, b  0
1

 3
02. Let a   3 2 x , b   2  , if a  b = 17, find x.
 x 
 y
1 2 x  6 
03. Let A    andB   x  . If AB    , find x and y.
3  1 2  1  8

6
For 4. and 5. let

1 2  3 
A ,
 4 0  2
3 1  2 3 1  1 0  3
    2 3 2  3
B  2 4 , C  3  4 5 , D    , E   2 1 5  andF  
  1  2  4 1 
 1 5 1  1  2  3 4 2 

04. If possible compute:

a. AB, b. BA, c. CB + D, d. AB + DF, e. BA + FD.

05. If possible compute:

a. A(BD), b. (AB)D, c. A(C + E), d. AC + AE. e. (D + F)A.

1 0 2 3
06. If I 2    andD    , compute DI 2 and I 2 D .
0 1   1  2

1 2  2  1
07. Let, A    andB    show that AB  BA.
3 2  3 4 

 2 3   1 3   4  3
08. If A    , B   2 0 , andC   0  4 that show that AB = AC.
 3  3    

0 1 
09. If A    , show that A  I 2.
2

1 0 

2  1 
 2 1  2  
10. If A    andB  3 4  if possible compute:
 3 2 5  1  2

a.( AB ) T
b.B T AT
c. AT B T
d .BB T
e.B T B.

7
 4 2
11. Let, A    , find
1 3 

a. A 2  3 A
b.2 A3  3 A 2  4 A  5I 2.

12. Determine a constant K such that ( KAT )( KA)  1.

  2
Where, A   1  . Is there more than one value of K that could be used?
  1 
Answers of Matrix-4
1. (a) 2 (b) 1 (c) 4 (d) 1

2. x= 2

3. x = 6/5 , y = 12/5

7 6  11
10  6  
4. (a)   (b) 18 4  14
 
14  6 19  2  7 

26  9
(c) Not possible (d)  4  5
 

(e) Not possible

26 42 26 42


5. (a) 34 54 (b) 34 54
   

 7  12 18   7  12 18 
(c) 4  8
(d) 4  8
 6  6

 4 8  12
(e)  1 6  7 
 

8
2 3
6. DI2 = I2D =  
  1  2

 4 7    1 2
7. AB =  0 5 BA =  9 2 So, AB  BA
   

 8  6  8  6
8. AB =  9 9  AC =  12 3  So, AB  AC
   

1 0 1 0
9. A2 = 0 1  I2 = 0 1  So, A2 = I2
   

5 17  5 17 
10. (a) (AB)T = 6  5 (b) BTAT = 6  5
   

 1 18 4  5 2 4
 0 11  3   
(c) ATBT =
  (d) BBT =
2 25  5
 9 14  12 4  5 5 

16 8 
(e) BTB =  8 21
 

30 20 247 206


11. (a) 10 20 (b) 103 144 
   

9
12. 12. K =  1/ 6

10

You might also like