This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# Orthogonalize

 Orthogonalize gives an orthonormal basis found by orthogonalizing the vectors . Orthogonalizegives a basis for the orthonormal with respect to the inner product function f.
• Orthogonalize uses the ordinary scalar product as an inner product.
• The output from Orthogonalize always contains the same number of vectors as the input. If some of the input vectors are not linearly independent, the output will contain zero vectors.
• All nonzero vectors in the output are normalized to unit length.
• The inner product function f is applied to pairs of linear combinations of the .
• The can be any expressions for which f always yields real results.
• Orthogonalize[{v1, v2, ...}, Dot] effectively assumes that all elements of the are real.
• Other bases can be obtained by giving alternative settings for the Method option. Possible settings include: , , , and .
Find an orthonormal basis for two 3D vectors:
Find the coefficients of a general vector with respect to this basis:
Find an orthonormal basis for two 3D vectors:
 Out[1]=
Find the coefficients of a general vector with respect to this basis:
 Out[2]=
 Scope   (2)
Use exact arithmetic to find an orthonormal basis:
Use machine arithmetic:
Use 25-digit precision arithmetic:
Orthogonalize complex vectors:
Find a symbolic basis, assuming all variables are real:
Orthogonalize symbolic expressions with a symbolic scalar product:
 Options   (3)
Below the tolerance, two vectors are not recognized as linearly independent:
forms a set of vectors that are nearly linearly dependent:
Deviation from orthonormality for the default method:
Deviation for all of the methods:
For a large numerical matrix, the Householder method is usually fastest:
 Applications   (1)
Derive normalized Legendre polynomials by orthogonalizing powers of :
Derive normalized Hermite polynomials:
In dimensions, there can be at most elements in the orthonormal basis:
Most sets of random -dimensional vectors are spanned by exactly basis vectors:
With the default method, the first element of the basis is always a multiple of the first vector:
For linearly independent vectors, the result is an orthonormal set:
Verify using matrix multiplication:
For linearly independent vectors, the result is a set orthonormal with the given inner product:
Verify orthonormality:
They are the same up to sign:
New in 6