# Using Gram-Schmidt Orthogonalization, Find an Orthogonal Basis for the Span

## Problem 716

Using Gram-Schmidt orthogonalization, find an orthogonal basis for the span of the vectors $\mathbf{w}_{1},\mathbf{w}_{2}\in\R^{3}$ if
$\mathbf{w}_{1} = \begin{bmatrix} 1 \\ 0 \\ 3 \end{bmatrix} ,\quad \mathbf{w}_{2} = \begin{bmatrix} 2 \\ -1 \\ 0 \end{bmatrix} .$

Contents

## Solution.

We apply Gram-Schmidt orthogonalization as follows. The first step is to define $\mathbf{u}_{1}=\mathbf{w}_{1}$. Before defining $\mathbf{u}_{2}$, we must compute
\begin{align*}
\mathbf{u}_{1}^{T}\mathbf{w}_{2}
&=
\mathbf{w}_{1}^{T}\mathbf{w}_{2}
=
\begin{bmatrix}
1 & 0 & 3
\end{bmatrix}
\begin{bmatrix}
2 \\ -1 \\ 0
\end{bmatrix}
=2+0+0=2,
\\
\mathbf{u}_{1}^{T}\mathbf{u}_{1}
&=
\mathbf{w}_{1}^{T}\mathbf{w}_{1}
=
\begin{bmatrix}
1 & 0 & 3
\end{bmatrix}
\begin{bmatrix}
1 \\ 0 \\ 3
\end{bmatrix}
=1+0+9=10.
\end{align*}

Next, we define
$\mathbf{u}_{2} = \mathbf{w}_{2} -\dfrac{\mathbf{u}_{1}^{T}\mathbf{w}_{2}} {\mathbf{u}_{1}^{T}\mathbf{u}_{1}} \mathbf{u}_{1} = \begin{bmatrix} 2 \\ -1 \\ 0 \end{bmatrix} -\dfrac{2}{10} \begin{bmatrix} 1 \\ 0 \\ 3 \end{bmatrix} = \begin{bmatrix} 10/5 \\ -1 \\ 0 \end{bmatrix} \begin{bmatrix} 1/5 \\ 0 \\ 3/5 \end{bmatrix} = \begin{bmatrix} 9/5 \\ -1 \\ -3/5 \end{bmatrix} .$ By Gram-Schmidt orthogonalization, $\{\mathbf{u}_{1},\mathbf{u}_{2}\}$ is an orthogonal basis for the span of the vectors $\mathbf{w}_{1}$ and $\mathbf{w}_{2}$.

## Remark

Note that since scalar multiplication by a nonzero number does not change the orthogonality of vectors and the new vectors still form a basis, we could have used $5\mathbf{u}_2$, instead of $\mathbf{u}_2$ to avoid a fraction in our computation.
We have
$5\mathbf{u}_2=\begin{bmatrix} 10 \\ -5 \\ 0 \end{bmatrix}-\begin{bmatrix} 1 \\ 0 \\ 3 \end{bmatrix}=\begin{bmatrix} 9 \\ -5 \\ -3 \end{bmatrix},$ and $\{\mathbf{u}_1, 5\mathbf{u}_2\}$ is an orthogonal basis for the span.

Let $\mathbf{v}_{1} = \begin{bmatrix} 1 \\ 1 \end{bmatrix} ,\; \mathbf{v}_{2} = \begin{bmatrix} 1 \\ -1 \end{bmatrix} .$ Let...