The method is named for Jørgen Pedersen Gram and Erhard Schmidt but it appeared earlier in the work of Laplace and Cauchy. 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).
The Gram–Schmidt process
We define the projection operator by
The Gram–Schmidt process then works as follows:
| mathbf{e}_1 = {mathbf{u}_1 over >mathbf{u}_1 |
The sequence u1, …, uk is the required system of orthogonal vectors, and the normalized vectors e1, …, ek form an orthonormal set.
To check that these formulas yield an orthogonal sequence, first compute 〈u1, u2〉 by substituting the above formula for u2: you will get zero. Then use this to compute 〈u1, u3〉 again by substituting the formula for u3: you will get zero. The general proof proceeds by mathematical induction.
Geometrically, this method proceeds as follows: to compute ui, it projects vi orthogonally onto the subspace U generated by u1, …, ui−1, which is the same as the subspace generated by v1, …, vi−1. The vector ui is then defined to be the difference between vi and this projection, guaranteed to be orthogonal to all of the vectors in the subspace U.
The Gram–Schmidt process also applies to a linearly independent infinite sequence {vi}i. The result is an orthogonal (or orthonormal) sequence {ui}i such that for natural number n: the algebraic span of v1, …, vn is the same as that of u1, …, un.
If the Gram–Schmidt process is applied to a linearly dependent sequence, it outputs the 0 vector on the th step, assuming that is a linear combination of .
Example
Consider the following set of vectors in R2 (with the conventional inner product)Now, perform Gram–Schmidt, to obtain an orthogonal set of vectors:
We check that the vectors u1 and u2 are indeed orthogonal:
We can then normalize the vectors by dividing out their sizes as shown above:
Numerical stability
When this process is implemented on a computer, the vectors are often not quite orthogonal, due to rounding errors. For the Gram–Schmidt process as described above this loss of orthogonality is particularly bad; therefore, it is said that the (naïve) Gram–Schmidt process is numerically unstable.
The Gram–Schmidt process can be stabilized by a small modification. Instead of computing the vector uk as
Algorithm
The following algorithm implements the stabilized Gram–Schmidt process. The vectors v1, …, vk are replaced by orthonormal vectors which span the same subspace.
- for j from 1 to k do
- for i from 1 to j − 1 do
- (remove component in direction vi)
- end for
- (normalize)
- end for
Alternatives
Other orthogonalization algorithms use Householder transformations or Givens rotations. The algorithms using Householder transformations are more stable than the stabilized Gram–Schmidt process. On the other hand, the Gram–Schmidt process produces the th orthogonalized vector after the th 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.
References
- .
- .
External links
- MIT Linear Algebra Lecture on Orthogonal Matrices at Google Video, from MIT OpenCourseWare
- Gram–Schmidt orthogonalization on the Earliest known uses of some of the words of mathematics
This article is licensed under the GNU Free Documentation License.
Last updated on Friday May 16, 2008 at 15:16:05 PDT (GMT -0700)
View this article at Wikipedia.org - Edit this article at Wikipedia.org - Donate to the Wikimedia Foundation
Copyright © 2008, Dictionary.com, LLC. All rights reserved.













