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:
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.
Now, let's expand (B · A) · x.
Both calculations produce the exact same value! Now, let's return to the beginning.
From our calculations above, we can replace B · (A · x) with (B · A) · x. This gives us:
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:
Again, (C · B · A) is just a 2 × 2 matrix, so we can apply the substitution again.
And again...
And again...
And again...
And one more...
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: