Description

nag_orthog_real_gram_schmidt (f05aa) applies the Schmidt orthogonalization process to nn linearly independent vectors in mm-dimensional space, n ≤ mn≤m. The effect of this process is to replace the original nn vectors by nn orthonormal vectors which have the property that the rrth vector is linearly dependent on the first rr of the original vectors, and that the sum of squares of the elements of the rrth vector is equal to 11, for r = 1,2, … ,nr=1,2,…,n. Inner-products are accumulated using additional precision.

Error Indicators and Warnings

Accuracy

Innerproducts are accumulated using additional precision arithmetic and full machine accuracy should be obtained except when cc > 0.99999cc>0.99999. (See Section [Further Comments].)

Further Comments

The time taken by nag_orthog_real_gram_schmidt (f05aa) is approximately proportional to nm2nm2, where n = n2 − n1 + 1n=n2-n1+1.

Parameters cc and icol have been included to give some indication of whether or not the vectors are nearly linearly independent, and their values should always be tested on exit from the function. cc will be in the range [0.0,1.0][0.0,1.0] and the closer cc is to 1.01.0, the more likely the vector icol is to be linearly dependent on vectors n1 to icol − 1icol-1. Theoretically, when the vectors are linearly dependent, cc should be exactly 1.01.0. In practice, because of rounding errors, it may be difficult to decide whether or not a value of cc close to 1.01.0 indicates linear dependence. As a general guide a value of cc > 0.99999cc>0.99999 usually indicates linear dependence, but examples exist which give cc > 0.99999cc>0.99999 for linearly independent vectors. If one of the original vectors is zero or if, possibly due to rounding errors, an exactly zero vector is produced by the Gram–Schmidt process, then cc is set exactly to 1.01.0 and the vector is not, of course, normalized. If more than one such vector occurs then icol references the last of these vectors.

If you are concerned about testing for near linear dependence in a set of vectors you may wish to consider using function nag_lapack_dgesvd (f08kb).