Question: find an orthonormal basis for the subspace of $\mathbb{R}^4$ generated by the vectors $(1,1,1,0)$, $(1,-1,1,1)$ and $(-1,0,2,1)$
1. **State the problem:** Find an orthonormal basis for the subspace of $\mathbb{R}^4$ generated by the vectors $\mathbf{v}_1 = (1,1,1,0)$, $\mathbf{v}_2 = (1,-1,1,1)$, and $\mathbf{v}_3 = (-1,0,2,1)$.
2. **Method:** Use the Gram-Schmidt process to orthogonalize the vectors, then normalize each to get an orthonormal basis.
3. **Step 1: Set $\mathbf{u}_1 = \mathbf{v}_1$**
$$\mathbf{u}_1 = (1,1,1,0)$$
4. **Step 2: Compute $\mathbf{u}_2 = \mathbf{v}_2 - \mathrm{proj}_{\mathbf{u}_1}(\mathbf{v}_2)$**
Projection formula:
$$\mathrm{proj}_{\mathbf{u}_1}(\mathbf{v}_2) = \frac{\mathbf{v}_2 \cdot \mathbf{u}_1}{\mathbf{u}_1 \cdot \mathbf{u}_1} \mathbf{u}_1$$
Calculate dot products:
$$\mathbf{v}_2 \cdot \mathbf{u}_1 = 1\cdot1 + (-1)\cdot1 + 1\cdot1 + 1\cdot0 = 1 -1 +1 +0 = 1$$
$$\mathbf{u}_1 \cdot \mathbf{u}_1 = 1^2 + 1^2 + 1^2 + 0^2 = 3$$
Projection:
$$\mathrm{proj}_{\mathbf{u}_1}(\mathbf{v}_2) = \frac{1}{3}(1,1,1,0) = \left(\frac{1}{3}, \frac{1}{3}, \frac{1}{3}, 0\right)$$
Subtract:
$$\mathbf{u}_2 = (1,-1,1,1) - \left(\frac{1}{3}, \frac{1}{3}, \frac{1}{3}, 0\right) = \left(1 - \frac{1}{3}, -1 - \frac{1}{3}, 1 - \frac{1}{3}, 1 - 0\right) = \left(\frac{2}{3}, -\frac{4}{3}, \frac{2}{3}, 1\right)$$
5. **Step 3: Compute $\mathbf{u}_3 = \mathbf{v}_3 - \mathrm{proj}_{\mathbf{u}_1}(\mathbf{v}_3) - \mathrm{proj}_{\mathbf{u}_2}(\mathbf{v}_3)$**
Calculate projections:
$$\mathbf{v}_3 \cdot \mathbf{u}_1 = (-1)\cdot1 + 0\cdot1 + 2\cdot1 + 1\cdot0 = -1 + 0 + 2 + 0 = 1$$
$$\mathrm{proj}_{\mathbf{u}_1}(\mathbf{v}_3) = \frac{1}{3}(1,1,1,0) = \left(\frac{1}{3}, \frac{1}{3}, \frac{1}{3}, 0\right)$$
Calculate $\mathbf{v}_3 \cdot \mathbf{u}_2$:
$$\mathbf{v}_3 \cdot \mathbf{u}_2 = (-1)\cdot\frac{2}{3} + 0\cdot\left(-\frac{4}{3}\right) + 2\cdot\frac{2}{3} + 1\cdot1 = -\frac{2}{3} + 0 + \frac{4}{3} + 1 = \frac{2}{3} + 1 = \frac{5}{3}$$
Calculate $\mathbf{u}_2 \cdot \mathbf{u}_2$:
$$\left(\frac{2}{3}\right)^2 + \left(-\frac{4}{3}\right)^2 + \left(\frac{2}{3}\right)^2 + 1^2 = \frac{4}{9} + \frac{16}{9} + \frac{4}{9} + 1 = \frac{24}{9} + 1 = \frac{24}{9} + \frac{9}{9} = \frac{33}{9} = \frac{11}{3}$$
Projection:
$$\mathrm{proj}_{\mathbf{u}_2}(\mathbf{v}_3) = \frac{\frac{5}{3}}{\frac{11}{3}} \mathbf{u}_2 = \frac{5}{3} \times \frac{3}{11} \mathbf{u}_2 = \frac{5}{11} \mathbf{u}_2 = \frac{5}{11} \left(\frac{2}{3}, -\frac{4}{3}, \frac{2}{3}, 1\right) = \left(\frac{10}{33}, -\frac{20}{33}, \frac{10}{33}, \frac{5}{11}\right)$$
Subtract projections:
$$\mathbf{u}_3 = (-1,0,2,1) - \left(\frac{1}{3}, \frac{1}{3}, \frac{1}{3}, 0\right) - \left(\frac{10}{33}, -\frac{20}{33}, \frac{10}{33}, \frac{5}{11}\right)$$
Calculate stepwise:
$$(-1,0,2,1) - \left(\frac{1}{3}, \frac{1}{3}, \frac{1}{3}, 0\right) = \left(-1 - \frac{1}{3}, 0 - \frac{1}{3}, 2 - \frac{1}{3}, 1 - 0\right) = \left(-\frac{4}{3}, -\frac{1}{3}, \frac{5}{3}, 1\right)$$
Then subtract $\left(\frac{10}{33}, -\frac{20}{33}, \frac{10}{33}, \frac{5}{11}\right)$:
$$\mathbf{u}_3 = \left(-\frac{4}{3} - \frac{10}{33}, -\frac{1}{3} + \frac{20}{33}, \frac{5}{3} - \frac{10}{33}, 1 - \frac{5}{11}\right)$$
Find common denominators (33):
$$-\frac{4}{3} = -\frac{44}{33}, \quad -\frac{1}{3} = -\frac{11}{33}, \quad \frac{5}{3} = \frac{55}{33}, \quad 1 = \frac{33}{33}$$
Calculate each coordinate:
$$-\frac{44}{33} - \frac{10}{33} = -\frac{54}{33} = -\frac{18}{11}$$
$$-\frac{11}{33} + \frac{20}{33} = \frac{9}{33} = \frac{3}{11}$$
$$\frac{55}{33} - \frac{10}{33} = \frac{45}{33} = \frac{15}{11}$$
$$\frac{33}{33} - \frac{15}{33} = \frac{18}{33} = \frac{6}{11}$$
So
$$\mathbf{u}_3 = \left(-\frac{18}{11}, \frac{3}{11}, \frac{15}{11}, \frac{6}{11}\right)$$
6. **Step 4: Normalize $\mathbf{u}_1$, $\mathbf{u}_2$, and $\mathbf{u}_3$ to get orthonormal vectors $\mathbf{e}_1$, $\mathbf{e}_2$, $\mathbf{e}_3$**
Calculate norms:
$$\|\mathbf{u}_1\| = \sqrt{1^2 + 1^2 + 1^2 + 0^2} = \sqrt{3}$$
$$\|\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}}$$
$$\|\mathbf{u}_3\| = \sqrt{\left(-\frac{18}{11}\right)^2 + \left(\frac{3}{11}\right)^2 + \left(\frac{15}{11}\right)^2 + \left(\frac{6}{11}\right)^2} = \frac{1}{11} \sqrt{18^2 + 3^2 + 15^2 + 6^2} = \frac{1}{11} \sqrt{324 + 9 + 225 + 36} = \frac{1}{11} \sqrt{594} = \frac{\sqrt{594}}{11}$$
Simplify $\sqrt{594}$:
$$594 = 9 \times 66 = 9 \times 6 \times 11 = 3^2 \times 6 \times 11$$
So
$$\sqrt{594} = 3 \sqrt{66}$$
Therefore
$$\|\mathbf{u}_3\| = \frac{3 \sqrt{66}}{11}$$
Normalize:
$$\mathbf{e}_1 = \frac{1}{\sqrt{3}} (1,1,1,0) = \left(\frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}}, 0\right)$$
$$\mathbf{e}_2 = \frac{1}{\sqrt{\frac{11}{3}}} \left(\frac{2}{3}, -\frac{4}{3}, \frac{2}{3}, 1\right) = \sqrt{\frac{3}{11}} \left(\frac{2}{3}, -\frac{4}{3}, \frac{2}{3}, 1\right) = \left(\frac{2}{3} \sqrt{\frac{3}{11}}, -\frac{4}{3} \sqrt{\frac{3}{11}}, \frac{2}{3} \sqrt{\frac{3}{11}}, \sqrt{\frac{3}{11}}\right)$$
$$\mathbf{e}_3 = \frac{1}{\frac{3 \sqrt{66}}{11}} \left(-\frac{18}{11}, \frac{3}{11}, \frac{15}{11}, \frac{6}{11}\right) = \frac{11}{3 \sqrt{66}} \left(-\frac{18}{11}, \frac{3}{11}, \frac{15}{11}, \frac{6}{11}\right) = \frac{1}{3 \sqrt{66}} (-18, 3, 15, 6) = \left(-\frac{18}{3 \sqrt{66}}, \frac{3}{3 \sqrt{66}}, \frac{15}{3 \sqrt{66}}, \frac{6}{3 \sqrt{66}}\right) = \left(-\frac{6}{\sqrt{66}}, \frac{1}{\sqrt{66}}, \frac{5}{\sqrt{66}}, \frac{2}{\sqrt{66}}\right)$$
7. **Final answer:** The orthonormal basis is
$$\mathbf{e}_1 = \left(\frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}}, \frac{1}{\sqrt{3}}, 0\right), \quad \mathbf{e}_2 = \left(\frac{2}{3} \sqrt{\frac{3}{11}}, -\frac{4}{3} \sqrt{\frac{3}{11}}, \frac{2}{3} \sqrt{\frac{3}{11}}, \sqrt{\frac{3}{11}}\right), \quad \mathbf{e}_3 = \left(-\frac{6}{\sqrt{66}}, \frac{1}{\sqrt{66}}, \frac{5}{\sqrt{66}}, \frac{2}{\sqrt{66}}\right)$$