TITLE: For $u,v,x \in \mathbb{R}^m$, let $T(u,v)(x)=x - \frac{\langle(u+v),x\rangle}{1+\langle u,v\rangle}(u+v)+2\langle u,x\rangle v$
QUESTION [6 upvotes]: The function in question appears in lemma $6.3$ of Milnors characteristic classes. Let $\langle \cdot, \cdot\rangle$ denote the dot product on $\mathbb{R}^m$
Let $u,v \in \mathbb{R}^m$ be unit vectors with $u \neq -v$. Let $T(u,v)$ denote the unique rotation of $\mathbb{R}^m$ which carries vector $u$ to vector $v$ and leaves everything orthogonal to $u$ and $v$ fixed. Alternatively, $T(u,v)$ can be defined by:
$$T(u,v)(x)=x - \frac{\langle(u+v),x\rangle}{1+\langle u,v\rangle}(u+v)+2\langle u,x\rangle v$$
Can somebody help me understand why this formula above works? I'm having troubles understanding why this formula gives the desired rotation. Thank you.

REPLY [3 votes]: Note $\|u+v\|^2=2(1+\langle u,v\rangle)$. If we write $\displaystyle w=\frac{u+v}{\|u+v\|}$, the given formula is
$$ R = \mathrm{Id}-2ww^T+2vu^T. $$
Where does this formula come from?
One clue is that $\mathrm{Id}-2ww^T$ is the Householder matrix for reflection across $w$'s orthogonal complement. Indeed, a good geometry exercise is that the product of two hyperplane reflections is a plane rotation by $2\theta$, in the plane spanned by the hyperplanes' two normals, where $\theta$ is the angle between the hyperplanes. One can argue it suffices to do this in 2D, and then it becomes a synthetic geometry exercise.
Note that $w$ is halfway between $u$ and $v$, so the angle $\angle uw$ is half the angle $\angle uv$. Therefore we may take the product of the two Householder reflections associated with $u,w$'s complements:
$$ (\mathrm{Id}-2ww^T)(\mathrm{Id}-2uu^T). $$
If you FOIL this out, then simplify with $w=u+v$, you get $R$ (exercise).