In learning how to rotate vertices about an arbitrary axis in 3D space, I came across the following matrices, which I need to calculate the inverse of to properly "undo" any rotation caused by them:


How can I get the inverse of both of these matrices?
Thanks.
The submatrices of interest are rotation matrices, so they are of the form
$$\left[ \begin{array}{ccc} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \\ \end{array} \right]$$
Since $\sin -\theta = -\sin \theta$ and $\cos -\theta = \cos\theta$ and rotating by $-\theta$ is the inverse of rotating by $\theta$, it's easily seen and verified that the inverse is simply
$$\left[ \begin{array}{ccc} \cos \theta & \sin \theta \\ -\sin \theta & \cos \theta \\ \end{array} \right]$$
So in both cases just negate the off-diagonal entries.