Structure, and the solver that cannot see it

A zero no twist can step around

Solved through its circulant wrap with the small capacitance system factorised stably, a banded matrix was found to lose only what the cancellation in the correction costs, and a twist of half a step kept that cancellation near one. That holds only while the cancellation is large. With it kept small, the corrected solve's error is a quarter of the wrap's condition number times u on every case measured — and on a symbol with a zero of fourth order, the square of the Laplacian, no twist can keep the wrap well conditioned, because the nearest sample any twist can reach sees (π/n)⁴. At n = 64 the corrected solve is 34 times less accurate than elimination, where the Laplacian's is four.

Worth reading first: The matrix that is one row · The circulant the problem did not contain · The correction lost to its own two-by-two solve.

The circulant the problem did not contain solved a banded matrix through the circulant that differs from it in its corners — a fast transform for the circulant, a small capacitance system for the corners — and found it losing accuracy against elimination. The correction lost to its own two-by-two solve found most of that loss was the small system’s, solved by Cramer’s rule, and that with a pivoted solve what remained was the cancellation: the intermediate solve through the wrap is larger than the answer, the correction’s last line subtracts two large vectors, and that ratio times u is the error. It drew the lesson plainly. “What is left is the answer, with the rounding of the cancellation and no more.”

Its last paragraph named the case that could break this. “A banded matrix whose symbol has a zero of high order — the square of the Laplacian, whose symbol vanishes to fourth order at the origin — brings several nearly null samples in at once from a single zero, and a correction of fixed rank then has fewer columns than near-null directions. Whether a stable small solve is still enough there, or whether the cancellation itself grows faster than the wrap’s condition number, is the measurement the rank-four band cannot make.”

Neither alternative is what happens. The cancellation stops growing. The error does not, and what it follows is the wrap.

Two symbols, and what a twist can reach

The operators are the Laplacian, tridiag(−1, 2 + s, −1), whose symbol 2+s2cosθ2 + s - 2\cos\theta vanishes to second order at θ = 0 as s → 0, and its square, the pentadiagonal band with symbol (2+s2cosθ)2(2 + s - 2\cos\theta)^2, which vanishes to fourth order there. Each is the circulant of its symbol with its corners removed, so each can be solved through the circulant and a correction — of rank two for the Laplacian, rank four for its square — and each circulant can be twisted by a phase on its corners, which moves the frequencies it samples from 2πk/n2\pi k/n to (2πk+φ)/n(2\pi k + \varphi)/n.

Two symbols near their zero, with the samples a half-step twisted wrap of order 32 takesOn logarithmic axes, the symbol of the Laplacian, 2 + s − 2cos θ, and of its square, against θ from 10⁻³ to π, with s = 10⁻⁸. Dots mark the first six samples of the wrap twisted by half a step, at odd multiples of π/32. The nearest sample, at θ = π/32, sees 0.00963 on the Laplacian and 9.27·10⁻⁵ on its square, against largest values of 4 and 16: the wraps' condition numbers are 415 and 1.73·10⁵.n = 32, twist of half a stepnearest sample, Laplacian0.0096nearest sample, squared9.3·10⁻⁵κ(wrap), squared1.7·10⁵10⁻³10⁻²10⁻¹110⁻⁹10⁻⁷10⁻⁵10⁻³10⁻¹10¹θsymbolπ/nLaplacian, θ² near 0its square, θ⁴ near 0no twist puts a sample further than π/n from θ = 0and the symbol's order decides what it sees there
Fig. 1 The two symbols near θ = 0 on logarithmic axes, at s = 10⁻⁸, with the first samples of the wrap twisted by half a step at n = 32 marked.

The earlier essays twisted by half a step, φ = π, for the Laplacian, and it was the right repair: the untwisted wrap samples θ = 0 itself, where the symbol is s, and the twisted one samples π/n and nothing nearer. That is as far from the zero as a twist can move the nearest sample, since the samples are 2π/n apart. At π/n the Laplacian’s symbol is about (π/n)2(\pi/n)^2, 2.4·10⁻³ at n = 64, and the wrap’s condition number — the largest sample, 4, over the smallest — is 1,659, the same as the banded matrix’s own 1,710. The twisted wrap is as well conditioned as the problem.

