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:

  1. for ,
  2. (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

  1. Initialize the first orthogonal vector as:

  2. For :

    • Subtract the projection of onto each of the previous :
      where .
    • Set .
  3. Normalize (if orthonormal basis is desired):

Key Properties

  1. Preserves Span:
    • The set spans the same subspace as .
  2. Orthogonality:
    • The resulting are pairwise orthogonal.
  3. 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

  1. QR factorization:
    • Used to compute the (orthogonal) and (upper triangular) matrices in QR factorization.
  2. Least Squares Problems:
    • Orthogonal basis simplifies solving least squares problems.
  3. Dimensionality Reduction:
    • Constructs orthogonal bases for subspaces in applications like Principal Component Analysis (PCA).
  4. Signal processing:
    • Orthogonal bases are fundamental for Fourier and wavelet transforms.