The linear-system residual is computable without knowing . The forward error is the actual difference from the desired solution. For an invertible matrix,
Keeping fixed, the approximate vector exactly solves with . Thus, for , is the relative backward error when only the right-hand side may change. For a vector norm and its induced operator norm,
A small relative linear-system residual ensures a small relative forward error when the condition number is moderate; an ill-conditioned matrix can amplify it. The bound follows directly from and .[ref]
For the Jacobi iteration for a three-variable tridiagonal system, the first linear-system residual is , while the first forward error is . In the Euclidean norm, the relative forward error is and the relative linear-system residual is . Its spectral condition number of a positive-definite matrix is , so the bound is about . The bound is a guarantee, not an equality. In floating-point arithmetic, recompute the linear-system residual from the current vector when checking termination; a small update alone need not certify a small forward error.
A nonzero pivot element can still be a poor numerical choice. Partial pivoting bounds the absolute values of the elimination multipliers by one in exact arithmetic, because each numerator is no larger than the selected denominator. This usually improves numerical stability, but does not prevent every possible growth of intermediate entries or guarantee accurate answers for every linear system.[ref]
To see the mechanism without depending on hardware, define a toy floating-point arithmetic model. The operator rounds an exact real number to the nearest value with three significant decimal digits; halfway cases choose the even final digit, and . Allow an unbounded exponent range. Round the inputs and the result of every addition, subtraction, multiplication and division separately; a product followed by a subtraction rounds twice. This is a prescribed arithmetic model, not a measurement of a physical computer. All inputs in the following original example are represented exactly:
Without a row interchange, the elimination multiplier is . The last coefficient and right-hand side become
Two distinct exact values now have the same rounded representation. Back substitution therefore returns
The small difference carrying information about was lost during elimination; the final subtraction only exposes that loss. Dividing by the tiny pivot element amplifies sensitivity to the lost information.
With partial pivoting, interchange the two rows, including their right-hand sides, to start from . Now , and the rounded updates are
Back substitution gives and . Both paths round intermediate values, but only the first creates million-sized entries and then divides a lost difference by .
The true solution follows from the original second equation :
Evaluate the linear-system residual against the original data in exact arithmetic, separately from the three-digit solve. With , the maximum norm, the results are
The respective relative linear-system residuals are and . Computing the diagnostic in higher precision matters: a check made only against the rounded reduced equations would miss the original error.
Figure 1.
The same three-digit floating-point arithmetic model gives without a row interchange and with partial pivoting; exact linear-system residuals expose the difference
. Details.
This matrix is well conditioned in the maximum norm: its induced matrix norm is , while
The failure therefore belongs to this unpivoted algorithm, rather than a large condition number. In general, however, partial pivoting cannot remove sensitivity inherent in the data. For any approximate solution of an invertible matrix system, ; the induced matrix norm inequality and give
A small linear-system residual controls solution error only in conjunction with the condition number; numerical stability and sensitivity are different questions.[ref]