Matrix multiplication
Matrix Multiplication
Basics of Matrices
- A matrix is a rectangular array of numbers arranged in rows and columns.
- A matrix has a size denoted by its number of rows and columns. For instance, a matrix with 2 rows and 3 columns is a 2x3 matrix.
- Each item inside a matrix is called an element.
Definition of Matrix Multiplication
- Matrix multiplication is not the same as multiplying numbers. You cannot just multiply corresponding elements of two matrices.
- Multiplication of matrices requires certain conditions to be met.
- Only matrices with compatible dimensions can be multiplied. Specifically, the number of columns in the first matrix should be equal to the number of rows in the second matrix. Therefore, you can multiply a 2x3 matrix with a 3x2 matrix, but not a 2x3 matrix with a 2x3 matrix.
How to Multiply Matrices
- The process involves taking the dot product of the rows from the first matrix with the columns from the second matrix and placing the result into the appropriate row and column in the resultant matrix.
- Suppose you’re multiplying a 2x3 matrix A with a 3x2 matrix B to create a 2x2 matrix C. The element in the first row and first column of matrix C (C11) is calculated by multiplying corresponding elements in the first row of A and the first column of B and summing the results.
- This process is then repeated for all combinations of rows from the first matrix and columns from the second to fill in all the elements of the resultant matrix.
Properties of Matrix Multiplication
- Matrix multiplication is associative, meaning that the order in which matrices are grouped for multiplication does not matter: (AB)C = A(BC).
- It is also distributive: A(B+C) = AB + AC.
- However, matrix multiplication is not commutative. In other words, AB is not always equal to BA.
- The Identity Matrix, denoted as I, plays a similar role to the number 1 in number multiplication. For any matrix A, AI = IA = A.
- When a matrix is multiplied by its Inverse Matrix, the result is the Identity Matrix. So, if B is the inverse of A, then AB = BA = I.
Practical Applications of Matrix Multiplication
- Matrix multiplication has broad practical applications, including in computer graphics transformations, solving systems of linear equations, and probability theory among others.
- Knowledge of how to multiply matrices is essential for progressing in higher-level mathematics, especially linear algebra.