13

Can anyone offer an intuitive proof of why the 2D rotation matrix works? http://en.wikipedia.org/wiki/Rotation_matrix

I've tried to derive it using polar coordinates to no avail.

David Faux
  • 3,425

2 Answers2

16

There's two ways to think of it. At this stage, I think seeing both might be helpful.

Hard way: Let $(x,y) \in \Bbb R^2$ be represented by polar coordinates $(r, \varphi)$. I mean the relations $x = r \cos \varphi, y = r \sin \varphi$. So, let $(x_\theta, y_\theta)$ be the point after a rotation of $\theta$. Clearly, we have: $$\begin{align} (x_\theta, y_\theta) &= (r \cos(\varphi + \theta), r \sin (\varphi + \theta)) \\ &= (r(\cos \varphi \cos \theta - \sin \varphi \sin \theta), r(\sin \varphi \cos \theta + \cos \varphi \sin \theta)) \\ &= (r \cos \varphi \cos \theta - r \sin \varphi \sin \theta, r \sin \varphi \cos \theta + r \cos \varphi \sin \theta) \\ &= (x \cos \theta - y \sin \theta, x \sin \theta + y \cos \theta) \end{align}$$ To find the matrix, in the standard basis, see that $(1,0)$ goes to $(\cos \theta, \sin \theta)$, and $(0,1)$ goes to $(- \sin \theta, \cos \theta)$. So, the matrix is: $$\begin{pmatrix} \cos \theta & - \sin \theta \\ \sin \theta & \cos \theta \end{pmatrix} $$

Easy way: Let $R_\theta$ be the rotation. See that rotations are linear mappings, hence, it suffices to know the effect of the transformation on a basis, let's say... $((1,0), (0,1))$. Drawing, it is easy to see that $R_\theta (1,0) = (\cos \theta, \sin \theta)$ and $R_\theta (0, 1) = (- \sin \theta, \cos \theta)$. This way, the matrix is: $$\begin{pmatrix} \cos \theta & - \sin \theta \\ \sin \theta & \cos \theta \end{pmatrix}$$ Finally, we can give the transformation: $$(R_\theta (x,y)) = \begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} x \cos \theta - y \sin \theta \\ x \sin \theta + y \cos \theta \end{pmatrix}$$

Maybe you don't agree with me on what point of view is easier, but if you get a clear idea of both, I'm happy.

Ivo Terek
  • 77,665
  • Note that in the end both approaches boil down to "see what the transform does to the standard basis vectors". For the "Hard way", once you have the formula for $R_\theta(x,y)$ in terms of $x$, $y$, and $\theta$, you could just derive the matrix "by inspection". – augurar Jun 30 '14 at 20:12
  • Why is it that we only need to see what the transform does to the basis vectors? Why does that guarantee that the rotation matrix work for linear combinations of those basis vectors? – David Faux Jul 01 '14 at 21:58
  • 1
    It is because rotations are linear. See that $$\begin{align} R(x,y) &= R(x(1,0) + y(0,1)) \ &= R(x(1,0)) + R(y(0,1)) \ &= x R(1,0) + y R(0,1) \end{align}$$ If you know $R(1,0)$ and $R(0,1)$, you know $R(x,y)$ for all $x,y \in \Bbb R $. – Ivo Terek Jul 01 '14 at 22:03
  • 1
    @IvoTerek, afaik, the easy way is actually the consequence of the hard way, since you have to show the linearity of the operator through the first method... It would be interesting to see some geometric intuition about about the hard method you described. – John Apr 01 '20 at 21:35
15

If I rotate $(1,0)^T$ by an angle of $\theta$ counterclockwise, it should end up at $(\cos\theta,\sin\theta)^T$. This will be the first column in the rotation matrix.

If I rotate $(0,1)^T$ by an angle of $\theta$ counterclockwise, it should end up at $(-\sin\theta,\cos\theta)^T$. This will be the second column in the rotation matrix.

JimmyK4542
  • 54,331