# Find an orthogonal basis for $\mathbb R^4$

Find orthogonal basis for $\mathbb R^4$ that contains the vectors: $v_1=$ $\begin{bmatrix} 2 \\[0.3em] 1 \\[0.3em] 0 \\[0.3em] -1 \end{bmatrix}$ and $v_2=$ $\begin{bmatrix} 1 \\[0.3em] 0 \\[0.3em] 3 \\[0.3em] 2 \end{bmatrix}$

Right now I'm trying to find any basis for $\mathbb R^4$ that contains $v_1$ and $v_2$. Multiplying both equations by $\begin{bmatrix} x \\[0.3em] y \\[0.3em] z \\[0.3em] w \end{bmatrix}$ I got $2x + y -z = 0 | x + 3y + 2z = 0$. What to do from here? How can I find these vectors so I can proceed to applying the Gram-Schmidt Process?

## 4 Answers

Take the set of vectors (say there are $k$ of them), augment it with the standard basis, apply the gram schmidt process by first going through the vectors in the set you started with then continue with the standard basis. Then, the original set of vectors and the non-zero vectors you get after the first $k$ form a basis for the whole space. It is orthogonal by the gram schmidt process since the first $k$ are orthogonal and the remainder are also orthogonal by gram schmidt. If you get a vector which is $0$ during the gram schmidt process, drop it from the process and continue until you get 4 vectors (which is the # of elements in a basis)

That is, you start with $\{v_1, v_2, e_1, e_2, e_3, e_4\}$. Applying Gram Schmidt to this will give you $\{v_1,v_2, a,b\}$

• @StarCute: The first two are already orthogonal, so G.-S. will keep both of them; the entire set of vectors certainly spans the space since it contains the usual basis. G.-S. will toss out any redundant vectors once it chews through enough to span the space. – MPW May 15 '14 at 5:48
• @MPW: Okay, I'm a little confused now. So do I not need to apply GS to the vectors I already have? I may need a more elementary explanation. – StarCute May 15 '14 at 5:54
• When you run through GS on the first 2 vectors, it will just normalize them. So, you'll get $\frac{v_1}{||v_1||}, \frac{v_2}{||v_2||}, \text{normalized form of } e_1- (\frac{v_1}{||v_1||} \cdot e_1) \frac{v_1}{||v_1||} - (\frac{v_2}{||v_2||} \cdot e_1) \frac{v_2}{||v_2||},$ then one more non-zero vector – Batman May 15 '14 at 5:58
• What? I just gave you the 3rd vector you'd get out of the gram schmidt process. The next vector you apply it to is $e_2$ ($e_i$ is the vector with all zeros except it is $1$ the $i$-th position). – Batman May 15 '14 at 6:03
• $\{e_2,e_3\}$ is not a basis for $R^3$. Just try it and see what happens. – Batman May 15 '14 at 6:21

By considering linear combinations we see that the second and third entries of $v_1$ and $v_2$ are linearly independent, so we just need $e_1=(1,0,0,0)^T,e_4=(0,0,0,1)$ To form an orthogonal basis, they need all be unit vectors, as you are mot asked to find an orthonormal basi.

• @e1lya: Okay this was the explanation I was looking for. However, do $e_1$ and $e_4$ need not be orthogonal to the vectors $v_1$ and $v_2$? – StarCute May 15 '14 at 6:58
• Yes, you are right, let me think about this – Ellya May 15 '14 at 7:38

Given a matrix $A$, the orthogonal complement of the column space of $A$ is the null space of $A^T$; so what you need is a basis for this space, that you can later orthogonalize.

The matrix to consider has $v_1$ and $v_2$ as columns, so we can perform elimination on $A^T$: $$A^T= \begin{bmatrix} 2 & 1 & 0 & -1 \\ 1 & 0 & 3 & 2 \end{bmatrix} \to \begin{bmatrix} 1 & 0 & 3 & 2 \\ 2 & 1 & 0 & -1 \end{bmatrix} \to \begin{bmatrix} 1 & 0 & 3 & 2 \\ 0 & 1 & -6 & -5 \end{bmatrix}$$ A basis of the null space consists then of $$w_1=\begin{bmatrix} -3 \\ 6 \\ 1 \\ 0 \end{bmatrix} \qquad w_2=\begin{bmatrix} -2 \\ 5 \\ 0 \\ 1 \end{bmatrix}$$ Since $$\frac{\langle w_1,w_2\rangle}{\langle w_1,w_2\rangle}= \frac{36}{46}=\frac{18}{23}$$ an orthogonal basis consists of $u_1=w_1$ and $$u_2=w_2-\frac{18}{23}w_1$$ Your required basis is then $\{v_1,v_2,u_1,u_2\}$.

So what the Gram-Schmidt process actually does is to create an orthogonal basis out of any linearly independent vectors in a space ($R^4$ in this case).

What you want to do is just pick any 2 vectors that you know will definitely be in $R^4$ and will be linearly independent from the two given you have, it's easy to see that $e_3$ and $e_4$ will have the desired properties.

$e_3 = [0, 0, 1, 0]^T$

$e_4 = [0, 0, 0, 1]^T$

Now you can continue to perform Gram-Schmidt on your ${v_1, v_2, e_3, e_4}$ and You will end up with an orthogonal basis (check this with the dot product). To avoid fractions, whenever you find one perpendicular complement, you could scale it first before using it in the next calculation.

Good luck!