Skip to content

Buyer's Guide

A Small Linear-System Residual Does Not Establish an Accurate Solution

A small residual shows that a candidate nearly satisfies the stated equations under the reported scaling, norm and normalization. It does not alone establish that the solution components are accurate. Conditioning connects equation mismatch to possible solution error; input uncertainty raises a separate question about which equations represent the intended problem. Assess the component or downstream quantity actually required, with evidence for that requirement.

Technical contentPublished Updated

01

Define the two quantities before interpreting a small number

Consider a square nonsingular linear system Ax = b, with nonzero b and exact solution x. A is the coefficient matrix, b is the supplied input vector, and xhat is a candidate returned for assessment. Define the residual as r = b − A xhat. Define the solution error as e = x − xhat. These vectors live on opposite sides of the equation: r measures mismatch in the equations, while e measures mismatch in the solution.

Here, the vector infinity norm, written ||v||∞, is the largest absolute component. Its induced matrix norm, ||A||∞, is the largest absolute row sum. Relative residual means ||r||∞ / ||b||∞; relative forward error means ||e||∞ / ||x||∞. Naming the denominator matters as much as naming the norm.

A report of “residual = 0.000001” leaves these definitions unresolved. It might report an absolute quantity, a normalized quantity or a stopping statistic for transformed equations. Establish which quantity was supplied before comparing it with an output requirement.

References: [LG75]

02

LIN-26: a small residual misses the required component

Constructed example LIN-26 uses dimensionless variables and exact rational arithmetic. The matrix is diagonal: A = diag(1, 1/1,000,000). The input is b = (1, 1/1,000,000). Thus the two equations are x1 = 1 and x2/1,000,000 = 1/1,000,000, giving the exact solution x = (1, 1).

Stipulate a candidate xhat = (1, 0). This is a deliberately supplied candidate, not a claimed output from NumPy, LAPACK, a scientific-AI model or an accelerator. No solver or hardware execution is represented.

Multiplication gives A xhat = (1, 0), so r = (0, 1/1,000,000). The infinity norms are ||r||∞ = 1/1,000,000 and ||b||∞ = 1. The relative residual is therefore 0.000001.

But e = (0, 1), with ||e||∞ = 1 and ||x||∞ = 1. Relative forward error is 1. The second solution component is wrong by its entire reference magnitude.

Suppose this fictional handoff requires the returned second component to differ from 1 by no more than 0.01. The candidate differs by 1 and fails. The residual calculation is correct; it answers a different comparison from the component requirement.

03

Conditioning explains how the mismatch reaches the solution

The second equation weights x2 by one millionth. Changing x2 by a whole unit therefore changes that equation's left side by only one millionth. A small equation mismatch can conceal a much larger solution mismatch.

The general relationship follows directly. Since Ax = b, the residual satisfies r = A(x − xhat) = Ae. Nonsingularity gives e = A^-1 r. Consequently, ||e||∞ ≤ ||A^-1||∞ ||r||∞. Also, ||b||∞ = ||Ax||∞ ≤ ||A||∞ ||x||∞. Combining the inequalities gives:

||e||∞ / ||x||∞ ≤ κ∞(A) × ||r||∞ / ||b||∞,

where κ∞(A) = ||A||∞ ||A^-1||∞. This is an upper bound for the stated nonsingular system and these norms, not a prediction of the actual error.

For LIN-26, A^-1 = diag(1, 1,000,000). The matrix norms are ||A||∞ = 1 and ||A^-1||∞ = 1,000,000, giving κ∞(A) = 1,000,000. The bound becomes relative forward error ≤ 1,000,000 × 0.000001 = 1. Our candidate attains that bound.

A large condition number permits strong amplification in some directions. It does not establish that every candidate has large error. The exact candidate (1, 1) has zero error for the same matrix.

References: [NC23] [LG75]

04

Keep the residual's useful conclusion without overstating it

The residual remains useful evidence about the stated equations. In exact arithmetic, xhat solves A xhat = b − r exactly. With A held fixed, the reported relative residual is the normwise relative change in b that makes this candidate an exact solution. In LIN-26, that nearby input is (1, 0).

That interpretation has a defined perturbation model: only b changes, measured relative to ||b||∞. It is not a universal backward-error formula allowing arbitrary changes in both A and b.

The LAPACK Users' Guide distinguishes backward stability from forward accuracy. A backward-stable computation gives an exact answer for sufficiently nearby inputs under its stated error model; sensitivity of the problem still affects closeness to the original answer. One stipulated candidate and its residual do not establish an algorithm's backward stability.

For this reader decision, retain both questions: how well does the candidate satisfy the supplied equations, and what does the evidence establish about the required solution? A reassuring answer to the first leaves the second open when conditioning or the output requirement has not been addressed.

References: [LG78]

05

Zero residual cannot settle uncertainty in the inputs

Now keep A fixed and change the supplied input to bnew = (1, 2/1,000,000). Its exact solution is xnew = (1, 2). Measured against the original vectors, ||bnew − b||∞ / ||b||∞ = 0.000001, while ||xnew − x||∞ / ||x||∞ = 1.

The input change is small in this global normwise comparison. It is a 100% change in the second component of b. A norm dominated by the first component does not make the change small relative to every input component.

Both exact solutions have zero residual for their own inputs. That proves equation satisfaction for each stated system. It supplies no evidence about which input vector represents the intended physical or scientific problem.

