The eigenvalue problem that is not linear

A backward-stable answer to a problem nobody asked

One quadratic eigenvalue problem, in nine systems of units, with a change of variable that is exact in both directions. The residual the solver prints stays at the rounding level at every stop. The answer loses eleven orders of magnitude, and the two facts are consistent.

Worth reading first: The exact answer to a nearby problem · A matrix that depends on its own eigenvalue · The condition number is an amplifier.

The spine of this site is one inequality:

forward error ⪅ condition number × backward error.

A good algorithm returns the exact answer to a nearby problem, the condition number says how much the problem magnifies a perturbation, and only their product is what anybody sees. Every essay here that reports an error reports which of the two factors it came from, and the exact answer to a nearby problem is where the habit was set.

There is a phrase in that sentence doing more work than it looks: a nearby problem. Nearby in what, and a problem of which kind? For a linear solve those questions have obvious answers and nobody has to ask them. For a quadratic eigenvalue problem they do not, and this essay is the measurement of what happens when the obvious answer is the wrong one.

One quadratic eigenvalue problem in 9 systems of units: what the solver reports and what the answer is worthAn overdamped chain of 8 masses, with λ replaced by γμ so that the coefficients become (γ²M, γC, K). That substitution is exact in both directions and divides the spectrum by γ exactly, so the closed form is still available and every error here is measured against it. The backward error of the eigenpair for the LINEARISED MATRIX — the residual a solver's own error analysis is about — is 6.76·10⁻¹⁶ at γ = 1 and 7.59·10⁻¹³ at γ = 108 — it moves by a factor of 1928 while the other two move by 1.68·10¹⁰. The backward error for the QUADRATIC, which is what the person who posed the problem is entitled to, grows by 8.76·10¹⁰ across the same sweep, and the forward error follows it: 7.49·10⁻¹⁴ to 0.00126. Nothing went wrong with the solver at any stop.0246810⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹log₁₀ γ, the change of unitsrelative errorforward errorη, the quadraticη, the linearisationagainst a closed formη(linearisation), worst7.6·10⁻¹³η(quadratic), worst1.2·10⁻⁴forward error, worst0.0013coefficient spread4.2·10¹⁵the solver is right at every stopabout a problem nobody asked
Fig. 1 One problem, nine systems of units. The flat curve is the number a solver’s own error analysis is about. The other two are the answer.

The family is one problem in different units

The sweep is built out of a substitution rather than a perturbation, and that is what makes it airtight. Replace λ by γμ in Q(λ) = λ²M + λC + K and the coefficients become

(γ²M, γC, K),

with the spectrum divided by γ exactly. Nothing is approximated, nothing is chosen, and the map back is a multiplication. If time is measured in milliseconds instead of seconds, γ is a thousand; if a stiffness is given in newtons per metre and a mass in tonnes, γ is whatever the unit conversion says. Every stop of the sweep is the same physical problem written down in a different unit system, and the closed form of the damped chain still gives its exact spectrum at every one of them.

So there is no wriggle room about what the right answer is, at any stop.

Two backward errors, and they are not the same number

The linearised matrix A is 2n × 2n, and the real Schur factorisation applied to it is backward stable in the sense the form a real matrix can reach establishes: the computed eigenpair is exact for A + ΔA with ‖ΔA‖/‖A‖ at the rounding level. That theorem is true here and nothing in this essay disputes it.

The backward error of the same pair for the quadratic is a different quantity:

η(λ, x) = ‖Q(λ)x‖ / ((|λ|²‖M‖ + |λ|‖C‖ + ‖K‖)‖x‖),

the smallest relative perturbation of M, C and K severally for which the pair is exact. The denominator is the whole content. A residual divided by ‖Q(λ)‖ would be the backward error of a perturbation of Q as a single object — which is not a quadratic problem, and so not an answer to anything anybody asked.

And the two numbers can be far apart, for a reason that is visible in the linearisation’s own shape. C₁ has identity blocks in it. Their norm is one whatever the coefficients are, so a perturbation that is small relative to ‖A‖ can be enormous relative to the smallest of ‖M‖, ‖C‖ and ‖K‖ — and there is no reason for the perturbed matrix to be a linearisation of any quadratic at all.

What is measured

At n = 8, on an overdamped chain, with γ running from 1 to 10⁸:

γ forward error η for the linearisation η for the quadratic
1 7.5·10⁻¹⁴ 6.8·10⁻¹⁶ 1.4·10⁻¹⁵
10² 5.2·10⁻¹² 3.9·10⁻¹⁶ 8.7·10⁻¹⁴
10⁴ 8.6·10⁻⁹ 7.8·10⁻¹⁵ 1.4·10⁻¹⁰
10⁶ 5.5·10⁻⁶ 1.3·10⁻¹³ 2.6·10⁻⁷
10⁸ 1.3·10⁻³ 7.6·10⁻¹³ 1.2·10⁻⁴

The middle column moves by a factor of about a thousand across the sweep. The outer two move by eleven orders of magnitude.

The solver did nothing wrong at any stop. It was handed a matrix and it returned eigenpairs that are exact for a matrix a rounding away. What it was not handed is the problem, and the residual it prints — the middle column — is a statement about the object it was given rather than about the object the caller has.

That the forward error tracks the quadratic’s backward error and not the linearisation’s is the half that makes this more than a definition. Measured, the ratio of forward error to η(quadratic) stays inside a factor of 5.8 across the whole sweep, while the ratio to η(linearisation) moves by a factor of 1.5·10⁷. One of those two numbers predicts the answer’s accuracy and the other one does not, and the one that does not is the one a solver reports.

The condition number that does not move

Take the spine’s inequality seriously and there should be a condition number in it. There is, and it separates in the same way.

The eigenvalue condition number of the quadratic at a simple λ is

κ(λ) = (|λ|²‖M‖ + |λ|‖C‖ + ‖K‖)‖x‖‖y‖ / (|λ| |yᵀQ′(λ)x|),

with x and y the right and left null vectors of Q(λ). It is the direct analogue of a condition number for one eigenvalue — the 1/|yᵀx| that governs how far a single eigenvalue of a matrix moves — with the two changes that make it a statement about a polynomial: the numerator measures the three coefficients separately, and the denominator carries Q′(λ) rather than the identity.

