The eigenvalue problem that is not linear

The scaling that buys ten orders

Two lines computed from three norms, a change of variable that is exact in both directions, and the whole of the loss the previous essay measured comes back — flat, at every stop, because after scaling every stop is the same problem.

Worth reading first: The units the matrix is measured in · A matrix that depends on its own eigenvalue · The exact answer to a nearby problem.

The previous essay ends with a problem that has lost every digit it had, under a change of variable that is exact in both directions. This one is the repair, and the repair is two lines.

γ = √(‖K‖/‖M‖),      δ = 2/(‖K‖ + γ‖C‖).

Replace λ by γμ, multiply the whole polynomial by δ, and solve the quadratic with coefficients (δγ²M, δγC, δK). Every eigenvalue of the original is γ times an eigenvalue of the scaled problem, exactly. Both parameters are computed from three norms and nothing else — no iteration, no tuning, no reference to the answer.

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. 1 The same eight decades of badly chosen units as the previous essay, with and without two lines in front of the solver. The flat curve is the interesting one.

What it recovers, and the shape that matters

At n = 8, over γ from 1 to 10⁸: the unscaled forward error runs 7.5·10⁻¹⁴ to 1.3·10⁻³, and the scaled one runs 1.3·10⁻¹³ to 1.6·10⁻¹³. Ten orders of magnitude, and — the half that matters more — flat.

Ten orders is the headline and flatness is the finding. Flatness is what says the repair is the right one rather than a lucky one. A device that reduced the error by a constant factor would leave a reader with a slope and a worry: it would be helping, at a rate that runs out. This leaves a horizontal line, and the reason is structural. After scaling, every stop of the sweep is the same problem in the same units, so there is nothing left for γ to do — the sweep has been collapsed to a point rather than tilted. The coefficient norms come out within a factor of a few hundred of each other at every stop, where they spanned 4·10¹⁵ before, and the backward error for the quadratic — the quantity the previous essay shows growing to 1.2·10⁻⁴ — sits at 1.5·10⁻¹⁵ throughout.

Why those two numbers

γ makes the outer coefficients balance: after the substitution ‖γ²M‖ and ‖K‖ are equal by construction, which is the same idea as the units the matrix is measured in — a row scaling chosen so that no row is systematically larger than another — carried from a matrix to a polynomial. δ then sets the overall size, so that ‖Q̃‖ is about one and no coefficient is near the top or bottom of the format’s range.

Neither is subtle and neither is a heuristic in the sense choosing without knowing uses the word. There is no parameter being guessed against a truth that is not available: the scaling is a change of variable, it is exact, and the only thing being chosen is which exact change of variable to make. If the choice were bad the answer would still be right; it would merely be no better than before.

What it does not do, which is where the interesting part is

γ = √(‖K‖/‖M‖) is a single number, and it balances the polynomial as a whole. It says nothing about where the eigenvalues are, and the natural next question is whether the same three norms can say that too.

They can, half of the time, and the half they fail on is instructive.

The tropical roots are the corners of the max-plus polynomial with coefficients ‖M‖, ‖C‖ and ‖K‖: if ‖C‖² > ‖M‖‖K‖ there are two of them, at ‖K‖/‖C‖ and ‖C‖/‖M‖, and otherwise a double one at √(‖K‖/‖M‖), which is γ. They are advertised as estimates of the moduli of the two groups of eigenvalues — obtainable before anything runs, from three cheap numbers.

