[Math] Find an orthogonal basis for the subspace of $\mathbb R^{4}$

linear algebra

Question: Consider the standard inner product in $\mathbb R^{4}$. Find an orthogonal basis for the subspace of $\mathbb R^{4}$ generated by the vectors $\begin{pmatrix}1 \\ 1 \\ 2 \\ 1 \end{pmatrix}$, $\begin{pmatrix} 2 \\ 1 \\ 4 \\ 2 \end{pmatrix}$, $\begin{pmatrix}0 \\ 1 \\ 4 \\ 1 \end{pmatrix}$

I used the Gram-Schmidt process using these 3 vectors as my $\vec{v_{1}}$, $\vec{v_{2}}$, $\vec{v_{3}}$. I didn't normalize them because the question asked to find only an orthogonal basis and not an orthonormal basis. However I go a terrible result for the third vector a huge fraction which made me think that maybe I shouldn't use Gram-Schmidt for this type of problem.

Is using the Gram-Schmidt algorithm corrct here or is it asking something completely different?

Best Answer

Yes, the Gram-Schmidt process would give you an orthogonal basis for that subspace. And so, I suspect you've made a calculation mistake somewhere. Here's what I got: Suppose those three vectors are $\mathbf{u_1}, \mathbf{u_2}$, and $\mathbf{u_3}$, respectively; let $\mathbf{v_1} = \begin{bmatrix} 1 \\ 1 \\ 2 \\ 1 \end{bmatrix}$, then

$$\mathbf{v_2} = \mathbf{u_2} - \frac{\mathbf{u_2} \bullet \mathbf{v_1}}{\mathbf{v_1} \bullet \mathbf{v_1}} \mathbf{v_1} = \begin{bmatrix} 1/7 \\ -6/7 \\ 2/7 \\ 1/7 \end{bmatrix}$$

$$\mathbf{v_3} = \mathbf{u_3} - \frac{\mathbf{u_3} \bullet \mathbf{v_1}}{\mathbf{v_1} \bullet \mathbf{v_1}} \mathbf{v_1} - \frac{\mathbf{u_3} \bullet \mathbf{v_2}}{\mathbf{v_2} \bullet \mathbf{v_2}} \mathbf{v_2} = \begin{bmatrix} -3/2 \\ 0 \\ 1 \\ -1/2 \end{bmatrix}$$