Solution (source code)

= Solution

Take positive angles counterclockwise. The <rotation> sends the <standard basis> <vectors> to $(\cos\alpha,\sin\alpha)$ and $(-\sin\alpha,\cos\alpha)$. These images form the columns of its <matrix>, so
$$
\boxed{R_2(\alpha)=\begin{pmatrix}\cos\alpha&-\sin\alpha\\\sin\alpha&\cos\alpha\end{pmatrix}.}
$$
The columns are an <orthonormal basis> and the <determinant> is one, as required for a plane <rotation>.