I was looking at these matrices and it got me thinking:
Can these matrices be derived?
How do we know that in order to rotate around z for example, we have to $\cos\theta$, $\sin\theta$ in the first column and $0$)?
So far I have figured out only that whatever axis we rotate around, we place a 1 in the $R_{11}$, $R_{22}$ or $R_{33}$ element (corresponding to rotation around $x$, $y$ and $z$).
Rotation matrix in $N$ dimensions are given by elements of the special orthogonal group $SO(N)$. A Lie group. Elements in this group satisfy the two relations:
The first one imply the rigidity of the rotation ($\mathbf{v}\cdot\mathbf{w}=\mathbf{v}R^T\cdot R\mathbf{w}$), while the second one select rotations without reflection about an axis. The case $N=2$ is a simple exercise in which you can find a parametrization in terms of cosine and sine for a general rotation matrix in two dimension. Try to use a generic matrix $$ R=\left( \begin{array}{cc} a & b \\ c & d \end{array} \right)$$ and impose the constraints.
See special orthogonal group on wikipedia.