Gram-Schmidt process
In linear algebra,Gram-Schmidt processmethodorthogonalizingsetvectorsan inner product space, most commonlyEuclidean space Rn. Orthogonalizationthis context meansfollowing: we startvectors v1,...,vk whichlinearly independentwe wantfind mutually orthogonal vectors u1,...,uk which generatesame subspace asvectors v1,...,vk.
We denoteinner (dot) product oftwo vectors uv by (u . v). The Gram-Schmidt process works as follows:
- u1 = v1
- u2 = v2 - [(v2 . u1)/(u1 . u1)]u1
- u3 = v3 - [(v3 . u1)/(u1 . u1)]u1 - [(v3 . u2)/(u2 . u2)]u2
- ...
- uk = vk - [(vk . u1)/(u1 . u1)]u1 - [(vk . u2)/(u2 . u2)]u2 - ... - [(vk . uk-1)/(uk-1 . uk-1)]uk-1
Geometrically, this method proceeds as follows:compute ui,projects vi orthogonally ontosubspace U generated by u1,...,ui-1, which issame assubspace generated by v1,...,vi-1. uithen definedbedifference between vithis projection, guaranteedbe orthogonalall ofvectors insubspace U.
If oneinterestedan orthonormal system u1,...,uk (i.e.vectorsmutually orthogonalall have norm 1), then one can divide ui by its norm (ui . ui).
When performing orthogonalization oncomputer,Householder transformationusually preferred overGram-Schmidt process since itmore numerically stable, i.e. rounding errors tendhave less serious effects.
