Back to Articles

2026-08-21

Why Matrix Composition Works

By Anthony Dito

See why applying linear transforms one at a time produces the same result as multiplying their matrices together and applying one composite transform.

Matrix composition lets us multiply several transform matrices together and apply the result once, producing the same outcome as applying each matrix one after another. In mathematical terms, this is what we are proving, using letters of the alphabet for the matrices:

H times G times F times E times D times C times B times A applied one at a time to x equals their matrix product applied to x

This post will provide an informal proof that multiplying transform matrices together produces the same result as applying each transform one after another.

The first thing that we will prove is that B · (A · x) is the same as (B · A) · x. This is straightforward enough; we can just compute both expressions. Let's take the vector to contain x and y.

Expansion of B applied to A applied to the vector x y

Now, let's expand (B · A) · x.

Expansion of the matrix product B A applied to the vector x y

Both calculations produce the exact same value! Now, let's return to the beginning.

H · (G · (F · (E · (D · (C · (B · (A · x)))))))

From our calculations above, we can replace B · (A · x) with (B · A) · x. This gives us:

H · (G · (F · (E · (D · (C · ((B · A) · x))))))

B · A is just a matrix, so C · ((B · A) · x) has the same form as B · (A · x). We can apply the same substitution again:

H · (G · (F · (E · (D · ((C · B · A) · x)))))

Again, (C · B · A) is just a 2 × 2 matrix, so we can apply the substitution again.

H · (G · (F · (E · ((D · C · B · A) · x))))

And again...

H · (G · (F · ((E · D · C · B · A) · x)))

And again...

H · (G · ((F · E · D · C · B · A) · x))

And again...

H · ((G · F · E · D · C · B · A) · x)

And one more...

(H · G · F · E · D · C · B · A) · x

Through this process, we have shown that applying a series of matrices to a vector is the same as multiplying the matrices together first and then applying the resulting matrix to the vector. Therefore, this formula holds:

H times G times F times E times D times C times B times A applied one at a time to x equals their matrix product applied to x