The condition number the problem has, and the one the solver's error analysis is written againstThe same eigenvalue of the same overdamped chain of 8 masses, in seven systems of units. Its condition number as an eigenvalue of the QUADRATIC — Tisseur's, with the three coefficient norms in the numerator and yᵀQ′(λ)x in the denominator — is 4.98 at γ = 1 and 4.98 at γ = 10⁶, a spread of 1 over six decades: it cannot move, because a change of units is not a change of problem. Its condition number as an eigenvalue of the LINEARISED MATRIX runs 49.66 to 7.844·10¹¹, a factor of 1.58·10¹⁰. The forward error follows the second one, and the first one is the honest description of the problem — so the substitution has manufactured an ill conditioning that belongs to the algorithm rather than to the question.012345610⁻¹10²10⁵10⁸10¹¹log₁₀ γ, the change of unitscondition numberthe linearisationthe quadraticone problem, two amplifiersκ(quadratic), first5κ(quadratic), last5κ(linearisation), last7.8·10¹¹how far the first moved1the problem is as well conditioned as everand the method is not
Fig. 2 The same eigenvalue of the same problem in seven systems of units, with its condition number as an eigenvalue of the quadratic and as an eigenvalue of the linearised matrix.

Measured: κ(quadratic) is 4.98 at every stop, over six decades of γ — a spread of 1.0002. It cannot move, because a change of units is not a change of problem and the quantity is built to be invariant under one. κ(linearisation) goes from 49.66 to 7.8·10¹¹.

So the accounting closes. The problem is as well conditioned at γ = 10⁶ as it was at γ = 1; the answer has lost six digits; and the entire loss is attributable to a substitution the caller made before the solver was reached. That is whose fault is it with a third party in it — not the algorithm and not the problem, but the reformulation — and it is the first time this site has had to name one.

What a perturbation of the linearisation would have to be

It is worth being concrete about why the two backward errors can differ at all, because the argument is short and it explains the size of the gap rather than merely its existence.

Suppose a solver returns a pair that is exact for A + ΔA with ‖ΔA‖ = u‖A‖. For that to say anything about the quadratic, ΔA would have to be a perturbation that keeps A a linearisation of some quadratic — that is, it would have to leave the identity blocks alone and disturb only the blocks built from M, C and K. Nothing in the error analysis of a Schur factorisation promises that. The perturbation it delivers is an arbitrary 2n × 2n matrix of the right size, and an arbitrary matrix of that size is not the linearisation of anything. That is the same shape of objection a nearby problem of the wrong kind makes about a structured problem, and it bites harder here, because the structure being violated is not a modelling assumption but the definition of the object.

So the question becomes: given the ΔA the solver actually produced, what is the smallest perturbation of the three coefficients that reproduces the same eigenpair? That is what η for the quadratic computes, by construction, and the answer involves dividing the residual by |λ|²‖M‖ + |λ|‖C‖ + ‖K‖ rather than by ‖A‖. When the three norms are wildly different those two denominators are wildly different, and the ratio between them is what the sweep is walking along.

The bound the literature gives for C₁ has the same shape: the quadratic’s backward error is at most the linearisation’s times a factor built from the coefficient norms and |λ|, and the factor is one when everything is of comparable size. Measured here, the ratio grows by about one order per decade of γ, so the bound is not merely satisfied — it is nearly attained, which is the only thing that makes a bound worth quoting.

What a caller can actually see

The uncomfortable part of this measurement is that every quantity a caller normally has is flat. The residual for the linearised matrix is at the rounding level. The computed eigenvalues look plausible: they are negative reals in an overdamped problem, spread over the range the physics suggests, in conjugate pairs where they should be. The iteration converged. Nothing warns.

Two things are visible without the closed form, and both are worth having.

The coefficient norms. ‖M‖, ‖C‖ and ‖K‖ are three cheap numbers, and their spread is what predicts the trouble — the same diagnostic role the units the matrix is measured in gives to a row scaling, and available for the same reason: it is a property of the data rather than of the run. At γ = 10⁸ they are 2.8·10¹⁶, 2.0·10⁹ and 6.8 — a spread of 4·10¹⁵ — and nothing else in the computation is that far out of balance.

The quadratic’s own backward error. η(λ, x) costs one matrix-vector product with each coefficient and three norms. It is the number that should be reported and, on the evidence of the table above, the only one worth reporting — and computing it is the same act orthogonal is a number recommends for a factorisation: measure the property being claimed rather than the one the routine happens to return. A library that prints the linearised residual is answering a question about its own internals; a library that prints η is answering the caller’s.

Which half of the eigenvector, and why it is worth saying

C₁’s eigenvector is [λx; x]. So the quadratic’s eigenvector can be read off either half of the computed 2n-vector, and the two halves differ by a factor of λ. They therefore have different backward errors, and on a badly scaled problem the difference is not small.

The measurement above reports the better of the two at every stop, deliberately: a comparison that took the worse half would be measuring a choice this essay is not arguing about, and the finding survives the most favourable reading of the method. It is worth knowing that the choice exists, because a library that takes the top half unconditionally is leaving a factor of |λ| on the table, and |λ| is 10⁻⁸ at the far end of this sweep.

What this does not say

Three things, because the finding is easy to over-read.

It is not that linearising is wrong. There is nothing else to do. A matrix polynomial has no QR algorithm of its own, and the linearisation is what makes fifty years of eigenvalue machinery applicable to a problem it was not written for. The finding is that the substitution has a price, that the price is measurable, and that it is invisible in every number a solver returns.

It is not that the sweep is exotic. γ = 10⁸ is a unit conversion. The measured examples that motivated this analysis in the literature are structural models where mass is in kilograms and stiffness in newtons per metre, which is exactly a mismatch of this size, and nobody involved thought they were doing anything unusual.

And it is not unfixable. The repair is two lines of scaling computed from three norms, it recovers all ten orders, and it is the scaling that buys ten orders. What this essay establishes is why anyone should bother: without the measurement, a code that scales looks like a code with a superstition in it, since every residual it prints was already at the rounding level.

Where the eigenvector comes from, and what it costs to get one

