[Math] What effect does rotating the coordinate axes have on a given vector? (rotation matrices)

coordinate systemslinear algebramatricesrotations

Suppose I have a vector $\vec{B}$ represented in the $x, y, z$ coordinate system. If I were to rotate my coordinate axes by applying the rotation matrices $R_x(\theta)$ and $R_z(\theta)$ to the $x$ and $z$ axes respectively, how do I compensate for these changes in my $\vec{B}$? What rotations do I have to apply to $\vec{B}$ so it can be represented in the new coordinate system?

P.S: The matrices I'm talking about are these. I know the relevant angles for each of these in my problem.
enter image description here

Best Answer

If your coordinate system changes according to some transformation, then the coordinates of a fixed vector transform according to the inverse of the transformation. In this case, our transformations are simple rotations, and the inverse of a rotation is simply the rotation around the same axis but with the opposite angle. In symbols: $R^{-1}(\theta) = R(-\theta)$. Therefore, if we apply $R_x$ followed by $R_z$ (note that the order matters) to the original basis, we find that the coordinate vector of $\vec{B}$ in the new basis is given by $$(R_z(\theta_2)R_x(\theta_1))^{-1}\vec{B} = R_x^{-1}(\theta_1)R_z^{-1}(\theta_2)\vec{B} = R_x(-\theta_1)R_z(-\theta_2)\vec{B}.$$

Related Question