If a handoff includes measured, estimated or model-produced inputs, ask the responsible team how their uncertainty relates to the required output. LIN-26 provides no measured uncertainty distribution or real application tolerance. Its invented 0.01 requirement applies only to the original stated input; evaluating xnew against that original target would mix two different problems.

06

Keep scaling and component requirements attached to the result

An equivalent writing of LIN-26 makes the reporting issue visible. Multiply only the second equation by 1,000,000. The equations become x1 = 1 and x2 = 1: the coefficient matrix is the identity and the input is (1, 1). The exact solution and the stipulated candidate are unchanged.

For this representation, the candidate's residual is (0, 1), its relative infinity-norm residual is 1, and the matrix's infinity-norm condition number is 1. The original representation reported a relative residual of 0.000001 and a condition number of 1,000,000. Both descriptions lead to the same upper bound of 1 for this candidate's relative forward error.

Rewriting the equations has not repaired xhat or supplied more accurate input information. It has changed how equation mismatch is weighted. In a real handoff, record the variables' units, equation and variable scaling, any transformations, and the representation to which a reported norm applies. This example is an explanation of reporting, not a scaling prescription.

Nor does a global relative solution-error target automatically protect each component's relative accuracy: a small component can be hidden by a larger one in the denominator. If the requirement concerns x2, a derived quantity or a downstream decision, identify that quantity and its comparison rule directly.

07

Read library and condition-estimate claims within their scope

NumPy 2.3 documents numpy.linalg.solve for square, full-rank systems and identifies LAPACK _gesv as its implementation context. Its description distinguishes this determined solve from a least-squares problem. The word “exact” in that description is not evidence of zero floating-point solution error for a particular input.

NumPy 2.3's numpy.linalg.cond defaults to the 2-norm, computed using singular values. The calculations here explicitly use the infinity norm. A condition-number report needs its norm attached even where two norms happen to give the same number for a particular matrix.

The LAPACK Users' Guide also explains the use of estimated condition numbers. An estimate is not an exact condition number or a measured solution error. If an error claim uses an estimate, retain the estimator's qualifications; substituting it into a formula does not automatically create a guaranteed upper bound.

These references establish definitions and documented API scope. They do not identify the algorithm, residual-evaluation arithmetic or accepted output of a submitted workload. A successful return, a precision label and a condition estimate each leave the component requirement to be established by appropriate evidence.

References: [NS23] [NC23] [LG78]

08

Compare the handoff against the result being bought

Imagine two fictional offers for the original LIN-26 input. Offer R supplies xhat = (1, 0) and advertises the relative residual of 0.000001. Offer C supplies the same candidate, the stated norm and normalization, and a comparison against the required second component. C's fuller evidence exposes a failure; it does not make its candidate acceptable. R's headline supplies no acceptance evidence for that component, and its disclosed candidate fails the same comparison.

For an actual solver or scientific-AI handoff, identify the supplied A and b, their scaling and relevant uncertainty, the returned solution, and the precise output requirement. Ask which equations the residual evaluates, how it is normalized and what arithmetic was used to evaluate it. Keep any condition estimate, forward-error evidence and reference limitations attached to those same inputs and outputs.

Where the exact solution is unavailable, ask the numerical owner what justified bound, reference comparison or other evidence addresses the required quantity. A normwise bound may help, but its scope must match the claim. A condition estimate alone supplies neither the missing reference nor a demonstrated component error.

Accept the result against the agreed output requirement before comparing completion times. The related guides cover rounding order, internal matrix precision and repeatability as separate questions. None turns a small residual into evidence that an unspecified component tolerance has been met.

09

Discuss physical installation when the selected equipment needs it

If equipment selected for the workload also needs physical installation, Leviathan's rack-and-stack service and project inquiry provide a route to discuss agreed mounting, physical IT cabling, labels and handoff records. Share a nonconfidential equipment, rack and site outline to discuss scope and availability. Numerical evaluation and application acceptance remain with the appointed software team.

References: [L1]

10Sources

Primary sources

  1. [NC23]
    NumPy 2.3: numpy.linalg.condChecked 2026-10-21. Defines a norm-qualified condition number and documents the default 2-norm and explicit infinity-norm option. LIN-26 uses the infinity norm throughout.
  2. [NS23]
    NumPy 2.3: numpy.linalg.solveChecked 2026-10-21. Documents the square, full-rank system and LAPACK _gesv context. The determined-solve description does not establish a particular workload's numerical accuracy.
  3. [LG75]
    LAPACK Users' Guide: How to Measure ErrorsChecked 2026-10-21. Historical Users' Guide definitions of vector error, infinity vector norm and maximum-row-sum matrix norm. The LIN-26 values and bound are derived explicitly in the article.
  4. [LG78]
    LAPACK Users' Guide: Standard Error AnalysisChecked 2026-10-21. October 1, 1999 discussion of normwise backward stability, conditioning and condition estimation. Its mathematical distinctions do not establish the behavior of a current solver or accelerator.
  5. [L1]
    Leviathan Systems: Rack & Stack / ColocationChecked 2026-10-21. Agreed physical mounting, IT cabling, labeling and installation records are scoped per engagement.

Contact

Does the selected equipment need physical installation?

Share a nonconfidential equipment, rack and site outline to discuss physical installation scope, handoff requirements and availability.