For the square, the nearest sample sees (π/n)4(\pi/n)^4, 5.8·10⁻⁶ at n = 64, against a largest value of 16. The twisted wrap’s condition number is 2.8·10⁶, and the banded matrix’s own is 6.1·10⁵: the wrap is 4.6 times worse conditioned than the matrix it stands in for, and at every size measured it is between 3.2 and 4.8 times worse. No twist does better, because no twist puts a sample further than π/n from the zero, and the fourth power is what the symbol does there.

The corrected solve, twisted every way

Forward error of the corrected solve through a twisted wrap, against the twist, n = 64, shift 10⁻⁸The twist φ as a fraction of a half-step, π, from 0.05 to 1, on the Laplacian with its rank-two correction and on its square with its rank-four one, the capacitance systems solved with pivoting; median relative error over five right-hand sides, beside elimination on each band. On the squared Laplacian the best twist, 0.9 of a half-step, gives 5.58·10⁻¹¹ against elimination's 2.54·10⁻¹², 22 times; on the Laplacian a half-step gives 4.6·10⁻¹⁴ against 1.12·10⁻¹⁴.n = 64squared, best twist5.6·10⁻¹¹squared, elimination2.5·10⁻¹²Laplacian, half-step4.6·10⁻¹⁴00.10.20.30.40.50.60.70.80.9110⁻¹⁴10⁻¹³10⁻¹²10⁻¹¹10⁻¹⁰10⁻⁹10⁻⁸10⁻⁷10⁻⁶10⁻⁵twist, as a fraction of half a steprelative errorsquared, correctedsquared, eliminationLaplacian, correctedLaplacian, eliminationevery twist moves the nearest sample at most π/n from the zerothe squared symbol's fourth order does the rest
Fig. 2 Forward error of the corrected solve against the twist, for both operators at s = 10⁻⁸, beside elimination on each band. The dial moves the order.

At n = 64 and s = 10⁻⁸, with every capacitance system solved by pivoted elimination and the median taken over five right-hand sides, the Laplacian’s corrected solve at a half-step twist has an error of 4.6·10⁻¹⁴ against elimination’s 1.1·10⁻¹⁴: four times. The squared Laplacian’s is 8.5·10⁻¹¹ against elimination’s 2.5·10⁻¹²: thirty-four times. Over the seven twists drawn, from a twentieth of a half-step to a whole one, the squared Laplacian’s best is 5.6·10⁻¹¹ at nine tenths of a half-step, twenty-two times elimination, and its worst, at the smallest twist, is 4.6·10⁻⁶.

Turn the dial. At n = 16 the squared Laplacian’s corrected solve is 6.3 times elimination’s; at 32, 18 times; at 64 and 128, 34 and 33 times. The Laplacian’s stays between 1.1 and 6 times at every order. The twist that repaired the second-order zero leaves the fourth-order one an order and a half of magnitude behind.

What the error follows

The corrected solve's error against the wrap's condition number times u, every size and twist, both operatorsEach filled dot is one twisted case — four sizes at a half-step twist on the Laplacian and its square, and seven twists at n = 64 on the square — its median error against κ(wrap)·u. The error is between 0.08 and 0.30 times κ(wrap)·u in every case. Open dots are the cancellation times u for the same cases, the loss the rank-two and rank-four measurements found to be the whole of it; on the squared Laplacian they sit 25 to 115 times below the error.10⁻¹⁵10⁻¹³10⁻¹¹10⁻⁹10⁻⁷10⁻⁵10⁻³10⁻¹⁶10⁻¹⁴10⁻¹²10⁻¹⁰10⁻⁸10⁻⁶10⁻⁴κ(wrap)·urelative errorsquared LaplacianLaplacianopen: cancellation × udashed: κ(wrap)·u and a twentieth of itthe error sits between them
Fig. 3 Every twisted case measured on the squared Laplacian, and the Laplacian at a half-step twist: the corrected solve’s error against κ(wrap)·u, with the cancellation times u for the squared Laplacian’s cases as open dots.
The same correction, its two-by-two system solved two ways, on tridiag(−1, 2 + σ, −1)The forward error of solving tridiag(−1, 2 + σ, −1) of size 64 through its periodic circulant and a rank-two correction, median of five answers, against σ on a logarithmic axis, with the correction's two-by-two capacitance system solved by Cramer's rule and by elimination with a row interchange; beside elimination on the matrix itself, and the size of the intermediate over the answer times the unit roundoff. At σ = 10⁻⁸ the errors are 1.2·10⁻⁴, 2.9·10⁻¹⁰ and 1.1·10⁻¹⁴, and the cancellation times u is 1.7·10⁻¹⁰.at σ = 10⁻⁸Cramer's rule1.2·10⁻⁴pivoted2.9·10⁻¹⁰elimination on T1.1·10⁻¹⁴cancellation × u1.7·10⁻¹⁰-10-9-8-7-6-5-4-3-210⁻¹⁶10⁻¹⁴10⁻¹²10⁻¹⁰10⁻⁸10⁻⁶10⁻⁴10⁻²1σ, as a power of tenforward errorCramer's rulepivotedcancellation × uelimination on Tleft: σ small, the wrap nearly singularthe pivoted solve follows the cancellation
Fig. 4 The preceding essay’s measurement on the Laplacian through its periodic wrap: the corrected solve by Cramer’s rule and by pivoted elimination against the shift, with the cancellation times u.

