You are on page 1of 20

Product of matrices

Definition: If A is an 𝑛 × 𝑟 matrix and B is an 𝑟 × 𝑚


matrix, then the product AB is the matrix 𝑛 × 𝑚
whose entries are determined as follows.

‫بالنجاح والتوفيق‬
1 23/03/1442
‫شيماء داود‬.‫د‬
Product of matrices

To find the entry in row i and column j of AB, single


out row i from the matrix A and column j from the
matrix B. Multiply the corresponding entries from
the row and column together, and then add up the
resulting products.

‫بالنجاح والتوفيق‬
2 23/03/1442
‫شيماء داود‬.‫د‬
Product of matrices
Example 5: Multiplying Matrices
4 1 4 3
1 2 4
A= , B = 0 −1 3 1
2 6 0
2 7 5 2
Find AB
Since A is a 2 × 3 matrix and B is a 3 × 4 matrix, the
product is a 2 × 4 matrix.
To determine, for example, the entry in row 2 and
column 3 of , we single out row 2 from A and column 3
from B. Then, as illustrated below, we multiply
corresponding entries together and add up these
products
‫بالنجاح والتوفيق‬
3 23/03/1442
‫شيماء داود‬.‫د‬
‫‪Product of matrices‬‬

‫بالنجاح والتوفيق‬
‫‪4‬‬ ‫‪23/03/1442‬‬
‫د‪.‬شيماء داود‬
‫‪Product of matrices‬‬

‫بالنجاح والتوفيق‬
‫‪5‬‬ ‫‪23/03/1442‬‬
‫د‪.‬شيماء داود‬
Product of matrices
Example 6: Multiplying Matrices
2 4 1 −2
A= , B=
3 −1 0 5
Find: AB

‫بالنجاح والتوفيق‬
6 23/03/1442
‫شيماء داود‬.‫د‬
Product of matrices
EXAMPLE 6: Multiplying Matrices
3 4
0 3 5
A= , B= 3 −2
5 5 2
4 −2
Find: 1) BA
Solution:
3 4
0 3 5
BA = 3 −2 =
5 5 2
4 −2
‫بالنجاح والتوفيق‬
7 23/03/1442
‫شيماء داود‬.‫د‬
‫‪Product of matrices‬‬

‫‪Also:‬‬
‫‪3 4‬‬
‫‪0‬‬ ‫‪3 5‬‬
‫= 𝐵𝐴‬ ‫‪3 −2‬‬
‫‪5‬‬ ‫‪5 2‬‬
‫‪4 −2‬‬
‫=‬

‫بالنجاح والتوفيق‬
‫‪8‬‬ ‫‪23/03/1442‬‬
‫د‪.‬شيماء داود‬
‫‪Homework‬‬
‫‪1 −4‬‬ ‫‪3 7‬‬
‫= ‪If A‬‬ ‫=‪,B‬‬
‫‪0 6‬‬ ‫‪2 3‬‬

‫‪Find‬‬
‫‪1) A+B‬‬
‫‪2) 2B-3A‬‬
‫‪3)BA‬‬

‫بالنجاح والتوفيق‬
‫‪9‬‬ ‫‪23/03/1442‬‬
‫د‪.‬شيماء داود‬
Product of matrices
Example: Multiplying Matrices
1
1 2 4
A= , B= −1
2 6 0
7
1
1 2 4 27
AB= −1 =
2 6 0 −4
7

1 1 + 2 −1 + 4 7 = 27
2 1 + 6 −1 + 0 7 = −4
‫بالنجاح والتوفيق‬
10 23/03/1442
‫شيماء داود‬.‫د‬
Product of matrices
Example: Multiplying Matrices
−1 3 3
A= 1 −9 −3 , B= 1 2 −3
2 1 2
Find
−1 3 3
AB= 1 −9 −3 1 2 −3 = −16 −18 24
2 1 2

1 −1 + −9 1 + −3 2 = −16
1 3 + −9 2 + −3 1 = −18
1 3 + −9 −3 + −3 2 = 24
‫بالنجاح والتوفيق‬
11 23/03/1442
‫شيماء داود‬.‫د‬
Transpose of Matrix
Definition: If A is any 𝑚 × 𝑛 matrix, then the
transpose of A, denoted by 𝐴𝑇 , is defined to be the
𝑛 × 𝑚 matrix that results from interchanging the
rows and columns of A; that is, the first column of
𝐴𝑇 is the first row of A, the second column of 𝐴𝑇 is
the second row of A, and so forth.

‫بالنجاح والتوفيق‬
12 23/03/1442
‫شيماء داود‬.‫د‬
Transpose of Matrix
Example Some Transposes
The following are some examples of matrices
and their transposes.
1
1 2 4
A= , B= −1 , C= 4
2 6 0
7
1 2
𝐴𝑇 = 2 6 ,𝐵𝑇 = 1 −1 7 , 𝐶 𝑇 = 4
4 0
‫بالنجاح والتوفيق‬
13 23/03/1442
‫شيماء داود‬.‫د‬
Trace of Matrix
Definition: If A is a square matrix, then the trace
of A, denoted by tr(A), is defined to be the sum
of the entries on the main diagonal of A. The
trace of A is undefined if A is not a square
matrix.

‫بالنجاح والتوفيق‬
14 23/03/1442
‫شيماء داود‬.‫د‬
Trace of Matrix
EXAMPLE The following are examples of
matrices and their traces.
𝑎11 𝑎12 𝑎13
𝐴 = 𝑎21 𝑎22 𝑎23 , tr(A)=𝑎11 +𝑎22 + 𝑎33 ,
𝑎31 𝑎32 𝑎33
−1 2 7 0
𝐵= 3 5 −8 4 , tr(B)=-1+5+7+0=11
1 2 7 −3
4 −2 1 0
‫بالنجاح والتوفيق‬
15 23/03/1442
‫شيماء داود‬.‫د‬
Determinant of a 2×2matrix
𝑎 𝑏
Definition: If A=
𝑐 𝑑
Then the determinant of A is given by
det 𝐴 𝑜𝑟 𝐴 = 𝑎𝑑 − 𝑏𝑐

‫بالنجاح والتوفيق‬
16 23/03/1442
‫شيماء داود‬.‫د‬
Determinant of a 2×2matrix
3 −2
Example: If A=
4 −5
find det(A)
Solution:
det 𝐴 = 3 −5 − −2 4 = −15 + 8
= −7

‫بالنجاح والتوفيق‬
17 23/03/1442
‫شيماء داود‬.‫د‬
Inverse of a 2×2matrix
𝑎 𝑏
Definition: If A=
𝑐 𝑑
then the inverse of A is given by
−1 1 𝑑 −𝑏
𝐴 =
det(𝐴) −𝑐 𝑎

‫بالنجاح والتوفيق‬
18 23/03/1442
‫شيماء داود‬.‫د‬
Inverse of a 2×2matrix
1 −2
Example: If A=
3 −2
Find 𝐴−1
det 𝐴 = 1 −2 − −2 3 = 4
−1
1 −2 2
𝐴 =
4 −3 1

‫بالنجاح والتوفيق‬
19 23/03/1442
‫شيماء داود‬.‫د‬
Excerise
1 −1
Example: If A=
3 5
Find
𝑇 1 3
1) 𝐴 =
−1 5
2) 𝑡𝑟 𝐴 = 1 + 5 = 6
3) 𝐴−1
det(𝐴) = 1(5) − (−1)(3) = 5 + 3 = 8
−1
1 5 1
𝐴 =
8 −3 1
‫بالنجاح والتوفيق‬
20 23/03/1442
‫شيماء داود‬.‫د‬

You might also like