now \( \{ \vec{v}_1, \vec{v}_2 \} = \left\{ \begin{bmatrix} 1 \\ 2 \end{bmatrix}, \begin{bmatrix} 4/5 \\ -2/5 \end{bmatrix} \right\} \) is orthogonal
Example
\[ \left\{ \vec{x}_1 = \begin{bmatrix} 2 \\ 1 \\ -1 \end{bmatrix}, \vec{x}_2 = \begin{bmatrix} -2 \\ -1 \\ 0 \end{bmatrix}, \vec{x}_3 = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} \right\} \text{ not mutually orthogonal} \]
\[ \vec{v}_1 = \vec{x}_1 = \begin{bmatrix} 2 \\ 1 \\ -1 \end{bmatrix} \]
\[ \vec{v}_2 = \vec{x}_2 - \frac{\vec{x}_2 \cdot \vec{v}_1}{\vec{v}_1 \cdot \vec{v}_1} \vec{v}_1 = \begin{bmatrix} -2 \\ -1 \\ 0 \end{bmatrix} - \frac{-5}{6} \begin{bmatrix} 2 \\ 1 \\ -1 \end{bmatrix} = \begin{bmatrix} -1 \\ -1/2 \\ -5/6 \end{bmatrix} \]
Note: Component of \( \vec{x}_2 \) along \( \vec{v}_1 \). To make fractions disappear for convenience, we can scale the vector.
\[ \vec{v}_2 = \begin{bmatrix} -2 \\ 3 \\ -1 \end{bmatrix} \]
\[ \vec{v}_3 = \vec{x}_3 - \frac{\vec{x}_3 \cdot \vec{v}_1}{\vec{v}_1 \cdot \vec{v}_1} \vec{v}_1 - \frac{\vec{x}_3 \cdot \vec{v}_2}{\vec{v}_2 \cdot \vec{v}_2} \vec{v}_2 \]
- First subtraction gets rid of component of \( \vec{x}_3 \parallel \vec{v}_1 \)
- Second subtraction gets rid of component of \( \vec{x}_3 \parallel \vec{v}_2 \)