That figure is where the cancellation law was established, and its regime is visible in it: the periodic wrap samples the zero, the cancellation grows as the shift falls, and the pivoted curve rides on the cancellation times u because the cancellation is by far the largest thing in the problem.

The preceding essay’s law would put the error at the cancellation times u. On the squared Laplacian at n = 64 the cancellation is 1.0·10⁴, so the law predicts 1.1·10⁻¹², and the error is 74 times that; at the other sizes it is 25 to 115 times. The open dots on the figure are that prediction, and they sit below every measured error.

What the error does follow is the wrap’s condition number. Across four sizes and seven twists, the squared Laplacian’s error is between 0.08 and 0.30 times κ(wrap)·u — every case, over seven orders of magnitude of κ(wrap). The Laplacian at a half-step twist is on the same line, at 0.11 to 0.25. And that explains the Laplacian’s own small excess over elimination too: its cancellation at n = 64 is 7.6, and its error is 55 times the cancellation times u, because the floor is the wrap’s condition number and not the cancellation. The cancellation law was measured in the regime where the cancellation was enormous — the periodic wrap nearly landing on the zero — and there it dominates. Keep it small, and the floor under it is the wrap’s.

That is a statement the earlier essays could not have made, because on the Laplacian the two floors nearly coincide. The twisted wrap’s condition number is the matrix’s, and a quarter of κ(T)·u is within a few times of what elimination achieves. On the fourth-order zero they separate: the wrap is worse conditioned than the matrix by a factor near five, and the corrected route inherits every bit of it.

The band’s conditioning, and the wrap’s

The band matrices themselves grow ill conditioned with the order of their zero, and a limit the matrix never reaches measured how a banded Toeplitz family’s condition number approaches what its symbol predicts. Here the Laplacian’s grows as n2n^2: 116, 441, 1,710 and 6,740 at orders 16 to 128. Its square’s grows as n4n^4, near enough: 3.3·10³, 4.2·10⁴, 6.1·10⁵ and 9.1·10⁶. Both are what the symbol says, since the smallest eigenvalue of the band sits at the smallest frequency it can represent and the symbol there is a power of that frequency.

The wrap has the same growth and a different constant. Its smallest sample is at π/n, a little nearer the zero than the band’s smallest frequency, and for a second-order zero the difference is a factor between 0.89 and 0.98 in the condition number — nothing. For a fourth-order zero the same small difference in frequency is raised to the fourth power, and the wrap’s condition number is 3.2, 4.0, 4.6 and 4.8 times the band’s at the four orders. That factor, and the constant the corrected route pays against the constant elimination pays, are the whole of the thirty-fold gap; neither is large, and their product is.

The capacitance matrix, measured

The small system is ill conditioned too, and for the reason the rest of this essay gives rather than the one the earlier essays analysed. At a half-step twist the Laplacian’s 2 × 2 capacitance matrix has condition numbers of 17, 33, 65 and 129 at the four orders — growing as n, since each is the wrap’s smallest sample against the correction’s scale. The squared Laplacian’s 4 × 4 capacitance matrix has 3.1·10³, 2.6·10⁴, 2.1·10⁵ and 1.7·10⁶, growing as n3n^3. The error is not a fixed multiple of that either: it is 0.8, 2.0, 3.6 and 7.3 times κ(S)·u at the four orders, so the capacitance matrix’s condition number under-predicts the loss by a growing factor, where the wrap’s predicts it within a constant.

