[Math] Counterclockwise rotation matrix

matricesrotations

If I take the basis $(\vec{e_x},\vec{e_y})$ and make a rotation counterclockwise of angle $\theta$, I end up with two new vectors $(\vec{u},\vec{v})$ such that :

$\vec{u} = \cos\theta \vec{e_x} + \sin\theta \vec{e_y}$

$\vec{v} = \cos\theta \vec{e_x} – \sin\theta \vec{e_y}$

so
\begin{equation}
\left( \begin{array}{ccc}
\vec{u} \\
\vec{v}\end{array} \right)
= \left( \begin{array}{ccc}
\cos\theta & \sin\theta\\
-\sin\theta & \cos\theta\end{array} \right)
\left( \begin{array}{ccc}
\vec{e_x} \\
\vec{e_y}\end{array} \right)
\end{equation}

I don't understand why the counterclockwise rotation is defined as :
\begin{pmatrix}
\cos\theta & -\sin\theta \\
\sin\theta & \cos\theta
\end{pmatrix}

EDIT:

When I look at my picture, it looks like a counterclockwise rotation…
enter image description here

Best Answer

Suppose the rotation matrix is

$$\begin{bmatrix}a&b\\c&d\end{bmatrix}$$

Since it rotate every vector by angle $\theta$, we will look at what it does to the basis $\begin{bmatrix}1\\0\end{bmatrix}$, $\begin{bmatrix}0\\1\end{bmatrix}$.

$$\begin{bmatrix}a&b\\c&d\end{bmatrix}\begin{bmatrix}1\\0\end{bmatrix}=\begin{bmatrix}a\\c\end{bmatrix}$$

By the following picture, we could see that $a=\cos\theta,c=\sin\theta$.

enter image description here

Similarly, you can find $b,d$.