Multiplication of Two Matrices
Definition
The multiplication of two matrices involves taking the rows of the first matrix and the columns of the second matrix and calculating the dot product for each pair. This operation is only defined when the number of columns in the first matrix is equal to the number of rows in the second matrix.
Mathematically:
Let ( A ) be a matrix of dimensions ( m \times n ) (with ( m ) rows and ( n ) columns), and ( B ) be a matrix of dimensions ( n \times p ) (with ( n ) rows and ( p ) columns). The product ( C = A \cdot B ) will result in a new matrix ( C ) of dimensions ( m \times p ).
For each element ( c_{ij} ) in the resulting matrix ( C ): [ c_{ij} = \sum_{k=1}^{n} a_{ik} \cdot b_{kj} ] Where:
- ( a_{ik} ) represents elements from the row ( i ) of matrix ( A ),
- ( b_{kj} ) represents elements from the column ( j ) of matrix ( B ).
Steps for Matrix Multiplication:
- Ensure the number of columns in matrix ( A ) matches the number of rows in matrix ( B ).
- Multiply the corresponding elements of the row from ( A ) with the elements of the column from ( B ) and sum the products.
- Place the resulting value in the corresponding position of the resulting matrix.
Example 1:
Let ( A ) be a 2x3 matrix, and ( B ) be a 3x2 matrix: [ A = \begin{bmatrix} 1 & 2 & 3 \ 4 & 5 & 6 \end{bmatrix}, \quad B = \begin{bmatrix} 7 & 8 \ 9 & 10 \ 11 & 12 \end{bmatrix} ]
Now, multiply ( A ) and ( B ):
[ A \cdot B = \begin{bmatrix} (1 \cdot 7 + 2 \cdot 9 + 3 \cdot 11) & (1 \cdot 8 + 2 \cdot 10 + 3 \cdot 12) \ (4 \cdot 7 + 5 \cdot 9 + 6 \cdot 11) & (4 \cdot 8 + 5 \cdot 10 + 6 \cdot 12) \end{bmatrix} ]
[ A \cdot B = \begin{bmatrix} (7 + 18 + 33) & (8 + 20 + 36) \ (28 + 45 + 66) & (32 + 50 + 72) \end{bmatrix} ]
[ A \cdot B = \begin{bmatrix} 58 & 64 \ 139 & 154 \end{bmatrix} ]
Thus, the product of ( A ) and ( B ) is: [ \begin{bmatrix} 58 & 64 \ 139 & 154 \end{bmatrix} ]
Example 2:
Let ( C ) be a 2x2 matrix, and ( D ) be a 2x2 matrix: [ C = \begin{bmatrix} 2 & 3 \ 0 & 1 \end{bmatrix}, \quad D = \begin{bmatrix} 4 & 5 \ 6 & 7 \end{bmatrix} ]
Now, multiply ( C ) and ( D ):
[ C \cdot D = \begin{bmatrix} (2 \cdot 4 + 3 \cdot 6) & (2 \cdot 5 + 3 \cdot 7) \ (0 \cdot 4 + 1 \cdot 6) & (0 \cdot 5 + 1 \cdot 7) \end{bmatrix} ]
[ C \cdot D = \begin{bmatrix} (8 + 18) & (10 + 21) \ (0 + 6) & (0 + 7) \end{bmatrix} ]
[ C \cdot D = \begin{bmatrix} 26 & 31 \ 6 & 7 \end{bmatrix} ]
Thus, the product of ( C ) and ( D ) is: [ \begin{bmatrix} 26 & 31 \ 6 & 7 \end{bmatrix} ]
Conclusion
- Matrix multiplication is defined when the number of columns in the first matrix equals the number of rows in the second matrix.
- The resulting matrix has dimensions determined by the number of rows of the first matrix and the number of columns of the second matrix.
- Each element of the resulting matrix is the dot product of a row from the first matrix and a column from the second matrix.
No Comments