A detail that matters for the measurement’s honesty. The real Schur factorisation returns eigenvalues; the eigenvectors here come from inverse iteration on the linearised matrix, four steps from a fixed deterministic start with the shift moved off the eigenvalue by a relative 10⁻¹⁰.

That is the standard device and it looks alarming the first time: the matrix being solved with is deliberately nearly singular. It works for exactly that reason — the ill conditioning aims the solve at the eigenvector, since the component along it is the one amplified — and it is the same argument the inverse that is never formed makes about why a solve is not an inverse. What matters here is that the resulting pairs are good ones for the linearisation: their η(linearisation) is at the rounding level at every stop of the sweep, which is the column the table’s middle holds. If they were not, this essay would be measuring a bad eigenvector rather than a bad substitution.

The sweep in the other direction

The table above raises γ, which makes ‖M‖ large. Lowering it makes ‖K‖ large instead, and the same thing happens with the roles exchanged: the eigenvalues become enormous, |λ|²‖M‖ dominates the scale in the denominator, and the small-modulus eigenvalues are the ones that lose their digits. There is nothing special about the direction, which is worth saying because it kills the obvious defence — that the problem is large numbers and could be avoided by working in sensible SI. What matters is the ratio of the three coefficient norms, and no choice of units makes all three of ‖M‖, ‖C‖ and ‖K‖ comparable for every problem, because they carry different physical dimensions and their ratios have units of time.

That is why the repair is a change of variable rather than a convention: the right γ is a property of the problem’s own numbers and has to be computed from them.

The thing to carry out of this

A backward error is a promise about which problem the answer is exact for, and the promise is only as good as the reader’s assumption about what the data is. This site has met that once before, from a different direction: a nearby problem of the wrong kind shows a backward-stable computation whose nearby problem is not of the same structure as the one posed, so a perturbation the analysis permits is one the model forbids.

Here the mismatch is more elementary and more common. The nearby problem is not a quadratic eigenvalue problem at all. It is a nearby 2n × 2n matrix, and the set of quadratics that linearise to it is, in general, empty.

At other settings

