Professional Documents
Culture Documents
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
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, A22 and B22 and their product AB22 .
B A = BA
2 2 2 2 23
(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 22 and BA 22 .
Example-04
2 5
1 2 1
Let, A= and B 4 3
3 1 4 23 2 1 32
2
Then the product AB C22 .
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 23 y (2 2) (1 4) (1 y ) 4 y 21
31
12 2 4 x 3 y
Since, AB
6 y
Example-6
Let us take the matrices A and B in Example 4, where A23 , B32 and
4 2
AB C .
6 16 22
3
A B = C is possible while
2 3 3 1 2 1
B A is not possible.
3 1 2 3
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.
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 AB22 the entry ab 21
is
ab 21
(3 21) (2 28) (2 30) 179
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.
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
No. # 02
Exercies 03
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
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.
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
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
9
12. 12. K = 1/ 6
10