Developer Reference for Intel® oneAPI Math Kernel Library for C
Error Analysis
In practice, most computations are performed with rounding errors. Besides, you often need to solve a system \(Ax = b\), where the data (the elements of \(A\) and \(b\)) are not known exactly. Therefore, it is important to understand how the data errors and rounding errors can affect the solution \(x\).
Data perturbations.
If \(x\) is the exact solution of \(Ax = b\), and \(x + \delta x\) is the exact solution of a perturbed problem \((A + \delta A)(x + \delta x) = (b + \delta b)\), then this estimate, given up to linear terms of perturbations, holds:
\[\frac{\lVert\delta x \rVert}{\lVert x \rVert} \leq \kappa(A)\left(\frac{\lVert\delta A \rVert}{\lVert A \rVert} + \frac{\lVert\delta b \rVert}{\lVert b \rVert}\right)\]
where \(A + \delta A\) is nonsingular and
\[\kappa(A) = \lVert A \rVert \left\lVert A^{-1} \right\rVert\]
In other words, relative errors in \(A\) or \(b\) may be amplified in the solution vector \(x\) by a factor \(\kappa(A)\) called the condition number of \(A\).
Rounding errors
Rounding errors have the same effect as relative perturbations \(c(n)\epsilon\) in the original data. Here \(\epsilon\) is the machine precision, defined as the smallest positive number \(x\) such that \(1 + x > 1\); and \(c(n)\) is a modest function of the matrix order \(n\). The corresponding solution error is
\[\frac{\lVert\delta x \rVert}{\lVert x \rVert} \leq c(n)\kappa(A)\epsilon\]
The value of \(c(n)\) is seldom greater than \(10n\).
Thus, if your matrix \(A\) is ill-conditioned (that is, its condition number \(\kappa(A)\) is very large), then the error in the solution \(x\) can also be large; you might even encounter a complete loss of precision. LAPACK provides routines that allow you to estimate \(\kappa(A)\) (see Routines for Estimating the Condition Number ) and also give you a more precise estimate for the actual solution error (see Refining the Solution and Estimating Its Error ).