We discuss the necessary changes to our QR decomposition algorithms to handle matrices which do not have full rank.
We developed a QR decomposition algorithm, based on the orthogonalisation process of Gram-Schmidt in a series of posts here, here, here, and here. Let’s have a look how good this algorithm performs against built-in implementations from julia and other programming languages.
Problem Formulation We already discussed QR decompositions and showed that using the modified formulation of Gram Schmidt significantly improves the accuracy of the results. However, there is still an error of about $10^3 M_\varepsilon$ (where $M_\varepsilon$ is the machine epsilon) when using the modified Gram Schmidt as base algorithm for the orthogonalisation.
We consider the necessary changes to the Gram-Schmidt orthogonalisation to obtain a QR Decomposition
We compare the accuracy of the classical Gram-Schmidt algorithm to the modified Gram-Schmidt algorithm.
Floating point computations on computers may behave differently than one might expect. Every software developer should be aware of these since computed results may be off by orders of magnitude in the worst case.