A prediction from three numbers, exact at one end of the spectrum and wrong by n² at the otherThe tropical roots of the max-plus quadratic with coefficients ‖M‖, ‖C‖ and ‖K‖, divided by the extreme moduli they are supposed to estimate, for chains of 4 to 32 masses with C = 6M + 0.5K. The large root is within 5.7 per cent of the largest modulus at every size. The small root is out by 5.36, 17.1, 60.8 and 229.6 — a factor growing like the square of the size. The reason is structural: a norm is a maximum, the small end of this spectrum is set by the SMALLEST eigenvalue of K, which is 4sin²(π/2(n+1)), and no norm of K contains that number. A quantity built out of maxima is exact where the answer is a maximum and silent where it is a minimum.11.31.610⁻¹110¹10²10³log₁₀ ntropical root ÷ actual modulusexactsmallest moduluslargest modulusthree norms, two endslarge root, n = 40.96large root, n = 320.94small root, n = 45.4small root, n = 32230a maximum predicts a maximumand says nothing about a minimum
Fig. 2 The two tropical roots divided by the extreme moduli they estimate, for chains of 4 to 32 masses. One ratio is the same number at every size and the other is not.

Measured on the overdamped chain, at four sizes: the large tropical root divided by the largest modulus is 0.961, 0.948, 0.944, 0.943 at n = 4, 8, 16 and 32. The small tropical root divided by the smallest modulus is 5.36, 17.08, 60.83, 229.6 over the same four sizes — a factor growing like n².

The reason is structural rather than a defect of the bound, and it is worth stating as a general sentence:

A norm is a maximum. It is exact about the end of a spectrum that is a maximum and says nothing about the end that is a minimum.

The largest eigenvalue modulus of this family is governed by ‖C‖/‖M‖, which is a ratio of norms; the smallest is governed by the smallest eigenvalue of K, which is 4sin²(π/2(n+1)) and falls like 1/n². No norm of K contains that number. Nothing about the estimate is being sloppy — it is answering the question it can answer.

This site has said something close to it once before from the other side. Small compared to what is about relative accuracy in the small eigenvalues of a symmetric matrix, and the whole difficulty there is the same: quantities that describe a matrix as a whole are quantities about its top end.

One γ, and when one is not enough

The tropical roots are not only a prediction; they are also the argument for a second scaling. When the max-plus polynomial has two distinct corners the eigenvalues fall into two groups whose moduli are widely separated, and a single γ cannot put both of them near one. The device the literature offers is to scale twice — once with each tropical root — and to keep, from each run, the eigenvalues that group predicts.

On this family it is not needed, and the reason is worth reading because it is the same reason the prediction half-fails. The two tropical roots here are ‖K‖/‖C‖ and ‖C‖/‖M‖, and their ratio is ‖C‖²/(‖M‖‖K‖), which for the overdamped chain is about a hundred. A hundred is not a separation that hurts: the coefficients after one scaling come out within a factor of a few hundred of each other, and the backward error sits at the rounding level for every eigenvalue, small and large alike, at every stop of the sweep. Nothing in the measurement asks for a second pass.

What would ask for one is a problem whose two groups are twenty decades apart, which is exactly the shape of a palindromic quadratic — and there the repair turns out to be neither one scaling nor two, but a division. That the same symptom has three different repairs in three different families is not a defect of the theory; it is what it looks like when a phenomenon is being described from several sides.

Reading the numbers at the far end

It is worth walking one stop of the sweep slowly, because every quantity in the argument is visible in it.

At γ = 10⁸ the coefficients are (10¹⁶M, 10⁸C, K) with norms 2.8·10¹⁶, 2.0·10⁹ and 6.8. The eigenvalues are the chain’s, divided by 10⁸, so they run from about 2·10⁻¹⁰ to 7·10⁻⁸. Now look at the scale in the backward error’s denominator: |λ|²‖M‖ is about 10⁻¹⁶ × 10¹⁶ ≈ 1, |λ|‖C‖ is about 10⁻⁸ × 10⁹ ≈ 10, and ‖K‖ is 6.8. All three terms are of order one — which is exactly right, and exactly the problem. The residual ‖Q(λ)x‖ is being compared against a quantity of order one, while the entries being cancelled to produce it are of order 10¹⁶. Sixteen digits of cancellation, in a format that has sixteen digits.

Scaling replaces those coefficients with three matrices of norm about one, and the same cancellation is between numbers of order one. Nothing else about the problem changed: same eigenvalues up to a factor, same conditioning, same solver, same arithmetic. That is the whole mechanism, and it is why the recovery is complete rather than partial.

