ConceptComplete

Condition Numbers and Error Analysis for Linear Systems

The sensitivity of Ax=bAx = b to perturbations in AA and bb is governed by the condition number of AA. Understanding conditioning is crucial for assessing the reliability of computed solutions and designing stable algorithms.


Condition Number

Definition5.7Matrix Condition Number

The condition number of a nonsingular matrix AA with respect to a matrix norm \|\cdot\| is κ(A)=AA1\kappa(A) = \|A\| \cdot \|A^{-1}\|. For the 2-norm, κ2(A)=σmax(A)/σmin(A)\kappa_2(A) = \sigma_{\max}(A) / \sigma_{\min}(A) where σmax\sigma_{\max} and σmin\sigma_{\min} are the largest and smallest singular values. A matrix is well-conditioned if κ(A)\kappa(A) is small (close to 1) and ill-conditioned if κ(A)\kappa(A) is large. In floating-point arithmetic with machine epsilon εmach\varepsilon_{\text{mach}}, roughly log10(κ(A))\log_{10}(\kappa(A)) digits of accuracy are lost in solving Ax=bAx = b.

ExampleThe Hilbert Matrix

The n×nn \times n Hilbert matrix HnH_n with entries hij=1/(i+j1)h_{ij} = 1/(i + j - 1) is notoriously ill-conditioned. For n=5n = 5: κ2(H5)4.8×105\kappa_2(H_5) \approx 4.8 \times 10^5. For n=10n = 10: κ2(H10)1.6×1013\kappa_2(H_{10}) \approx 1.6 \times 10^{13}. For n=15n = 15: κ2(H15)1018\kappa_2(H_{15}) \approx 10^{18}, exceeding 1/εmach1/\varepsilon_{\text{mach}} in double precision. The condition number grows exponentially: κ2(Hn)e3.5n\kappa_2(H_n) \sim e^{3.5n}.


Perturbation Theory

Definition5.8Perturbation Bounds

If Ax=bAx = b and (A+δA)(x+δx)=b+δb(A + \delta A)(x + \delta x) = b + \delta b, then δxxκ(A)(δAA+δbb)+O(δA2)\frac{\|\delta x\|}{\|x\|} \leq \kappa(A) \left(\frac{\|\delta A\|}{\|A\|} + \frac{\|\delta b\|}{\|b\|}\right) + O(\|\delta A\|^2). For perturbations in bb only: δxxκ(A)δbb\frac{\|\delta x\|}{\|x\|} \leq \kappa(A) \frac{\|\delta b\|}{\|b\|}. These bounds are sharp: there exist perturbations achieving equality (up to higher-order terms).

RemarkComponentwise Condition Numbers

The normwise condition number κ(A)\kappa(A) may overestimate the actual sensitivity. The componentwise condition number considers element-wise perturbations: cond(A,x)=A1Axx\mathrm{cond}(A, x) = \frac{\||A^{-1}| |A| |x|\|_\infty}{\|x\|_\infty} (where |\cdot| denotes entrywise absolute value). This is relevant for sparse or structured systems where perturbations respect the sparsity pattern. Skeel's condition number κS(A)=A1A\kappa_S(A) = \||A^{-1}||A|\|_\infty provides a normwise upper bound.


Backward Error Analysis

Definition5.9Backward Error of a Computed Solution

The backward error of a computed solution x^\hat{x} to Ax=bAx = b is η(x^)=min{ϵ:(A+δA)x^=b+δb,δAϵA,δbϵb}\eta(\hat{x}) = \min\{\epsilon : (A + \delta A)\hat{x} = b + \delta b, \|\delta A\| \leq \epsilon\|A\|, \|\delta b\| \leq \epsilon\|b\|\}. Rigal-Gaches formula: η(x^)=rAx^+b\eta(\hat{x}) = \frac{\|r\|}{\|A\|\|\hat{x}\| + \|b\|} where r=bAx^r = b - A\hat{x} is the residual. A small backward error means x^\hat{x} is the exact solution of a nearby problem. Combined with the condition number: xx^xκ(A)η(x^)\frac{\|x - \hat{x}\|}{\|x\|} \lesssim \kappa(A) \cdot \eta(\hat{x}).

ExampleSmall Residual Does Not Imply Small Error

For the system (1111.0001)(x1x2)=(22.0001)\begin{pmatrix} 1 & 1 \\ 1 & 1.0001 \end{pmatrix}\begin{pmatrix}x_1\\x_2\end{pmatrix} = \begin{pmatrix}2\\2.0001\end{pmatrix}, the exact solution is (1,1)T(1, 1)^T. The approximate solution x^=(2,0)T\hat{x} = (2, 0)^T gives residual r=(0,0.0001)Tr = (0, -0.0001)^T with r=104\|r\|_\infty = 10^{-4}, but xx^=1\|x - \hat{x}\|_\infty = 1, a 100% relative error. The condition number κ4×104\kappa_\infty \approx 4 \times 10^4 explains this amplification.