Generator

The growth factor of a 12×12 elimination, against the condition number of the matrix

One function in the symmetric library, called 19 times across 4 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 37 claims it put to the test while drawing them, and where it stands against the rule this site is named for.

At its defaults it draws the growth factor of a 12×12 elimination, against the condition number of the matrix. Three curves against κ. Cholesky's growth factor is exactly 1 at every condition number drawn — the elimination never produces an entry larger than the matrix already had. Partial pivoting on the same matrices reaches the same growth, and reaches it by making up to 9 row interchanges, each of which destroys the symmetry that was the reason to use a symmetric factorisation. The bound the general theory allows, 2^11 = 2048, is drawn above them both.

cholesky-growth is one function in lib/figures/symmetric.js — symmetric eliminations — a growth factor of exactly one, and a diagonal that is zero. Everything below came out of it during this build, at arguments taken from the essays rather than invented for this page. A figure here is the figure a reader meets in an essay, and if the generator changes, this page changes with it.

At its defaults

Drawn even though every essay passes arguments — which on this site is every essay, at 100% of placements since the standard pass. A default nothing exercises is a trap for the next essay to call this with none, and this is the page where a default that has drifted from the figures around it becomes visible.

The growth factor of a 12×12 elimination, against the condition number of the matrixThree curves against κ. Cholesky's growth factor is exactly 1 at every condition number drawn — the elimination never produces an entry larger than the matrix already had. Partial pivoting on the same matrices reaches the same growth, and reaches it by making up to 9 row interchanges, each of which destroys the symmetry that was the reason to use a symmetric factorisation. The bound the general theory allows, 2^11 = 2048, is drawn above them both.10¹10³10⁵10⁷10⁹10¹¹110¹10²10³10⁴condition number of the matrixgrowth factorbound 2^11partial pivotingCholeskyno pivot to gain fromCholesky growth, every κ1Cholesky interchanges0partial pivoting, worst9the bound, 2^112048both eliminations reach the same growthand only one of them had to swap to get there

Three curves against κ. Cholesky's growth factor is exactly 1 at every condition number drawn — the elimination never produces an entry larger than the matrix already had. Partial pivoting on the same matrices reaches the same growth, and reaches it by making up to 9 row interchanges, each of which destroys the symmetry that was the reason to use a symmetric factorisation. The bound the general theory allows, 2^11 = 2048, is drawn above them both.

show: "refine-inverse"

The arguments are the ones A curvature direction the factors cannot refine passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

What each factorisation's curvature direction holds, and the eigenvalue inverse iteration with the same factors converges to, against the couplingOn the planted family, the magnitude of the Rayleigh quotient over the smallest eigenvalue, −8.40 at every coupling, for the direction each rule's factors give, and the magnitude of the eigenvalue nearest zero over the same, on logarithmic axes. Bunch–Kaufman's direction falls as the square of the coupling; the bounded rule's holds 0.14 at every coupling; and the eigenvalue nearest zero — the one inverse iteration with either factorisation lands on within two steps — falls as the square of the coupling and is positive until it reaches the rounding level.fractions of the curvaturebounded rule's direction, every ε0.14nearest zero at ε = 10⁻⁸, ÷ λ10⁻¹⁶10⁻¹⁰10⁻⁸10⁻⁶10⁻⁴10⁻²10⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹coupling ε|quotient| ÷ |smallest eigenvalue|Bunch–Kaufman's directionthe bounded rule'seigenvalue nearest zeroinverse iteration goes where the eigenvalue nearest zero isa solve amplifies the smallest, not the most negative

On the planted family, the magnitude of the Rayleigh quotient over the smallest eigenvalue, −8.40 at every coupling, for the direction each rule's factors give, and the magnitude of the eigenvalue nearest zero over the same, on logarithmic axes. Bunch–Kaufman's direction falls as the square of the coupling; the bounded rule's holds 0.14 at every coupling; and the eigenvalue nearest zero — the one inverse iteration with either factorisation lands on within two steps — falls as the square of the coupling and is positive until it reaches the rounding level.

