Completing unit vector to orthonormal basis

395 Views Asked by At

Given a unit vector $x=(\sin \theta \cos \varphi, \sin \theta \sin \varphi, \cos \theta)\in \Bbb R^3$, how do I find two other vectors $y,z\ \in \Bbb R^3$ such that $\{x,y,z\}$ is an orthonormal basis?

What are $y,z$ explicitly?

3

There are 3 best solutions below

0
On BEST ANSWER

Write $x=(a,b,c)$. You can take, e.g., $y=(b^2+c^2)^{-1/2}(0,c,-b)$ (unless $b=c=0$). Then take $z$ to be the vector product of $x$ and $y$.

0
On

You can pick any $2$ other independent vector and then apply Gram-Schmidt. First pick any vector that is independent to $x$. So for example I picked $$y = (1,1,\sin \theta)$$ Then do the cross product between $y$ and $x$ to find a $z$ then apply Gram-Schmidt so your orthognal basis lets call $U = \{u_1,u_2,u_3\}$ can be defined in terms of $x,y,z$ as follows $$ u_1 = x$$ $$u_2 = y - \frac{u_1 \cdot y}{|u_1|^2} u_1$$ $$u_3 = z - \frac{u_1 \cdot z}{|u_1|^2} u_1 - \frac{u_2 \cdot z}{|u_2|^2} u_2 $$

0
On

Since you’re starting off with the spherical coordinates of a unit vector, it’s very easy to generate a vector orthogonal to it by adding $\frac\pi2$ to either of the angles. The basis can then be completed by finding the cross product of these two vectors.

Observe that if we modify $\theta$, then the third vector will lie in the $X$-$Y$ plane and is rotated 90° from the projection of $x$ onto this plane, so that we can find its components without actually computing a cross product. Therefore take $$y=\left(\sin\left(\theta+\frac\pi2\right)\cos\phi,\left(\theta+\frac\pi2\right)\sin\phi,\cos\left(\theta+\frac\pi2\right)\right)=(\cos\theta\cos\phi,\cos\theta\sin\phi,-\sin\theta)$$ and then $z=(-\sin\phi,\cos\phi,0)$, which you can verify by computing $x\times y$. You can also easily verify that these vectors comprise an orthonormal set and that $\det\begin{bmatrix}x^T&y^T&z^T\end{bmatrix}=1$ so that they form a right-handed basis of $\mathbb R^3$.