Gram Schmidt R4
1. **Stating the problem:** We are given vectors \(\mathbf{v}_1 = [1, 1, -1, 0]\) and \(\mathbf{v}_2 = [0, 2, 0, 1]\) that form a basis for subspace \(W\subseteq \mathbb{R}^4\). We need to use the Gram–Schmidt process to produce an orthonormal basis of \(W\).
2. **Step 1: Define \(\mathbf{u}_1\) as \(\mathbf{v}_1\).**
\[\mathbf{u}_1 = [1, 1, -1, 0]\]
3. **Step 2: Normalize \(\mathbf{u}_1\) to get the first orthonormal vector \(\mathbf{e}_1\).**
Calculate the norm:
\[\|\mathbf{u}_1\| = \sqrt{1^2 + 1^2 + (-1)^2 + 0^2} = \sqrt{1+1+1+0} = \sqrt{3}\]
Normalize:
\[\mathbf{e}_1 = \frac{1}{\sqrt{3}}[1, 1, -1, 0]\]
4. **Step 3: Compute \(\mathbf{u}_2\) by subtracting the projection of \(\mathbf{v}_2\) onto \(\mathbf{e}_1\) from \(\mathbf{v}_2\):**
Calculate projection scalar:
\[\mathrm{proj}_{\mathbf{e}_1}(\mathbf{v}_2) = (\mathbf{v}_2 \cdot \mathbf{e}_1)\mathbf{e}_1\]
Dot product:
\[\mathbf{v}_2 \cdot \mathbf{e}_1 = [0, 2, 0, 1] \cdot \frac{1}{\sqrt{3}}[1,1,-1,0] = \frac{1}{\sqrt{3}}(0*1 + 2*1 + 0*(-1) + 1*0) = \frac{2}{\sqrt{3}}\]
Projection vector:
\[\frac{2}{\sqrt{3}} \mathbf{e}_1 = \frac{2}{\sqrt{3}} \times \frac{1}{\sqrt{3}}[1,1,-1,0] = \frac{2}{3}[1,1,-1,0] = \left[\frac{2}{3}, \frac{2}{3}, -\frac{2}{3}, 0\right]\]
Calculate \(\mathbf{u}_2\):
\[\mathbf{u}_2 = \mathbf{v}_2 - \mathrm{proj}_{\mathbf{e}_1}(\mathbf{v}_2) = \left[0,2,0,1\right] - \left[\frac{2}{3}, \frac{2}{3}, -\frac{2}{3}, 0\right] = \left[-\frac{2}{3}, \frac{4}{3}, \frac{2}{3}, 1\right]\]
5. **Step 4: Normalize \(\mathbf{u}_2\) to get \(\mathbf{e}_2\).**
Calculate the norm:
\[\|\mathbf{u}_2\| = \sqrt{\left(-\frac{2}{3}\right)^2 + \left(\frac{4}{3}\right)^2 + \left(\frac{2}{3}\right)^2 + 1^2} = \sqrt{\frac{4}{9} + \frac{16}{9} + \frac{4}{9} + 1} = \sqrt{\frac{24}{9} + 1} = \sqrt{\frac{24}{9} + \frac{9}{9}} = \sqrt{\frac{33}{9}} = \sqrt{\frac{11}{3}} = \frac{\sqrt{33}}{3}\]
Normalize:
\[\mathbf{e}_2 = \frac{1}{\|\mathbf{u}_2\|} \mathbf{u}_2 = \frac{3}{\sqrt{33}} \left[-\frac{2}{3}, \frac{4}{3}, \frac{2}{3}, 1\right] = \left[-\frac{2}{\sqrt{33}}, \frac{4}{\sqrt{33}}, \frac{2}{\sqrt{33}}, \frac{3}{\sqrt{33}}\right]\]
6. **Final answer: The orthonormal basis for \(W\) is**
\[\mathbf{e}_1 = \frac{1}{\sqrt{3}}[1,1,-1,0], \quad \mathbf{e}_2 = \left[-\frac{2}{\sqrt{33}}, \frac{4}{\sqrt{33}}, \frac{2}{\sqrt{33}}, \frac{3}{\sqrt{33}}\right]\]