show: "refine-steps", eps: 1e-8

The arguments are the ones A curvature direction the factors cannot refine passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

Refining the direction of negative curvature read from each factorisation, coupling 10 to the minus 8: the Rayleigh quotient over the smallest eigenvalue, step by stepThe planted 24 × 24 matrix at coupling 10 to the minus 8. From the direction each rule's factors give — Bunch–Kaufman's holding 6.9e-16 of the curvature, the bounded rule's 0.14 — three refinements: inverse iteration with the same factors, power iteration on the norm times the identity less the matrix, and Lanczos. Lanczos reaches ninety-nine per cent in 9 products from Bunch–Kaufman's direction and 6 from the bounded rule's; power iteration reaches ninety per cent in 13 from the bounded rule's and not within sixty from Bunch–Kaufman's; inverse iteration leaves both at the eigenvalue nearest zero, which is positive. Quotients at or below zero are drawn on the floor.products to 99 per centLanczos, from Bunch–Kaufman9Lanczos, from the bounded rule6051015202530354010⁻¹⁸10⁻¹⁵10⁻¹²10⁻⁹10⁻⁶10⁻³1refinement step, or matrix-vector productRayleigh quotient ÷ smallest eigenvalueinverse iteration, Bunch–Kaufmanpower iteration, Bunch–KaufmanLanczos, Bunch–Kaufmaninverse iteration, boundedpower iteration, boundedLanczos, boundeddashed: from the bounded rule's directionthe matrix refines what the factors cannot

The planted 24 × 24 matrix at coupling 10 to the minus 8. From the direction each rule's factors give — Bunch–Kaufman's holding 6.9e-16 of the curvature, the bounded rule's 0.14 — three refinements: inverse iteration with the same factors, power iteration on the norm times the identity less the matrix, and Lanczos. Lanczos reaches ninety-nine per cent in 9 products from Bunch–Kaufman's direction and 6 from the bounded rule's; power iteration reaches ninety per cent in 13 from the bounded rule's and not within sixty from Bunch–Kaufman's; inverse iteration leaves both at the eigenvalue nearest zero, which is positive. Quotients at or below zero are drawn on the floor.

show: "refine-cost"

The arguments are the ones A curvature direction the factors cannot refine passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

Matrix-vector products needed to reach ninety per cent of the curvature, from each factorisation's direction, against the couplingOn the planted family. Lanczos needs 7 products from Bunch–Kaufman's direction and 4 from the bounded rule's at every coupling. Power iteration from the bounded rule's needs 13 at every coupling; from Bunch–Kaufman's it needs 28, 39, 54, more than sixty, more than sixty as the coupling falls through the five values. Points drawn at the top did not arrive within sixty products.products to 90 per centLanczos, either start7power from Bunch–Kaufman, ε = 10⁻⁶5410⁻¹⁰10⁻⁸10⁻⁶10⁻⁴10⁻²010203040506070coupling εproducts to ninety per centpower, from Bunch–Kaufmanpower, from the bounded ruleLanczos, from Bunch–KaufmanLanczos, from the bounded ruletop line: did not arrive in sixtyLanczos keeps what a start has; power iteration needs it large

On the planted family. Lanczos needs 7 products from Bunch–Kaufman's direction and 4 from the bounded rule's at every coupling. Power iteration from the bounded rule's needs 13 at every coupling; from Bunch–Kaufman's it needs 28, 39, 54, more than sixty, more than sixty as the coupling falls through the five values. Points drawn at the top did not arrive within sixty products.

show: "refine-random"

The arguments are the ones A curvature direction the factors cannot refine passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

