Rotation Matrices and Change of Basis
The perspective of certain linear transformations (invertible ones) as a change of basis has always felt weird to me, and I think I've discovered why after developing a better understanding of rotation matrices. Consider the rotation matrix which "rotates a vector by 90 degrees". It is defined as follows:
As we know from my post on linear algebra, the columns of this matrix basically define where the basis vectors for the coordinate system defined by this matrix are with respect to the standard basis. So, to understand the rotation matrix, we ought to understand why the basis vectors are defined the way they are.
We know that length is preserved under a pure rotation, so the resulting vector (no matter ) will have length 1 just like the standard basis vectors.
Therefore, directly following from the definition for cosine (), and shows where will end up.
Next, we know the other basis vector will always be 90 degrees to the left of the first basis vector:
For intuition on these identities, picture the unit vector being rotated by an angle . While you could picture as starting from the positive x-axis and moving counter-clockwise, imagine that it is turning counter clockwise from the positive y-axis. Then, will extract the magnitude of the x-vector but, since it is moving in the negative x-direction, we negate. With the similar visual, gives the y component.
But what does matrix vector multiplication mean then? Well, we are always scaling the basis vector by the coordinate and the same for . What this actually represents depends on which of two interpretations you adopt:
The input vectors are in terms of the rotated coordinate systems. So means we go one along the rotated and zero along . When we multiply by the matrix, we're converting these coordinates from the rotated basis back into the standard basis. In other words, the rotation matrix's columns are the rotated basis vectors expressed in the standard coordinate system, and matrix multiplication translates coordinates from the rotated reference frame into the original, unrotated one. This explains why it seems like the rotated basis vectors are rotated in reverse: because we're not rotating vectors themselves, we're translating coordinates from a rotated system back to the fixed original system, effectively "undoing" the rotation. I like to think about it as picking up the rotated coordinate system and dropping it in the correct orientation, which will have the effect of rotating the vector with respect to the standard basis.
The input vectors are in standard basis. When we multiply, we're literally applying linear transformations to the vector and rotating it within the standard basis. This interpretation is more intuitive.