Multiplying matrices
Rows times columns.
To multiply matrices AB, each entry of the result is a row of A times a column of B: multiply matching entries and add. The entry in row i, column j comes from row i of A and column j of B. The number of columns of A must equal the number of rows of B. Usually AB ≠ BA.
Example: [1, 2; 3, 4] times [5, 6; 7, 8], row 1 column 2
- row 1 of A: (1, 2); column 2 of B: (6, 8)
- 1 × 6 + 2 × 8
- 22
Why it works: Each entry combines a row of the first matrix with a column of the second, because the first transformation feeds into the second.
Tip: Trace a row across with your left finger and a column down with your right.