very simple question how to switch the $y$ and $z$-axis of a rotation matrix. So far I have rotated the rotation matrix $90$ degrees around $x$. The only thing left would be to inverse the new $y$ axis, which is the old $z$ axis. How can I do this? Or is there a way to do the switch in one step?
Thanks!
I'm not sure what "one step" means but simple conjugation by the permutation matrix $$ P_{23}=\left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \\ \end{array} \right) $$ will do the trick. This permutation amounts to interchanging the $y$ and $z$ axis. The matrix itself if not in $SO(3)$ (its determinant is -1) but by conjugating your rotation you introduce two such factors with the result that, if $$ R_y(\theta)=\left( \begin{array}{ccc} \cos (\theta ) & 0 & -\sin (\theta ) \\ 0 & 1 & 0 \\ \sin (\theta ) & 0 & \cos (\theta ) \\ \end{array} \right) $$
then $$ P^{-1}_{23} R_y(\theta)P_{23}=R_{P_{23}y}(\theta)=R_z(-\theta)\in SO(3)\, . $$
Note that $$ R_x(\pi/2)=\left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & -1 & 0 \\ \end{array} \right) $$ is a proper rotation so that $R^{-1}_x(\pi/2)R_y(\theta)R_x(\pi/2)$ will produce the matrix $R_z(\theta)$.