The Gram-Schmidt procedure is a way to explicitly construct (or expand) orthogonal bases for inner product vector spaces.
Here is (in the scope of MAT 224) considered to be a subspace of , but the same construction works for an arbitrary inner product vector space.
Consider any basis of the space . We will start by building a basis of consisting of orthogonal vectors. The orthogonal basis will be obtained inductively: we will start with , then change so that it will be perpendicular to , then change so that it will be perpendicular to and , and so on.
Let . We want to choose such a such that , and . Let us choose . Geometrically is the orthogonal component of projecting on ; in other words, is the projection of on .
Then, indeed,
The vector has to be orthogonal both to and to . Let us choose . The resulting vector will be orthogonal to both and , but this is only true because and are already orthogonal to each other. (We are using here that if and are orthogonal.)
We leave as an exercise to the reader to check that the resulting vectors and stay linearly independent.
The -th step of the Gram-Schmidt process looks as follows:
In terms of inner products,
Explicit calculation shows that, using multilinearity and orthogonality of , the vector is orthogonal to all previous .
Rescaling all vectors to unit vectors by changing them to yields the target orthonormal basis.