The two lines are cheap, and the alternative is not

The cost of the repair is three Frobenius norms, a square root and a division: O(n²) work in front of an O(n³) factorisation, which is free in any accounting anybody uses. It is worth stating because the natural alternative — solve, notice the answer is bad, solve again in different units — costs a factor of two and requires noticing, and the previous essay is a demonstration that nothing available at run time does the noticing.

There is a third option that a reader might reach for: do the arithmetic in higher precision. It works, and it is worth pricing against this. Doubling the significand buys sixteen more digits and costs a factor of anywhere from eight to a hundred in time depending on the hardware, which is the measurement buying the accuracy back makes in the opposite direction. Scaling buys ten of those digits for three norms. Where the two meet is a real engineering question and it has an obvious answer.

The ordering, which is the practical finding

Two knobs have now been identified: which units and which linearisation. A reader who has to fix one first is entitled to be told which.

The measurement says the units, by a long way. At γ = 10⁶, the six ways of solving one problem — three linearisations, each reduced two ways — give forward errors from 5.5·10⁻⁶ to 2.2·10⁻⁴, a spread of 41. Scaling the same problem takes every one of them to about 10⁻¹³. So the choice of linearisation is worth a factor of tens and the choice of units is worth ten orders, and the sensible order to fix them in is not a matter of taste.

That ordering is the sort of thing this site’s combination field exists to find — four knobs and one floor is the same shape of result for a different set of parameters — and it arrives here for free, because both knobs were measured against the same closed form.

The scaling is not optional in a narrow format

There is a second reason to scale, and in a narrow arithmetic it is the only one that matters: at some point γ²M stops being representable.

The boundary is √(largest finite value ÷ largest entry of M), which is a closed form computed from the format’s own parameters. In binary64 it is 1.3·10¹⁵⁴ and nobody meets it by accident. In binary32 it is 1.8·10¹⁹, and in fp16 it is 256.

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. 3 Whether the coefficients can be written down at all, in one format, at twelve changes of units — and the same question after scaling, which never fails.

Past that boundary the entries are infinities, the linearisation contains them, and there is no answer rather than a poor one. The scaled coefficients are representable at every stop, because δγ²M has norm about one whatever γ was. So in a format with a short exponent the two lines are not an accuracy device — they are what makes the problem exist, which is the other half of a format being the half that decides.

The trap inside that is worth its own sentence. The norm the scaling is computed from can overflow before the scaling that would prevent the overflow has been computed. A naive Frobenius norm sums squares, so it fails at √(largest finite value) even when the answer is comfortably representable — measured in binary32, the naive route returns an infinity from 10¹⁹ upwards while the true norms run to 5.8·10²² and are perfectly representable. float.js’s scaled norm, which is the repair a norm that overflows before it is a norm is about, returns them correctly at every stop. The same trap, one level up, and with a consequence rather than an inconvenience: the quantity that overflows is γ’s own input.

What a code should actually do

Collecting the measurements into a procedure, because the field is at the point where one can be written down.

Compute the three norms first, with a scaled norm rather than a naive one. They are the diagnostic and they are γ’s input, and the naive route fails before the problem does.

Scale, always. There is no case in which it hurts: when the coefficients are already balanced γ comes out near one and δ near a constant, and the substitution is the identity to within a rounding. A caller who scales unconditionally pays three norms and can stop thinking about units.

Then choose the linearisation, and it matters less. The first companion form reduced by inverting the leading coefficient is the default for a reason; the trailing reduction is worth having when the eigenvalues near zero are the ones wanted, because it maps them to the large end where a Schur factorisation resolves them best.

And report η for the quadratic rather than the residual for the matrix. One matrix–vector product with each coefficient, three norms already computed. It is the only number in the whole computation that answers the caller’s question.

That last item is the one this field would change about existing software if it could change one thing. Everything above it is a repair; that one is a measurement, and the measurements are what this site is for.

