Elimination, and the swap

The growth a boundary-value problem supplies

Large growth under partial pivoting is usually said to need a matrix built for it. A two-point boundary-value problem solved by multiple shooting supplies one without being asked: its growth factor is e^(5T/6)/2 to four figures — 1.1·10⁴ at an interval of 12, 1.3·10⁵ at 15 — on a matrix whose condition number never exceeds 8.3, while rook and complete pivoting keep it below 2. And it is the finer shooting grid that grows: below a step of 0.3397 the choice partial pivoting makes turns on one entry against one, and above it there is no growth at all.

Worth reading first: The bound that is never attained · The swap that is not optional · The condition number is an amplifier.

The bound that is never attained set out the growth factor’s standing problem. Partial pivoting permits the entries of a factorisation to double at every step, one matrix built by Wilkinson attains that exactly, random matrices come nowhere near it, and the reason nobody worries is empirical: growth factors above ten are essentially never seen on matrices from applications, and matrices that produce large growth have to be constructed. The essay ended on the open question of why, and on the argument for measuring rather than assuming.

The empirical half of that argument has a well-known exception, and it is not a construction. A two-point boundary-value problem for a linear system of differential equations, discretised by multiple shooting — one of the standard ways to solve such a problem — produces a matrix on which partial pivoting’s growth is exponential in the length of the interval. Wright published the example; this essay measures it, and finds three things the citation leaves out.

The growth is not approximately exponential but exactly the growing mode of the differential equation, halved. It sits on a matrix whose condition number is single-digit throughout, so it is growth the problem does not contain. And it appears only when the shooting grid is fine enough: there is a step size below which partial pivoting’s choice at every continuity row flips to the entry that accumulates, and above which the same method on the same problem has no growth at all.

Growth factor on a multiple-shooting matrix against the length of the interval, shooting step h = 0.3The growth factor of Gaussian elimination on the multiple-shooting matrix of y′ = My, M = [[−1/6, 1], [1, −1/6]], with the boundary condition y(0) + y(T) given, for intervals T up to 15.0 at a step of 0.3, on a logarithmic axis. Under partial pivoting it reaches 1.342·10⁵ at T = 15.0 with 102 unknowns, following e^(5T/6)/2 — 1.342·10⁵ there — drawn dashed. Rook pivoting reaches 2 and complete pivoting 2. The matrix's condition number is at most 8.31 over the whole range.0246810121416110¹10²10³10⁴10⁵10⁶length of the interval Tgrowth factorpartialrookcompleteh = 0.3, 102 unknownspartial, T = 15.01.3·10⁵e^(5T/6)/21.3·10⁵complete2largest κ8.3a boundary-value problem, not a constructionκ single-digit throughout
Fig. 1 The growth factor of the multiple-shooting matrix at a step of 0.3, against the length of the interval T, under three pivot rules. Partial pivoting reaches 1.34·10⁵ at T = 15 with 102 unknowns, on the dashed curve e^(5T/6)/2. Rook and complete pivoting stay at 2. The condition number is at most 8.3 over the whole range.

A matrix from a method, not from a construction

The problem is the system y′ = My on an interval [0, T] with

M=[1/6111/6]M = \begin{bmatrix} -1/6 & 1 \\ 1 & -1/6 \end{bmatrix}

and the boundary condition y(0) + y(T) = β. M has eigenvalues 5/6 and −7/6, so the equation has one mode that grows like e^(5t/6) and one that decays like e^(−7t/6). A boundary-value problem of this kind is well posed — the boundary condition pins down the growing mode — and is the ordinary situation for a system with modes in both directions.

Simple shooting integrates from 0 to T and fails, because the growing mode swamps everything over a long interval. Multiple shooting breaks the interval into N steps of length h, takes the state at each of the N + 1 points as an unknown, and asks for continuity between them: s1=Es0s_1 = E s_0, s2=Es1s_2 = E s_1, and so on, where E = exp(hM) is the transfer matrix over one step, exact here because M is constant. With the two boundary equations, that is a linear system in 2(N + 1) unknowns:

[IIEIEI][s0s1sN]=[β00]\begin{bmatrix} I & & & I \\ E & -I & & \\ & \ddots & \ddots & \\ & & E & -I \end{bmatrix} \begin{bmatrix} s_0 \\ s_1 \\ \vdots \\ s_N \end{bmatrix} = \begin{bmatrix} \beta \\ 0 \\ \vdots \\ 0 \end{bmatrix}

