- Prev: matrix-operations
- Next: square-matrices-determinant-trace
1. Matrix multiplication as composition of linear transformations
- To perform multiple linear transformations (in order) on a vector , you can pre-multiply by the matrices representing each transformation.
- This must be written in reverse order (i.e. the first transformation is written on the right) — see below.
- This is equivalent to multiplying the matrices representing each transformation together, to obtain a composition matrix,
- Then multiplying the resultant composition matrix by .
1.1. Example:
Say you wish to apply two transformations to . First, a rotation, then a shear (in that order).
- Let’s call the matrix, and
- the matrix
We can apply both transformations as follows:
Note this reads from right to left: means first apply to , then apply to the result of that.
Note that the composition matrix (RHS) is the matrix that represents the combined transformation of the two individual transformations (LHS):
1.2. Geometric intuition
1.2.1. Rotation matrix :
( matrix) tells you where the basis vectors and end up after the first transformation (Rotation).
Specifically:
- Column 1 of states that the first basis vector is “rotated” and its new location is as follows:
- Column 2 of states that the second basis vector is “rotated” and its new location is as follows:
1.2.2. Shear matrix :
Next, ( matrix) states where these “new” (rotated) basis vectors end up after the second (shear) transformation.
The rotated is “sheared”:
Similarly, the rotated is “sheared” as follows:
The resultant matrix (i.e. the composition of the two transformations) is :
2. Another example
Say we are applying two transformations then (in that order) to a vector . We can determine the composition matrix as follows:
Let’s follow the geometric intuition:
- The columns of tell us where the basis vectors and end up after the first transformation.
- Multiplying by these “new” basis vectors (columns of ) will tell us where they end up after the second transformation.
Finally, augment the columns to form the composition matrix :