Finding an orthonormal basis of the subspace using Gram-Schmidt method

gram-schmidtlinear algebra

Apply the Gram-Schmidt orthonormalization process to the vectors $[1,3,2]^T$ and $[1,0,1]^T$ in order to get an orthonormal basis of the subspace that they span.

My Try:

I took $u_1=[1,3,2]^T,u_2=[1,0,1]^T$ and used the formula $V_1=\dfrac{u_1}{\|u_1\|}$ and $V_2=\dfrac{u_2-\langle u_2V_1\rangle V_1}{\|u_2- \langle u_2V_1\rangle V_1\|}$

I got $V_1=\left[\dfrac{1}{\sqrt{14}},\dfrac{3}{\sqrt{14}},\dfrac{2}{\sqrt{14}}\right]^T$

Now, I don't whether I am doing correct for $V_2$ or not. But this is what I did.

$$\langle u_2V_1\rangle V_1=\left<(1,0,1)^T\left(\dfrac{1}{\sqrt{14}},\dfrac{3}{\sqrt{14}},\dfrac{2}{\sqrt{14}}\right)^T\right>^T\left<\dfrac{1}{\sqrt{14}},\dfrac{3}{\sqrt{14}},\dfrac{2}{\sqrt{14}}\right>^T=\left<\frac{3}{14},\frac{9}{14},\frac{6}{14}\right>^T$$
and $$u_2-\langle u_2V_1\rangle V_1=\left<\frac{11}{14},\frac{-9}{14},\frac{4}{14}\right>^T$$
$$V_2=\left<\frac{11}{\sqrt{218}},\frac{-9}{\sqrt{218}},\frac{4}{\sqrt{218}}\right>^T$$

Is my $V_2$ correct?

Best Answer

You made a small mistake, it should be:

$$u_2-\langle u_2,V_1\rangle V_1=\left<\frac{11}{14},\frac{-9}{14},\frac{\color{red}{8}}{14}\right>^T$$

and then

$$V_2 = \left<\frac{11}{\sqrt{266}},\frac{-9}{\sqrt{266}},\frac{8}{\sqrt{266}}\right>^T$$

Now you can check that $\|V_1\| = \|V_2\| = 1$ and $\langle V_1, V_2\rangle = 0$ so they are correct.