Matrix Multiplication To Multiply matrix A by matrix
Matrix Multiplication To Multiply matrix A by matrix B: • Multiply each Row in matrix A by each Column in matrix B • Multiply corresponding entries and then add the resulting products C 1 C 3 C 2 R 1 R 2 (1)(1) + (2)(-2) 2 , C R 2 sul t in Re , C 3 n ti l u R s (1)(2) + (2)(3) R 2 Re C 2 t in ult Res 1, in R 3 C 1, sul (1)(-1) + (2)(3) C 1 1 Re ult Res 1, in R R in lt esu , C R 2 5 -3 8 9 -5 18 = A. B = (3)(-1) + (4)(3) (3)(1) + (4)(-2) (3)(2) + (4)(3)
We had: 2 elements or 2 columns 2 rows 2 elements or 2 rows 3 columns , Result: 2 rows by 3 columns and A: has 2 rows, 2 columns or 2 x 2 B: has 2 rows, 3 columns or 2 x 3 By multiplying Rows from the first matrix by Columns in the second matrix: • The result will have: number of rows of A and number of columns of B. The result AB has 2 rows and 3 columns or 2 x 3. • The number of elements in per row of A, must be equal to the number of elements in per column in B, Or: Number of columns in the A = Number of Rows in B 2 = 2
For the following matrices, using the multiplication of Row by Column : , a) b) , Which of the following multiplication is possible 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) the number of element per column in B (3 elements, 3 rows). b) The resulting matrix will be 2 row by 1 columns or 2 x 1 A. C: 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). b) The resulting matrix will be 2 rows by 2 columns or 2 x 2 B. C: 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). C. A: 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). b) The resulting matrix will be 3 rows by 3 columns or 3 x 3 B. C is Not Possible
The following example will be helpful in Markov Chain section (Section 9. 2). If: 2 3 4 find A , A and A 5
- Slides: 4