I would like to compose/decompose an $n$-dimensional orthogonal rotation matrix (restricting to simple planar rotations, which rotates in the specified plane of rotation, and fixes in the plane orthogonal to the plane of rotation) from/to the two basis vectors of the plane of rotation, and the angle of rotation.


The most common method in 3 dimensions is composing/decomposing the rotation matrix from/to an axis and an angle, but this doesn't work in higher dimensions.


For example in $\mathbb{R}^3$ the well-known 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 composing/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$?



Compose/decompose rotation matrix from/to plane of rotation and angle
I may be misunderstanding the question, but to construct the matrix of a rotation in a given plane, complete the two vectors to a basis using Gram-Schmidt, then conjugate the obvious matrix consisting of a two-by-two block in your question (and identity outside the $xy$ plane). To find the rotation, diagonalize over $\mathbb{C}$ (a rotation matrix is normal, so diagonalizable), you will have ones on the main diagonal, except in two positions, so the plane spanned by those two vectors is the rotation plane, and the angle is the argument of the eigenvalue.