Thirty random symmetric matrices: how much of the curvature each factorisation's direction holds, after eight steps of inverse iteration with the factors, and after eight Lanczos productsRandom 24 × 24 symmetric matrices with standard normal entries, factored by Bunch–Kaufman and by the bounded rule. The Rayleigh quotient over the smallest eigenvalue: the factors' own direction has a median of 0.077 and 0.103; after eight steps of inverse iteration with the same factors, 0.000 and 0.006; after eight Lanczos products, 0.996 and 0.996, the least of all sixty 0.749.fraction of the curvatureinverse iteration, median, both rules0.0061Lanczos, least of sixty0.7500.250.50.751left: Bunch–Kaufman · right: the bounded ruleRayleigh quotient ÷ smallest eigenvaluethe factors' directioneight inverse stepseight Lanczos productsred: Bunch–Kaufman · green: the bounded rulethe solve finds the wrong end of the spectrum

Random 24 × 24 symmetric matrices with standard normal entries, factored by Bunch–Kaufman and by the bounded rule. The Rayleigh quotient over the smallest eigenvalue: the factors' own direction has a median of 0.077 and 0.103; after eight steps of inverse iteration with the same factors, 0.000 and 0.006; after eight Lanczos products, 0.996 and 0.996, the least of all sixty 0.749.

show: "refine-shift"

The arguments are the ones A curvature direction the factors cannot refine passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

Inverse iteration with a second factorisation, shifted at the most negative pivot each first factorisation's D carries, and a tenth past itThe planted matrix at coupling ten to the minus eight, smallest eigenvalue −8.399. The shift is the most negative eigenvalue of D: −7.339 for Bunch–Kaufman's factors and −5.437 for the bounded rule's, then each pushed a tenth further. Bunch–Kaufman, shift −7.34: the quotient settles at 0.849 of the smallest eigenvalue, the eigenvalue nearest the shift being −7.135; Bunch–Kaufman, shift −8.07: the quotient settles at 1.000 of the smallest eigenvalue, the eigenvalue nearest the shift being −8.399; bounded rule, shift −5.44: the quotient settles at 0.597 of the smallest eigenvalue, the eigenvalue nearest the shift being −5.015; bounded rule, shift −5.98: the quotient settles at 0.598 of the smallest eigenvalue, the eigenvalue nearest the shift being −5.015.fraction of the curvature, step 8Bunch–Kaufman, shift −7.340.85Bunch–Kaufman, shift −8.071bounded, shift −5.440.6bounded, shift −5.980.61234567800.250.50.751step of shifted inverse iterationRayleigh quotient ÷ smallest eigenvalueBunch–Kaufman, at the pivotBunch–Kaufman, pushedbounded, at the pivotbounded, pusheddashed: shifted at the pivot itselfa shift finds the eigenvalue nearest it

The planted matrix at coupling ten to the minus eight, smallest eigenvalue −8.399. The shift is the most negative eigenvalue of D: −7.339 for Bunch–Kaufman's factors and −5.437 for the bounded rule's, then each pushed a tenth further. Bunch–Kaufman, shift −7.34: the quotient settles at 0.849 of the smallest eigenvalue, the eigenvalue nearest the shift being −7.135; Bunch–Kaufman, shift −8.07: the quotient settles at 1.000 of the smallest eigenvalue, the eigenvalue nearest the shift being −8.399; bounded rule, shift −5.44: the quotient settles at 0.597 of the smallest eigenvalue, the eigenvalue nearest the shift being −5.015; bounded rule, shift −5.98: the quotient settles at 0.598 of the smallest eigenvalue, the eigenvalue nearest the shift being −5.015.

What it checked while drawing

Every figure above checked its own claims on the way to being drawn, and a claim that failed would have stopped the picture rather than shipped a wrong one. Those checks used to leave no trace at all: a passing one returned true and the only evidence the figure had checked anything was that nothing crashed. The list below is what they actually said, collected by running this generator with an observer installed — not a description of what it is believed to check.

37 distinct claims across 6 sets of arguments, grouped below by shape — because most of them are one sentence with a different number in it, and how many separate times that sentence was put to the test is the informative part.

and partial pivoting's is no larger at κ = 10 — checked 3 times

Cholesky succeeds at κ = 10 — checked 3 times

