Home page for accesible maths 3 Inner products

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

3.E The Gram-Schmidt process

Finding coordinates with respect to a basis ℬ which is orthogonal is quite easy; and if it’s orthonormal, than it’s easier still. The following theorem justifies this statement.

Theorem 3.33.

Let V be an inner product space, basis B=(x1→,⋯,xn→), and v→∈V.

  1. i.

    If ℬ is orthogonal: v→=∑i=1n⟨v→,xi→⟩||xi→||2⁢xi→,

  2. ii.

    if ℬ is orthonormal: v→=∑i=1n⟨v→,xi→⟩⁢xi→.

In other words, the coordinates of v→ with respect to B are ⟨v→,x1→⟩||x1→||2,⋯,⟨v→,xn→⟩||xn→||2.

Proof.

Since ℬ is a basis, we can find scalars αk∈ℝ such that v→=∑k=1nαk⁢xk→. Take the inner product of both sides with xi→. If the basis is orthogonal, then ⟨xk→,xi→⟩=0 for any i≠k; so using bilinearity of the inner product:

⟨v→,xi→⟩=⟨∑k=1nαk⁢xk→,xi→⟩=∑k=1nαk⁢⟨xk→,xi→⟩=αi⁢⟨xi→,xi→⟩.

Solving for αi, and the result follows. ∎

Exercise 3.34:

Let’s illustrate Theorem 3.33 for V=ℝ2. Consider the basis ℬ=(x1→,x2→) where x1→=(1,1) and x2→=(1,-1). This basis is orthogonal since ⟨x1→,x2→⟩=0. Now choose your own vector in ℝ2, and call it v→. For your vector, compute the expression ∑i=1n⟨v→,xi→⟩||xi→||2⁢xi→. According to Theorem 3.33 the result should be equal to v→!

[End of Exercise]

If we are given a basis ℬ=(x1→,⋯,xn→) of an inner product space V, then we may wish to construct a new orthogonal basis 𝒞=(b1→,⋯,bn→) from it. We do this by the Gram-Schmidt process, as follows:

  1. b1→:=x1→,

  2. Then, inductively define: bk→:=xk→-∑i=1k-1⟨xk→,bi→⟩||bi→||2⁢bi→, for each k=2,⋯,n.

The above formula is commonly called the Gram-Schmidt formula.

Exercise 3.35:

For each of the following sequences of vectors x1→,x2→, apply the Gram-Schmidt process, and compute b1→,b2→. In each case, draw the four resulting vectors on the same axis.

  1. i.

    x1→=(1,0) and x2→=(2,2).

  2. ii.

    x1→=(2,2) and x2→=(1,0).

[End of Exercise]

This construction has the following properties:

Theorem 3.36.

Let B=(x1→,⋯,xn→) be a basis of an inner product space, and C=(b1→,⋯,bn→) the sequence of vectors obtained by the Gram-Schmidt process (defined above). Then for each k=1,⋯,n the following are true.

  1. i.

    bk→≠0→,

  2. ii.

    (b1→,⋯,bk→) is an orthogonal sequence of vectors,

  3. iii.

    span⁡{b1→,⋯,bk→}=span⁡{x1→,⋯,xk→}.

Proof.

The proof is by induction on k. When k=1, then b1→=x1→≠0, and the other statements are obvious. Let r>1, then our inductive assumption is that all three statements are true for values of k strictly less than r; i.e. for k<r. With that assumption, we want to prove all three statements for k=r.

If br→=0→, then xr→∈span⁡{b1→,⋯,br-1→}=span⁡{x1→,⋯,xr-1→}, by the Gram-Schmidt formula together with the assumption (iii) for k=r-1. This contradicts the assumption that ℬ is linearly independent. So (i) is true for k=r.

Since we have assumed (ii) for k=r-1, to prove it for k=r we just need to check that ⟨br→,bj→⟩=0 for any j=1,⋯,r-1, which is Exercise 3.38.

Finally, since we have assumed (iii) for k=r-1, we see by the Gram-Schmidt formula that br→ is a linear combination of elements in (x1→,⋯,xr→), and thus span⁡{b1→,⋯,br→}⊂span⁡{x1→,⋯,xr→}. Equality follows because they are both subspaces of the same dimension (by (i), (ii), and Exercise 3.44). So, by induction, the result it true for all k. ∎

Exercise 3.37:

Choose your own basis x1→,x2→,x3→ of ℝ3 which is not orthogonal. Apply the Gram-Schmidt process to it to obtain a new basis b1→,b2→,b3→. Verify that your new basis is orthogonal. Is it orthonormal?

[End of Exercise]

Exercise 3.38:

In the proof of Theorem 3.36, show that ⟨br→,bj→⟩=0.

[End of Exercise]

Corollary 3.39.

Let W⊂Rn be a subspace. There is an orthonormal basis of W. Furthermore, that basis can be extended to an orthonormal basis of Rn.

Proof.

We omit this proof from the module. Here is a sketch proof: Choose a basis of W (by Theorem 2.36), apply the Gram-Schmidt process to obtain an orthogonal basis of W, then scale to make it orthonormal.

Next, extend to a basis to ℝn (Corollary 2.37), apply the Gram-Schmidt process (the first r vectors are unchanged), and scale to get an orthonormal basis of ℝn. ∎