Three errors and one number
Worth reading first: The exact answer to a nearby problem · An index that is a pair · Elimination is a sequence of choices.
The exact answer to a nearby problem is the first essay of this field and it states the identity the whole site is built on:
forward error ⪅ condition number × backward error.
A wrong answer has two possible authors and they can be measured separately. The problem was sensitive, or the algorithm was not stable, and only their product is what anyone sees. Eleven fields have since applied that division and it has held.
Two of the newest fields have now put something in front of it, twice, and the additions are of a kind the original two are not.
The third party
Six routes to one spectrum measures a quadratic eigenvalue problem across eight decades of an exact change of variable. Across that sweep:
- the problem’s condition number is 4.98 at every stop, flat;
- the algorithm’s backward error against the matrix it factorised is 7.6·10⁻¹³, flat;
- the answer loses eleven orders.
Neither factor moved and the answer collapsed. What moved is a matrix nobody chose to look at: the linearised pencil’s own condition number, which runs from 49.7 to 7.8·10¹¹ over the same sweep. The substitution from a quadratic to a 2n × 2n matrix is exact in the algebra and is not neutral in the arithmetic, and the loss belongs to it. That is the reading a nearby problem of the wrong kind gives to a structured problem whose backward error is measured over the wrong set of perturbations: the number is right about a question nobody asked.
That is a third author, and naming it changes what a diagnosis has to include. The problem was fine and the algorithm was fine is no longer a complete sentence, because there is a step between them that has a conditioning of its own.
The fourth
The problem the solver was actually given measures a nonlinear eigenvalue problem where there is nothing to linearise at all — a finite pencil has finitely many eigenvalues and a square root has a branch cut. Every algorithm replaces the function first, then linearises the replacement.
For a computed eigenpair of the replacement:
- the residual against the object the solver factorised is 8·10⁻¹⁵;
- the residual against the problem that was asked is 3.0·10⁻⁵;
- the forward error is 5.9·10⁻⁴.
The first number does not fall when the answer improves. It slowly rises, because a better approximation is a larger matrix. So the number a solver returns moves in the opposite direction to the accuracy of what it returned, over a sweep in which the answer improves by four orders.
The identity with a term in front:
forward error ⪅ ‖g − r‖ + condition number × backward error.
The new term is not amplified by anything, not produced by the arithmetic, and not a property of the problem.
What kind of thing each of the four is
Setting them out together is the point of this essay, because the differences matter more than the list.
| author | what it is | who chose it | visible in a residual |
|---|---|---|---|
| the problem’s conditioning | a property of the question | nobody | no, but estimable |
| the algorithm’s backward error | a property of the code | the library author | yes, directly |
| the reformulation | a property of a substitution | the library author, once | no |
| the approximation | a number somebody typed | the caller, every time | no |
The first two are properties. Nobody decides a Hilbert matrix’s condition number, and a library’s backward stability is a fact about it that a user inherits.
The third is a decision made once, by whoever wrote the solver, and inherited by everyone who calls it. A user of a quadratic eigenvalue solver does not choose the linearisation and usually does not know which one is inside.
The fourth is different in kind. It is chosen every time, by the caller, usually without being told a choice is being made — the target set, the degree, the region. And it is the largest of the four on the problems where it appears: five orders from the region, against a factor of forty from the linearisation and nothing at all from the conditioning.
Why a residual cannot see two of them
The mechanism is the same in both cases and it is worth stating once.
A residual is a backward error for the object the arithmetic was performed on. That is exactly what makes it valuable: it is computable without knowing the answer, and it certifies that the computation did what it claimed on what it was given.
When the object handed to the arithmetic is the problem, up to an exact transformation, the residual is a statement about the problem. Every field before these two was in that situation, which is why a small residual is not a small error needed only one extra quantity — the condition number — to complete the account.
When the object is a reformulation, the residual is a statement about the reformulated object, and the map back to the original is not norm-preserving. When it is an approximation, the residual is a statement about a different function. In both cases the word backward stops pointing where it used to, and the number is correct, cheap, and about something else.
What to compute instead, in each case
Both have a repair and both repairs are cheap, which is the useful half of this essay.
For the reformulation: compute the backward error of the computed eigenvalue with respect to the original coefficients rather than to the linearised matrix. For a quadratic that is η = ‖Q(λ)x‖ / ((|λ|²‖M‖ + |λ|‖C‖ + ‖K‖)‖x‖), two matrix–vector products. It is the quantity that tracks the forward error in six routes to one spectrum: its ratio to the forward error stays within a factor of 5.8 across the whole sweep while the linearised residual’s moves by 1.5·10⁷.
For the approximation: compute the residual against the original function, which is one further evaluation of g per computed eigenvalue. It tracks the forward error to a factor of about twenty at every degree.
And in both cases: compute the term itself in advance. The linearisation’s conditioning is available from norms already in hand; ‖g − r‖ is a maximum of a scalar function over an interval. Both are free relative to the factorisation at the end of the chain, and neither is reported by anything — the same gap an estimate that can be fooled records for the one quantity of the four that does have an estimator.
The pattern, stated as a habit
Four authors, and the two that are hardest to see are the two that were chosen. That inversion is the thing worth carrying.
A property can be estimated, and this site has spent eleven fields building estimators for them: condition estimators, backward-error formulas, growth factors. A decision cannot be estimated — it can only be reported, by whoever made it — and nothing in the conventional output of a solver reports one.
So the habit the two newest fields suggest is a question rather than a measurement: what was replaced, between the problem that was asked about and the object that was factorised? If the answer is nothing, the two-factor identity is complete and the existing tools apply. If the answer is a linearisation, the reformulation’s conditioning is a third quantity to look at. If it is an approximation, there is a term in front of the whole identity that no amount of care in the arithmetic will reduce.
Asking that question costs nothing and it is not answered by any number a solver currently returns.
Where the two new authors do and do not appear
It is worth saying which problems have three or four authors and which have two, because the answer is not “the hard ones”.
Two authors is the ordinary case and covers every field before polynomial. A linear system, a
least-squares fit, an eigenvalue problem for a matrix, a sparse factorisation: the object the
arithmetic runs on is the object that was asked about, possibly reordered or rescaled by
transformations that are exact. Everything this site built in eleven fields applies.
Three appears whenever a problem is reformulated into a different kind of object before being solved. A matrix polynomial linearised into a pencil is the instance measured here, and it is not the only one: forming the normal equations is a reformulation in exactly this sense, and the road that squares the problem is that essay written before the vocabulary existed. So is forming PQ to get Hankel singular values, in the product nobody had to form. The pattern in each case is the same: the residual against the reformulated object is small, the reformulated object’s conditioning is worse than the original’s, and the gap is the reformulation’s.
Four appears when the problem cannot be reformulated exactly at all — when there is no finite object with the same answer, and the only route is to replace the question. That is rarer and it is what the nonlinear eigenvalue problem is. It also covers a case this site has met without naming: truncating an infinite series to compute a matrix function, where the series that has to be squared back measures a truncation error that sits in exactly this position.
The reason to sort them is that the diagnostic differs. With two authors, measure both. With three, measure the reformulated object’s conditioning as well, and expect the answer to be a change of variable. With four, the dominant term is usually the one that was chosen, and the repair is to choose differently rather than to compute more carefully.
What has not changed
Worth closing on, because a reader could take this essay as an argument that residuals are unreliable and it is the opposite.
Every measurement above is possible because the backward-error framework works. The reason the reformulation’s contribution could be isolated is that the linearised solve’s backward error was measured and found flat; the reason the approximation’s could be is that the residual against the approximant was measured and found at rounding. Both new authors were found by the existing tools being applied carefully enough to notice that they had run out of explanation.
The identity is not wrong. It has always been a statement about a specific problem and a specific algorithm, and what the newest fields supply is a reason to check which problem and which algorithm those are.
A worked reading, on one number
It helps to run the account once on a single computed quantity, because the four authors are easier to keep apart when they are attached to one answer rather than to a table.
Take the quadratic eigenvalue problem of a damped chain of eight masses, in units chosen badly by a factor of 10⁸, and ask for its spectrum. A library returns twenty-eight numbers and, if asked, a residual of about 7.6·10⁻¹³. The forward error against the closed form is 1.3·10⁻³.
Four questions, in the order worth asking them.
Was the problem sensitive? The eigenvalue condition number of the quadratic is 4.98. No. Whatever went wrong was not the question’s fault, and this is the measurement that rules out the answer most people reach for first.
Was the algorithm unstable? Its backward error against the matrix it factorised is 7.6·10⁻¹³, which for a 16 × 16 real Schur factorisation is what stability looks like. No.
Was something reformulated? Yes — a quadratic became a 2n × 2n pencil — and the reformulated object’s condition number is 7.8·10¹¹ where the quadratic’s is 4.98. That is the loss, located, and it is eleven orders in the right place.
Was anything approximated? No. The linearisation is exact and there is no fourth term here.
Total account: eleven orders, all of it in the third author, none of it visible in either of the two numbers a library would return. And the repair is two lines of scaling computed from three norms, after which the same four questions give the same first two answers and 1.6·10⁻¹³ for the third.
That is the shape a diagnosis should have. Four questions, each with a number, and a sum that closes.
Why this took eleven fields to notice
A closing observation about how the two new authors were found, since the method is more portable than the finding.
Neither was found by a gate. Every check this site runs asks whether a computed quantity satisfies a relation, and both new authors produce computations in which every relation holds: the residual is small, the factorisation reconstructs, the assertions pass. A suite that measures whether numbers are right cannot find an author of error that makes no number wrong.
Both were found by sweeping a parameter that was supposed to be free. The change of units in the quadratic field is exact — the spectrum divides by γ and the closed form follows it — so it is a control: anything that moves across the sweep is manufactured rather than inherent. The target set in the nonlinear field is the same kind of thing, a decision that changes no eigenvalue and changes the answer.
That is a technique rather than a result and it is worth stating as one. To find an error source nobody is measuring, vary something that is not supposed to matter and see what moves. Both of this site’s newest authors were sitting in plain sight behind a parameter everybody treated as notation.
The one line
Before reading a residual as an accuracy estimate, ask what was replaced between the problem and the object that was factorised. If nothing was, the number means what it appears to. If a linearisation was, there is a third quantity to measure and it is the conditioning of the thing that was substituted. If an approximation was, there is a term in front of the whole identity, it was chosen rather than incurred, and it is usually the largest of the four.
At other settings
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- A backward-stable answer to a problem nobody asked — both name backward error, condition number, exact ground truth, forward error, linearisation, scaling
- The scaling that buys ten orders — both name backward error, condition number, exact ground truth, linearisation, scaling
- Two condition numbers of one matrix — both name backward error, condition number, exact ground truth, forward error, scaling
- A condition number sent to infinity — both name backward error, condition number, exact ground truth, forward error
- A tensor that cannot be decomposed — both name backward error, condition number, exact ground truth, forward error
- An accuracy that is a backward error — both name backward error, condition number, forward error, residual
Named objects
A flat tag is an object no other essay names yet.
Approximation before linearisationBackward errorCondition numberExact ground truthForward errorLinearisationResidualScalingUnit roundoff