Matrix Product 0 PDF
Matrix Product 0 PDF
Matrix Product 0 PDF
1 Multiplication of Matrices
We now come to the most important operation between matrices, called the matrix multiplica-
tion. We define it as follows.
Definition 1.1. Let A = [aij ] 2 Mm,n (C) and B = [bij ] 2 Mn,r (C). Then, the product of A and
B, denoted AB, is a matrix C = [cij ] 2 Mm,r (C) such that for 1 i m, 1 j r
2 3
b1j
6 7
6 b2j 7 Xn
6 7
cij = A[i, :]B[:, j] = [ai1 , ai2 , . . . , ain ]6 . 7 = ai1 b1j + ai2 b2j + · · · + ain bnj = aik bkj .
6 .. 7
4 5 k=1
bnj
Thus, AB is defined if and only if the number of columns of A = the number of rows of B.
The way matrix product is defined seems quite complicated. Most of you have already seen it.
But, we will find other ways (3 more ways) to understand this matrix multiplication. These will be
quite useful at di↵erent stages in our study. So, we will spend quite a lot of time understanding it.
2 3
1 1 " #
6 7 3 4 5
Example 1.2. Let A = 6 7
42 0 5 and B = .
1 0 1
0 1
1. (AB)11 = 1 · 3 + ( 1) · ( 1) = 3 + 1 = 4. Similarly, compute the rest.
2 3
4 4 4
6 7
2. Thus AB = 6 7
4 6 8 105.
1 0 1
3. Note that A[1, :] is a 1 ⇥ 2 matrix and B is a 2 ⇥ 3 matrix and hence A[1, :]B is a 1 ⇥ 3 matrix.
2
4. Note that A is a 3 ⇥ 2 matrix and B[:, 1] is a 2 ⇥ 1 matrix and hence A(B[:, 1]) is a 3 ⇥ 1
matrix. So, matrix multiplication is defined. Thus,
2 3 2 3 2 3 2 3
1 1 " # 1 1 4
6 7 3 6 7 6 7 6 7
6
A · B[:, 1] = 42 0 5 7 = 4 25 · 3 + 4 0 5 · 1 = 4 6 7
6 7 6 7 6
1 5
0 1 0 1 1
2 3 2 3 2 3 2 3
1 1 " # 1 1 4
6 7 4 6 7 6 7 6 7
A · B[:, 2] = 6 7 6 7 6 7
42 0 5 0 = 425 · 4 + 4 0 5 · 0 = 485
6 7
0 1 0 1 0
2 3 2 3 2 3 2 3
1 1 " # 1 1 4
6 7 5 6 7 6 7 6 7
6
A · B[:, 1] = 42 0 5 7 = 425 · 5 + 4 0 5 · 1 = 4107
6 7 6 7 6
1 5
0 1 0 1 1
h i
Thus, if B = B[:, 1] B[:, 2] B[:, 3] then
2 3
h i h i 6 4 4 4
7
AB = A B[:, 1 B[:, 2] B[:, 3] = A · B[:, 1 A · B[:, 2] A · B[:, 3] = 6
46 8 107
5.
1 0 1
2 3 2 3
? ?
6 7 6 7
Ans: Note (A aI)[:, 1] = 0, (A bI)[:, 1] = 407
6
5, (A bI)[:, 2] = 407
6
5. Hence
0 0
2 3 2 32 3
0 0 ? 0 0 ? ? ? ?
6 7 6 76 7
(A aI)(A bI) = 6 40 0 ?5
7 . Thus, (A aI)(A bI)(A cI) = 6
40 0 ?7 6 7
540 ? ?5 = 0.
0 0 ? 0 0 ? 0 0 0
Note that this idea can be generalized for higher order matrices as well.
If the first column of A is the zero vector then the first row of B doesn’t play any role in AB.
" #
h i B[1, :]
6. We also have if A = A[:, 1] A[:, 2] and B = then A[:, 1] is a 3 ⇥ 1 matrix and
B[2, :]
B[1, :] is a 1 ⇥ 3 matrix. Thus, the matrix product A[:, 1] B[1, :] is defined and is a 3 ⇥ 3
matrix. Hence,
2 3 2 3
1 h i 6 17 h i
6 7
A[:, 1]B[1, :] + A[:, 2]B[2, :] = 425 3 4 5 + 6
6 7 0
4 5
7 1 0 1
0 1
2 3 2 3 2 3
3 4 5 1 0 1 4 4 4
6 7 6 7 6 7
=6 7 6 7 6
46 8 105 + 4 0 0 0 5 = 4 6 8 105.
7
0 0 0 1 0 1 1 0 1