Real or complex by the sign of an error
Worth reading first: Every eigenvalue real, and a test that says so · A matrix that depends on its own eigenvalue.
A guarantee paid for in digits compared two ways of computing a hyperbolic quadratic’s spectrum near the edge of its class. A damped chain of masses with damping is hyperbolic — every eigenvalue real, as a property certified by one Cholesky factorisation — for every above a critical value , and at its two slowest eigenvalues sit apart, about to collide. A definite linearisation makes the real spectrum a property of the algorithm: it reduces the problem to a symmetric one, whose eigenvalues cannot be complex. It pays in digits, because its Cholesky divides by a Crawford number that vanishes like . The unstructured companion route — linearise, invert, take a real Schur form — keeps its digits and knows nothing of the class, so in principle it could return the colliding pair as a complex pair. On twenty chains rotated by random orthogonal congruences, it did so only at the boundary itself, .
The essay asked where, between and zero, the first complex pair appears. “The companion route moved the colliding pair by about relative at , while the pair was apart. The prediction is that on the twenty rotated chains the first complex pair appears at a margin between and , where the separation falls to the size of the companion route’s perturbation of it, and that no run returns one at or above.”
Both clauses hold, on a hundred chains rather than twenty. What happens below the margin where the first pair appears is the interesting part: the companion route does not start returning complex pairs. It starts tossing a coin.
A pair that can come back either way
The colliding pair belongs to the chain’s slowest mode, with stiffness for eight masses. Its two eigenvalues are the roots of , a centre and a half-separation , real above the boundary. The pair comes back complex exactly when the computed squared half-separation is negative. So the measurement that matters is not the pair’s error but the error in : call it , the computed squared half-separation minus the exact one, with a complex pair’s squared half-separation counted as minus its imaginary part squared. A run returns a complex pair exactly when .
At fifteen margins, from down to the boundary, the chain is rotated by a hundred random orthogonal congruences — the same spectrum, a different matrix each time, so that the rounding is different each time — and the companion route’s colliding pair is located against the closed-form spectrum. The smallest margins are a few units in the last place of : below about the margin rounds away entirely, and is stored as the same double as itself.
Where the first pair appears
No run of a hundred returns a complex pair at any margin from down to . The first appear at , on three runs. Then the share climbs: eleven at , eighteen at , twenty-four at , thirty-seven at , forty-five at . Below that it stops climbing. At , at and at the boundary itself it is forty-six, forty-six and forty-seven.
The prediction placed the first pair between and ; it came at the top of that range, and nothing came at or above. The predicted mechanism — the separation falling to the size of the perturbation — is the right one, and the next figure shows it at work. What the prediction did not say, and what the curve does, is that a margin below the perturbation does not make complex pairs certain. It makes them a coin toss.
The error does not care about the margin
The error has a median size between and at every one of the fifteen margins, with no trend. It is a property of the arithmetic acting on this matrix, not of how close the matrix is to the boundary. The exact is — at a margin of , at , zero at the boundary — and the two curves cross between and . Above the crossing the separation is far larger than any error and the pair stays real; below it the error dominates.
The square root explains the earlier essay’s observation. An error of in a squared half-separation is an error of about in the half-separation itself, when the half-separation is small — the sensitivity of a nearly double eigenvalue that one eigenvalue and two steps measured as a ring of radius around a defective eigenvalue. At the half-separation is and an error of is the “” the earlier essay saw. The pair cannot turn complex until its exact separation is no larger than that, which is of a few times .
Why a coin
The dial shows why the curve flattens. The hundred errors form two clouds, one negative and one positive, each spread over about a decade around , with about as many in each. At a margin of the threshold sits at , two decades to the left of the negative cloud, and no error reaches it. At it has walked into the negative cloud and twenty-four errors lie beyond it. At the boundary it is at zero, and every negative error turns the pair complex: forty-seven of a hundred. Once the threshold has passed through the negative cloud there is nothing more for it to take, and the share stays at the share of errors that happen to be negative.
So the companion route’s answer below the noise is not “complex”; it is “whichever way the rounding went”. The computation perturbs the matrix by a backward error of the size of the unit roundoff in a direction set by the rotation and the order of operations, and the pair’s discriminant moves by an amount whose sign depends on that direction. Nothing in the algorithm prefers one sign. The direction the error leans found accumulated errors leaning one way only when the rounding mode or the data made them; here neither does, and the errors split almost evenly.
How large a margin is, in a damping coefficient
It helps to translate the margins back into the problem’s own terms. The critical damping for this chain is in the chain’s units. A margin of is a damping of ; a margin of is a damping that differs from critical in the fifteenth significant figure. No physical damping is known to fifteen figures, and no measured one to six. The region where the companion route tosses its coin is not a region any data could place a problem in with confidence. It is the region where the problem’s own definition — this chain, this damping — is finer than the number that stores it.
And it is narrow on a logarithmic scale as well. The coin appears between and , one decade, and everything above it is certainly real. The earlier essay’s caution about the unstructured route was that it could return a complex pair for a hyperbolic quadratic; the measurement says it does so only inside a decade of margins two orders below anything a caller could meaningfully ask for, and there it does so for a reason that has nothing to do with the route being unstructured. A condition number for one eigenvalue measured how one eigenvalue’s sensitivity can be orders larger than its neighbours’; a nearly double eigenvalue is the extreme case, with a sensitivity that is a square root and therefore unbounded relative to the size of the perturbation. Any route that computes it from rounded data inherits that, structured or not; the definite route’s structure only decides which property it keeps when the digits run out.
Rounding that takes both signs
The even split is the part of the result most worth understanding, because it is what makes the curve predictable. A backward-stable computation returns the exact eigenvalues of a nearby matrix, and the nearby matrix differs from the true one by perturbations of relative size about in directions set by the order of the floating-point operations. For the discriminant of the colliding pair, every such perturbation moves it by an amount linear in the perturbation, and the rotation of the chain — a different random orthogonal congruence each run — scrambles which directions the operations favour. Averaged over rotations, the discriminant’s error has no preferred sign, and the two clouds of the dial figure are the result: forty-seven negative errors in a hundred at the boundary, close to the fifty a fair coin would give.
A coin flip that fixes the average used this property on purpose: stochastic rounding makes each rounding error’s sign a fair coin, so that accumulated errors cancel instead of leaning. Here the fairness arrives unbidden, from the rotations, and it has the opposite effect on a caller. An answer that depends on the sign of one rounding error is as likely to be one thing as the other. The structured alternatives the last sections describe are ways to take the coin away — the definite route by forcing the sign, at the cost of digits; a symmetric solver, perhaps, by making the perturbation’s direction systematic.
One distribution predicts the curve
If the error’s distribution is the same at every margin, then the share of complex pairs at margin is just the share of errors below , and the errors measured at any one margin should predict the share at all the others. That is a sharp test of the account above, and the dashed curve in the first figure is it: the hundred errors measured at the boundary, used to predict the share at each of the other fourteen margins.
The prediction is within 0.09 of the measured share at every margin: 0.04 against 0.03 at , 0.21 against 0.18 at , 0.33 against 0.24 at — the largest miss — and 0.41 against 0.45 at . The whole transition, from no complex pairs to a coin, follows from one number per run — the error in the pair’s squared separation — measured where the pair is exactly double. A model with no parameter fitted to the curve reproduces the curve.
Eight digits either way
Real or complex, the computed pair is accurate. Drawn as offsets from the exact pair’s centre, every computed pair at both margins sits within about of it — eight correct digits, the the double eigenvalue allows. At , where the exact pair is apart, most runs return two real eigenvalues straddling the centre at about the right distance and three return a complex pair with imaginary parts of . At the boundary, where the exact pair is a double eigenvalue, the runs scatter along both axes, real splits and complex splits of the same size.
A complex pair with an imaginary part of , for a quadratic whose eigenvalues are certified real, is wrong in kind and right in size. A caller who rounds the result to seven digits sees two equal real eigenvalues either way. A caller who tests whether the imaginary part is exactly zero — the way a program decides whether a mode oscillates — gets a different answer on about half of the equivalent matrices.
The guarantee loses first
The structured route makes the opposite trade, and it reaches its failure sooner. The definite linearisation certifies the quadratic and returns a real spectrum at every margin down to , and its error grows as its Crawford number shrinks: at a margin of , at , at , at — an eigenvalue more than twice wrong — and at . At and at the boundary the Cholesky certificate refuses: as stored, is and the quadratic is not hyperbolic. The companion route’s error over the same range is between and .
So below a margin of about neither route delivers both properties a caller might want. The definite route delivers a real spectrum with no correct digit; the companion route delivers eight correct digits and the wrong kind of number half the time. Every eigenvalue real, and a test that says so introduced the certificate as the class’s defining computation, and a class a longer chain takes away found the class shrinking as chains grow; this is where, for one chain, the class stops being distinguishable from its boundary in double precision.
What the coin means for a caller
The useful reading is not that the companion route is unreliable near the boundary. It is that near the boundary the question “real or complex” has no answer in double precision, and the companion route reports that honestly by answering at random. A margin of is a damping coefficient correct to fifteen digits, and no measured damping is. Any real problem near this boundary is a problem whose class is undetermined by its data, and an algorithm that returned a confident “real” there — as the definite route does, with 70 per cent errors — would be reporting a property of its own construction rather than of the problem. Six routes to one spectrum found the routes agreeing to rounding far from the boundary; here they disagree in kind, and the disagreement is the information.
What a caller can do with that is test the gap rather than the type. A pair whose computed separation, real or imaginary, is below about times the eigenvalues’ size is a pair the arithmetic cannot classify, and it should be reported as a double eigenvalue of uncertain type — which is what the number that moves when the problem does would call a condition number of infinity for the question being asked.
What a hundred chains do not show
Every chain has eight masses and proportional damping, so its colliding pair is one mode’s and its centre is known in closed form. With non-proportional damping the colliding pair mixes modes, and the error in its separation would be expected to be larger and its sign distribution possibly lopsided; that is not measured. The rotations are random orthogonal congruences, which change the rounding without changing the problem; a structured solver that preserved symmetry throughout might make the error’s sign systematic, which is the second question below. And the near-even split of signs is measured, not derived: forty-five to forty-seven of a hundred is consistent with a fair coin, and why the computation’s backward error should move the discriminant symmetrically is argued from the absence of a preferred direction, not proved.
Still open: a sign the structure fixes, and a test on the gap
A symmetric solver’s sign. The companion route destroys the quadratic’s symmetry in its first step. A solver that keeps , and symmetric throughout — a symmetric linearisation reduced by congruences only — perturbs only symmetric data, and a symmetric perturbation of an overdamped pair’s discriminant may have a preferred sign. The prediction with a sign is that such a solver returns a complex pair on fewer than ten of a hundred rotated chains at the boundary, against the companion route’s forty-seven, while keeping its errors within a factor of ten of the companion route’s at every margin.
Testing the gap instead of the type. A classifier that reports “double, type undetermined” whenever the computed half-separation is below times the pair’s centre would be right on every run where it answers at all. The prediction is that with it answers “real” on every run at margins of and above, “undetermined” on every run at and below, and never answers “complex” for a certified hyperbolic quadratic.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- A backward-stable answer to a problem nobody asked — both name backward error, linearisation, quadratic eigenvalue problem
- The middle group needs no reduction of its own — both name backward error, companion form, linearisation
- The scaling that buys ten orders — both name backward error, linearisation, quadratic eigenvalue problem
- A basis that has to know where the roots are — both name backward error, companion form
- A Krylov space for a problem that is not linear — both name linearisation, quadratic eigenvalue problem
- A perturbation that keeps the symmetry — both name backward error, quadratic eigenvalue problem
Named objects
A flat tag is an object no other essay names yet.
Backward errorCompanion formDefective matrixDouble rootHyperbolic quadraticLinearisationOverdampingQuadratic eigenvalue problem