Matrix Multiplication
The row-by-column algorithm that combines matrices in a fundamentally new way.
Introduction
Matrix multiplication is NOT entry-by-entry like addition. Instead, we use the row-by-column algorithm: each entry in the result comes from dotting a ROW of the first matrix with a COLUMN of the second. This operation is fundamental to transformations, systems of equations, and data science.
Prerequisite Connection
You can add matrices and multiply by scalars. You understand the dot product of vectors.
Today's Increment
We multiply matrices using the row-by-column method and understand dimension requirements.
Why This Matters
Matrix multiplication powers computer graphics (composing transformations), machine learning (neural networks), and physics simulations.
Key Concepts
Dimension Requirement
To multiply , we need (inner dimensions match).
Result dimension: (outer dimensions)
Row-by-Column Algorithm
Entry = (Row of ) · (Column of )
⚠️ NOT Commutative!
In general, . Order matters!
Even when both products exist, they usually give different results.
Worked Examples
Example 1: 2×2 Times 2×2 (Basic)
Compute :
Entry (1,1): Row 1 of A · Column 1 of B
Entry (1,2): Row 1 of A · Column 2 of B
Entry (2,1) and (2,2):
and
Answer:
Example 2: Different Dimensions (Intermediate)
Compute :
Check dimensions: → inner = 3 ✓
Result will be
Entry (1,1):
Entry (2,1):
Answer:
Example 3: Non-Commutativity (Advanced)
Show that :
Compute :
Compute :
Matrix multiplication is NOT commutative!
Common Pitfalls
Multiplying entry-by-entry
Matrix multiplication uses ROW-by-COLUMN dot products, NOT element-wise multiplication!
Ignoring dimension compatibility
For , the number of columns in must equal the number of rows in .
Assuming
Order matters! Always compute in the given order. and are usually different (if both even exist).
Real-World Application
Computer Graphics: Transformation Composition
Each transformation (rotate, scale, translate) is a matrix. To apply multiple transformations, we MULTIPLY the matrices together. The GPU performs billions of matrix multiplications per second to render 3D graphics in real-time video games.
Rotate then scale: (apply right-to-left)
Practice Quiz
Loading...