5.11 Gram-Schmidt

Let the input V1,V2,,Vn be a set of n linearly independent vectors. We want to use Grame-Schmidt to obtain set of n orthonormal vectors, called v1,v2,,vn. The notation V1,V2 is used to mean the inner product between any two vectors. The first vector v1 is easy to find777(1)v1=V1V1,V1 The second v2=V2v1v1,V2 Where v2 means v2 but not yet normalized. Before we normalize v2, we need to show that v1,v2=0. But v1,v2=v1,(V2v1v1,V2) Expanding the above givesv1,v2=v1,V2v1,v1v1,V2 But v1,V2 above is just a number. We can take it out of the second inner product term above. The above becomesv1,v2=v1,V2v1,V2v1,v1 But v1,v1=1, since v1 is normalized vector. The above becomesv1,v2=v1,V2v1,V2=0

Now we normalized v2 v2=v2v2,v2 Now we find v3v3=V3(v1v1,V3+v2v2,V3)v3=v3v3,v3

And so on.