Matrix Multiplication As Composition
These are notes I took while watching the series The Essence of Linear Algebra by 3Blue1Brown.
Linear Transformations Recap
Linear transformations are functions with vectors as inputs and vectors as outputs. We described them visually and saw how they change the vector space such that grid lines remain parallel and evenly spaced and where the origin remains fixed. We also saw that a linear transformation is completely determined by where the basis vectors of the space. For two dimensions, this means that we just need to know where
Suppose we want to find out where the vector
To write things numerically, the convection is to arrange the coordinates of these vectors as columns in a 2x2 matrix and then to put the matrix to the left of the vector (just like functions!)
Multiple Linear Transformations
What if we wanted to apply not just one linear transformations but multiple linear transformations? For example, suppose we want to apply a rotation followed by a shear transformation (see above). It turns out that the end result is still another linear transformation recorded in the following matrix,
This new linear transformations is called the composition of the two transformations that we applied (rotation + shear). One way to think about the new matrix is as follows: if we were to take some vector and then pump it through the rotation and then the shear. The long way to compute where it ends up is first to multiply this vector by the rotation matrix on the left and then whatever you get and multiply that on the left by the shear matrix.
This is what it means to apply a rotation then a shear to a given victor and whatever we get should exactly the same as applying this vector by the new composition matrix.
Since this new matrix is supposed to capture this overall effect of applying a rotation and then a shear, it should be reasonable to call this new matrix as the “product” of the original two matrices.
One thing to always remember is that the multiplying two matrices like the above has the geometric meaning of applying one transformation then another. And the reason why we apply the most right matrix first is just following the function notation In
Multiplying Matrices Numerically
Let’s carry out the multiplication numerically without visualizing it. First we will need to know where
Let’s see what happens after applying the transformation
The resulting vector is the first column of the composition matrix below!
Next, we will apply
And the resulting vector will be the second column of the new composition matrix!
Properties of Matrix Multiplication
Does the order matter? Does
What about associativity? Does
3D
The same concept applies to 3 dimensions and the video “chapter 5: Three dimensional linear transformations” has really great animations to show different transformations in 3D.