# Using Gram-Schmidt to find an orthogonal basis

I was given the following question:

The given set is a basis for subset $$W$$. Use the Gram-Schmidt process to produce an orthogonal basis for $$W$$.$$\left\{\left[\begin{matrix}0\\8\\8\\\end{matrix}\right],\left[\begin{matrix}4\\7\\3\\\end{matrix}\right]\right\}$$

The Gram-Schmidt process is a method of turning a basis $$(x_1,x_2)$$ into an orthogonal basis $$(v_1,v_2)$$. The first vector can remain the same, making $$v_1=\left(\begin{matrix}0\\8\\8\\\end{matrix}\right)$$. The method for finding the second vector is to take the projection of the $$x_2$$ on $$v_1$$ and subtract it from $$x_2$$. This looks like this: $$\vec{x}_2-\left[\frac{\vec{x}_2\bullet\vec{v}_1}{\vec{v}_1\bullet\vec{v}_1}\right]\vec{v}_1\\\vec{x}_2\cdot\vec{v_1}=0+54+24=80\\\vec{v}_1\cdot\vec{v}_1=0+64+64=128\\\frac{80}{128}\vec{v}_1=\left(\begin{matrix}0\\5\\5\\\end{matrix}\right)\\\vec{x}_2-\left(\begin{matrix}0\\5\\5\\\end{matrix}\right)=\left(\begin{matrix}4\\2\\-2\\\end{matrix}\right)$$My final solution, therefore, is: $$\vec{v}_1=\left(\begin{matrix}0\\8\\8\\\end{matrix}\right),\vec{v}_2=\left(\begin{matrix}4\\2\\-2\\\end{matrix}\right)$$.

I feel confident about my work (maybe in error :)) but the book has a different result: $$\vec{v}_1=\left(\begin{matrix}0\\8\\8\\\end{matrix}\right),\vec{v}_2=\left(\begin{matrix}4\\5\\-5\\\end{matrix}\right)$$I do see how both my solution and the books solution creates an orthogonal basis, but did I make a mistake somewhere?

You are right, and the book is wrong.

Indeed the second vector given by the book, $$\left(\begin{matrix}4\\5\\-5\\\end{matrix}\right)$$

does not belong to $$W$$.

• This may be a very basic question, but how do you know that (4,5,-5) does not belong to W?
– Burt
Sep 1, 2020 at 20:57
• Try to find $a,b \in \mathbb{R}$ so that vector is equal to $au_1 + bu_2$, where $u_1$ and $u_2$ are the two basis vectors of $W$... Sep 1, 2020 at 20:58
• I can set it up in a matrix with 4,5,5 as the solution matrix augmented to the matrix made up of the basis vectors?
– Burt
Sep 1, 2020 at 20:59
• Yes, if you want. Or try to solve the system "by hand" (it is enough simple to deal with it by hand). You should find that there is no solution. Sep 1, 2020 at 21:00