Rotating a given vector to align it with another vector using only $x$ and $y$ axes as rotation axes

76 Views Asked by At

I have this question that occurred to me today. Suppose you have a unit vector $V_1$ and another unit vector $V_2$ where both vectors are in $\mathbb{R}^3$. I want to verify that it is always possible to apply two successive rotations, either starting with a rotation about the $x$ axis, then a rotation about the $y$ axis, or vice versa, such that after this double rotation $V_1$ is aligned exactly with $V_2$.

My thought is yes, this is always possible. But I'd like the input of the community on this.

Update:

I state without proof that an arbitrary unit vector $V_1$ can be rotated into another arbitrary unit vector $V_2$ by one or more of the following:

  1. A rotation about the $x$ axis followed by a rotation about the $y$ axis.

  2. A rotation about the $y$ axis followed by a rotation about the $x$ axis.

For some pairs $(V_1, V_2)$ it is possible to use either way. For others only $1.$ will work, or only $2.$ will work.

In addition, it is always possible to rotate a unit vector $V_1$ into another unit vector $V_2$ by a sequence of $3$ rotations where the rotation axis alternates as follows: $X, Y, X$ or $Y, X, Y$. Both are always possible.

Any comments, hints, or answers that include proofs are high appreciated. Thank you all.

1

There are 1 best solutions below

1
On BEST ANSWER

CLAIM: Let $$\vec{u} = \begin{pmatrix} u_x \\ u_y \\ u_z\end{pmatrix}$$ and $$\vec{v} = \begin{pmatrix} v_x \\ v_y \\ v_z\end{pmatrix}$$ be unit vectors. I claim that there exist an $x$-rotation $X$ and a $y$-rotation $Y$ such that $YX\vec{u}=\vec{v}$ if and only if $$u_y^2+u_z^2\geqslant v_y^2.$$

COROLLARY: For any unit vectors $\vec{m}, \vec{n}\in \mathbb{R}^3$, there exist an $x$-rotation $A$ and a $y$-rotation $B$ such that either $BA\vec{m}=\vec{n}$ or $AB\vec{m}=\vec{n}$.

PROOF OF COROLLARY USING CLAIM: Let $$\vec{m}=\begin{pmatrix} m_x \\ m_y \\ m_z\end{pmatrix}$$ and let $$\vec{n} = \begin{pmatrix} n_x \\ n_y \\ n_z\end{pmatrix}.$$ If $m_y^2+m_z^2 \geqslant n_y^2+n_z^2$, let $\vec{u}=\vec{m}$ and let $\vec{v}=\vec{n}$. Then $$u_y^2+u_z^2 \geqslant v_y^2+v_z^2\geqslant v_y^2.$$ By the claim, there exist an $x$-rotation $X$ and a $y$-rotation $Y$ such that $YX\vec{u}=\vec{v}$. Let $A=X$ and $B=Y$ to get $BA\vec{m}=\vec{n}$. On the other hand, if $m_y^2+m_z^2 < n_y^2+n_z^2$, then let $\vec{u}=\vec{n}$ and let $\vec{v}=\vec{m}$. Then $$u_y^2+u_z^2 > v_y^2+v_z^2 \geqslant v_y^2,$$ so again by the claim there exist an $x$-rotation $X$ and a $y$-rotation $Y$ such that $YX\vec{u}=\vec{v}$. This means $YX\vec{n}=\vec{m}$ and $X^{-1}Y^{-1}\vec{m}=\vec{n}$. We finish by letting $A=X^{-1}$, which is the inverse of an $x$-rotation and therefore an $x$-rotation, and $B=Y^{-1}$, which is the inverse of a $y$-rotation and therefore a $y$-rotation. This proves the corollary.

SUBCLAIM: For any real numbers $a,b,c$, there exists $\theta$ such that $\cos(\theta)a+\sin(\theta)b=c$ if and only if $a^2+b^2\geqslant c^2$.

PROOF OF SUBCLAIM: Geometrically this is clear. Just picture the rotation of the vector $$\begin{pmatrix} \cos(\theta) & \sin(\theta) \\ -\sin(\theta) & \cos(\theta) \end{pmatrix}\begin{pmatrix} a \\ b \end{pmatrix} = \begin{pmatrix} \cos(\theta) a+\sin(\theta)b \\ -\sin(\theta)a+\cos(\theta)b\end{pmatrix}.$$ As $\theta$ varies over all real values, this vector just traces out a circle with radius $\sqrt{a^2+b^2}$, so its maximum and minimum $x$-values will be $\sqrt{a^2+b^2}$ and $-\sqrt{a^2+b^2}$, respectively. It will pass through the line $x=c$ if and only if that line lies between $\sqrt{a^2+b^2}$ and $-\sqrt{a^2+b^2}$, which is equivalent to $a^2+b^2\geqslant c^2$.

