# Gram-Schmidt Calculator

This calculator will orthonormalize the set of vectors, i.e. find the orthonormal basis, using the Gram-Schmidt process, with steps shown.

$\mathbf{\vec{v_{1}}}$ $\mathbf{\vec{v_{2}}}$ $\mathbf{\vec{v_{3}}}$

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please write it in the comments below.

Orthonormalize the set of the vectors $\mathbf{\vec{v_{1}}} = \left[\begin{array}{c}0\\3\\4\end{array}\right]$, $\mathbf{\vec{v_{2}}} = \left[\begin{array}{c}1\\0\\1\end{array}\right]$, $\mathbf{\vec{v_{3}}} = \left[\begin{array}{c}1\\1\\3\end{array}\right]$ using the Gram-Schmidt process.

## Solution

According to the Gram-Schmidt process, $\mathbf{\vec{u_{k}}} = \mathbf{\vec{v_{k}}} - \sum_{j=1}^{k - 1} \text{proj}_{\mathbf{\vec{u_{j}}}}\left(\mathbf{\vec{v_{k}}}\right)$, where $\text{proj}_{\mathbf{\vec{u_{j}}}}\left(\mathbf{\vec{v_{k}}}\right) = \frac{\mathbf{\vec{u_{j}}}\cdot \mathbf{\vec{v_{k}}}}{\mathbf{\left\lvert\vec{u_{j}}\right\rvert}^{2}} \mathbf{\vec{u_{j}}}$ is a vector projection.

The normalized vector is $\mathbf{\vec{e_{k}}} = \frac{\mathbf{\vec{u_{k}}}}{\mathbf{\left\lvert\vec{u_{k}}\right\rvert}}$.

### Step 1

$\mathbf{\vec{u_{1}}} = \mathbf{\vec{v_{1}}} = \left[\begin{array}{c}0\\3\\4\end{array}\right]$

$\mathbf{\vec{e_{1}}} = \frac{\mathbf{\vec{u_{1}}}}{\mathbf{\left\lvert\vec{u_{1}}\right\rvert}} = \left[\begin{array}{c}0\\\frac{3}{5}\\\frac{4}{5}\end{array}\right]$ (for steps, see unit vector calculator).

### Step 2

$\mathbf{\vec{u_{2}}} = \mathbf{\vec{v_{2}}} - \text{proj}_{\mathbf{\vec{u_{1}}}}\left(\mathbf{\vec{v_{2}}}\right) = \left[\begin{array}{c}1\\- \frac{12}{25}\\\frac{9}{25}\end{array}\right]$ (for steps, see vector projection calculator and vector subtraction calculator).

$\mathbf{\vec{e_{2}}} = \frac{\mathbf{\vec{u_{2}}}}{\mathbf{\left\lvert\vec{u_{2}}\right\rvert}} = \left[\begin{array}{c}\frac{5 \sqrt{34}}{34}\\- \frac{6 \sqrt{34}}{85}\\\frac{9 \sqrt{34}}{170}\end{array}\right]$ (for steps, see unit vector calculator).

### Step 3

$\mathbf{\vec{u_{3}}} = \mathbf{\vec{v_{3}}} - \text{proj}_{\mathbf{\vec{u_{1}}}}\left(\mathbf{\vec{v_{3}}}\right) - \text{proj}_{\mathbf{\vec{u_{2}}}}\left(\mathbf{\vec{v_{3}}}\right) = \left[\begin{array}{c}- \frac{3}{17}\\- \frac{4}{17}\\\frac{3}{17}\end{array}\right]$ (for steps, see vector projection calculator and vector subtraction calculator).

$\mathbf{\vec{e_{3}}} = \frac{\mathbf{\vec{u_{3}}}}{\mathbf{\left\lvert\vec{u_{3}}\right\rvert}} = \left[\begin{array}{c}- \frac{3 \sqrt{34}}{34}\\- \frac{2 \sqrt{34}}{17}\\\frac{3 \sqrt{34}}{34}\end{array}\right]$ (for steps, see unit vector calculator).

The set of the orthonormal vectors is $\left\{\left[\begin{array}{c}0\\\frac{3}{5}\\\frac{4}{5}\end{array}\right], \left[\begin{array}{c}\frac{5 \sqrt{34}}{34}\\- \frac{6 \sqrt{34}}{85}\\\frac{9 \sqrt{34}}{170}\end{array}\right], \left[\begin{array}{c}- \frac{3 \sqrt{34}}{34}\\- \frac{2 \sqrt{34}}{17}\\\frac{3 \sqrt{34}}{34}\end{array}\right]\right\}\approx \left\{\left[\begin{array}{c}0\\0.6\\0.8\end{array}\right], \left[\begin{array}{c}0.857492925712544\\-0.411596604342021\\0.308697453256516\end{array}\right], \left[\begin{array}{c}-0.514495755427527\\-0.685994340570035\\0.514495755427527\end{array}\right]\right\}.$A