The matrix is block bidiagonal apart from the corner the boundary condition puts in the top row, its entries are bounded by the entries of E and one, and it is nothing like Wilkinson’s matrix. It is the linear system a textbook method writes down.

The growth is the growing mode, halved

At a step of h = 0.3 and intervals from 1.5 to 15, the growth factor under partial pivoting is:

T unknowns growth e^(5T/6)/2 condition number complete pivoting
6 42 75.2 74.2 7.78 1.99
9 62 905 904 8.11 2.00
12 82 11,010 11,010 8.26 2.00
15 102 134,200 134,200 8.31 2.00

From T = 12 the growth equals e^(5T/6)/2 to four figures, and at T = 6 it is 1.3 per cent above it. The exponent 5/6 is the growing mode’s rate. The factor of one half is the diagonal of E averaging the growing and decaying modes along the continuity chain. So the growth factor of the elimination is a quantity the differential equation specifies before any matrix is formed: how much the growing mode amplifies over the interval.

The condition number meanwhile is at most 8.3. The matrix is not ill conditioned and does not become so — it rises from 4.7 to 8.3 while the growth rises by four orders — so the boundary condition does what it is supposed to do and pins the growing mode. The growth is not the problem’s difficulty expressed in the factorisation. It is the factorisation’s own.

Rook and complete pivoting keep the growth below 2 at every interval. A pivot that searches one row and one column found rook pivoting holding Wilkinson’s matrix at exactly 2 for about three times partial pivoting’s search; on the shooting matrix the rook’s growth is the same as complete pivoting’s to four figures at every size. Moving the boundary rows from the top of the matrix to the bottom changes nothing: 7.1, 905 and 1.34·10⁵ again at T = 3, 9 and 15.

Where in the factor it accumulates

The table gives one number per matrix. The factor shows where the number comes from.

Where the growth accumulates: the largest entry of each row of U, 40 shooting steps of 0.3For the multiple-shooting matrix with 40 steps of 0.3, the largest entry in each row of the upper triangular factor divided by the matrix's largest entry, on a logarithmic axis. Under partial pivoting the rows reach 1.101·10⁴, climbing through the continuity rows one step of the growing mode at a time; under complete pivoting no row exceeds 2.01020304050607080110¹10²10³10⁴row of Ulargest entry ÷ largest entry of Apartialcomplete82 unknownsgrowth, partial1.1·10⁴growth, complete2each continuity row passes the growing mode onthe last rows carry all of it
Fig. 2 The largest entry in each row of the upper triangular factor, as a multiple of the matrix’s largest entry, for 40 steps of 0.3. Under partial pivoting the rows climb through the continuity equations and reach 1.1·10⁴ in the last; under complete pivoting no row exceeds 2.

Under partial pivoting the rows of U climb through the continuity equations one step of the growing mode at a time and reach their largest entry, 1.1·10⁴ times the largest entry of the matrix, in the last rows. The mechanism is the corner. The boundary row couples s0s_0 to sNs_N, and eliminating down the chain carries that coupling through every continuity row, multiplied at each step by the transfer matrix’s entry — so by the time the elimination reaches sNs_N, the entry that began as a one in the boundary row has been multiplied by the growing mode over the whole interval. That is the same shape as Wilkinson’s matrix, in which the last column doubles down the rows, with the growing mode’s factor per step in place of two.

Complete pivoting takes its pivots from the continuity equations’ −1 entries in a different order, never lets the corner’s coupling ride the chain, and no row of its U exceeds twice the matrix’s largest entry.

The finer grid is the one that grows

The step size is a choice, and it is the choice that decides whether there is any growth at all.

