# Generalized rotation matrix in N dimensional space around N-2 unit vector

There is a 2d rotation matrix around point $(0, 0)$ with angle $\theta$.

$$\left[ \begin{array}{ccc} \cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{array} \right]$$

Next, there is a 3d rotation matrix around point $(0, 0, 0)$ and unit axis $(u_x, u_y, u_z)$ with angle $\theta$ (Rodrigues' Rotation Formula).

\begin{bmatrix} \cos \theta +u_x^2 \left(1-\cos \theta\right) & u_x u_y \left(1-\cos \theta\right) - u_z \sin \theta & u_x u_z \left(1-\cos \theta\right) + u_y \sin \theta \\ u_y u_x \left(1-\cos \theta\right) + u_z \sin \theta & \cos \theta + u_y^2\left(1-\cos \theta\right) & u_y u_z \left(1-\cos \theta\right) - u_x \sin \theta \\ u_z u_x \left(1-\cos \theta\right) - u_y \sin \theta & u_z u_y \left(1-\cos \theta\right) + u_x \sin \theta & \cos \theta + u_z^2\left(1-\cos \theta\right) \end{bmatrix}

How it is possible to generalize rotation matrix on $N$ dimension around zero point and $N-2$ dimensional unit axis with angle $\theta$?

-
@RobertIsrael could you please tell me the reference (name of the formula, article, book, etc.) for your formula above (a matrix that rotates the span of u and v by angle \theta)? Thank you in advance. – user71237 Apr 6 '13 at 8:13

The definition is that $A\in M_{n}(\mathbb{R})$ is called a rotation matrix if there exist a unitary matrix $P$ s.t $P^{-1}AP$ is of the form $$\begin{pmatrix}\cos(\theta) &-\sin(\theta)\\ \sin(\theta) & \cos(\theta)\\ & & 1\\ & & & 1\\ & & & & 1\\ & & & & & .\\ & & & & & & .\\ & & & & & & & .\\ & & & & & & & & 1 \end{pmatrix}$$
If we consider $A:\mathbb{R}^{n}\to\mathbb{R}^{n}$ then the meaning is that there exist an orthonormal basis where we rotate the $2-$dimensional space spanned by the first two vectors by angle $\theta$ and we fix the other $n-2$ dimensions
If $u$ and $v$ are two orthonormal vectors, a matrix that rotates the span of $u$ and $v$ by angle $\theta$ is $A = I + \sin(\theta) ( v u^T - u v^T) + (\cos(\theta) - 1)( u u^T + v v^T)$. Thus $A_{ij} = \delta_{ij} + \sin(\theta) (v_i u_j - u_i v_j) + (\cos(\theta)-1)(u_i u_j + v_i v_j)$. – Robert Israel Sep 16 '12 at 23:51
The $n-2$-dimensional space that is the orthogonal complement of my two vectors is fixed by the rotation, i.e. $Aw = w$ for $w$ in this space. – Robert Israel Sep 20 '12 at 7:44