What is left after the scaling

The honest boundary of this essay is that scaling fixes the part of the problem that is about units and none of the part that is about conditioning. If a quadratic has a genuinely ill conditioned eigenvalue — one whose κ is 10¹⁰ because Q′(λ) is nearly singular along the eigenvector, not because the coefficients are badly balanced — then γ and δ change nothing about it. The condition number that the previous essay measures at 4.98 is invariant under the substitution in both directions: that is what made the loss attributable to the method, and it is equally what makes the repair unable to help when the loss is not.

Which is the same division of labour this site has drawn from its first essay onwards, arriving in a field where the third party — the reformulation — is new. Scaling removes the reformulation’s contribution exactly. The problem’s own difficulty is still the problem’s.

Why this is a change of variable and not a preconditioner

One last distinction, because the words are close enough to cause trouble.

A preconditioner replaces a problem by a different problem whose answer is related to the original’s, and the relation costs something to undo: changing the condition number on purpose solves M⁻¹Ax = M⁻¹b and the answer x is the same, but the residual is not, the iteration count is not, and the theory has to be redone for the pair rather than for A.

This is not that. The scaled polynomial’s eigenvalues are the original’s divided by γ, exactly, and the eigenvectors are unchanged — not approximately, not up to a rounding, but as an algebraic identity in one line. Nothing has to be undone except a multiplication, and no property has to be re-derived. That is what makes it worth doing unconditionally: a preconditioner is a bet, and a change of variable is not.

