orthonormal basis without gram schmidt

I need to do the orthonormal basis without gram schmidt. This is the method I figured out after A LOT of trial and error. Are there any better methods than this? Its nice not to have to deal with nasty fractions like you do with gram schmidt. Are there any special cases where this will not work?

Let $$B = \left\{ 1/\sqrt(6) \begin{bmatrix} -1\\ 2\\ 1\end{bmatrix},1/\sqrt(3) \begin{bmatrix} 1\\ 1\\ -1\end{bmatrix}\right\},\qquad u =\begin{bmatrix} 1\\ 4\\ -1\end{bmatrix}.$$ a) obtain unique vectors $w$ in $W$ and z in $W^{\perp}$ such that $u = w + z$.
b) Find the orthogonal projection of $u$ on $W$.
c) Find the distance from $u$ to $W$.

$1/\sqrt(6)(-x_1+2x_2+x_3)$

$1/\sqrt(3)(x_1+x_2-x_3)$

Putting the information in a matrix.

\begin{bmatrix} -1 & 2 & 1\\ 1 & 1 & -1 \end{bmatrix}

Reduced row echelon form

\begin{bmatrix} 1 & 0 & -1\\ 0 & 1 & 0 \end{bmatrix}

This is my first general solution. \begin{cases} x1 &= -x_3\\ x2 &= 0\\ x3 & \text{is free}\\ \end{cases}

So the solution set is:

$$\begin{bmatrix} x_1\\ x_2\\ x_3\end{bmatrix}=\begin{bmatrix} -x_3\\ 0\\ x_3\end{bmatrix}=x_3\begin{bmatrix} -1\\ 0\\ 1\end{bmatrix}, x_3\in\mathbb{R}$$

Solving for the $1,4-1$. This gives you a way to get the $w$ in $u-w = z$.

$$\begin{bmatrix} 1\\ 4\\ -1\end{bmatrix}=1\begin{bmatrix} -1\\ 2\\ 1\end{bmatrix}+2\begin{bmatrix} 1\\ 1\\ -1\end{bmatrix}+0\begin{bmatrix} -1\\ 0\\ 1\end{bmatrix}$$

You get $w_1 , w_2,$ from this.

$$w_1\begin{bmatrix} -1\\ 2\\ 1\end{bmatrix}+w_2\begin{bmatrix} 2\\ 2\\ -2\end{bmatrix}=\begin{bmatrix} 1\\ 4\\ -1\end{bmatrix}$$

$w$ in $W$

$$w = \begin{bmatrix} 1\\ 4\\ -1\end{bmatrix}$$

$u-w = z$ $$\begin{bmatrix} 1\\ 4\\ -1\end{bmatrix}-\begin{bmatrix} 1\\ 4\\ -1\end{bmatrix}=\begin{bmatrix} 0\\ 0\\ 0\end{bmatrix}$$

Distance

$$\|(0,0,0) \|=\sqrt{0^2+0^2+0^2}=0$$

• You have a calculation error, the vector you found is not orthogonal to $B$. Once you fix that, you'll probably discover that $u$ is not in $\operatorname{span} B$ so your method won't work. Apr 26, 2017 at 0:46
• It would also help if you defined $W$ somewhere.
– amd
Apr 26, 2017 at 1:30
• Why do you think that you might need to use the Gram-Schmidt process for this in the first place? $B$ is already orthonormal and the three problems can be solved without extending $B$ to cover all of $\mathbb R^3$ or even finding a basis for its orthogonal complement.
– amd
Apr 26, 2017 at 1:34
• @amd like that with the w in W? My book gives a few examples of using the Gram-Schmidt process. My professor always likes to make us find a different way of doing things than what the book show. Apr 26, 2017 at 1:47
• @levap Can you point it out? I don't see the calculation error. Apr 26, 2017 at 1:48