One quadratic eigenvalue problem in 5 systems of units: what the solver reports and what the answer is worthAn overdamped chain of 8 masses, with λ replaced by γμ so that the coefficients become (γ²M, γC, K). That substitution is exact in both directions and divides the spectrum by γ exactly, so the closed form is still available and every error here is measured against it. The backward error of the eigenpair for the LINEARISED MATRIX — the residual a solver's own error analysis is about — is 6.76·10⁻¹⁶ at γ = 1 and 7.81·10⁻¹⁵ at γ = 104 — it moves by a factor of 19.8 while the other two move by 1.14·10⁵. The backward error for the QUADRATIC, which is what the person who posed the problem is entitled to, grows by 1.02·10⁵ across the same sweep, and the forward error follows it: 7.49·10⁻¹⁴ to 8.57·10⁻⁹. Nothing went wrong with the solver at any stop.0123410⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹log₁₀ γ, the change of unitsrelative errorforward errorη, the quadraticη, the linearisationagainst a closed formη(linearisation), worst7.8·10⁻¹⁵η(quadratic), worst1.4·10⁻¹⁰forward error, worst8.6·10⁻⁹coefficient spread4.2·10⁷the solver is right at every stopabout a problem nobody asked
Fig. 3 Four decades instead of eight: the same three curves, the same shapes, a shorter axis.
One quadratic eigenvalue problem in 11 systems of units: what the solver reports and what the answer is worthAn overdamped chain of 8 masses, with λ replaced by γμ so that the coefficients become (γ²M, γC, K). That substitution is exact in both directions and divides the spectrum by γ exactly, so the closed form is still available and every error here is measured against it. The backward error of the eigenpair for the LINEARISED MATRIX — the residual a solver's own error analysis is about — is 6.76·10⁻¹⁶ at γ = 1 and 2.2·10⁻¹⁰ at γ = 1010 — it moves by a factor of 5.59·10⁵ while the other two move by 3.99·10¹⁵. The backward error for the QUADRATIC, which is what the person who posed the problem is entitled to, grows by 2.44·10¹⁴ across the same sweep, and the forward error follows it: 7.49·10⁻¹⁴ to 299. Nothing went wrong with the solver at any stop.024681010⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹log₁₀ γ, the change of unitsrelative errorforward errorη, the quadraticη, the linearisationagainst a closed formη(linearisation), worst2.2·10⁻¹⁰η(quadratic), worst0.34forward error, worst299coefficient spread4.2·10¹⁹the solver is right at every stopabout a problem nobody asked
Fig. 4 And ten, where the forward error passes one and the answer has no digits left at all.
The condition number the problem has, and the one the solver's error analysis is written againstThe same eigenvalue of the same overdamped chain of 4 masses, in seven systems of units. Its condition number as an eigenvalue of the QUADRATIC — Tisseur's, with the three coefficient norms in the numerator and yᵀQ′(λ)x in the denominator — is 3.596 at γ = 1 and 3.596 at γ = 10⁶, a spread of 1 over six decades: it cannot move, because a change of units is not a change of problem. Its condition number as an eigenvalue of the LINEARISED MATRIX runs 36.5 to 5.929·10¹¹, a factor of 1.62·10¹⁰. The forward error follows the second one, and the first one is the honest description of the problem — so the substitution has manufactured an ill conditioning that belongs to the algorithm rather than to the question.012345610⁻¹10²10⁵10⁸10¹¹log₁₀ γ, the change of unitscondition numberthe linearisationthe quadraticone problem, two amplifiersκ(quadratic), first3.6κ(quadratic), last3.6κ(linearisation), last5.9·10¹¹how far the first moved1the problem is as well conditioned as everand the method is not
Fig. 5 The same separation at four masses, which is the control: it is the substitution and not the size.
The condition number the problem has, and the one the solver's error analysis is written againstThe same eigenvalue of the same overdamped chain of 12 masses, in seven systems of units. Its condition number as an eigenvalue of the QUADRATIC — Tisseur's, with the three coefficient norms in the numerator and yᵀQ′(λ)x in the denominator — is 6.076 at γ = 1 and 6.076 at γ = 10⁶, a spread of 1 over six decades: it cannot move, because a change of units is not a change of problem. Its condition number as an eigenvalue of the LINEARISED MATRIX runs 60.31 to 9.461·10¹¹, a factor of 1.57·10¹⁰. The forward error follows the second one, and the first one is the honest description of the problem — so the substitution has manufactured an ill conditioning that belongs to the algorithm rather than to the question.012345610⁻¹10²10⁵10⁸10¹¹log₁₀ γ, the change of unitscondition numberthe linearisationthe quadraticone problem, two amplifiersκ(quadratic), first6.1κ(quadratic), last6.1κ(linearisation), last9.5·10¹¹how far the first moved1the problem is as well conditioned as everand the method is not
Fig. 6 And at twelve.
What two lines of scaling are worth: the same quadratic in nine systems of unitsThe forward error against the closed form for an overdamped chain of 8 masses, before and after Fan–Lin–Van Dooren scaling. The unscaled curve runs 7.49·10⁻¹⁴ to 0.001258 — every digit gone by the far end — and the scaled one runs 1.26·10⁻¹³ to 8.23·10⁻¹⁴, flat to within a factor of 2.01. The scaling is γ = √(‖K‖/‖M‖) and δ = 2/(‖K‖ + γ‖C‖), computed from three norms and nothing else, and the map back is λ = γμ with no rounding in the statement. Flatness is the half that matters: after scaling every stop of the sweep IS the same problem, so there is nothing left for the change of units to do.0246810⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹log₁₀ γ, the change of unitsforward erroras writtenafter scalingone change of variableunscaled, worst0.0013scaled, worst1.7·10⁻¹³orders recovered10scaled coefficient spread4.5the answer was never the problemthe units were
Fig. 7 The repair, from the next essay: the same sweep with two lines of scaling in front of it.
Six ways of computing one spectrum, at a change of units of 106Three linearisations — the first companion form, the second, and the symmetric member of the DL(Q) family — each reduced to a standard eigenvalue problem in two ways: by inverting the leading coefficient, whose eigenvalues are λ, and by inverting the trailing one, whose eigenvalues are 1/λ. All six have exactly the eigenvalues of the quadratic in exact arithmetic. Measured against the closed form at γ = 106, the best is first/leading at 5.473·10⁻⁶ and the worst second/trailing at 2.234·10⁻⁴, a spread of 40.81. Under the leading reduction the symmetric form and the first companion form are THE SAME MATRIX — −A₁⁻¹A₀ is [[−M⁻¹C, −M⁻¹K], [I, 0]] for both — so the distinction between them is one the inversion discards, and it survives only under the trailing one.first · leading5.47·10⁻⁶first · trailing4.62·10⁻⁵second · leading4.27·10⁻⁵second · trailing2.23·10⁻⁴symmetric · leading5.47·10⁻⁶symmetric · trailing4.05·10⁻⁵all six are the same algebrabest route5.5·10⁻⁶worst route2.2·10⁻⁴spread across the six41condition of the linearisation8.3·10¹²the spectra agreeand the arithmetic does not
Fig. 8 Six routes to the same spectrum at γ = 10⁶, differing by a factor of forty.
Six ways of computing one spectrum, at a change of units of 100Three linearisations — the first companion form, the second, and the symmetric member of the DL(Q) family — each reduced to a standard eigenvalue problem in two ways: by inverting the leading coefficient, whose eigenvalues are λ, and by inverting the trailing one, whose eigenvalues are 1/λ. All six have exactly the eigenvalues of the quadratic in exact arithmetic. Measured against the closed form at γ = 100, the best is first/trailing at 4.383·10⁻¹⁵ and the worst first/leading at 7.489·10⁻¹⁴, a spread of 17.08. Under the leading reduction the symmetric form and the first companion form are THE SAME MATRIX — −A₁⁻¹A₀ is [[−M⁻¹C, −M⁻¹K], [I, 0]] for both — so the distinction between them is one the inversion discards, and it survives only under the trailing one.first · leading7.49·10⁻¹⁴first · trailing4.38·10⁻¹⁵second · leading2.28·10⁻¹⁴second · trailing8.86·10⁻¹⁵symmetric · leading7.49·10⁻¹⁴symmetric · trailing4.71·10⁻¹⁴all six are the same algebrabest route4.4·10⁻¹⁵worst route7.5·10⁻¹⁴spread across the six17condition of the linearisation452the spectra agreeand the arithmetic does not
Fig. 9 And the same six where the units are sensible, differing by noise.
The 16 eigenvalues of an 8 × 8 quadratic eigenvalue problem, computed and in closed formλ²M + λC + K for a chain of 8 masses with C = 0.3M + 0.1K. The crosses are the closed form — one scalar quadratic per eigenvalue of K, whose roots are known exactly — and the discs are the eigenvalues a real Schur factorisation returns from the 16 × 16 first companion linearisation. There are 16 of them for a matrix with 8 rows, of which 16 are complex and arrive in conjugate pairs, so the eigenvectors cannot be independent: 9 vectors in 8 dimensions never are. The worst disagreement between the two routes is 2.12·10⁻¹⁵, and the routes share nothing but the three coefficient matrices.00.0939569-2-1.24498-0.4899610.2650581.020081.7751real partimaginary parttwo routes, one spectrumeigenvalues16rows8complex16against the closed form2.1·10⁻¹⁵n rows and 2n eigenvaluesso the eigenvectors are not a basis
Fig. 10 The spectrum all of this is about, from the field’s first essay.
Backward and forward error against the condition numberA log–log plot over twelve decades of condition number. The backward error is a flat line at ten to the minus sixteen; the forward error rises in proportion to the condition number.110²10⁴10⁶10⁸10¹⁰10¹²10¹⁴10⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹condition number κ(A)relative errorforward errorbackward errorpredicted: κ · u8×8, 20 seeds per κ; dashed is the worstthe problem worsens, not the method
Fig. 11 A small residual is not a small error, in the field where the sentence was first measured.
The backward error of a hierarchical solve, against the error of the representation it usedSolve A_H x = b exactly and the residual against the matrix that was wanted is b − Ax = (A_H − A)x, so ‖b − Ax‖ ⁄ ‖A‖‖x‖ cannot be anything but the representation's own error. Measured across six accuracies spanning ten decades, the two track at a slope of 0.994 and sit a constant 6.7× apart, which is the difference between a norm of a matrix and a norm of that matrix applied to one vector. The reading is the one this field is built on: the accuracy knob is not an accuracy, it is a backward error chosen in advance. Everywhere else on this site a backward error is something an algorithm produced and somebody then measured; here it is a line in the program, and its size is known before the solve starts.10⁻¹⁵10⁻¹²10⁻⁹10⁻⁶10⁻³10⁻¹⁵10⁻¹²10⁻⁹10⁻⁶10⁻³‖A − A_H‖ ⁄ ‖A‖, the representation‖b − Ax‖ ⁄ ‖A‖‖x‖, the solveequala backward error, chosenslope0.99representation at 10⁻⁸1.2·10⁻⁹backward error there1.3·10⁻¹⁰representation at 10⁻¹²1.2·10⁻¹³backward error there2.5·10⁻¹⁴the compression is not an approximationit is a perturbation of the problem
Fig. 12 The backward error as the quantity an algorithm is entitled to be judged on.
How much a perturbation of the right-hand side is amplified, κ = 10⁶The cumulative distribution of the amplification factor over two hundred random perturbation directions, with the condition number marked as the upper limit.110¹10²10³10⁴10⁵10⁶10⁷00.250.50.751amplification of the input perturbationfraction of directions at or belowκ = 10·10⁵worst found 7.6·10⁵6×6, 200 directionsmedian reaches 0.29 of κ
Fig. 13 And the amplifier that turns it into a forward error.
The condition number of one eigenvalue, at an off-diagonal entry of 100A rising curve against the size of an off-diagonal entry, on logarithmic axes, with a flat line at one below it and a vertical marker at the current value.110¹10²10³110¹10²10³off-diagonal entry ccondition number of the eigenvalue√(1 + c²)decoupled: 1measuredthree routes, one number‖A − ZTZᵀ‖/‖A‖1.7·10⁻¹⁵closed form100computed 1/|yᵀx|100worst measured movement46four eigenvalues, two conditioning numbersthe symmetric case has one, and it is 1
Fig. 14 The per-eigenvalue condition number for a single matrix, which the quadratic’s generalises.
The same three schemes on a problem with no layer in itWorst nodal error against the grid size, both axes logarithmic, for a manufactured smooth solution on the identical operator at ε = 0.005. Adding no diffusion gives 0.0016, 4·10⁻⁴, 10·10⁻⁵, falling by four at each refinement. The tuned diffusion gives 0.067, 0.022, 0.0061 — 42 times worse at the coarsest grid, and falling more slowly.10²10⁻⁴10⁻³10⁻²10⁻¹grid points nworst nodal errorupwindtunedcentralthe same tuning, another problemtuned ÷ central at n = 3142tuned ÷ central at n = 12761central's error at the finest grid10·10⁻⁵exact on the problem it was derived fromand harmful on the one beside it
Fig. 15 A backward error whose nearby problem is not of the kind that was posed.
Two perturbation bounds and the error that was measured, on a 8×8 matrix spread over 8 decades of unitsThree curves against the size of an entrywise relative perturbation. The normwise bound κ_∞·ε is a valid bound and sits 4·10⁷ times above the componentwise one cond(A, x)·ε, which is also a bound and is nearly attained by the worst of forty random perturbations at each size.10⁻¹⁴10⁻¹³10⁻¹²10⁻¹¹10⁻¹⁰10⁻⁹10⁻¹⁵10⁻¹²10⁻⁹10⁻⁶10⁻³1relative size of the entrywise perturbationrelative forward errorκ_∞ · εcond(A,x) · εmeasuredboth bounds holdκ_∞(A)1.9·10⁸cond(A, x)4.8ratio of the bounds4·10⁷both curves above the data are boundsand only one of them is a measurement
Fig. 16 The componentwise condition number, which is the other place a norm hides the answer.
Where binary32 stops being able to hold the linearisation, and where the scaled problem does notForming the first companion linearisation needs γ²M to be representable. The upper row is whether every entry of (γ²M, γC, K) is finite in binary32, at twelve changes of units; the lower row is the same question after Fan–Lin–Van Dooren scaling. The boundary is √(largest finite value ÷ largest entry of M) = 1.8447·10¹⁹, computed from the format's parameters and nothing measured — and the sweep agrees with it at every stop: the last change of units that survives is 10¹⁹ and the first that does not is 10²⁰. The scaled row never fails, because δγ²M has norm about one whatever γ was. In a narrow format the scaling is not an accuracy device: it is what makes the problem exist.02468101201change of units, by exponent10⁰10¹10²10³10⁴10⁶10¹⁰10¹⁶10¹⁹10²⁰10⁴⁰10¹⁵⁰as writtenafter scalinga range questionlargest finite value3.4·10³⁸predicted boundary γ1.8·10¹⁹last γ that forms10¹⁹stops where scaling fails0not a poor answerno answer at all
Fig. 17 What the same change of units does in a narrower format, where it stops being an accuracy question.
The roots of ∏(x − i) up to degree 20, computed from the coefficients that define themA polynomial whose roots are the integers 1 to n, expanded exactly in BigInt and then handed to the route every library takes: the eigenvalues of the companion matrix. The measured relative error runs 1.711·10⁻¹³ at degree 6 to 0.007614 at degree 20 — the third digit of an answer whose truth is an integer. The other curve is the root condition number times the unit roundoff, which is a prediction made from the coefficients alone, and it tracks the measurement to within two orders at every degree. Above degree 19 the coefficients are integers larger than 2⁵³, so the polynomial handed to the routine is not the polynomial that was written down — the problem is damaged before any algorithm runs.57911131517192110⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²degreerelative error of the worst rootmeasuredκ × ua polynomial is its coefficientsworst root, measured0.0076predicted, κ × u0.0023root condition number10¹³largest coefficient1.4·10¹⁹the roots are integersand the coefficients are not the roots
Fig. 18 And the scalar case, where the coefficients cannot be written down at all.
What each way of eliminating a constraint inherits, over five decades of κ(A)The same system solved twice, at 8 unknowns and 3 constraints with κ(H) = 100. The range-space method forms S = AH⁻¹Aᵀ and inherits κ(S), which rises from 12.99 to 3.981·10¹⁰ — the square of κ(A), for the reason the normal equations square it. The null-space method solves with the reduced Hessian ZᵀHZ, whose condition number is 21.13 at the start of the sweep and 21.13 at the end: it does not contain κ(A) at all. The two forward errors, measured against a solution computed in BigInt rationals, follow their own condition numbers: 5.314·10⁻⁶ against 5.788·10⁻¹² at the far end. Both methods are correct and one of them is usable.01234510⁻¹⁷10⁻¹³10⁻⁹10⁻⁵10⁻¹10³10⁷10¹¹log₁₀ κ(A)condition number, and relative errorκ(S)κ(ZᵀHZ)range-space errornull-space erroragainst a BigInt answerκ(S) at κ(A) = 10⁵4·10¹⁰κ(ZᵀHZ), all stops21range-space forward error5.3·10⁻⁶null-space forward error5.8·10⁻¹²both are the same algebraand only one squares
Fig. 19 Two ways to write one constrained solve, inheriting different condition numbers.
A double root, approached: the pair separates like √ε and the accuracy fails like √uA chain of 8 masses at β = β*(1 + ε), where β* is the critical damping and the smallest mode's two eigenvalues coincide at ε = 0. The separation of that pair is 0.9657√ε at every one of twelve decades — a spread of 1.02 in the constant — and the computed spectrum's worst relative error against the closed form rises as the pair closes, reaching 3.732·10⁻⁸ at the boundary itself. That is √u times a small constant: half the digits, on a problem where κ(K) is 32.16 at every stop and the coefficients are integers. Nothing here is ill conditioned in any sense this site has used before; what is unbounded is the derivative of the map from a coefficient to a double root.-15-13-11-9-7-5-3-110⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹log₁₀ ε, distance past the critical dampingseparation, and relative errorat ε = 0: 3.73·10⁻⁸separationcomputed errornothing is ill conditionedthe √ε constant0.97spread of it, twelve decades1error at the boundary3.7·10⁻⁸κ(K), unchanged throughout32half the digitsand no condition number to blame
Fig. 20 And a loss of accuracy with no condition number behind it at all.
The 16 real eigenvalues of an overdamped chain, in two groups of 8, with the certificate between themA chain of 8 masses with C = 8K, which is above the critical damping 5.75877 = 1/sin(π/2(n+1)), so the quadratic is hyperbolic and every one of its 16 eigenvalues is real. The vertical line is the μ at which Q(μ) is negative definite — a Cholesky that completes, and the whole proof that the spectrum is real. It also lies in the gap: exactly 8 eigenvalues above it and 8 below, with a gap of 0.6698 between the two groups. One factorisation answers both questions, which is the second thing a boolean would not have carried.-33-28.2505-23.5009-18.7514-14.0018-9.25229-4.502750eigenvalueQ(μ) ≺ 0one Cholesky, two answersabove the certificate8below it8the gap0.67critical β for this n5.8the spectrum is real by classnot by outcome
Fig. 21 The overdamped family every measurement here is made on.
Two Krylov methods for one quadratic, priced by the numbers they storeA chain of 40 masses. Arnoldi on the 80 × 80 linearisation stores m vectors of length 80 and returns m Ritz values; the second-order recurrence stores m vectors of length 40 and its projection is taken onto the QUADRATIC, which has 2m eigenvalues for an m × m problem. So at every subspace size the second route holds half as many numbers and returns twice as many approximations — a factor of four in Ritz values per number stored, exactly and by construction. Plotted against storage, its curve is the lower one at every point: at 240 numbers it is 0.01379 from the dominant eigenvalue where the linearised route needs 480 to reach 0.07294. Both converge slowly — twenty-six vectors buy three digits — because the chain's spectrum is an arc with no isolated extreme, and that is the honest half: this is a comparison of prices rather than a fast method.33.310⁻⁴10⁻³10⁻²10⁻¹1log₁₀ numbers storeddistance to the dominant eigenvalueArnoldi, linearisedprojected quadraticper number heldstorage, linearised2080storage, second-order1040Ritz values, linearised26Ritz values, second-order52half the storageand twice the approximations
Fig. 22 The same problem, approached by a subspace rather than by a factorisation.
One quadratic eigenvalue problem in 7 systems of units: what the solver reports and what the answer is worthAn overdamped chain of 8 masses, with λ replaced by γμ so that the coefficients become (γ²M, γC, K). That substitution is exact in both directions and divides the spectrum by γ exactly, so the closed form is still available and every error here is measured against it. The backward error of the eigenpair for the LINEARISED MATRIX — the residual a solver's own error analysis is about — is 6.76·10⁻¹⁶ at γ = 1 and 1.26·10⁻¹³ at γ = 106 — it moves by a factor of 320 while the other two move by 7.31·10⁷. The backward error for the QUADRATIC, which is what the person who posed the problem is entitled to, grows by 1.86·10⁸ across the same sweep, and the forward error follows it: 7.49·10⁻¹⁴ to 5.47·10⁻⁶. Nothing went wrong with the solver at any stop.012345610⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹log₁₀ γ, the change of unitsrelative errorforward errorη, the quadraticη, the linearisationagainst a closed formη(linearisation), worst1.3·10⁻¹³η(quadratic), worst2.6·10⁻⁷forward error, worst5.5·10⁻⁶coefficient spread4.2·10¹¹the solver is right at every stopabout a problem nobody asked
Fig. 23 Six decades: the separation between the three curves is already three orders.
The condition number the problem has, and the one the solver's error analysis is written againstThe same eigenvalue of the same overdamped chain of 6 masses, in seven systems of units. Its condition number as an eigenvalue of the QUADRATIC — Tisseur's, with the three coefficient norms in the numerator and yᵀQ′(λ)x in the denominator — is 4.338 at γ = 1 and 4.338 at γ = 10⁶, a spread of 1 over six decades: it cannot move, because a change of units is not a change of problem. Its condition number as an eigenvalue of the LINEARISED MATRIX runs 43.48 to 6.925·10¹¹, a factor of 1.59·10¹⁰. The forward error follows the second one, and the first one is the honest description of the problem — so the substitution has manufactured an ill conditioning that belongs to the algorithm rather than to the question.012345610⁻¹10²10⁵10⁸10¹¹log₁₀ γ, the change of unitscondition numberthe linearisationthe quadraticone problem, two amplifiersκ(quadratic), first4.3κ(quadratic), last4.3κ(linearisation), last6.9·10¹¹how far the first moved1the problem is as well conditioned as everand the method is not
Fig. 24 Six masses, and a quadratic condition number that still does not move.
The condition number the problem has, and the one the solver's error analysis is written againstThe same eigenvalue of the same overdamped chain of 10 masses, in seven systems of units. Its condition number as an eigenvalue of the QUADRATIC — Tisseur's, with the three coefficient norms in the numerator and yᵀQ′(λ)x in the denominator — is 5.554 at γ = 1 and 5.554 at γ = 10⁶, a spread of 1 over six decades: it cannot move, because a change of units is not a change of problem. Its condition number as an eigenvalue of the LINEARISED MATRIX runs 55.22 to 8.685·10¹¹, a factor of 1.57·10¹⁰. The forward error follows the second one, and the first one is the honest description of the problem — so the substitution has manufactured an ill conditioning that belongs to the algorithm rather than to the question.012345610⁻¹10²10⁵10⁸10¹¹log₁₀ γ, the change of unitscondition numberthe linearisationthe quadraticone problem, two amplifiersκ(quadratic), first5.6κ(quadratic), last5.6κ(linearisation), last8.7·10¹¹how far the first moved1the problem is as well conditioned as everand the method is not
Fig. 25 Ten, where the linearised one is larger and the quadratic’s is flat again.
Six ways of computing one spectrum, at a change of units of 104Three linearisations — the first companion form, the second, and the symmetric member of the DL(Q) family — each reduced to a standard eigenvalue problem in two ways: by inverting the leading coefficient, whose eigenvalues are λ, and by inverting the trailing one, whose eigenvalues are 1/λ. All six have exactly the eigenvalues of the quadratic in exact arithmetic. Measured against the closed form at γ = 104, the best is first/trailing at 2.638·10⁻⁹ and the worst second/trailing at 1.549·10⁻⁸, a spread of 5.872. Under the leading reduction the symmetric form and the first companion form are THE SAME MATRIX — −A₁⁻¹A₀ is [[−M⁻¹C, −M⁻¹K], [I, 0]] for both — so the distinction between them is one the inversion discards, and it survives only under the trailing one.first · leading8.57·10⁻⁹first · trailing2.64·10⁻⁹second · leading8.61·10⁻⁹second · trailing1.55·10⁻⁸symmetric · leading8.57·10⁻⁹symmetric · trailing5.87·10⁻⁹all six are the same algebrabest route2.6·10⁻⁹worst route1.5·10⁻⁸spread across the six5.9condition of the linearisation8.3·10⁸the spectra agreeand the arithmetic does not
Fig. 26 Four decades of units, where the six routes have separated by a factor of ten.
Backward error with and without the structure, for Levinson and for elimination, n = 12Both solvers are backward stable on this family by the usual measure: the smallest perturbation of any kind that explains either answer stays below 3.1·10⁻¹⁷ at every ρ, and the two curves are indistinguishable. Insisting the perturbation be a symmetric Toeplitz matrix — the kind of object the problem was posed with — lifts both by orders, and at ρ = 0.999 Levinson's rises by a factor of 2.48·10⁶. Neither number is alarming in absolute terms; what is worth carrying is that the reassuring one is the one that is reported, and the two are not measuring the same thing.10⁻³10⁻²10⁻¹110⁻¹⁹10⁻¹⁷10⁻¹⁵10⁻¹³10⁻¹¹10⁻⁹1 − ρbackward errorLevinson, Toeplitzelimination, ToeplitzLevinson, any kindelimination, any kindat ρ = 0.999Levinson, any perturbation3.1·10⁻¹⁷Levinson, Toeplitz only7.6·10⁻¹¹the ratio between them2.5·10⁶diagonal defect of the first0.97the number that is reportedand the number that is asked about
Fig. 27 What a solver’s own backward error looks like when nothing has been reformulated.
Backward and forward error of two routes to x, on 30×30 systems across eight decades of κBoth routes start from the same LU factorisation. The LU solve's backward error is 2.2·10⁻¹⁷ at every conditioning — a flat line at the unit roundoff. Multiplying by the explicitly formed inverse gives 4.5·10⁻⁵ at κ = 10¹⁴, a slope of 0.94 against κ. The two forward errors, drawn above them, are 2.8·10⁻⁴ and 0.015 — within a factor of 54, which is why the difference between the two methods is invisible to anyone measuring how wrong the answer is.10²10⁴10⁶10⁸10¹⁰10¹²10¹⁴10⁻¹⁸10⁻¹⁵10⁻¹²10⁻⁹10⁻⁶10⁻³1κ₂(A)relative errorforward, A⁻¹bforward, A\bbackward, A⁻¹bbackward, A\bat κ = 10¹⁴η, LU solve2.2·10⁻¹⁷η, via the inverse4.5·10⁻⁵forward, LU solve2.8·10⁻⁴forward, via the inverse0.015one factorisation, two ways to use itand one of them forfeits the backward error
Fig. 28 And a computation whose backward error belongs to an object nobody wanted.
Backward error, forward error and the condition number, with measured valuesTwo boxes at the top — the problem posed and the nearby problem the algorithm answered exactly — and two answers below them, with the distances between all four labelled by numbers from a Hilbert solve.the problem you posedA = H10b = A·(1, 2, …, 10)the problem it answered exactlyA + δA, b + δb‖δ‖ / ‖A‖ = 2.3·10⁻¹⁷the answer you wantedx = (1, 2, …, 10), exactlythe answer you gotx̂, wrong by 2.7·10⁻⁴ relativebackward error 2.3·10⁻¹⁷forward error 2.7·10⁻⁴κ = 1.6·10¹³κ · η = 3.6·10⁻⁴, and the measured forward error is 2.7·10⁻⁴.The algorithm is not at fault. The problem is.H10, LU with partial pivotingresidual and error differ
Fig. 29 The inequality this essay’s accounting is written against.
How close Hager's estimate is to the true κ₁, over 200 seeded 8×8 matricesFive bars. The estimate is exactly the true condition number on 81% of the sample and inside ten per cent on 87%; the worst underestimate in the whole sample returns 38% of the truth. The last bar is the matrix built to defeat it, at 7.7%, well below anything the random sample reached.each bar is a percentage — of the sample, or of the true condition numberexactly right80.5%inside 10%87.0%inside a factor of 287.0%worst in the sample, ×10037.7%the constructed matrix, ×1007.7%usually exactexact share0.81worst of the sample0.38the constructed matrix0.077a routine that is right most of the timeand never wrong in the safe direction
Fig. 30 An estimated condition number, and what it can be fooled by.
The forward error of a hierarchical solve, and κ times the backward error that was chosen for itForward error ⪅ condition number × backward error is the identity this collection is organised around, and it is normally used after the fact: the algorithm ran, somebody measured what it did, and the condition number explains the difference. Here both factors are known in advance — κ = 20.88 is a property of the problem, and the backward error was set at the top of the program — so the upper line is a prediction rather than an account. The measured error tracks it at a slope of 0.971 and sits 16× below it throughout, which is the usual looseness of a worst-case bound applied to one right-hand side and not a failure of the prediction. What the figure licenses is the sentence a code needs: decide how many digits the answer requires, divide by κ, and compress to that.10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹‖A − A_H‖ ⁄ ‖A‖, chosen‖x − x*‖ ⁄ ‖x*‖κ × the chosen backward errorthe error in the answerboth factors known firstκ21chosen at 10⁻⁸1.4·10⁻⁹predicted forward2.9·10⁻⁸measured forward1.6·10⁻⁹bound ⁄ measured26the amplifier, used forwardsfor once
Fig. 31 A forward error predicted from a backward one, where the prediction holds.
What two lines of scaling are worth: the same quadratic in nine systems of unitsThe forward error against the closed form for an overdamped chain of 12 masses, before and after Fan–Lin–Van Dooren scaling. The unscaled curve runs 3.72·10⁻¹⁴ to 0.3958 — every digit gone by the far end — and the scaled one runs 1.04·10⁻¹³ to 3.02·10⁻¹⁴, flat to within a factor of 8.1. The scaling is γ = √(‖K‖/‖M‖) and δ = 2/(‖K‖ + γ‖C‖), computed from three norms and nothing else, and the map back is λ = γμ with no rounding in the statement. Flatness is the half that matters: after scaling every stop of the sweep IS the same problem, so there is nothing left for the change of units to do.0246810⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹log₁₀ γ, the change of unitsforward erroras writtenafter scalingone change of variableunscaled, worst0.4scaled, worst10⁻¹³orders recovered13scaled coefficient spread4.5the answer was never the problemthe units were
Fig. 32 The repair at twelve masses.
Where fp16 stops being able to hold the linearisation, and where the scaled problem does notForming the first companion linearisation needs γ²M to be representable. The upper row is whether every entry of (γ²M, γC, K) is finite in fp16, at twelve changes of units; the lower row is the same question after Fan–Lin–Van Dooren scaling. The boundary is √(largest finite value ÷ largest entry of M) = 255.94, computed from the format's parameters and nothing measured — and the sweep agrees with it at every stop: the last change of units that survives is 100 and the first that does not is 1000. The scaled row never fails, because δγ²M has norm about one whatever γ was. In a narrow format the scaling is not an accuracy device: it is what makes the problem exist.02468101201change of units, by exponent10⁰10¹10²10³10⁴10⁶10¹⁰10¹⁶10¹⁹10²⁰10⁴⁰10¹⁵⁰as writtenafter scalinga range questionlargest finite value6.6·10⁴predicted boundary γ256last γ that forms100stops where scaling fails0not a poor answerno answer at all
Fig. 33 And the same units in a format where the coefficients stop being representable at 256.
One quadratic eigenvalue problem in 9 systems of units: what the solver reports and what the answer is worthAn overdamped chain of 6 masses, with λ replaced by γμ so that the coefficients become (γ²M, γC, K). That substitution is exact in both directions and divides the spectrum by γ exactly, so the closed form is still available and every error here is measured against it. The backward error of the eigenpair for the LINEARISED MATRIX — the residual a solver's own error analysis is about — is 7.1·10⁻¹⁶ at γ = 1 and 2.57·10⁻¹² at γ = 108 — it moves by a factor of 7022 while the other two move by 7.37·10¹¹. The backward error for the QUADRATIC, which is what the person who posed the problem is entitled to, grows by 7.03·10¹¹ across the same sweep, and the forward error follows it: 9.14·10⁻¹⁵ to 0.00674. Nothing went wrong with the solver at any stop.0246810⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹log₁₀ γ, the change of unitsrelative errorforward errorη, the quadraticη, the linearisationagainst a closed formη(linearisation), worst2.6·10⁻¹²η(quadratic), worst4.6·10⁻⁴forward error, worst0.0067coefficient spread4.2·10¹⁵the solver is right at every stopabout a problem nobody asked
Fig. 34 Six masses, where the three curves separate at the same rate.
Jacobi, Gauss–Seidel and SOR at ω = 1.000A semi-logarithmic plot of relative residual against iteration for three stationary methods, with dashed reference curves showing the rate each is predicted to contract at.015030045060075090010⁻¹³10⁻¹¹10⁻⁹10⁻⁷10⁻⁵10⁻³10⁻¹iteration‖r‖ / ‖b‖JacobiGauss–SeidelSOR ω=1.00closed form vs measuredρ Jacobi, exact0.99ρ measured0.99ρ Gauss–Seidel, exact0.981D Laplacian, n = 24ω optimal = 1.777
Fig. 35 The stiffness spectrum the closed form is built from.

What links here

Computed from the collection, not written here: the essays that point at this one.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A flat tag is an object no other essay names yet.

Backward errorCondition numberExact ground truthForward errorInverse iterationLinearisationMatrix polynomialQuadratic eigenvalue problemScaling