↑ arvau

Wikipedia / Gram–Schmidt process

In mathematics, particularly linear algebra and numerical analysis, the Gram–Schmidt process or Gram-Schmidt algorithm is a way of finding a set of two or more vectors that are perpendicular to each other.

By technical definition, it is a method of constructing an orthonormal basis from a set of vectors in an inner product space, most commonly the Euclidean space equipped with the standard inner product. The Gram–Schmidt process takes a finite, linearly independent for and generates an orthogonal set.

The method is named after Jørgen Pedersen Gram and Erhard Schmidt, but Pierre-Simon Laplace had been familiar with it before Gram and Schmidt. In the theory of Lie group decompositions, it is generalized by the Iwasawa decomposition.

The application of the Gram–Schmidt process to the column vectors of a full column rank matrix yields the QR decomposition (it is decomposed into an orthogonal and a triangular matrix).

Description

The vector projection is defined as denotes the dot product is the orthogonal projection is defined as the zero vector.

form an orthonormal set is known as Gram–Schmidt orthogonalization is known as Gram–Schmidt orthonormalization.

the proof is accomplished by mathematical induction.

.

The Gram–Schmidt process also applies to a linearly independent countably infinite sequence . The result is an orthogonal (or orthonormal) sequence such that for natural number .

If the Gram–Schmidt process is applied to a linearly dependent sequence, it outputs the . If an orthonormal basis is to be produced, then the algorithm should test for zero vectors in the output and discard them because no multiple of a zero vector can have a length of 1. The number of vectors output by the algorithm will then be the dimension of the space spanned by the original inputs.

A variant of the Gram–Schmidt process using transfinite recursion, the completion is the same as that of In particular, when applied to a (algebraic) basis of a Hilbert space (rather, it's a subspace of its completion).

Example

Euclidean space

(with the conventional inner product

noting that if the dot product of two vectors is 0 then they are orthogonal.

Properties

.

It has the following properties:

  • It is continuous

  • It is orientation.

  • It commutes with orthogonal maps:

Further, a parametrized version of the Gram–Schmidt process yields a (strong) deformation retraction.

Numerical stability

are often not quite orthogonal, due to rounding errors. For the Gram–Schmidt process as described above (sometimes referred to as "classical Gram–Schmidt") this loss of orthogonality is particularly bad; therefore, it is said that the (classical) Gram–Schmidt process is numerically unstable.

The Gram–Schmidt process can be stabilized by a small modification; this version is sometimes referred to as modified Gram-Schmidt or MGS. This approach gives the same result as the original formula in exact arithmetic and introduces smaller errors in finite-precision arithmetic.

Instead of computing the vector

.

. If orthonormal vectors are desired, then we normalize as we go, so that the denominators in the subtraction formulas turn into ones.

Algorithm

The following MATLAB algorithm implements classical Gram–Schmidt orthonormalization. The vectors (columns of matrix V, so that V(:,j)th vector) are replaced by orthonormal vectors (columns of U) which span the same subspace.

The cost of this algorithm is asymptotically floating point operations, where is the dimensionality of the vectors.

Via Gaussian elimination

If the rows , then applying Gaussian elimination must be brought to row echelon form, using only the row operation of adding a scalar multiple of one row to another.

And reducing this to row echelon form

as in the example above.

Determinant formula

The result of the Gram–Schmidt process may be expressed in a non-recursive formula using determinants.

is the Gram determinant

is a "formal" determinant, i.e. the matrix contains both scalars and vectors; the meaning of this expression is defined to be the result of a cofactor expansion along the row of vectors.

The determinant formula for the Gram-Schmidt is computationally (exponentially) slower than the recursive algorithms described above; it is mainly of theoretical interest.

Expressed using geometric algebra

Expressed using notation used in geometric algebra operator defined above. The results can equivalently be expressed as which is closely related to the expression using determinants above.

Alternatives

Other orthogonalization algorithms use Householder transformations or Givens rotationsth iteration, while orthogonalization using Householder reflections produces all the vectors only at the end. This makes only the Gram–Schmidt process applicable for iterative methods like the Arnoldi iteration.

Yet another alternative is motivated by the use of Cholesky decomposition for inverting the matrix of the normal equations in linear least squares be a full column rank is Hermitian and positive definite using the Cholesky decomposition with strictly positive diagonal entries is invertible are orthonormal and span makes the algorithm unstable, especially if the product's condition number is large. Nevertheless, this algorithm is used in practice and implemented in some software packages because of its high efficiency and simplicity.

In quantum mechanics there are several orthogonalization schemes with characteristics better suited for certain applications than original Gram–Schmidt. Nevertheless, it remains a popular and effective algorithm for even the largest electronic structure calculations.

Run-time complexity

Gram-Schmidt orthogonalization can be done in strongly-polynomial time. The run-time analysis is similar to that of Gaussian elimination.

See also

References

Notes

Sources

  • .

  • .

  • .

  • .