Cholesky's growth factor is exactly one at κ = 10 — checked 3 times

a coupling between 0 and 1

a coupling the dial draws

a coupling the planted family is drawn at

a nonsingular 2 × 2 pivot

a nonzero 1 × 1 pivot

a pivot rule this file implements

a size the dense factorisations can afford

and partial pivoting's is no larger at κ = 10¹⁰

and partial pivoting's is no larger at κ = 10¹²

and partial pivoting's is no larger at κ = 10⁴

and partial pivoting's is no larger at κ = 10⁶

and partial pivoting's is no larger at κ = 10⁸

and the general bound is far above both

Cholesky succeeds at κ = 10¹⁰

Cholesky succeeds at κ = 10¹²

Cholesky succeeds at κ = 10⁴

Cholesky succeeds at κ = 10⁶

Cholesky succeeds at κ = 10⁸

Cholesky's growth factor is exactly one at κ = 10¹⁰

Cholesky's growth factor is exactly one at κ = 10¹²

Cholesky's growth factor is exactly one at κ = 10⁴

Cholesky's growth factor is exactly one at κ = 10⁶

Cholesky's growth factor is exactly one at κ = 10⁸

Jacobi needs a symmetric matrix

LU is for square matrices

matmul shapes agree

the rook search ends at an entry largest in its row and its column

which it reaches by interchanging rows, where Cholesky interchanges none

Against the rule

It draws a decomposition and prints its residual. It calls luFactor, choleskyGrowth, and every figure above carries the badge — which residualcheck verifies by looking for it in the emitted SVG rather than by finding the call that builds one. A badge that is constructed and then left out of the body is the failure that check exists for.

Across the library: the rule bites on 217 of 397 generators — 199 print a residual and 18 are exempt with a published reason; 180 factorise nothing. Read from lib/residual-rule.js, which is the same body the gate enforces from, and the gate's last check fails the build if this page and it disagree about any generator.

Where it is called

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

Elimination, and the swap

A curvature direction the factors cannot refine

A direction of negative curvature read from Bunch–Kaufman's factors held 7·10⁻¹⁶ of the curvature that was there, and the bounded rule's held 14 per cent. The prediction was that a few steps of inverse iteration with the same factors would recover it from either. One step leaves both under a thousandth, and two put both on positive curvature, at the eigenvalue nearest zero — because a solve amplifies the smallest eigenvalue in magnitude, not the most negative. What recovers the curvature is the matrix, not its factors: Lanczos from either direction reaches ninety-nine per cent in six to nine products at every coupling, and power iteration from Bunch–Kaufman's direction has not reached a tenth after sixty.

Elimination, and the swap

A factorisation with nothing to pivot for

Cholesky's growth factor is not bounded by one. It is equal to one, at every size and every condition number, and the two-line reason is why the algorithm needs no pivoting at all — not "usually gets away without it". Its only failure is the square root of a non-positive number, which is exactly the test for definiteness, and in floating point that test moves with the precision.

Elimination, and the swap

When symmetry is not enough

The matrix [[0, 1], [1, 0]] is symmetric, nonsingular and perfectly conditioned, and there is no diagonal entry to pivot on. Every factorisation restricted to symmetric interchanges and one-by-one pivots fails on it, at any depth of searching, because every entry it could search is zero. The repair is to take two variables at once.

Elimination, and the swap

Where the multipliers go

Bunch–Kaufman bounds the growth in D and not the entries of L, and the warning attached to that is that everything which later uses the factors inherits the size of L. On a matrix built to make those entries 1.2 over ε, they reach 1.2·10¹⁰ while the solve's backward error stays at 1.6·10⁻¹⁶, |L||D||Lᵀ| stays at 6.7 times ‖A‖, and a step of refinement changes nothing. The large multipliers are where the rule has put the matrix's ill-conditioning. A direction of negative curvature read from those factors finds 7·10⁻¹⁶ of the curvature that is there; the bounded rule's finds 13%.

The whole library · All essays · What must fail