Interesting algorithm on finding orthonormal basis. But also on the bottom it said for cetain cases this might not be the best algorithm so I am curious about other algorithms on this question. Thanks!
The implementation shown here is the Classical Gram-Schmidt algorithm. Because Gram-Schmidt orthogonalizes basis vectors one by one (as described in the algorithm on this slide), the algorithm becomes prone to numerical error. For example, this can happen when the inner product between e_1 and e_2 is small, but not zero; computing e_3 will be affected by this numerical error, and this error will accumulate as the number of basis vectors increases. There is a way to modify the algorithm above to mitigate this error, and this is referred to as the Modified Gram-Schmidt algorithm.
Interesting algorithm on finding orthonormal basis. But also on the bottom it said for cetain cases this might not be the best algorithm so I am curious about other algorithms on this question. Thanks!
There are several different algorithms used for orthogonalization, including Gram–Schmidt and Householder QR.
The implementation shown here is the Classical Gram-Schmidt algorithm. Because Gram-Schmidt orthogonalizes basis vectors one by one (as described in the algorithm on this slide), the algorithm becomes prone to numerical error. For example, this can happen when the inner product between
e_1
ande_2
is small, but not zero; computinge_3
will be affected by this numerical error, and this error will accumulate as the number of basis vectors increases. There is a way to modify the algorithm above to mitigate this error, and this is referred to as the Modified Gram-Schmidt algorithm.