Growth factor on the multiple-shooting matrix at T = 12, against the shooting stepThe growth factor under partial and complete pivoting of the multiple-shooting matrix for an interval of 12, against the step h from 0.100 to 0.500, on a logarithmic axis. For every step below 0.3397, where the diagonal entry of the one-step transfer matrix exp(hM) falls below one, partial pivoting chooses the −1 of each continuity row and its growth is 1.101·10⁴ to 1.101·10⁴, against e^(5T/6)/2 = 1.101·10⁴. For every step above it the growth is under 2. Complete pivoting stays under 2 throughout.00.050.10.150.20.250.30.350.40.450.50.550.60.650.70.750.80.850.90.951110¹10²10³10⁴shooting step hgrowth factorE₁₁ = 1 at h = 0.340e^(5T/6)/2partialcompleteT = 12switch, h0.34growth at h = 0.3331.1·10⁴growth at h = 0.3532a finer shooting grid is the one that growsthe choice turns on one entry against one
Fig. 3 The growth factor at an interval of T = 12 against the shooting step, from 0.1 to 0.5. For every step below 0.3397, where the diagonal entry of exp(hM) falls below one, partial pivoting’s growth is e^(5T/6)/2 = 1.1·10⁴. For every step above it the growth is under 2. Complete pivoting is under 2 throughout.

At T = 12, every step from 0.1 to 0.333 gives a growth of 1.1·10⁴, and every step from 0.353 to 0.5 gives a growth under 2. There is nothing in between. The switch sits at h = 0.3397, the step at which the diagonal entry of the transfer matrix,

E11=12(e5h/6+e7h/6),E_{11} = \tfrac12\left(e^{5h/6} + e^{-7h/6}\right),

is exactly one. At each continuity row partial pivoting compares E11E_{11} with the −1 below it in the same column. When E11E_{11} is larger — a coarse step, over which the growing mode has had room to grow — the continuity row’s E entry is the pivot and nothing accumulates. When E11E_{11} is smaller — a fine step, over which the decaying mode still pulls the diagonal below one — the −1 is the pivot, the multiplier is E11E_{11} over −1, and the corner’s coupling is carried on down the chain.

Growth factor on the multiple-shooting matrix at T = 6, against the shooting stepThe growth factor under partial and complete pivoting of the multiple-shooting matrix for an interval of 6, against the step h from 0.100 to 0.500, on a logarithmic axis. For every step below 0.3397, where the diagonal entry of the one-step transfer matrix exp(hM) falls below one, partial pivoting chooses the −1 of each continuity row and its growth is 75.21 to 75.21, against e^(5T/6)/2 = 74.21. For every step above it the growth is under 2. Complete pivoting stays under 2 throughout.00.050.10.150.20.250.30.350.40.450.50.550.60.650.70.750.80.850.90.951110¹10²shooting step hgrowth factorE₁₁ = 1 at h = 0.340e^(5T/6)/2partialcompleteT = 6switch, h0.34growth at h = 0.33375growth at h = 0.3532a finer shooting grid is the one that growsthe choice turns on one entry against one
Fig. 4 The same sweep at T = 6. Below the switch the growth is 75.2, the growing mode over the shorter interval; above it, under 2. The switch does not move with T, because it is a property of one step.

At T = 6 the picture repeats with the growth at 75.2, the growing mode over the shorter interval. The switch is at the same step, because it is a property of one step of the transfer matrix and not of the interval. So a user who refines the shooting grid for accuracy — the usual reason to take more steps — crosses from a factorisation with no growth into one whose growth is the whole interval’s amplification, at a step size set by the differential equation’s two rates and nothing else.

That runs against the grain of how shooting is usually tuned. Shorter steps make each continuity equation better conditioned, and multiple shooting exists because long steps are dangerous. On this problem a step of 0.4 gives a factorisation whose growth is under 2, and a step of 0.3 gives one whose growth is 1.1·10⁴, with both matrices well conditioned.

Growth factor on a multiple-shooting matrix against the length of the interval, shooting step h = 0.4The growth factor of Gaussian elimination on the multiple-shooting matrix of y′ = My, M = [[−1/6, 1], [1, −1/6]], with the boundary condition y(0) + y(T) given, for intervals T up to 15.2 at a step of 0.4, on a logarithmic axis. Under partial pivoting it reaches 1.978 at T = 15.2 with 78 unknowns. Rook pivoting reaches 1.978 and complete pivoting 1.978. The matrix's condition number is at most 6.87 over the whole range.0246810121416110¹10²10³10⁴10⁵10⁶length of the interval Tgrowth factorpartialrookcompleteh = 0.4, 78 unknownspartial, T = 15.22e^(5T/6)/21.6·10⁵complete2largest κ6.9a boundary-value problem, not a constructionκ single-digit throughout
Fig. 5 The growth factor against the interval at a step of 0.4, above the switch. Partial pivoting’s growth reaches 1.98 at T = 15.2 with 78 unknowns, the same as rook and complete pivoting’s, and the condition number is at most 6.9.

