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?
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)$?