# Best way to find orthonormal vector

What is the easiest method to find two vectors that make an orthonormal basis with a given vector?

For example, I have a vector \begin{pmatrix} 2^{-1/2} \\ -2^{-1/2} \\ 0 \end{pmatrix}

I understand that we need to find two unit vectors with cross product 0 with the original vector.

In this case, we can see by inspection that $(0, 0, 1)$ is an acceptable choice. Then, evaluate $(2^{-1/2},-2^{-1/2},0)\times(0,0,1) = (-2^{-1/2},-2^{-1/2},0)$. One can readily check that these are already normalised and so we are done. Perhaps you could have seen what these vectors could have been using geometric considerations as well. But note that our choice of an orthogonal basis is by no means unique. Even if we have two vectors, to complete the orthonormal basis there are still two possible choices.

Alternatively, you could take two linearly-independent vectors and use the Gran-Schmmidt process. There are articles abound on the web mentioning this process.

The Gram-Schmidt process is the standard text-book technique in any vector space.

In 3D, there is another way that I think is easier.

Let's use $\vec u$ to denote the given vector.

(1) Choose some other vector $\vec x$ that is not parallel to $\vec u$. A good choice is to set $\vec x$ equal to one of the coordinate axis vectors $(1,0,0)$, $(0,1,0)$ or $(0,0,1)$. If you're concerned about numerical stability, choose the one that is most nearly perpendicular to $\vec u$.

(2) Let $\vec v$ be a unit vector in the direction of $\vec u \times \vec x$. So, you compute $\vec u \times \vec x$ and then unitize it.

(3) Let $\vec w = \vec u \times \vec v$.

Then $\vec u$, $\vec v$, $\vec w$ form an orthonormal set.

Let's choose a unit vector that is orthogonal to the given vector. Take for example:

$\mathbf{a} = (0,0,1)$, then let $\mathbf{b} = \mathbf{a}\times \begin{pmatrix} 2^{-1/2} \\ -2^{-1/2} \\ 0 \end{pmatrix}$. Then choose the third vector $\mathbf{c} = \dfrac{\mathbf{b}}{||\mathbf{b}||}$. Then $\mathbf{a}$, $\mathbf{c}$, and the given vector form an orthonormal basis for $\mathbb{R}^3$

• Not quite right, I think. Please see my answer, which says what you were trying to say, I believe. May 18 '14 at 3:46