Angle from 2x2 Rotation Matrix

4.4k Views Asked by At

How would I go about extracting the angle from a 2x2 rotational matrix? I'm using a matrix to track transformations in 2D space, but I'm struggling to figure out how to reverse this once I've got the rotation matrix so I can just see the angle that was applied.

1

There are 1 best solutions below

6
On

If it's a 2D rotation matrix, then it equals $$R(\theta)=\begin{pmatrix} \cos\theta & -\sin\theta\\ \sin\theta & \cos \theta \end{pmatrix}$$ where $\theta$ is the angle you are looking for. Therefore, you can simply take $\cos^{-1}$ of the first entry in your matrix.

Due to the periodicity of the cosine function though, you won't know the sign of $\theta$ (i.e., whether it is clockwise or anticlockwise). You can determine this by noting the signs of the sines (e.g. if the angle is $-30^\circ$, then the $\sin$ entry in the first column would be negative).