Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

4.9: Gram-Schmidt Process

( \newcommand{\kernel}{\mathrm{null}\,}\)

Learning Objectives
  • Given a linearly independent set, use the Gram-Schmidt Process to find corresponding orthogonal and orthonormal sets.

The Gram-Schmidt process is an algorithm to transform a set of vectors into an orthonormal set spanning the same subspace, that is generating the same collection of linear combinations.

The goal of the Gram-Schmidt process is to take a linearly independent set of vectors and transform it into an orthonormal set with the same span. The first objective is to construct an orthogonal set of vectors with the same span, since from there an orthonormal set can be obtained by simply dividing each vector by its length.

Algorithm 4.9.1: Gram-Schmidt Process

Let {u1,,un} be a set of linearly independent vectors in Rn.

I: Construct a new set of vectors {v1,,vn} as follows: v1=u1v2=u2(u2v1v12)v1v3=u3(u3v1v12)v1(u3v2v22)v2vn=un(unv1v12)v1(unv2v22)v2(unvn1vn12)vn1

II: Now let wi=vivi for i=1,,n.

Then

  1. {v1,,vn} is an orthogonal set.
  2. {w1,,wn} is an orthonormal set.
  3. span{u1,,un}=span{v1,,vn}=span{w1,,wn}.
Solution

The full proof of this algorithm is beyond this material, however here is an indication of the arguments.

To show that {v1,,vn} is an orthogonal set, let a2=u2v1v12 then: v1v2=v1(u2a2v1)=v1u2a2(v1v1)=v1u2u2v1v12v12=(v1u2)(u2v1)=0 Now that you have shown that {v1,v2} is orthogonal, use the same method as above to show that {v1,v2,v3} is also orthogonal, and so on.

Then in a similar fashion you show that span{u1,,un}=span{v1,,vn}.

Finally defining wi=vivi for i=1,,n does not affect orthogonality and yields vectors of length 1, hence an orthonormal set. You can also observe that it does not affect the span either and the proof would be complete.

Consider the following example.

Example 4.9.1: Find Orthonormal Set with Same Span

Consider the set of vectors {u1,u2} given as in Example 4.9.1. That is u1=[110],u2=[320]R3

Use the Gram-Schmidt algorithm to find an orthonormal set of vectors {w1,w2} having the same span.

Solution

We already remarked that the set of vectors in {u1,u2} is linearly independent, so we can proceed with the Gram-Schmidt algorithm: v1=u1=[110]v2=u2(u2v1v12)v1=[320]52[110]=[12120]

Now to normalize simply let w1=v1v1=[12120]w2=v2v2=[12120]

You can verify that {w1,w2} is an orthonormal set of vectors having the same span as {u1,u2}, namely the XY-plane.

In this example, we began with a linearly independent set and found an orthonormal set of vectors which had the same span. It turns out that if we start with a basis of a subspace and apply the Gram-Schmidt algorithm, the result will be an orthogonal basis of the same subspace. We examine this in the following example.

Example 4.9.2: Find a Corresponding Orthogonal Basis

Let x1=[1010],x2=[1011], and x3=[1100], and let U=span{x1,x2,x3}. Use the Gram-Schmidt Process to construct an orthogonal basis B of U.

Solution

First f1=x1.

Next, f2=[1011]22[1010]=[0001].

Finally, f3=[1100]12[1010]01[0001]=[1/211/20].

Therefore, {[1010],[0001],[1/211/20]} is an orthogonal basis of U. However, it is sometimes more convenient to deal with vectors having integer entries, in which case we take B={[1010],[0001],[1210]}.


4.9: Gram-Schmidt Process is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by LibreTexts.

Support Center

How can we help?