Skip to content

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.

Let AA be invertible, Ax=bAx=b, b≠0b\ne0, and let x^\widehat x be an approximation. In the Euclidean norm define the residual r=b−Ax^r=b-A\widehat x. Then x−x^=A−1rx-\widehat x=A^{-1}r. Since ∥b∥2≤∥A∥2∥x∥2\|b\|_2\leq\|A\|_2\|x\|_2,

∥x−x^∥2∥x∥2≤κ2(A)∥r∥2∥b∥2,κ2(A)=σmax⁡(A)σmin⁡(A).\begin{aligned} \frac{\|x-\widehat x\|_2}{\|x\|_2} &\leq \kappa_2(A)\frac{\|r\|_2}{\|b\|_2},\\ \kappa_2(A)&=\frac{\sigma_{\max}(A)}{\sigma_{\min}(A)} . \end{aligned}

Each residual component has the units of its corresponding datum. Dividing the residual norm by ∥b∥\|b\| gives the relative backward error when only bb may change, since the candidate exactly solves Ax^=b−rA\widehat x=b-r. If errors in both AA and bb are allowed at the same relative scale, the normwise backward measure instead has denominator ∥A∥∥x^∥+∥b∥\|A\|\|\widehat x\|+\|b\|. 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”

Let uu and vv be the normalized column vectors in the directions (1,1)(1,1) and (1,−1)(1,-1) respectively, and choose

Aδ=uuT+δvvT,b=u,0<δ≤1.A_\delta=uu^\mathsf T+\delta vv^\mathsf T,\qquad b=u,\qquad 0\lt\delta\leq1 .

The exact solution is x=ux=u. Deliberately return x^=u+v\widehat x=u+v, so the entire error is in the weak direction. The columns of (u,v)(u,v) are orthonormal. One multiplication gives r=−δvr=-\delta v, hence

δ\deltaRelative residualκ2\kappa_2Relative forward error
11111111
10−410^{-4}10−410^{-4}10410^411
10−1010^{-10}10−1010^{-10}101010^{10}11

This is an exact-arithmetic construction. No roundoff or faulty solver is necessary. A zero singular value at δ=0\delta=0 makes every u+tvu+t v 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 J(x)=wTxJ(x)=w^\mathsf T x, solve ATz=wA^\mathsf T z=w. Then J(x)−J(x^)=zTrJ(x)-J(\widehat x)=z^\mathsf T r. For complex data use conjugate transposes in both definitions. In the example the error in Ju=uTxJ_u=u^\mathsf T x vanishes, while the error in Jv=vTxJ_v=v^\mathsf T x has magnitude one. Specify the requested observable when reporting an accuracy target.

Keep the same residual vector r=−10−10vr=-10^{-10}v in two experiments. With A=IA=I the solution error has magnitude 10−1010^{-10}. With δ=10−10\delta=10^{-10} 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 x1=1x_1=1 and x2=1x_2=1, but the reported vector is (1,0)(1,0). Multiply the second equation on both sides by a positive scale ϵ\epsilon. Then

A=diag⁡(1,ϵ),b=(1,ϵ)T.A=\operatorname{diag}(1,\epsilon),\qquad b=(1,\epsilon)^\mathsf T .

With 0<ϵ≤10\lt\epsilon\leq1, the right-hand-side relative residual in the infinity norm is ϵ\epsilon. Expressing the second reading in units a billion times larger makes that number a billion times smaller. The error in the inferred x2x_2 remains one.

If the data instead allow a relative perturbation of each stored entry, the relevant backward error is

ηc=max⁡i∣ri∣(∣A∣ ∣x^∣+∣b∣)i.\eta_{\rm c}=\max_i \frac{|r_i|}{\bigl(|A|\,|\widehat x|+|b|\bigr)_i}.

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 ϵ/ϵ=1\epsilon/\epsilon=1. Indeed, with x^2=0\widehat x_2=0, 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 AδA_\delta above and suppose the data are fixed while only δ\delta can change. For x^=u+v\widehat x=u+v,

(Aδ+Δδ−Aδ)x^=(Δδ)v.(A_{\delta+\Delta\delta}-A_\delta)\widehat x =(\Delta\delta) v.

Take 0<δ<10\lt\delta\lt1 and consider two possible data sets, each giving a residual of Euclidean length ϵ<min⁡(δ,1−δ)\epsilon\lt\min(\delta,1-\delta). If b=Aδx^+ϵvb=A_\delta\widehat x+\epsilon v, the shift Δδ=ϵ\Delta\delta=\epsilon explains the entire discrepancy. If b=Aδx^+ϵub=A_\delta\widehat x+\epsilon u, no shift in δ\delta fits the data. Taking the scalar product with uu certifies this immediately. For any residual of this length the best coupling correction in least squares is Δδ=vTr\Delta\delta=v^\mathsf T r, and the unexplained residual has length ∣uTr∣|u^\mathsf T r|. 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 a=2−27a=2^{-27}, A=1+aA=1+a, b=1b=1 and x^=1−a\widehat x=1-a. These three inputs are exactly representable in binary64. Their exact product Ax^A\widehat x is 1−2−541-2^{-54}, 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 2−542^{-54}.

from fractions import Fraction
a = 2.0 ** -27
coefficient, estimate = 1.0 + a, 1.0 - a
rounded_product = coefficient * estimate
print(1.0 - rounded_product) # 0.0 in binary64
A = Fraction.from_float(coefficient)
x_hat = Fraction.from_float(estimate)
residual = 1 - A * x_hat
x = 1 / A
assert 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 FF on a neighborhood of the segment joining the candidate to a root x∗x_*, write

F(x^)=[∫01DF(x∗+t(x^−x∗)) dt](x^−x∗).F(\widehat x)= \left[\int_0^1 DF(x_*+t(\widehat x-x_*))\,dt\right](\widehat x-x_*).

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 F(z)=z2−aF(z)=z^2-a with a=10−12a=10^{-12}, the reported z=0z=0 has residual 10−1210^{-12}, sits 10−610^{-6} from each true root, and has zero derivative. Perturbing aa 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 0.990.99 and 1.021.02 in units of 10−610^{-6}. The signs of FF at the two ends are opposite and F′F' is positive throughout. There is exactly one root in the interval. At the candidate z^=1.01×10−6\widehat z=1.01\times10^{-6} the residual magnitude is 2.01×10−142.01\times10^{-14}. Throughout the interval the derivative is at least 1.98×10−61.98\times10^{-6}. The mean-value theorem bounds the distance to that identified root by 1.016×10−81.016\times10^{-8}, rounded upward. The exact distance is 10−810^{-8}. 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.

  • E. Anderson et al., LAPACK Users’ Guide, 3rd ed., SIAM, 1999, chapter 4, especially “How to Measure Errors” and “Standard Error Analysis.” LAPACK guide