Gram Schmidt Process.
Let \(B=\left\{\mathbf{v}_{1}, \mathbf{v}_{2}, \ldots, \mathbf{v}_{m}\right\}\) be a basis of a subspace \(W\) of \(\mathbb{R}^{n}\text{.}\)
-
Let \(B^{\prime}=\left\{\mathbf{w}_{1}, \mathbf{w}_{2}, \ldots, \mathbf{w}_{n}\right\}\text{,}\) where\begin{align*} \mathbf{w}_1\amp=\mathbf{v}_1 \\ \mathbf{w}_2\amp=\mathbf{v}_2-\frac{\mathbf{v}_2\cdot \mathbf{w}_1}{\mathbf{w}_1\cdot \mathbf{w}_1}~\mathbf{w}_1 \\ \mathbf{w}_3\amp=\mathbf{v}_3-\frac{\mathbf{v}_3\cdot \mathbf{w}_1}{\mathbf{w}_1\cdot \mathbf{w}_1}~\mathbf{w}_1-\frac{\mathbf{v}_3\cdot \mathbf{w}_2}{\mathbf{w}_2\cdot \mathbf{w}_2}~\mathbf{w}_2 \\ \amp\ddots\\ \mathbf{w}_m\amp=\mathbf{v}_m-\frac{\mathbf{v}_m\cdot \mathbf{w}_1}{\mathbf{w}_1\cdot \mathbf{w}_1}~\mathbf{w}_1-\frac{\mathbf{v}_m\cdot \mathbf{w}_2}{\mathbf{w}_2\cdot \mathbf{w}_2}~\mathbf{w}_2-\ldots-\frac{\mathbf{v}_m\cdot \mathbf{w}_{m-1}}{\mathbf{w}_{m-1}\cdot \mathbf{w}_{m-1}}~\mathbf{w}_{m-1} \end{align*}\(B'\) is an orthogonal basis of \(W\text{.}\)
- Let \(\mathbf{u}_{i}=\frac{\mathbf{w}_{i}}{\left\|\mathbf{w}_{i}\right\|}\text{.}\) Then \(B^{\prime \prime}=\left\{\mathbf{u}_{1}, \mathbf{u}_{2}, \ldots, \mathbf{u}_{n}\right\}\) is an orthonormal basis for \(W\text{.}\) Also, for \(k=1,2, \ldots, m\text{,}\)\begin{equation*} \operatorname{span}\left\{\mathbf{v}_{1}, \mathbf{v}_{2}, \ldots, \mathbf{v}_{k}\right\}=\operatorname{span}\left\{\mathbf{u}_{1}, \mathbf{u}_{2}, \ldots, \mathbf{u}_{k}\right\} \end{equation*}