Orthonormal basis containing a given vector

363 Views Asked by At

What is the easiest way to find an orthonormal basis that contains a given vector in $\mathbb{R}^n$ ? I am looking for the change-of-basis matrix from the standard Euclidean basis containing the axis-aligned unit vectors to the (rotated) orthonormal basis that contains the vector $\mathbf{x}=(1,1,...,1)/\sqrt{n}$. I can do it iteratively by solving systems of equations, but I was wondering if there is a more direct way.

2

There are 2 best solutions below

2
On

If $\lVert v\rVert=1$, then $\dim\{w\in\mathbb R^n\,|\,v.w=0\}=n-1$. Pick an orthonormal basis $\{v_1,\ldots,v_{n-1}\}$ of that space and add $v$ to it.

0
On

It’s easy enough to generate a set of $n-1$ linearly-independent vectors that are all orthogonal to $\mathbf x$. For instance, you could take $(1,-1,0,0,\dots)^T$, $(1,0,-1,0,\dots)^T$, &c. Apply the Gram-Schmidt process to this sequence to orthonormalize it. Alternatively, start G-S with $\mathbf x$ and then feed in the standard basis vectors. If the process produces a zero vector, discard it and continue with the next input. The second method works for any $\mathbf x$.