Matrix multiplications are ``backwards''

Which operation is getting applied to the model first when we apply a product of matrices? Consider rotating a point $ p = (x,y,z)$. We have two rotation matrices $ R$ and $ Q$. If we rotate $ p$ using $ R$, we obtain $ p' = Rp$. If we then apply $ Q$, we get $ p'' = Qp'$. Now suppose that we instead want to first combine the two rotations and then apply them to $ p$ to get $ p''$. Programmers are often temped to combine them as $ RQ$ because we read from left to right and also write sequences in this way. However, it is backwards for linear algebra because $ Rp$ is already acting from the left side. Thus, it ``reads'' from right to left.3.1 We therefore must combine the rotations as $ QR$ to obtain $ p'' = QRp$. Later in this chapter, we will be chaining together several matrix transforms. Read them from right to left to understand what they are doing!

Steven M LaValle 2020-11-11