45

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$?

Ivan Kochurkin
  • 1,231
  • 2
  • 13
  • 28
  • @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. –  Apr 06 '13 at 08:13

2 Answers2

26

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

Belgi
  • 23,614
  • Lyx tip is appriciated for the matrices – Belgi Sep 16 '12 at 23:23
  • Ok, but is there efficient algorithm for finding every matrix item, based on special numbers, permutations or something else, exists? – Ivan Kochurkin Sep 16 '12 at 23:31
  • 27
    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
  • Thank you, @RobertIsrael. But i don't understand how to switch from your explanation with two orthogonal vectors to rotation around N-2 dimensional plane? Can you show it on Rodrigues' Rotation Formula? – Ivan Kochurkin Sep 20 '12 at 07:35
  • 1
    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 07:44
  • 9
    @RobertIsrael can you point to a source of these equations? – gota Oct 09 '17 at 15:54
  • 2
    From a related question, here is a source with that equation: https://analyticphysics.com/Higher%20Dimensions/Rotations%20in%20Higher%20Dimensions.htm – Azmisov Jun 23 '21 at 01:19
1

This answer gives an explanation of the formula quoted in Robert Israel's comments to the answer above, and makes a brief remark about its relation to Rodrigues' rotation formula.

If $R$ is a rotation by $\theta$ in a $2$-plane $P\leq \mathbb R^n$ then $R$ acts as the identity $\text{id}_{P^\perp}$ on $P^{\perp}$. $$ P^\perp = \{u \in \mathbb R^n: \langle v,u \rangle =0 \forall v \in P\}. $$ To find the matrix of $R$ we will assume that we already have obtained an orthonormal basis $\{v_1,v_2\}$ of $P$.

First let $B = \{f_1,\ldots,f_n\}$ be a basis of $\mathbb R^n$ and let $B^* =\{x_1,\ldots,x_n\}$ be the basis of $\mathrm{Hom}(\mathbb R^n,\mathbb R)$ dual to $\{f_1,\ldots,f_n\}$. We view $\mathrm{Hom}(\mathbb R^n,\mathbb R)$ as the space of row vectors and for $f \in \mathrm{Hom}(\mathbb R^n, \mathbb R)$ and $v \in \mathbb R^m$ we write $f.v$ for the linear map $u \mapsto f(u).v$.

Now let $T\in \mathrm{Hom}(\mathbb R^n,\mathbb R^n)$ be a linear map and, for $1\leq i \leq n$ set $t_i = T(f_i)$. Then \begin{equation} \label{basis sufficiency} T = \sum_{i=1}^n x_i.t_i, \end{equation} since the two sides are both linear maps which agree when evaluated on the basis $B$. If $B$ is orthonormal, then the basis $B^* = \{f_1^\intercal, \ldots, f_n^{\intercal}\}$

Now if we extend $\{v_1,v_2\}$, the orthonormal basis of $P$, to an orthonormal basis of $\mathbb R^n$, say $B=\{v_1,\ldots,v_n\}$, then if we let $S = R-I$ then $S=0$ on $P^{\perp}$ (so $S(v_i)=0$ if $i>2$) and $$ Sv_1 = (\cos(\theta)-1)v_1 + \sin(\theta).v_2; \quad Sv_2 = -\sin(\theta)v_1 + (\cos(\theta)-1)v_2 $$ It follows that $$ R = I_n+S = I_n + (\cos(\theta)-1).)(v_1^{\intercal}v_1 + v_2^{\intercal} v_2) +\sin(\theta)(v_1^{\intercal} v_2 - v_2^{\intercal} v_1) $$

This is not so easy to relate to Rodrigues' formula, because it expresses the rotation in terms of vectors on the $2$-plane being rotated, rather than the axis of rotation. Of course in $\mathbb R^3$ $v_1 \times v_2$ is a unit vector on the axis of rotation, so one could use that to compare the two formulae. On the other hand, I think the easiest way to deduce Rodrigues' formula is to use the cross product in $\mathbb R^3$: If $a = (a_x,a_y,a_z) \in \mathbb R^3$ is a unit vector in $\mathbb R^3$, then $v \mapsto a\times v$ acts on $H =\{v \in \mathbb R^3: \langle v,a \rangle =0\}$, the plane perpendicular to $H$, as a rotation by $\pi/2$, since $a\times v$ is perpendicular to both $a$ and $v$, and $\|a\times v\| = \|v\|$ since $\|a\|=1$ and $a$ and $v$ are orthogonal. But then a rotation by about the origin in $H$ $\theta$ is given by $\cos(\theta)I_H +\sin(\theta)(a\times -)$, and so it follows that $$ \begin{split} v \mapsto &\langle v,a \rangle a + \cos(\theta)(v-\langle a,v \rangle a) + \sin(\theta)a\times v\\ &= \cos(\theta)v + (1-\cos(\theta))\langle v,a \rangle a + \sin(\theta)(a\times v) \end{split} $$ describes a rotation by $\theta$ about the axis through $a$. Noting that $v \mapsto \langle a,v\rangle a$ has matrix $a^\intercal a$ and that $v\mapsto a\times v$ has matrix $$ \begin{bmatrix} 0 & -u_z & u_y \\u_z & 0 &-u_x \\ -u_y & u_x & 0 \end{bmatrix} $$ then gives Rodrigues' formula.

krm2233
  • 7,230