Rules of Matrix Multiplication
Unlike regular multiplication, matrix multiplication is not commutative (A × B is generally not equal to B × A), and it is subject to strict dimensional constraints. To multiply matrix A by matrix B, the matrices must be **compatible**:
- If A has dimensions m × n and B has dimensions n × p, they can be multiplied. The inner dimensions (n) must match.
- The resulting product matrix C will have dimensions m × p (the outer dimensions).
How to Calculate Matrix Multiplication
To find the entry in row i and column j of the product matrix C, you take the dot product of the i-th row of A and the j-th column of B:
Ci,j = ai,1b1,j + ai,2b2,j + ... + ai,nbn,j
Worked Example: 2x2 Matrix Multiplication
Let's multiply A and B:
| 1 | 2 |
| 3 | 4 |
| 5 | 6 |
| 7 | 8 |
The entries of product matrix C are computed as follows:
- Entry C1,1 (Row 1 × Col 1): (1 × 5) + (2 × 7) = 5 + 14 = 19
- Entry C1,2 (Row 1 × Col 2): (1 × 6) + (2 × 8) = 6 + 16 = 22
- Entry C2,1 (Row 2 × Col 1): (3 × 5) + (4 × 7) = 15 + 28 = 43
- Entry C2,2 (Row 2 × Col 2): (3 × 6) + (4 × 8) = 18 + 32 = 50
The resulting matrix C is:
| 19 | 22 |
| 43 | 50 |
Properties of Matrix Multiplication
- Associative: A(BC) = (AB)C
- Distributive: A(B + C) = AB + AC
- Identity Element: AI = IA = A (where I is the Identity matrix)
- Transpose of Product: (AB)T = BTAT