At a step of 0.4 the growth under partial pivoting is 1.98 at T = 15.2 — identical to rook and complete pivoting — and the condition number at most 6.9. At a step of 0.2, below the switch, it is 1.34·10⁵ at T = 15 on 152 unknowns, with a condition number of 12, the same growth as at 0.3 because the growth belongs to the interval and not to the number of steps it is divided into.

What the growth costs the solve

A growth factor matters because the backward error is bounded by about n times the growth times the unit roundoff. On this matrix the bound’s middle factor is 1.3·10⁵, and the measurement is how much of that the solve actually pays.

Backward error of the shooting system's solve under partial and complete pivoting, h = 0.3The backward error ‖b − Ax̂‖ / (‖A‖‖x̂‖ + ‖b‖) of the solve of the multiple-shooting system with a known solution, against the interval T, on a logarithmic axis. Under partial pivoting it rises from 5.66·10⁻¹⁷ at T = 1.5 to 1.35·10⁻¹² at T = 15.0, where the growth is 1.342·10⁵; under complete pivoting it is 5.87·10⁻¹⁷ there. The dashed line is n·ρ·u, the bound the growth permits; the forward error of the partial pivoting solve at T = 15.0 is 7.96·10⁻¹² on a matrix with κ = 8.31.024681012141610⁻¹⁶10⁻¹⁵10⁻¹⁴10⁻¹³10⁻¹²10⁻¹¹10⁻¹⁰10⁻⁹length of the interval Tbackward errorn·ρ·upartialcompleteT = 15.0, 102 unknownspartial, backward1.3·10⁻¹²complete, backward5.9·10⁻¹⁷partial, forward8·10⁻¹²κ8.3the dotted line is one roundingthe growth is paid for in digits
Fig. 6 The backward error of the solve of the shooting system at a step of 0.3, with a known solution, against the interval, under partial and complete pivoting. Under partial pivoting it rises from 5.7·10⁻¹⁷ at T = 1.5 to 1.35·10⁻¹² at T = 15; under complete pivoting it stays at 5.9·10⁻¹⁷. The dashed line is n·ρ·u.

Under partial pivoting the backward error rises from 5.7·10⁻¹⁷ at T = 1.5 to 1.35·10⁻¹² at T = 15 — four and a half digits lost against complete pivoting, which stays at 5.9·10⁻¹⁷ throughout. The bound n·ρ·u is 1.5·10⁻⁹ at T = 15, so the solve pays about a thousandth of what the growth permits: the bound multiplies every pessimism together, and the rounding errors do not all land along the direction the growth amplifies.

The forward error at T = 15 is 8.0·10⁻¹² under partial pivoting and 1.7·10⁻¹⁶ under complete, on a matrix whose condition number of 8.3 amplifies a backward error by at most that. A small residual is not a small error put the standing distinction between the two kinds of error; here both are the algorithm’s, the problem is innocent, and the backward stability that the first growth essay described as the flat line everything rests on is bent by four and a half digits by a matrix nobody designed. On a double-precision machine that leaves eleven correct digits, which is enough for most purposes and is not the sixteen a well-conditioned system is entitled to.

A rule that is right at every step and wrong for the chain

The shooting matrix’s growth is worth a closer look at the level of a single step, because every step partial pivoting takes on it is a good one by the rule’s own standard.

Partial pivoting’s guarantee is local. At each step it takes the largest entry in the column as the pivot, so every multiplier is at most one in size, and the swap that is not optional showed what goes wrong without that: a multiplier of 10¹⁷, an answer of the right shape and nothing to announce the failure. On the shooting matrix below the switch, every multiplier partial pivoting forms along the continuity chain is E11E_{11} over −1, which is 0.994 in size at a step of 0.3. The rule’s promise is kept at every step. The growth comes from the fact that the promise is about one step, and a chain of steps each multiplying the corner’s coupling by a number just under the growing mode’s factor compounds the way a chain of doublings does in Wilkinson’s matrix.

