Explicit form of rotation matrix mapping x to y

53 Views Asked by At

Let $x$ and $y$ be points in $\mathbb{R}^n$ with $\|x\|=\|y\|$. It seems intuitive that there should be a special orthogonal matrix $S$ (so $\det(S)=1)$ satisfying $Sx=y$ but how can we write it down in closed form? I'm thinking something to do with the SVD of $x^{\top}y$ but I don't know...

1

There are 1 best solutions below

1
On BEST ANSWER

Here's one approach for when $x\neq \pm y$:

First consider the calse in $\mathbb{R}^2$. We can normalize $x$ and $y$ to obtain two unit vectors: $$ u=\frac{x}{\|x\|},\ \ \ v=\frac{y}{\|v\|} $$ And complete both to form consistently oriented orthonormal bases $(u,\bar{u})$ and $(v,\bar{v})$. $$ \bar{u}=\frac{v-\langle v,u\rangle u}{\|v-\langle v,u\rangle u\|},\ \ \ \bar{v}=\frac{\langle u,v\rangle v-u}{\|\langle u,v\rangle v-u\|} $$ The rotation which takes $(u,\bar{u})$ to $(v,\bar{v})$ also takes $x$ to $y$, and is given by $$ R=vu^T+\bar{v}\bar{u}^T $$ In $\mathbb{R}^n$, the same matrix acts appropriately on $\text{span}(u,v)$, but not on the orthogonal complement. To obtain a proper rotation, we can add a matrix $I-uu^T-\bar{u}\bar{u^T}$, which restricts to zero on $\text{span}(u,v)$ and the identity on the orthogonal complement. $$ R=I+(v-u)u^T+(\bar{v}-\bar{u})\bar{u}^T $$ You can verift that this is indeed a proper rotation which takes $x$ to $y$. This is not the only such rotation, but it is the only one which acts trivially on the orthogonal compliment of $\text{span}(x,y)$. The cases $x,y=0$ and $x=\pm y$ can be dealt with separately.