Residuals, conditioning and forward error
Suppose a reconstructed vector solves its equations to twelve decimal places. How many places in the vector are correct? A two-dimensional example can lose all of them along one direction. The needed extra information is how strongly the forward map stretches that direction. For an invertible linear system the inverse norm gives an exact error bound. For nonlinear spectral equations, the corresponding derivative supplies only local information.
Turn the residual into a forward bound
Section titled “Turn the residual into a forward bound”Let be invertible, , , and let be an approximation. In the Euclidean norm define the residual . Then . Since ,
Each residual component has the units of its corresponding datum. Dividing the residual norm by gives the relative backward error when only may change, since the candidate exactly solves . If errors in both and are allowed at the same relative scale, the normwise backward measure instead has denominator . The perturbation model specifies what “nearby equations” means. The LAPACK Users’ Guide describes this distinction and the role of conditioning in its error analysis. LAPACK, chapter 4, “Standard Error Analysis”
An example where the bound is attained
Section titled “An example where the bound is attained”Let and be the normalized column vectors in the directions and respectively, and choose
The exact solution is . Deliberately return , so the entire error is in the weak direction. The columns of are orthonormal. One multiplication gives , hence
| Relative residual | Relative forward error | ||
|---|---|---|---|
This is an exact-arithmetic construction. No roundoff or faulty solver is necessary. A zero singular value at makes every an exact solution. A numerical residual cannot identify which member of this set supplied the data.
The physically relevant quantity may be better conditioned. For a real linear observable , solve . Then . For complex data use conjugate transposes in both definitions. In the example the error in vanishes, while the error in has magnitude one. Specify the requested observable when reporting an accuracy target.
Keep the same residual vector in two experiments. With the solution error has magnitude . With in the table its magnitude is one. Both matrices have norm one. The difference is entirely in their inverse action on this particular residual.
Would a change of units reverse the verdict?
Section titled “Would a change of units reverse the verdict?”Suppose two independent measurements require and , but the reported vector is . Multiply the second equation on both sides by a positive scale . Then
With , the right-hand-side relative residual in the infinity norm is . Expressing the second reading in units a billion times larger makes that number a billion times smaller. The error in the inferred remains one.
If the data instead allow a relative perturbation of each stored entry, the relevant backward error is
Here the absolute values inside the denominator are entrywise. A zero entry of the original matrix must stay zero in this model. Multiplying one row and its datum by the same nonzero factor multiplies its numerator and denominator by the same magnitude, so this test is invariant under the change of units. The second row gives . Indeed, with , any permitted change to its diagonal coefficient still leaves a zero left side. Its datum must change by 100 percent. This is the componentwise quantity underlying LAPACK’s reported backward error. LAPACK Users’ Guide, chapter 4, “Further Details: Error Bounds for Linear Equation Solving”
Which residual could an uncertain coupling explain?
Section titled “Which residual could an uncertain coupling explain?”Sometimes several matrix entries come from a single physical coupling. Return to above and suppose the data are fixed while only can change. For ,
Take and consider two possible data sets, each giving a residual of Euclidean length . If , the shift explains the entire discrepancy. If , no shift in fits the data. Taking the scalar product with certifies this immediately. For any residual of this length the best coupling correction in least squares is , and the unexplained residual has length . This last quantity tests whether a fitted coupling can account for the observed discrepancy within the assumed data uncertainty.
Can computing the residual lose the residual itself?
Section titled “Can computing the residual lose the residual itself?”Even a well-conditioned scalar equation can produce a misleading final digit. Take , , and . These three inputs are exactly representable in binary64. Their exact product is , halfway between one and the adjacent smaller binary64 value. A separately rounded multiplication rounds to one under nearest-even rounding. The subsequent subtraction returns zero. Re-evaluating the same stored inputs as exact fractions gives the true residual and relative solution error, both .
from fractions import Fraction
a = 2.0 ** -27coefficient, estimate = 1.0 + a, 1.0 - arounded_product = coefficient * estimateprint(1.0 - rounded_product) # 0.0 in binary64
A = Fraction.from_float(coefficient)x_hat = Fraction.from_float(estimate)residual = 1 - A * x_hatx = 1 / Aassert residual == abs(x_hat - x) / x == Fraction(1, 2**54)The scalar condition number is one. This example isolates the precision of the residual evaluation itself. Computing it at higher precision can recover a discrepancy in stored data. It cannot recover precision already lost when those data were measured or rounded.
From a regular root to a singular spectral problem
Section titled “From a regular root to a singular spectral problem”For a continuously differentiable on a neighborhood of the segment joining the candidate to a root , write
If the average Jacobian is invertible, its inverse maps the residual to the error. A well-conditioned Jacobian at the reported point suggests a Newton correction, but a certification also needs control of its variation on a neighborhood and identification of the solution branch. For with , the reported has residual , sits from each true root, and has zero derivative. Perturbing through zero changes the character of the roots. In infinitely many dimensions the singular values of a compact forward operator can approach zero even when it is injective; a cutoff or a prior then changes the inverse problem.
Suppose independent information locates the positive root between and in units of . The signs of at the two ends are opposite and is positive throughout. There is exactly one root in the interval. At the candidate the residual magnitude is . Throughout the interval the derivative is at least . The mean-value theorem bounds the distance to that identified root by , rounded upward. The exact distance is . Evaluating the derivative only at the candidate gives a Newton correction slightly smaller than the true error.
For a finite Bethe calculation inspect the scaled Jacobian of the chosen logarithmic equations, test the state against the independently constructed Hamiltonian, and name the quantum numbers or symmetry sector selecting the branch. A coordinate singularity in root space may coexist with a perfectly regular physical eigenvector. The four-site example gives an explicit state check. Singular XXX Bethe roots
The finite-ring continuation example tests two distinct mechanisms: a four-site singular pair whose physical vector depends on its regularizing path, and a twisted one-magnon root for which the rapidity Jacobian is small. In the latter calculation one can double precision at a fixed starting branch, then vary the seed at fixed precision, and compare both runs with an elementary trigonometric solution.
References
Section titled “References”- E. Anderson et al., LAPACK Users’ Guide, 3rd ed., SIAM, 1999, chapter 4, especially “How to Measure Errors” and “Standard Error Analysis.” LAPACK guide
Connected readings