Rotation matrix in terms of dot products. Let us suppose we have unit vectors $u, v \in \mathbb{R}^m$ with $u \neq v.$ Let $T(u,v)$ denote the unique rotation of $\mathbb{R}^m$ carrying $u$ to $v$ and which is the identity on the orthogonal complement of $\text{Span}(u,v).$I have found the claim that $T(u,v)$ can be defined by the formula:
$$T(u,v)x = x - \dfrac{(u+v) \cdot x}{1+u\cdot v} (u+v) + 2 (u \cdot x) v.$$
I don't see why this is true. I would appreciate if someone could help me. 
 A: The underlying idea is that the composition of reflections in a pair of intersecting lines yields a rotation in the plane spanned by those lines through an angle equal to double the angle between them. In this case, we first reflect in the line spanned by $\mathbf u$ and then in the angle bisector of $\mathbf u$ and $\mathbf v$, for which we can use $\mathbf u+\mathbf v$ since $\mathbf u$ and $\mathbf v$ are unit vectors.  
Reflection in a subspace $W$ can be expressed in terms of orthogonal projection onto $W$ as $$\operatorname{Ref_W}\mathbf x = \pi_W\mathbf x-(\mathbf x-\pi_W\mathbf x)=2\pi_W\mathbf x-\mathbf x,$$ i.e., reverse the component of $\mathbf x$ that is orthogonal to $W$. Orthogonal projection onto a vector $\mathbf w$ is $$\pi_{\mathbf w}\mathbf x = {\mathbf w\cdot\mathbf x\over\mathbf w\cdot\mathbf w}\mathbf w,$$ with the denominator equal to one if $\mathbf w$ is a unit vector. We can thus write the desired rotation as $$\begin{align}T_{\mathbf u,\mathbf v}\mathbf x &= \operatorname{Ref_{\mathbf u+\mathbf v}}(\operatorname{Ref_{\mathbf u}}\mathbf x) \\
&= \operatorname{Ref_{\mathbf u+\mathbf v}}(2\pi_{\mathbf u}\mathbf x-\mathbf x) \\
&= 2\operatorname{Ref_{\mathbf u+\mathbf v}}(\pi_{\mathbf u}\mathbf x)-\operatorname{Ref_{\mathbf u+\mathbf v}}(\mathbf x). \end{align}$$ Now, $\pi_{\mathbf u}\mathbf x = (\mathbf u\cdot\mathbf x)\mathbf u$ and reflection in $\mathbf u+\mathbf v$ maps $\mathbf u$ to $\mathbf v$, so the first term simplifies to $2(\mathbf u\cdot\mathbf x)\mathbf v$. Also, $(\mathbf u+\mathbf v)\cdot(\mathbf u+\mathbf v)=2+2(\mathbf u\cdot\mathbf v)$, so expanding the second term yields $$T_{\mathbf u,\mathbf v}\mathbf x = 2(\mathbf u\cdot\mathbf x)\mathbf v - {(\mathbf u+\mathbf v)\cdot\mathbf x\over1+\mathbf u\cdot\mathbf v}(\mathbf u+\mathbf v) + \mathbf x.$$ It’s clear from inspection that the first two terms of this expression vanish for $\mathbf x\in\operatorname{span}\{\mathbf u,\mathbf v\}^\perp$.
