Rotation matrix

493 Views Asked by At

I'm finding different results for the 3D rotation matrix in the XY plane from different sources and I was hoping for someone to help clarify. In my "applications of vector calculus" book, the matrix for a rotation by $a$ counterclockwise is given by $$ \left( \begin{array}{cc} \cos(a) & \sin(a) & 0 \\ -\sin(a) & \cos(a) & 0 \\ 0& 0 & 1 \end{array} \right),$$

whereas on wikipedia, my other algebra and geometry notes and other sources I'm finding the result for the counterclockwise rotation by $a$ to be $$ \left( \begin{array}{cc} \cos(a) & -\sin(a) & 0 \\ \sin(a) & \cos(a) & 0 \\ 0& 0 & 1 \end{array} \right).$$

I would have assumed that there was just an error in my vector calc notes but both are using a diagram like the one linked to justify the matrix but when I look at the diagram it looks like it should be the first matrix to me. http://en.wikipedia.org/wiki/File:Counterclockwise_rotation.png

Which one should it be?

2

There are 2 best solutions below

2
On BEST ANSWER

Here's a quick way to check.

Note that the columns of any $3\times 3$ matrix are the images of $(1\ 0\ 0)^T, (0\ 1\ 0)^T$, and $(0\ 0\ 1)^T$.

Thus, we can see that when (for example) $\theta = \pi/2$, the image of $(1, 0, 0)^T$ under the first matrix is

$$\begin{bmatrix}\cos(\pi/2)\\ -\sin(\pi/2)\\ 0 \end{bmatrix} = \begin{bmatrix}0\\ -1\\ 0\end{bmatrix}.$$

So, which rotation - clockwise or counterclockwise - by a quarter-turn sends the point $(1, 0, 0)$ to $(0, -1, 0)$?

0
On

Counterclockwise rotation by an angle $\alpha$ of $(x,y)$ corresponds to the multiplication $$ (x+iy)(\cos\alpha+i\sin\alpha)= (x\cos\alpha-y\sin\alpha)+i(x\sin\alpha+y\cos\alpha) $$ so the correct matrix is $$ \begin{bmatrix} \cos\alpha & -\sin\alpha & 0 \\ \sin\alpha & \cos\alpha & 0 \\ 0 & 0 & 1 \end{bmatrix} $$ because $$ \begin{bmatrix} \cos\alpha & -\sin\alpha \\ \sin\alpha & \cos\alpha \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} x\cos\alpha-y\sin\alpha \\ x\sin\alpha+y\cos\alpha \end{bmatrix} $$

Since $$ \begin{bmatrix} \cos\alpha & \sin\alpha & 0 \\ -\sin\alpha & \cos\alpha & 0 \\ 0 & 0 & 1 \end{bmatrix}= \begin{bmatrix} \cos\alpha & -\sin\alpha & 0 \\ \sin\alpha & \cos\alpha & 0 \\ 0 & 0 & 1 \end{bmatrix}^{-1} $$ the first matrix you list is rotation by $-\alpha$ counterclockwise, that is, by $\alpha$ clockwise.