Decompose rotation matrix to plane of rotation and angle I would like to decompose an $n$-dimensional orthogonal rotation matrix (restricting to simple rotation with a single plane of rotation) to the two basis vectors of the plane of rotation, and an angle of rotation.
The common method is decomposing the rotation matrix to an axis and angle, but this doesn't work in higher dimensions.
For example in $\mathbb{R}^3$ given the rotation matrix 
$R_{xy}=\begin{bmatrix}\cos\theta & -\sin\theta & 0 \\ \sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \end{bmatrix}$
it's obvious that the plane of rotation is the $xy$-plane spanned by basis vectors $b_0 = (1,0,0)$ and $b_1=(0,1,0)$ and the angle of rotation is $\theta$.
However decomposing it mathematically is rather challenging.
What is the solution for a general (restricted to a single, but arbitrary plane) rotation matrix in $\mathbb{R}^n$?

This is the same answer as given by "arctic tern," but expressed differently.
If $R$ is an orthogonal rotation matrix (i.e. $R^{-1} = R^T$ and $\det(R) = 1$), then it can be diagonalized via a unitary similarity matrix.  The eigenvalues have absolute value $1$, and come in conjugate pairs.  And their product must be $1$.
Hence there are $k$ (where $2k \le n$) eigenvalues of the form $\cos(\theta_m) \pm i \sin(\theta_m)$ for $1 \le m \le k$, and $n-2k$ eigenvalues $1$.
Thus $R$ is the product $\prod_{m=1}^{k} R(\Pi_m,\theta_m)$ (as in "arctic tern's" answer), where $\Pi_m$ is the space generated by the eigenvectors corresponding to the eigenvalues $\cos(\theta_m) \pm i \sin(\theta_m)$.  (The eigenvectors also come in conjugate pairs, unless $\theta_m = \pi$, so you can take the two real vectors to be the real and imaginary parts of one of them.  For the case where the eigenvalues are $-1$ twice, just pick an eigenvector corresponding to each eigenvalue.  If any of the $\theta_m$'s are repeated, this representation won't be unique.)
