You are on page 1of 2

Linear Algebra through Matrices

Department of Mathematics and Statistics Indian Institute of Technology - Kanpur

Lecture -4: Matrix Product Recalled

1 Matrix Product Recalled


Remark 1.1. Let A ∈ Mm,n (C) and B ∈ Mn,p (C). Then observe the following:
1. Here, the product AB is defined.

2. AB corresponds to operating (combining certain multiples of rows) on the rows of B. This is


called the row method for calculating the matrix product. Here

(AB)[i, :] = A[i, :]B = ai1 B[1, :] + · · · + ain B[n, :], for 1 ≤ i ≤ m.

3. AB also corresponds to operating (combining certain multiples of columns) on the columns


of A. This is called the column method for calculating the matrix product. Here

(AB)[:, j] = AB[:, j] = A[:, 1]b1j + · · · + A[:, n]bnj , for 1 ≤ j ≤ p.


 
A[1, :]
 .  h i
4. Write A =  ..  and B = B[:, 1] · · · B[:, p] then
 
A[m, :]
 
A[1, :]B[:, 1] A[1, :]B[:, 2] · · · A[1, :]B[:, p]
 
 A[2, :]B[:, 1] A[2, :]B[:, 2] · · · A[2, :]B[:, p] 
AB =  .
 
.. .. ..

 . . · · · . 

A[m, :]B[:, 1] A[m, :]B[:, 2] · · · A[m, :]B[:, p]
 
B[1, :]
h i  . 
5. Write A = A[:, 1] · · · A[:, n] and B =  . 
 . . Then
B[n, :]
AB = A[:, 1]B[1, :] + A[:, 2]B[2, :] + · · · + A[:, n]B[n, :].

6. If m 6= p then the product BA is NOT defined.

7. if m = p then the product


 BA is defined as well. But, BA and AB have different orders. For
1 h i
 
example, let A = 2

 and B = −1 2 3 then
3
 
−1 2 3
 
AB = −2 4 6  whereas BA = −1 + 4 + 9 = 12.
 
−3 6 9
2

They look very different but during the study of eigenvalues and eigenvectors it will be shown
that they have similar structures.

8. If m = n = p, then the orders of AB and BA are same. Even then AB may NOT equal BA
as the following
" example
# shows:
" # " # " #
1 1 1 1 2 2 0 0
Let A = and B = . Then AB = whereas BA = .
−1 −1 1 1 −2 −2 0 0

Definition 1.2. Two square matrices A and B are said to commute if AB = BA.

Remark 1.3. Note that if A is a square matrix of order n and if B = αIn , a scalar matrix then
AB = BA. In general, the matrix product is NOT commutative as has been shown in the previous
remark. Therefore

A2 + AB + BA + B 2 = (A + B)2 6= A2 + 2AB + B 2 .
" # " # " # " #
1 1 1 0 2 0 1 1
Also, consider A = and B = . Then AB = 6= = BA.
0 0 1 0 0 0 1 1

We now prove some of the properties of matrix multiplication.

Theorem 1.4. Let A ∈ Mm,n (C), B ∈ Mn,p (C) and C ∈ Mp,q (C).

1. Then (AB)C = A(BC), i.e., the matrix multiplication is associative.

2. For any k ∈ C, (kA)B = k(AB) = A(kB).

3. Then A(B + C) = AB + AC, i.e., multiplication distributes over addition.

4. If A ∈ Mn (C) then AIn = In A = A.

5. (AB)T = B T AT and (AB)∗ = B ∗ A∗ .

You might also like