- categories: Linear algebra, Algorithm
Definition
The Gram-Schmidt orthogonalization process transforms a set of linearly independent vectors in an inner product space into an orthogonal (or orthonormal) set of vectors such that:
- for ,
- (if normalized).
The orthogonal vectors span the same subspace as the original vectors .
Intuition
Gram-Schmidt removes components of one vector that “overlap” with previously processed vectors, leaving only the orthogonal component. This results in a set of mutually orthogonal basis vectors.
Algorithm
-
Initialize the first orthogonal vector as:
-
For :
- Subtract the projection of onto each of the previous :
where . - Set .
- Subtract the projection of onto each of the previous :
-
Normalize (if orthonormal basis is desired):
Key Properties
- Preserves Span:
- The set spans the same subspace as .
- Orthogonality:
- The resulting are pairwise orthogonal.
- Numerical Stability:
- The classical Gram-Schmidt process can suffer from numerical instability in finite-precision arithmetic. The Modified Gram-Schmidt algorithm addresses this issue by orthogonalizing vectors incrementally.
Applications
- QR factorization:
- Used to compute the (orthogonal) and (upper triangular) matrices in QR factorization.
- Least Squares Problems:
- Orthogonal basis simplifies solving least squares problems.
- Dimensionality Reduction:
- Constructs orthogonal bases for subspaces in applications like Principal Component Analysis (PCA).
- Signal processing:
- Orthogonal bases are fundamental for Fourier and wavelet transforms.