The need for the Gram–Schmidt process

Orthonormal bases are nice because several formulas are much simpler when vectors are given wrt an ON basis.

Example: Let $\mathcal E = \{e_1, \dots, e_n\}$ be an ON basis. Then the Fourier expansion of any vector $v\in\operatorname{span}(\mathcal E)$ is just $$v = (v\cdot e_1)e_1 + (v\cdot e_2)e_2 + \cdots + (v\cdot e_n)e_n$$

Notice that there are no normalization factors and we don't need to construct a dual basis -- it's just a really simple formula.

In your example, of course $\{(1,0),(0,1)\}$ spans the same space as $\{(3,2),(2,2)\}$. But let me provide an example of my own: what about $\{(1.1,1.2,0.9,2.1,4),(3,-2,6,14,2),(6,6,6,3.4,11.1)\}$? There's certainly no subset of the standard basis vectors that spans the same space as these linearly independent vectors. But this is a pretty poor choice of basis because they're not orthonormal. It'd sure be nice if we had some algorithm that could produce as ON basis from them...


If the entire vector space we wanted a basis for all of $\mathbb{R}^n$ or a basis for, say, the $xy$-plane in $\mathbb{R}^3$, then we could certainly do this. The problem arises when we're looking for an orthonormal basis for subspaces that are more complicated.

For example, let take our subspace to be the plane $x+y+z=0$ inside of $\mathbb{R}^3$. This subspace can be written as

$$\mathrm{span} \left\{ \begin{bmatrix} 1 \\ -1 \\ 0 \end{bmatrix} , \begin{bmatrix} 1 \\ 0 \\ -1 \end{bmatrix} \right\}$$

Running Gram-Schmidt on this gives the basis

$$\left\{ \begin{bmatrix} \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \\ 0 \end{bmatrix} ~,~ \begin{bmatrix} \frac{1}{\sqrt{6}} \\\frac{1}{\sqrt{6}}\\ -\sqrt{\frac{2}{3}} \end{bmatrix} \right\}$$ which generates the same subspace of $\mathbb{R}^3$. However, if we just tried to take the basis $\left\{ \vec{e}_1 = [1~ 0~ 0]^T, ~ \vec{e}_2 = [ 0 ~ 1 ~ 0]^T \right\}$, we would certainly have an ortho-normal basis, but of a different subspace.

TL;DR: Gram-Schmidt is designed to turn a basis into an ortho-normal basis without altering the subspace that it spans.

Edit Gram-Schmidt is also important in that it preserves the orientation of given basis (roughly speaking, the order in which the basis elements are introduced). Somewhat higher level and beyond the scope of an introductory course to linear algebra, but worth tucking away for later.


You can also get into function spaces where it's not clear what the basis you can just grab from is. The Legendre polynomials can be constructed by starting with the functions $1$ and $x$ on the interval $x \in [-1,1]$, and using Gram-Schmidt orthogonalization to construct the higher order ones. The second order polynomial is constructed by removing the component of $x^2$ that points in the direction of $1$, for example.