Exercises C20

Compute the product of the two matrices below, AB. Do this using the defnitions of the matrix-vector product (Defnition MVP) and the defnition of matrix multiplication (Defnition MM).

\[ A= \left[ \begin{array}{cccc} 2 & 5 \\ -1 & 3 \\ 2 & -2 \end{array} \right] B = \left[ \begin{array}{cccc} 1 & 5 & -3 & 4 \\ 2 & 0 & 2 & -3 \end{array} \right] \]

Let first find out if we can multiply them. Matrix A is 3 x 2 (3 rows and 2 columns) martix and matrix B is 2 x 4 matrix. Because matrix A has 2 column and matrix B has 2 rows, we can multiply them. The size of A . B matrix will have a size of 3 x 4

Steps: Multiply row 1 of matrix A with column 1 of matrix B and so on..

Row 1

(2 x 1) + (5 x 2) = 12

\[ A.B= \left[ \begin{array}{cccc} 12 & - & - & -\\ - & - & - & - \\ - & - & - & - \end{array} \right] \]

(2 x 5) + (5 x 0) = 10

\[ A.B= \left[ \begin{array}{cccc} 12 & 10 & - & -\\ - & - & - & - \\ - & - & - & - \end{array} \right] \]

(2 x -3) + (5 x 2) = 4

\[ A.B= \left[ \begin{array}{cccc} 12 & 10 & 4 & -\\ - & - & - & - \\ - & - & - & - \end{array} \right] \]

(2 x 4) + (5 x -3) = -7

\[ A.B= \left[ \begin{array}{cccc} 12 & 10 & 4 & -7\\ - & - & - & - \\ - & - & - & - \end{array} \right] \]

Row 2

(-1 x 1) + (3 x 2) = 5

\[ A.B= \left[ \begin{array}{cccc} 12 & 10 & 4 & -7\\ 5 & - & - & - \\ - & - & - & - \end{array} \right] \]

(-1 x 5) + (3 x 0) = -5

\[ A.B= \left[ \begin{array}{cccc} 12 & 10 & 4 & -7\\ 5 & -5 & - & - \\ - & - & - & - \end{array} \right] \]

(-1 x -3) + (3 x 2) = 9

\[ A.B= \left[ \begin{array}{cccc} 12 & 10 & 4 & -7\\ 5 & -5 & 9 & - \\ - & - & - & - \end{array} \right] \]

(-1 x 4) + (3 x -3) = -13

\[ A.B= \left[ \begin{array}{cccc} 12 & 10 & 4 & -7\\ 5 & -5 & 9 & -13 \\ - & - & - & - \end{array} \right] \]

Row 3

(2 x 1) + (-2 x 2) = -2

\[ A.B= \left[ \begin{array}{cccc} 12 & 10 & 4 & -7\\ 5 & -5 & 9 & -13 \\ -2 & - & - & - \end{array} \right] \]

(2 x 5) + (-2 x 0) = 10

\[ A.B= \left[ \begin{array}{cccc} 12 & 10 & 4 & -7\\ 5 & -5 & 9 & -13 \\ -2 & 10 & - & - \end{array} \right] \]

(2 x -3) + (-2 x 2) = -10

\[ A.B= \left[ \begin{array}{cccc} 12 & 10 & 4 & -7\\ 5 & -5 & 9 & -13 \\ -2 & 10 & -10 & - \end{array} \right] \]

(2 x 4) + (-2 x -3) = 14

\[ A.B= \left[ \begin{array}{cccc} 12 & 10 & 4 & -7\\ 5 & -5 & 9 & -13 \\ -2 & 10 & -10 & 14 \end{array} \right] \]