Elimination is a sequence of choices described the decision at each step as the whole of the algorithm’s stability, and this is the case where the decisions are individually sound and collectively the worst available. Complete and rook pivoting see more than the column. Their search reaches the rows below and the columns to the right, finds entries that break the chain, and the corner’s coupling never gets to ride it. That is the reason the rook, which searches one row and one column rather than the whole remaining matrix, removes all of the growth here: the chain is a structure in one row and one column at a time, and a search of that width is enough to see it.

The comparison partial pivoting makes is also a comparison of two numbers whose relative size is set by how the equations were written. E11E_{11} and −1 sit in the same column because the state at one point appears in two continuity equations, once as E times itself and once as minus itself. The pivot that reads the units found a row scaling that made partial pivoting perform the elimination it exists to prevent, with no interchange at all, on the standard two-by-two example. The shooting matrix’s switch is the same vulnerability in a longer form: which side of one the diagonal entry of E falls on decides the whole factorisation, and a solver that scaled its continuity equations differently would put the switch somewhere else. Where exactly is a measurement this essay did not make.

None of this shows in the condition number, and it could not. The condition number is a property of the matrix, invariant under the choices the elimination makes, and the condition number as an amplifier describes what it bounds: how much the problem magnifies an error the algorithm introduced. Here it magnifies by at most 8.3, and the algorithm introduced 1.35·10⁻¹² of backward error where it could have introduced 6·10⁻¹⁷.

What this does to the empirical argument

The bound that is never attained offered two reasons nobody worries about growth: structural classes where it cannot happen, and an empirical record in which it does not. The shooting matrix belongs to no structural class — it is not symmetric, not diagonally dominant, not totally nonnegative — and it is a counterexample to the empirical record that the record’s own literature contains. It sharpens that argument in three ways rather than overturning it.

Growth that arrives from a problem has a mechanism, and the mechanism is a margin. The growth appears exactly when one entry of the transfer matrix falls below one, and it is the growing mode over the interval. That is a far more specific object than “a matrix constructed to produce growth”, and it says where to look in other problems: wherever an elimination’s pivot choice at each step of a chain is decided by a near-tie between an entry that carries a growing quantity and one that does not.

The condition number says nothing about it. Every matrix here has κ between 4.7 and 12. A user who checks the conditioning, finds it excellent and concludes the solve is safe has checked the problem’s property and not the algorithm’s — the same separation the exact answer to a nearby problem draws for every backward-stability argument.

The fix is cheap and known. Rook pivoting removes the growth entirely at a few times partial pivoting’s search, and a solver for boundary-value problems can order the unknowns or pivot within the block structure so that the corner’s coupling never rides the chain. The empirical argument survives as a statement about unstructured matrices; structured ones from methods with chains in them deserve the one extra comparison per step the first growth essay recommended.

What was not measured

One differential equation, with one growing and one decaying rate; a system with several growing modes, or with modes whose rates are close, would move the switch and possibly split it into several. Only the boundary condition y(0) + y(T) = β; separated boundary conditions, which put the growing mode’s constraint at one end only, change the corner and may change the growth. And only dense partial pivoting; a sparse or banded solver for the shooting matrix would take the continuity structure into account in its ordering, and whether the switch survives a banded elimination with threshold pivoting is not drawn.

Still open: noise, several growing modes, and a band solver

What noise does to growth that rests on a margin. Wilkinson’s growth rests on exact ties between candidate pivots; the shooting matrix’s rests on a margin — E11E_{11} against one, a difference of 5.6·10⁻³ at a step of 0.3. A worst case is as fragile as its margin measures what random perturbations of every size leave of each, and finds that the two kinds of growth need noise of very different sizes to disappear.

Several growing modes. A system with modes growing at different rates has a transfer matrix whose diagonal entries cross one at different steps, and the growth may switch on in stages as the step is refined. Whether the growth then follows the fastest mode alone, or a product of the modes whose entries have crossed, is the measurement.

A band solver. The shooting matrix is banded apart from its corner, and a band solver with partial pivoting within the band handles the corner by bordering. Whether that arrangement inherits the growth — whether the switch at E11E_{11} = 1 is a property of the matrix or of dense partial pivoting on it — is the question a practitioner choosing a solver would ask first.

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 errorComplete pivotingCondition numberGaussian eliminationGrowth factorPartial pivotingRook pivotingWorst-case analysis