- categories: Linear algebra, Algorithm
Modified Gram-Schmidt Algorithm
Definition
The Modified Gram-Schmidt (MGS) algorithm is a numerically stable variant of the Gram-Schmidt Orthogonalization used to compute an orthonormal basis for a set of vectors. It iteratively orthogonalizes each vector against previously orthogonalized vectors, reducing the numerical errors common in the classical Gram-Schmidt process.
Problem Setup
Given a set of linearly independent vectors in , the goal is to compute an orthonormal set such that:
Modified Gram-Schmidt Algorithm
Input:
- A matrix with columns .
- Linearly independent vectors in .
Output:
- Orthonormal matrix with columns .
- Upper triangular matrix such that .
Steps:
-
Initialize: Set and .
-
For each column :
- Compute : For :
- Orthogonalize :
- Normalize to get :
-
Return and .
Comparison with Classical Gram-Schmidt
-
Numerical Stability:
- The MGS algorithm reduces loss of orthogonality that arises due to floating-point round-off errors in the classical Gram-Schmidt process.
-
Re-orthogonalization:
- MGS orthogonalizes one vector against all previous orthonormal vectors in a structured way, minimizing accumulated numerical errors.
-
Efficiency:
- MGS and classical Gram-Schmidt have the same computational complexity, , but MGS is more reliable for numerical computations.