That is consistent with where the loss comes from. The capacitance matrix is formed from the wrap’s inverse applied to the correction’s columns, so it carries the wrap’s ill-conditioning in a four-dimensional projection; the intermediate solve carries it in all n dimensions. The small system’s pivoted solve is backward stable, and whatever it loses is bounded by its own condition number; the intermediate solve’s rounding is amplified by the whole wrap, and nothing in the correction’s four columns undoes that.

Why a stable small solve cannot absorb it

The preceding essay explained why an ill-conditioned capacitance matrix cost nothing once it was solved stably: as the wrap nears a zero, its inverse applied to anything has one enormous component along one near-null vector, the capacitance matrix and its right-hand side inherit that component together as a nearly rank-one term, and a backward-stable solve of the small system returns the coefficients that cancel it exactly. The ill-conditioning is concentrated, and what is concentrated can be removed.

On the squared Laplacian at a half-step twist it is not concentrated. The two samples at ±π/n see 5.8·10⁻⁶; the next pair, at ±3π/n, see 81 times that; the pair after, 625 times. The wrap’s inverse amplifies a spread of directions by factors from 10⁵ downwards, graded rather than separated, and the rank-four correction’s four columns cannot pick out a single large term to cancel because there is none. The rounding committed in the fast transform, which is backward stable in the norm and spread across every frequency, is amplified by the wrap’s inverse along all of those directions at once, and the capacitance matrix, whose condition number here is 2.1·10⁵, is ill conditioned for the same reason rather than for the one the earlier essay analysed.

So the rank-four correction does not have “fewer columns than near-null directions” in any sharp sense: at a half-step twist the nearest two samples form one conjugate pair, and a rank-four correction has room for two such pairs. What it lacks is a gap. Two near-zeros cost less than one found that a pair of samples landing on a pair of zeros gave a capacitance matrix of condition number one, because the correction absorbed exactly the directions the wrap had lost; here the wrap has lost a whole graded family of directions and the correction absorbs none of them cleanly.

Against the shift

The squared Laplacian's corrected solve against the shift, periodic and twisted, n = 64On logarithmic axes, the median error of the corrected solve for the shifted squared Laplacian, symbol (2 + s − 2cos θ)², against s from 10⁻² to 10⁻⁶, through the periodic wrap and through the wrap twisted by half a step, beside elimination. At s = 10^-2: periodic 1.5·10⁻¹², twisted 2.3·10⁻¹², elimination 1.1·10⁻¹²; At s = 10^-3: periodic 1.9·10⁻¹⁰, twisted 1.5·10⁻¹¹, elimination 1.8·10⁻¹²; At s = 10^-4: periodic 2.1·10⁻⁸, twisted 4.6·10⁻¹¹, elimination 9.8·10⁻¹³; At s = 10^-5: periodic 1.4·10⁻⁶, twisted 10·10⁻¹¹, elimination 3.9·10⁻¹²; At s = 10^-6: periodic 10⁻⁴, twisted 7.6·10⁻¹¹, elimination 3.9·10⁻¹². The periodic wrap samples the zero itself and loses two digits per decade of s; the twist stops the loss and leaves a floor.10⁻⁶10⁻⁵10⁻⁴10⁻³10⁻²10⁻¹³10⁻¹²10⁻¹¹10⁻¹⁰10⁻⁹10⁻⁸10⁻⁷10⁻⁶10⁻⁵10⁻⁴10⁻³shift srelative errorperiodic wraphalf-step twisteliminationthe twist removes the growthand not the floor the fourth-order zero sets
Fig. 5 The squared Laplacian at n = 64: the corrected solve’s error against the shift, through the periodic wrap and the half-step twisted one, beside elimination.

Through the periodic wrap, which samples the zero itself, the squared Laplacian’s corrected solve loses two digits for every decade of the shift: 1.5·10⁻¹² at s = 10⁻², 1.9·10⁻¹⁰ at 10⁻³, 2.1·10⁻⁸ at 10⁻⁴, 1.4·10⁻⁶ at 10⁻⁵, 1.0·10⁻⁴ at 10⁻⁶. That is the cancellation law at work, with the wrap’s smallest sample at s2s^2 and the intermediate solve growing as its inverse, and it is the Laplacian’s first essay again with the exponent doubled.

