4
Matrix Multiplication To Multiply matrix A by matrix B: 4 3 2 1 A 3 2 3 2 1 1 B tiply corresponding entries and then add the resulting produc (1)(-1) + (2)(3) ultiply each Row in matrix A by each Column in matrix B (1)(1) + (2)(-2) (3)(-1) + (4)(3) (3)(1) + (4)(-2) (1)(2) + (2)(3) (3)(2) + (4)(3) A.B = = 5 -3 8 9 -5 18 Result in R1, C1 Result in R1, C2 Result in R1, C3 Result in R2,C1 R es ul t i n R 2,C2 Resu lt i n R2 ,C3 R1 R 2 C1 C2 C3 R1 R1 R 2 R 2 C1 C2 C3

Matrix Multiplication To Multiply matrix A by matrix B: Multiply corresponding entries and then add the resulting products (1)(-1)+ (2)(3) Multiply each

Embed Size (px)

Citation preview

Page 1: Matrix Multiplication To Multiply matrix A by matrix B: Multiply corresponding entries and then add the resulting products (1)(-1)+ (2)(3) Multiply each

Matrix MultiplicationTo Multiply matrix A by matrix B:

43

21A

323

211

B

•Multiply corresponding entries and then add the resulting products

(1)(-1) + (2)(3)

•Multiply each Row in matrix A by each Column in matrix B

(1)(1) + (2)(-2)

(3)(-1) + (4)(3) (3)(1) + (4)(-2)

(1)(2) + (2)(3)

(3)(2) + (4)(3)A.B = =

5 -3 8

9 -5 18

Result in R1, C1

Result in R1, C2

Result i

n R1, C

3Result in R2,C1

Resul

t in

R2,C2

Res

ult i

n R

2,C

3

R1

R2

C1 C2 C3

R1R1

R2R2

C1 C2 C3

Page 2: Matrix Multiplication To Multiply matrix A by matrix B: Multiply corresponding entries and then add the resulting products (1)(-1)+ (2)(3) Multiply each

By multiplying Rows from the first matrix by Columns in the second matrix:

We had:

43

21A

323

211

B1859

835.

BA, and

A: has 2 rows, 2 columns or 2 x 2

B: has 2 rows, 3 columns or 2 x 3

• The result will have: number of rows of A and number of columns of B.

• The number of elements in per row of A, must be equal to the number of elements in per column in B, Or:

The result AB has 2 rows and 3 columns or 2 x 3.

2 rows

3 columns Result: 2 rows by 3 columns

2 elements or2 columns

2 elements or2 rows

Number of columns in the A = Number of Rows in B 2 = 2

Page 3: Matrix Multiplication To Multiply matrix A by matrix B: Multiply corresponding entries and then add the resulting products (1)(-1)+ (2)(3) Multiply each

For the following matrices, using the multiplication of Row by Column :

a) Which of the following multiplication is possible b) If it is possible, find the dimension of the resulting matrix

A.B: a) the number of elements per row in A (3 elements, 3 columns)

b) The resulting matrix will be 2 row by 1 columns or 2 x 1

A.C:

b) The resulting matrix will be 2 rows by 2 columns or 2 x 2

B.C:

112

511

A

0

1

2

B

40

21

12 C, ,

C.A:

b) The resulting matrix will be 3 rows by 3 columns or 3 x 3

the number of element per column in B (3 elements, 3 rows).

a) the number of elements per row in A (3 elements, 3 columns) the number of element per column in C (3 elements, 3 rows).

a) the number of elements per row in B (1 elements, 1 columns) the number of element per column in C (3 elements, 3 rows).

a) the number of elements per row in C (2 elements, 3 columns) the number of element per column in A (2 elements, 2 rows).

5

3. BA

45

213.

CA

448

335

1110

..

AC

B.C is Not Possible

Page 4: Matrix Multiplication To Multiply matrix A by matrix B: Multiply corresponding entries and then add the resulting products (1)(-1)+ (2)(3) Multiply each

The following example will be helpful in Markov Chain section (Section 9.2).

02

11 AIf: find A2, A3, A4 and A5

22

11

02

11.

02

11.2

AAA

22

13

02

11.

22

11.23

AAA

26

31

22

11.

22

11. 224

AAA

62

15

22

13.

22

11. 325

AAA