At other settings

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 4 masses, before and after Fan–Lin–Van Dooren scaling. The unscaled curve runs 7.01·10⁻¹⁵ to 4.331·10⁻⁴ — every digit gone by the far end — and the scaled one runs 7.67·10⁻¹⁵ to 4.77·10⁻¹⁵, flat to within a factor of 2.25. 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, worst4.3·10⁻⁴scaled, worst7.7·10⁻¹⁵orders recovered11scaled coefficient spread4.6the answer was never the problemthe units were
Fig. 4 Four masses: the same recovery, which is what makes it a property of the units rather than of the size.
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. 5 And twelve.
A prediction from three numbers, exact at one end of the spectrum and wrong by n² at the otherThe tropical roots of the max-plus quadratic with coefficients ‖M‖, ‖C‖ and ‖K‖, divided by the extreme moduli they are supposed to estimate, for chains of 4 to 32 masses with C = 6M + 0.2K. The large root is within 4.4 per cent of the largest modulus at every size. The small root is out by 5.76, 18.6, 66.7 and 252 — a factor growing like the square of the size. The reason is structural: a norm is a maximum, the small end of this spectrum is set by the SMALLEST eigenvalue of K, which is 4sin²(π/2(n+1)), and no norm of K contains that number. A quantity built out of maxima is exact where the answer is a maximum and silent where it is a minimum.11.31.610⁻¹110¹10²10³log₁₀ ntropical root ÷ actual modulusexactsmallest moduluslargest modulusthree norms, two endslarge root, n = 41large root, n = 321small root, n = 45.8small root, n = 32252a maximum predicts a maximumand says nothing about a minimum
Fig. 6 Weaker stiffness damping: the large root’s ratio moves to 1.04 and stays there at every size.
A prediction from three numbers, exact at one end of the spectrum and wrong by n² at the otherThe tropical roots of the max-plus quadratic with coefficients ‖M‖, ‖C‖ and ‖K‖, divided by the extreme moduli they are supposed to estimate, for chains of 4 to 32 masses with C = 6M + 4K. The large root is within 31 per cent of the largest modulus at every size. The small root is out by 3.09, 8.59, 29 and 107.8 — a factor growing like the square of the size. The reason is structural: a norm is a maximum, the small end of this spectrum is set by the SMALLEST eigenvalue of K, which is 4sin²(π/2(n+1)), and no norm of K contains that number. A quantity built out of maxima is exact where the answer is a maximum and silent where it is a minimum.11.31.610⁻¹110¹10²10³log₁₀ ntropical root ÷ actual modulusexactsmallest moduluslargest modulusthree norms, two endslarge root, n = 40.73large root, n = 320.69small root, n = 43.1small root, n = 32108a maximum predicts a maximumand says nothing about a minimum
Fig. 7 And stronger, where it settles at 0.69 — the ratio depends on the damping and not on the size.
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. 8 The same question in fp16, where the boundary arrives at a change of units of 256.
Where binary64 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 binary64, 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.3408·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 ∞. 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 value1.8·10³⁰⁸predicted boundary γ1.3·10¹⁵⁴last γ that forms10¹⁵⁰stops where scaling fails0not a poor answerno answer at all
Fig. 9 And in binary64, where it arrives at 10¹⁵⁴.
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. 10 The loss this essay repairs, over the same eight decades.
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. 11 And the condition number the repair does not touch, because it never moved.
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. 12 The second knob, worth a factor of forty where this one is worth ten orders.
Four pivot rules on [[ε, 1], [1, 1]] with ε = 10⁻¹⁶, before and after its first row is scaled by 1/εEight bars of forward error. On the matrix as given, no pivoting loses the answer entirely and all three pivot rules return it to rounding. Multiply the first row by 1/ε — which does not change the solution — and partial pivoting makes no interchange at all and returns the same wrong answer that no pivoting does. Scaled partial pivoting and complete pivoting are unmoved.forward error, relative to a solution of exactly (1, 1)no pivoting · as given1.2 0 interchangesno pivoting · rows scaled1 0 interchangespartial · as given1.1·10⁻¹⁶ 1 interchangepartial · rows scaled1 0 interchangesscaled partial · as given1.1·10⁻¹⁶ 1 interchangescaled partial · rows scaled2.2·10⁻¹⁶ 1 interchangecomplete · as given2.2·10⁻¹⁶ 1 interchangecomplete · rows scaled2.2·10⁻¹⁶ 1 interchangethe same problem twicepartial, as given1.1·10⁻¹⁶partial, rows scaled1its relative residual5·10⁻¹⁷complete, rows scaled2.2·10⁻¹⁶the two systems have the same solutionand one pivot rule cannot see it
Fig. 13 A scaling that changes which pivot is chosen, from the elimination field.
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. 14 The componentwise condition number, which is the one a row scaling cannot move.
κ(A) and κ of the row-equilibrated matrix, along both families, n = 8Write A = D·X with D diagonal and every row of X of unit norm. Every theorem about relative accuracy is a hypothesis on κ(X), and κ(A) appears in none of them — which is easy to read past and is the whole difference between the two families here. Along the graded family κ(A) climbs from 271 to 7.04·10⁵⁰ and κ(X) is 4.892 at every one of the six matrices — the grading is exactly what the diagonal factor absorbs. Along the uniform family κ(X) climbs to 3.87·10²⁵. That is the number that says which question has an answer, and it is not the number anybody prints.01020304050110¹⁰10²⁰10³⁰10⁴⁰10⁵⁰log₁₀ κ(A)log₁₀ of the condition numberκ(X) = κ(A)graded familyuniform familyone number decides, and it is not κκ(X), graded, at every grading4.9κ(A), graded, at the widest7·10⁵⁰κ(X), uniform, at the widest3.9·10²⁵κ(A) there8·10²⁸κ is a fact about the matrixand the hypothesis is about a factor of it
Fig. 15 Where a scaling changes a verdict rather than an accuracy.
Where each norm works, for a vector of 8Four horizontal rows, one per format. Each carries a pale bar for the format's whole range, a bar above it for the scaled norm and a shorter bar below it for the naive one.-47-37-27-17-7313233301234log₁₀ of the vector's normfp1611 bitsbfloat168 bitstf3211 bitsbinary3224 bitspale: the format's range · blue: √(Σ(xᵢ/m)²)·m · red: √(Σxᵢ²)fp16 and tf32 have the same eleven significand bitsand their bars do not overlap
Fig. 16 The norm that overflows before it is a norm, which is the trap this essay meets again.
A 16-bit budget, split between range and precisionTwo curves against the width of the exponent field. One rises steeply and one falls in a straight line. Vertical lines mark the splits real hardware formats use.3456789101100.250.50.751bits in the exponent fieldeach curve as a fraction of its own maximumbfloat16fp16rangeprecisionto 617 decadesto 3.9 digitswhat the split buysbfloat16: largest number3.4·10³⁸fp16: largest number6.6·10⁴a bit of exponent doubles the rangea bit of significand adds a third of a digit
Fig. 17 What a sixteen-bit format can hold, and where its exponent runs out.
The representable numbers with a 3-bit significandA number line from 0.5 to 4 with a tick at every representable value. The ticks are evenly spaced inside each power-of-two interval and twice as far apart in the next one up.[½, 1)[1, 2)[2, 4)0.5124gap 0.125gap 0.25 — twice as wide8 values per octavespacing doubles at each power of two
Fig. 18 The representable numbers themselves, spaced.
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. 19 The scalar case of the same subject, where the coefficients stop being representable.
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. 20 The spectrum being computed throughout.
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 And the family it is computed on.
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. 22 A loss that no scaling repairs, because it is not about the units.
What a reciprocal pairing is worth: three ways to the small half of a palindromic spectrumA palindromic quadratic of size 6 whose spectrum spreads by two decades for every decade of b. The general solver returns the large eigenvalues to 5.52·10⁻¹⁵ at every stop and the small ones to 1.041·10⁻⁷ at the far end. Taking the reciprocals of the large ones instead returns the small ones to 4.89·10⁻¹⁵ — seven orders, for a division, out of a symmetry the solver discarded. The structure-preserving route, which enforces the pairing exactly, is the worst of the three on the eigenvalues themselves: 6.538·10⁻⁶, because each pair comes from one computed number and both members carry its error. Preserving a symmetry and using one are different acts with different prices.1357910⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴log₁₀ b, the couplingrelative errorsmall half, directstructure-preservingsmall half, by 1/λone divisionlarge half, direct5.5·10⁻¹⁵small half, direct10⁻⁷small half, by 1/λ4.9·10⁻¹⁵structure-preserving6.5·10⁻⁶the structure is not decorationit is where half the accuracy is
Fig. 23 And a repair that is a division rather than a scaling.
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 6 masses, before and after Fan–Lin–Van Dooren scaling. The unscaled curve runs 9.14·10⁻¹⁵ to 0.006738 — every digit gone by the far end — and the scaled one runs 2.59·10⁻¹⁴ to 1.02·10⁻¹⁴, flat to within a factor of 7.39. 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.0067scaled, worst2.6·10⁻¹⁴orders recovered12scaled coefficient spread4.6the answer was never the problemthe units were
Fig. 24 Six masses: the recovery is the same, which is what makes it about the units.
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 10 masses, before and after Fan–Lin–Van Dooren scaling. The unscaled curve runs 3.1·10⁻¹³ to 0.07412 — every digit gone by the far end — and the scaled one runs 6.09·10⁻¹⁴ to 2.72·10⁻¹⁴, flat to within a factor of 5.65. 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.074scaled, worst6.1·10⁻¹⁴orders recovered11scaled coefficient spread4.5the answer was never the problemthe units were
Fig. 25 And ten.
A prediction from three numbers, exact at one end of the spectrum and wrong by n² at the otherThe tropical roots of the max-plus quadratic with coefficients ‖M‖, ‖C‖ and ‖K‖, divided by the extreme moduli they are supposed to estimate, for chains of 4 to 32 masses with C = 6M + 1K. The large root is within 15 per cent of the largest modulus at every size. The small root is out by 4.8, 15, 52.9 and 199.1 — a factor growing like the square of the size. The reason is structural: a norm is a maximum, the small end of this spectrum is set by the SMALLEST eigenvalue of K, which is 4sin²(π/2(n+1)), and no norm of K contains that number. A quantity built out of maxima is exact where the answer is a maximum and silent where it is a minimum.11.31.610⁻¹110¹10²10³log₁₀ ntropical root ÷ actual modulusexactsmallest moduluslargest modulusthree norms, two endslarge root, n = 40.88large root, n = 320.85small root, n = 44.8small root, n = 32199a maximum predicts a maximumand says nothing about a minimum
Fig. 26 Damping of one, where the large tropical root sits at 0.85 of the largest modulus at every size.
A prediction from three numbers, exact at one end of the spectrum and wrong by n² at the otherThe tropical roots of the max-plus quadratic with coefficients ‖M‖, ‖C‖ and ‖K‖, divided by the extreme moduli they are supposed to estimate, for chains of 4 to 32 masses with C = 6M + 2K. The large root is within 24 per cent of the largest modulus at every size. The small root is out by 4, 12, 41.6 and 156 — a factor growing like the square of the size. The reason is structural: a norm is a maximum, the small end of this spectrum is set by the SMALLEST eigenvalue of K, which is 4sin²(π/2(n+1)), and no norm of K contains that number. A quantity built out of maxima is exact where the answer is a maximum and silent where it is a minimum.11.31.610⁻¹110¹10²10³log₁₀ ntropical root ÷ actual modulusexactsmallest moduluslargest modulusthree norms, two endslarge root, n = 40.79large root, n = 320.76small root, n = 44small root, n = 32156a maximum predicts a maximumand says nothing about a minimum
Fig. 27 And two, where it sits at 0.76 — the ratio moves with the damping and not with the size.
Where tf32 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 tf32, 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.8442·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. 28 tf32, whose exponent is binary32’s and whose significand is fp16’s, so its boundary is binary32’s.
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. 29 Ten decades of the loss being repaired.
Six ways of computing one spectrum, at a change of units of 108Three 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 γ = 108, the best is first/leading at 0.001258 and the worst second/trailing at 1.545, a spread of 1229. 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 · leading0.00126first · trailing0.491second · leading0.813second · trailing1.55symmetric · leading0.00126symmetric · trailing0.402all six are the same algebrabest route0.0013worst route1.5spread across the six1229condition of the linearisation8.3·10¹⁶the spectra agreeand the arithmetic does not
Fig. 30 And the second knob at the far end, where every route has lost every digit.
The backward error of a solve along a sequence, with the pivot order chosen fresh, kept, and kept after equilibrationA 10×10 conflict grid, 100 unknowns, with three of its rows scaled down through 9 decades as the sequence runs — a row that was ordinary becoming a row that is small in the matrix's own units. The sparsity pattern is identical at every member, so a symbolic phase computed once stays valid throughout. Choosing a fresh order each time holds the backward error at the working precision. Keeping the first member's order costs 2 replaced pivots and a backward error of 4.82·10⁻⁹. Keeping the same order after dividing each row by its largest entry costs nothing at all: 6.55·10⁻¹⁷, with no pivot replaced anywhere in the run. The ringed points on the upper curve are the members at which another pivot fell below the floor and was replaced.02468101210⁻¹⁸10⁻¹⁶10⁻¹⁴10⁻¹²10⁻¹⁰10⁻⁸member of the sequencebackward error of the solvefresh order · equilibrated kept orderringed: another pivot replaced hereone order, two sets of unitsfresh order, last member9.5·10⁻¹⁷kept order, last member4.8·10⁻⁹equilibrated, last member6.5·10⁻¹⁷pivots replaced, kept2pivots replaced, equilibrated0the perturbation floor √u1.1·10⁻⁸a reused pivot order is safe or notdepending on what the rows are measured in
Fig. 31 A scaling that changes which pivot an elimination chooses.
κ(A) and κ of the row-equilibrated matrix, along both families, n = 8Write A = D·X with D diagonal and every row of X of unit norm. Every theorem about relative accuracy is a hypothesis on κ(X), and κ(A) appears in none of them — which is easy to read past and is the whole difference between the two families here. Along the graded family κ(A) climbs from 271 to 7.04·10⁵⁰ and κ(X) is 4.892 at every one of the six matrices — the grading is exactly what the diagonal factor absorbs. Along the uniform family κ(X) climbs to 3.87·10²⁵. That is the number that says which question has an answer, and it is not the number anybody prints.01020304050110¹⁰10²⁰10³⁰10⁴⁰10⁵⁰log₁₀ κ(A)log₁₀ of the condition numberκ(X) = κ(A)graded familyuniform familyone number decides, and it is not κκ(X), graded, at every grading4.9κ(A), graded, at the widest7·10⁵⁰κ(X), uniform, at the widest3.9·10²⁵κ(A) there8·10²⁸κ is a fact about the matrixand the hypothesis is about a factor of it
Fig. 32 And one that changes a verdict rather than an accuracy.
Precision against range, with the 5-bit-exponent formats markedA scatter of formats with unit roundoff across and largest finite value up, both logarithmic. The two eight-bit formats sit at the lower left, joined to each other and to a marked position below one of them.10⁻¹⁶10⁻¹²10⁻⁸10⁻⁴10²10⁸10¹⁴10²⁰10²⁶10³²10³⁸unit roundofflargest finite valueE4M3E5M2bfloat16fp16tf32binary32binary64240 — what IEEE's rules would givethe octave the rule-breaking boughtE4M3 largest finite448under IEEE's rules240E5M2 largest finite5.7·10⁴seven bits and a sign, spent two waysno infinities in one of them
Fig. 33 The two axes of a format, separated.
Where each norm works, for a vector of 64Four horizontal rows, one per format. Each carries a pale bar for the format's whole range, a bar above it for the scaled norm and a shorter bar below it for the naive one.-47-37-27-17-7313233301234log₁₀ of the vector's normfp1611 bitsbfloat168 bitstf3211 bitsbinary3224 bitspale: the format's range · blue: √(Σ(xᵢ/m)²)·m · red: √(Σxᵢ²)fp16 and tf32 have the same eleven significand bitsand their bars do not overlap
Fig. 34 The window of magnitudes a naive norm can hold, which is where the repair’s own input lives.
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 14 masses, before and after Fan–Lin–Van Dooren scaling. The unscaled curve runs 6.21·10⁻¹⁴ to 1.074 — every digit gone by the far end — and the scaled one runs 1.24·10⁻¹³ to 6.63·10⁻¹⁴, flat to within a factor of 2.07. 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, worst1.1scaled, worst1.4·10⁻¹³orders recovered13scaled coefficient spread4.5the answer was never the problemthe units were
Fig. 35 Fourteen masses, which is the largest size the sweep is drawn at.
A prediction from three numbers, exact at one end of the spectrum and wrong by n² at the otherThe tropical roots of the max-plus quadratic with coefficients ‖M‖, ‖C‖ and ‖K‖, divided by the extreme moduli they are supposed to estimate, for chains of 4 to 32 masses with C = 6M + 0.5K. The large root is within 5.7 per cent of the largest modulus at every size. The small root is out by 5.36, 17.1, 60.8 and 229.6 — a factor growing like the square of the size. The reason is structural: a norm is a maximum, the small end of this spectrum is set by the SMALLEST eigenvalue of K, which is 4sin²(π/2(n+1)), and no norm of K contains that number. A quantity built out of maxima is exact where the answer is a maximum and silent where it is a minimum.11.31.610⁻¹110¹10²10³log₁₀ ntropical root ÷ actual modulusexactsmallest moduluslargest modulusthree norms, two endslarge root, n = 40.96large root, n = 320.94small root, n = 45.4small root, n = 32230a maximum predicts a maximumand says nothing about a minimum
Fig. 36 And the prediction at the damping every other measurement here uses.

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 truthLinearisationMatrix polynomialQuadratic eigenvalue problemScalingTropical roots