The half-step twist stops that growth: 2.3·10⁻¹², 1.5·10⁻¹¹, 4.6·10⁻¹¹, 1.0·10⁻¹⁰ and 7.6·10⁻¹¹ over the same shifts, a floor near 10⁻¹⁰ once s is below the nearest sample’s (π/n)⁴. Elimination sits at 1 to 4·10⁻¹² throughout. The twist removes the loss that depends on the shift and leaves the loss that depends on the order, and for this symbol the second is the larger.

What this means for the route

The fast route’s promise was that a banded matrix could be solved in O(n log n) with a small correction and lose nothing against elimination but a constant. For symbols with a simple zero — the Laplacian, and everything the earlier essays measured — the half-step twist keeps that promise within a few times. For a zero of order p the twisted wrap’s condition number grows as npn^p while the band’s own grows as well, but the wrap’s is larger by a constant that grows with p, and the corrected route’s error follows the wrap. The biharmonic operator, plate bending, higher-order smoothing penalties: every operator whose symbol has a multiple zero at the frequency of the smooth modes is in this class, and on them the twisted route costs more than a constant.

A code that wants the route on such an operator has two choices, neither measured here. It can refine: one step of iterative refinement with the band matrix’s own residual, which costs a band multiplication, should remove most of a thirty-fold loss, as the correction lost to its own two-by-two solve found refinement doing for Cramer’s loss. Or it can factor the operator: the squared Laplacian is the square of a matrix the twisted route solves to within four times elimination, and two such solves in sequence would multiply those factors rather than inherit n4n^4.

The same wrap as a preconditioner

A wrap is used far more often as a preconditioner than as a direct solver, and there the loss measured here matters less. The circulant that cannot be indefinite and two dimensions and the cluster that thins measured circulant preconditioners for banded Toeplitz systems by the steps an iteration takes, and four orders of conditioning and four steps found the count indifferent to four orders of magnitude of the matrix’s conditioning. Preconditioned by its own twisted wrap, a band is the identity plus a correction of rank four, so the preconditioned matrix has at most five distinct eigenvalues and a Krylov method would converge in five steps in exact arithmetic whatever the wrap’s condition number, with each step’s residual computed from the band itself.

That residual is what the direct route lacks. The corrected solve is a single application of the wrap’s inverse and a correction, and its error is whatever that application commits. An iteration measures its residual against the band after every step and removes what the wrap got wrong, so the κ(wrap)·u floor becomes a matter of the iteration’s stopping test rather than a limit on accuracy. The fourth-order zero makes the twisted wrap a poor direct solver and leaves it a good preconditioner, which is the use it is most often put to.

What this does not settle

Two operators, shifts from 10⁻² to 10⁻⁸, four sizes up to 128, five right-hand sides with random entries. The fraction of κ(wrap)·u the corrected route pays, a tenth to three tenths, is measured and not explained; nor is why elimination pays a twentieth to a tenth of κ(T)·u on both bands, which is what makes the wrap’s excess over the matrix visible at all.

The explanation of the floor — normwise-stable transform rounding amplified along a graded family of near-null directions — is an argument from the measurements, not a measurement of the error’s direction. Projecting the error onto the wrap’s eigenvectors would test it.

The Laplacian at small twists falls well below the law: at a twentieth of a half-step its error is 0.008 of κ(wrap)·u. There its one near-null sample is the direction the rank-two correction removes, and the wrap’s condition number, set by that sample, is not what the error sees. That exception is the preceding essay’s mechanism, and the law drawn here is for the regime where it does not apply.

Still open: refinement, and the factorised route

One step of refinement. A residual computed with the band matrix and a second corrected solve against it should remove most of the thirty-fold loss, if the corrected route’s error is a backward error of size κ(wrap)·u in the norm. Whether one step brings the squared Laplacian to elimination’s accuracy, and what it costs against simply eliminating, is the measurement that decides whether the route survives on high-order zeros.

Solving the square as two Laplacians. The squared Laplacian with the right boundary rows is the product of two tridiagonal matrices the half-step twist handles within a few times elimination. Two twisted solves in sequence would compound two small factors rather than inherit a wrap of order n4n^4, and whether the product form’s boundary rows match the band’s closely enough for that to be the same problem is the question the band’s corners decide.

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 errorCapacitance matrixCirculant matrixCondition numberFast fourier transformLow-rank updateSherman morrison woodburySymbol