Gram-Schmidt Orthogonalization
In Orthogonality and Projections we said that a set of nonzero vectors in is called an orthogonal set if for all . In this section we will prove that every orthogonal set is linearly independent, and therefore it is a basis for its span. We have already seen that the expansion of a vector as a linear combination of orthogonal basis vectors is easy to obtain because formulas exist for the coefficients. Hence the orthogonal bases are the “nice” bases. Our next task is to show that every subspace of has an orthogonal basis. We will start with intuitive explorations in lower dimensions, then proceed to formalize our results for subspaces of .
A Visual Guide to Creating an Orthogonal Basis
Given an arbitrary basis of , let’s start building our orthogonal basis, , by setting . To find the next element of our orthogonal basis, consider the orthogonal projection of onto . (See the figure below.)
Next, let . Observe that is orthogonal to (See Theorem th:orthDecompX of Orthogonality and Projections). This gives us an orthogonal collection . It is intuitively clear that and are linearly independent. Therefore is an orthogonal basis of .
The following exploration illustrates this process dynamically.
We can apply this process to any two-dimensional subset of . The following exploration will guide you through the process of constructing an orthogonal basis for a plane spanned by two arbitrary vectors in .
In the next exploration, we take the process of constructing an orthogonal basis to the edge of the visual realm and construct an orthogonal basis for .
Gram-Schmidt Orthogonalization Algorithm
In Orthogonality and Projections we have repeatedly assumed that our subspaces of have an orthogonal basis. We will now prove that this is indeed the case. Recall that to be a basis of a subspace, a set of vectors must be linearly independent and it must span the subspace. We will start by demonstrating that a set of orthogonal vectors must be linearly independent.
- Proof
- To show that this set is linearly independent, we need to demonstrate
that the only solution to the following equation is the trivial solution. To
accomplish this, we need to show that all for all . To do so we take the dot
product of each side of the above equation with the vector and obtain the
following.
We know that , so it follows that . Since was chosen arbitrarily, for all . This proves that is linearly independent.
The following theorem shows how to start with an arbitrary basis of a subspace of and find an orthogonal basis for . To better understand the notation and the process presented in this theorem, you may want to match the steps of the theorem to the steps of Exploration exp:orth3.
Then we can construct an orthogonal basis for for each by adding one vector at a time successively as follows:
Then, will be an orthogonal basis for .
- Proof
- Using the definition of projection onto a subspace, the iterative procedure
above may be written:
We see immediately that and that because is a linear combination of and . In fact,
for any value of , we see that , because each is a linear combination of the vectors
.
Repeated application of Corollary cor:orthProjOntoW shows that the set is orthogonal. Linear independence follows from orthogonality by Theorem orthbasis.
We conclude that is a linearly independent orthogonal set that spans .
The Gram-Schmidt algorithm demonstrates in a constructive way that every subspace of has an orthogonal basis. We formalize this in one final theorem.
- Proof
- Suppose is an orthogonal subset of . If , it is already a basis. Otherwise, there exists in outside . Using the Gram-Schmidt procedure we define , where . If , we are done. Otherwise, the process continues to create larger and larger orthogonal subsets of . They are all linearly independent by Theorem th:GS, so we have a basis when we reach a subset containing vectors.
The process described in the proof of this theorem is used in this final example.
Choose any vector not in , and apply the Gram-Schmidt algorithm to produce a vector such that is an orthogonal basis for .
Practice Problems
In each case, use the Gram-Schmidt algorithm to convert the given basis of to an orthogonal basis.
Text Source
This section was adapted from the first part of Section 8.1 of Keith Nicholson’s Linear Algebra with Applications. (CC-BY-NC-SA)
W. Keith Nicholson, Linear Algebra with Applications, Lyryx 2018, Open Edition, p. 415