Matrix Multiplication as Composition

Essence of Linear Algebra · Chapter 4 🔗 https://youtu.be/XkY2DOUCWMU

🧠 Big Idea

Multiplying two matrices isn't an arbitrary arithmetic rule — it's the description of applying one transformation, then another. The "product matrix" captures the combined effect as a single transformation.


🔗 Composition = Doing One Transform, Then Another

Suppose you rotate the plane 90°, then apply a shear. The end-to-end effect — start to finish — is itself a brand new linear transformation, called the composition of the two.

Like any linear transformation, you describe it by tracking where î and ĵ ultimately land after both steps.

The composition matrix's columns = where î and ĵ end up after the full sequence.


✖️ Composition Is Matrix Multiplication

If M₁ = rotation and M₂ = shear, applying rotation-then-shear to a vector means:

M₂(M₁(v))

This is exactly what we define as the matrix product:

M₂ · M₁  =  the single matrix representing "M₁ first, then M₂"

⚠️ Read right to left!

Shear · Rotation = Composition
  ↑         ↑
 2nd       1st
 step      step

This mirrors function notation: f(g(x)) — you apply g first, then f, reading right to left.


🧮 How to Actually Compute It

To find where î goes:

  1. Look at the first column of the right-hand matrix → that's where î initially lands (after the 1st transformation)
  2. Multiply the left-hand matrix by that column → that's where î ends up after the 2nd transformation
  3. That result becomes the first column of the product

Do the same with the second column (ĵ's landing spot) to get the second column of the product.

General formula (for reference, not memorization)

| a  b |   | e  f |   | ae+bg   af+bh |
| c  d | · | g  h | = | ce+dg   cf+dh |

Don't memorize this grid — derive it by asking "where does î go, where does ĵ go" each time. The formula falls out naturally.


🔄 Noncommutativity: Order Matters!

M₁ · M₂  ≠  M₂ · M₁     (in general)

Geometric proof, no arithmetic needed: picture shear-then-rotate vs. rotate-then-shear. They visibly produce different final grids. Once you can see transformations, you don't need to compute anything to know order matters.

Rotating then shearing ≠ shearing then rotating — try sketching both on paper basis vectors and you'll see why.


🔁 Associativity: Parentheses Don't Matter

(AB)C = A(BC)

This looks like a nightmare to prove with raw arithmetic — but it's trivial geometrically:

Applying (C, then B), then A = applying C, then (B, then A). It's just three transformations applied in the same fixed order. There's nothing to "prove" — grouping is irrelevant when you're just doing one thing after another.


💡 Key Takeaways

  • Matrix multiplication = composing transformations (apply right matrix first, then left)
  • The product's columns = where î and ĵ land after both transformations combined
  • Always read matrix products right to left, like nested functions f(g(x))
  • Matrices generally don't commute — order of operations changes the outcome
  • Matrices are associative — grouping doesn't matter, since it's still the same sequence
  • Don't memorize the multiplication formula — rederive it from "where does î/ĵ go" each time

🔗 Series

← Ch.3 – Linear Transformations → Ch.5 – Three-dimensional linear transformations