Linear systems: error, residual and conditioning
Direct versus iterative methods for Ax=b, the difference between error and residual, the residual stopping criterion and why the condition number decides whether it is reliable.
Direct versus iterative
You can solve with direct methods (Cramer, Gauss-Jordan), which reach the solution in finitely many operations, or with iterative methods, which produce better approximations step by step. For large, sparse or ill-conditioned matrices, iterative methods often cost less and let you stop once the desired precision is reached.
Error, residual and stopping
The error compares the approximation with the exact solution x*; the residual measures how much the equation fails. The error is unknown, so we stop by the residual.
The system with and has solution . A tiny perturbation changes the solution drastically.
Subtracting 0.0001 in the second row, the solution becomes:
Explained by the huge condition number:
The stationary iterative scheme
Iterative methods start from a splitting with easy to invert (diagonal, triangular…). is turned into an equivalent fixed point:
H is the iteration matrix. The method is stationary if H is constant throughout. Different choices of M give Jacobi, Gauss-Seidel and SOR.