[Math] Finding orthogonal matrix that maps one vector to another

geometrylinear algebramatricesorthogonality

Let $w, v \in \mathbb{R}^k$ be two known vectors such that $||w|| = ||v||$ ($|| . ||$ is the usual Euclidean norm). My questions are related with the problem of finding $Q$ orthogonal such that $v = Q w$. I know that if we take $u = (w-v)/||w-v||$, then $Q = I-2uu'$ (Householder reflection) will be a solution.

My questions are:

1) Is there any explicit way to characterize the solutions $Q$? For instance, what would be another concrete "formula" for a solution $Q$, different than the Householder reflection above?

2) Say that we have a matrix with eigenvalues $\Lambda$. If $Q_1$ is another solution (i.e. $Q_1$ is orthogonal and $v = Qw = Q_1 w$, $Q_1 \neq Q$), is it true that $Q D Q' = Q_1 D Q_1'$?

3) In essence, does the restriction $Q w = v$ for $Q$ orthogonal "tie down" the structure/properties of $Q$ in any interesting way?

Any reference or pointers are much appreciated… Thanks in advance!

Best Answer

Assume for simplicity that $\|v\|_2=\|w\|_2=1$. First, we characterize all $Q$ such that $$\tag{1}v=Qw$$ without assuming any structure of $Q$. The equation (1) can be considered as a linear system with the unknown matrix $Q$. Using the Kronecker product, we can rewrite (1) as $$\tag{2} (w^T\otimes I)\mathrm{vec}(Q)=v. $$ If we set $Q=vw^T$, (1) clearly holds. Hence any $Q$ satisfying (1) can be written as $Q=vw^T+Q_0$, where $Q_0$ is such that $$\tag{3}(w^T\otimes I)\mathrm{vec}(Q_0)=0.$$ Noticing the structure of $w^T\otimes I$, (3) holds if and only if each row of $Q_0$ is orthogonal to $w$ and hence, if $W$ is a matrix such that its columns contain an orthonormal basis of $\mathrm{span}(w)^\perp$ (that is, $W^TW=I$ and $W^Tw=0$), any $Q_0$ satisfying (3) can be written as $Q_0=VW^T$ for some $(k-1)\times k$ matrix $V$ (combining in an arbitrary way the columns of $V$ to form $Q_0$). Consequently, $$ \{Q:\;v=Qw\}=\{vw^T+VW^T:\;V\in\mathbb{R}^{(k-1)\times k}\}. $$

Notice that $Q=vw^T+VW^T$ can be written as $Q=[v,V][w,W]^T$, where the matrices on the right-hand side are square. Since $[w,W]$ is orthogonal by the choice of $W$, $Q$ is orthogonal if (and only if) $[v,V]$ is, that is, $V^TV=I$ and $V^Tv=0$. If we somehow fix both $V$ and $W$, the term $VW^T$ in $Q$ can be replaced as well by the term $VUW^T$ for any orthogonal $(k-1)\times(k-1)$ matrix $U$. Consequently, (denoting $O(k)$ the set of $k\times k$ orthogonal matrices) we have the following:

Let $v,w\in\mathbb{R}^k$ be such that $\|v\|_2=\|w\|_2=1$ and let $V$ and $W$ be $(k-1)\times k$ matrices such that $V^TV=W^TW=I$, $V^Tv=W^Tw=0$. Then $$ \{Q\in O(k):\;v=Qw\}=\{vw^T+VUW^T:\;U\in O(k-1)\}. $$