To do this formally, we first let $$\vec{H(\theta)} = \begin{pmatrix} \cos(\theta) & \sin(\theta) \\ - \sin(\theta) & \cos(\theta)\end{pmatrix}\begin{pmatrix} a \\ b \end{pmatrix}.$$ This is a continuous function of $\theta$. Let $$\vec{e}_1=\begin{pmatrix} 1 \\ 0 \end{pmatrix},$$ $$\vec{e}_2 = \begin{pmatrix} 0 \\ 1 \end{pmatrix},$$ and let $\vec{H(\theta)}\cdot \vec{e}_1$ denote the dot product of $\vec{H(\theta)}$ with $\vec{e}_1$. Then $$|\vec{H(\theta)}\cdot \vec{e}_1|^2 \leqslant |\vec{H(\theta)}\cdot \vec{e}_1|^2+|\vec{H(\theta)}\cdot \vec{e}_2|^2 = \|\vec{H(\theta)}\|^2 = a^2+b^2,$$ since $\vec{H(\theta)}$ is a rotation of $\begin{pmatrix} a\\ b\end{pmatrix}$. So if $c^2>a^2+b^2$, there cannot exist $\theta$ for which $\cos(\theta) a + \sin(\theta) b = \vec{H(\theta)}\cdot \vec{e}_1$ is equal to $c$. On the other hand, if we write $$\begin{pmatrix} a \\ b \end{pmatrix} = \sqrt{a^2+b^2}\begin{pmatrix} \cos(\varpi) \\ \sin(\varpi)\end{pmatrix},$$ which we can always do for some $\varpi$ (here I'm handwaving), and $\vec{H(\varpi)}\cdot\vec{e}_1=\sqrt{a^2+b^2}$ and $\vec{H(\pi+\varpi)}\cdot \vec{e}_1 = -\sqrt{a^2+b^2}$. So if $a^2+b^2\geqslant c^2$, then $-\sqrt{a^2+b^2}\leqslant c \leqslant \sqrt{a^2+b^2}$. Since $\vec{H(\theta)}\cdot \vec{e}_1$ is a continuous function of $\theta$, there exists some $\theta$ such that $\vec{H(\theta)}\cdot \vec{e}_1=c$ by the intermediate value theorem.

IDEA OF PROOF OF THE CLAIM: If $u_y^2+u_z^2 \geqslant v_y^2$, then we can first perform an $x$-rotation of $\vec{u}$ until its $y$-coordinate is $v_y$. Then perform a $y$-rotation to line up the other two coordinates without changing the $y$-coordinate. On the other hand, if $u_y^2+u_z^2<v_y^2$, then the first of these two steps is impossible (in other words, after an $x$-rotation of $\vec{u}$, the resulting vector's $y$-coordinate will not be equal to $v_y$), and following that up with a $y$-rotation won't change the $y$-coordinate, which still won't be equal to $v_y$.

PROOF OF CLAIM: In the proof, let $$X_\theta = \begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos(\theta) & \sin(\theta) \\ 0 & -\sin(\theta) & \cos(\theta) \end{pmatrix}$$ and $$Y_\phi = \begin{pmatrix} \cos(\phi) & 0 & \sin(\phi) \\ 0 & 1 & 0 \\ -\sin(\phi) & 0 & \cos(\phi)\end{pmatrix}.$$

First suppose that $u_y^2+u_z^2 < v_y^2$. Consider $X_\theta \vec{u}$, which has $y$-coordinate equal to $\cos(\theta)u_y+\sin(\theta) u_z$. By the subclaim, this cannot be equal to $v_y$. But since $y$-rotations don't change the $y$-coordinate, the $y$-coordinate of $Y_\phi X_\theta \vec{u}$ is the same as the $y$-coordinate of $X_\theta \vec{u}$, which, as we just noted, is not equal to $v_y$. Therefore $Y_\phi X_\theta \vec{u}=\vec{v}$ does not have any solution $\theta, \phi$.

Next suppose that $u_y^2+u_z^2 \geqslant v_y^2$. By the subclaim, there does exist some $\theta$ such that $\cos(\theta)u_y+\sin(\theta)u_z=v_y$. Then $$X_\theta \vec{u} = \begin{pmatrix} r \\ v_y \\ s \end{pmatrix}$$ for some $r,s$. Moreover, since this is still a unit vector, it follows that $$r^2+s^2 = 1-v_y^2=v_x^2+v_z^2.$$ Therefore the vectors $$\begin{pmatrix} r \\ s\end{pmatrix}$$ and $$\begin{pmatrix} v_x \\ v_z\end{pmatrix}$$ have the same length, and there exists an angle $\phi$ such that $$\begin{pmatrix} \cos(\phi) & \sin(\phi) \\ -\sin(\phi) & \cos(\phi)\end{pmatrix}\begin{pmatrix} r \\ s \end{pmatrix} = \begin{pmatrix} v_x \\ v_z\end{pmatrix}.$$ More specifically, if $R^2=r^2+s^2=v_x^2+v_z^2$, there are angles $\alpha, \beta$ such that $$\begin{pmatrix} r \\ s \end{pmatrix} =R\begin{pmatrix} \cos(\alpha) \\ \sin(\alpha)\end{pmatrix}$$ and $$\begin{pmatrix} v_x \\ v_z \end{pmatrix} =R\begin{pmatrix} \cos(\beta) \\ \sin(\beta)\end{pmatrix},$$ then we can take $\phi=\alpha-\beta$. This means $\cos(\phi)r+\sin(\phi)s=v_x$ and $-\sin(\phi)r+\cos(\phi)s=v_z$. Then $$Y_\phi \begin{pmatrix} r \\ v_y \\ s \end{pmatrix} = \begin{pmatrix} \cos(\phi) & 0 & \sin(\phi) \\ 0 & 1 & 0 \\ -\sin(\phi) & 0 & \cos(\phi)\end{pmatrix} \begin{pmatrix} r \\ v_y \\ s \end{pmatrix} = \begin{pmatrix} \cos(\phi)r +\sin(\phi)s \\ v_y \\ -\sin(\phi)r+\cos(\phi)s\end{pmatrix} = \vec{v}.$$ Therefore $Y_\phi X_\theta \vec{u}=\vec{v}$.