Generator

The plane, and the two vectors inside it, at a gap of 10⁻⁶

One function in the subspace library, called 24 times across 4 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 12 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 plane, and the two vectors inside it, at a gap of 10⁻⁶. A circle representing the invariant plane, with two perpendicular radii for the eigenvectors and two more for the perturbed ones, rotated within the same circle.

plane-and-vectors is one function in lib/figures/subspace.js — subspaces — the gap, the eigenvector, and the plane that survives both. 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 plane, and the two vectors inside it, at a gap of 10⁻⁶A circle representing the invariant plane, with two perpendicular radii for the eigenvectors and two more for the perturbed ones, rotated within the same circle.the invariant planesolid: beforedashed: aftersame perturbation, two questionsthe vectors turned, radians0.029the plane turned, radians7.6·10⁻⁸what left the plane5.6·10⁻⁸drawn in the unperturbed plane's own basisa radius is not determined; the circle is

A circle representing the invariant plane, with two perpendicular radii for the eigenvectors and two more for the perturbed ones, rotated within the same circle.

show: "lr-steps"

The arguments are the ones Refining the solution alone refines nothing passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The relative error of a least-squares solution against the exact solution of the stored data, after each step of four refinements of QR's answer, at a condition number of ten to the seventh and a tangent of one, median of five drawssolution alone, residual in binary64: 1.8e-4, 1.8e-4, 1.8e-4, 1.8e-4; solution alone, residual exact: 1.8e-4, 1.8e-4, 1.8e-4, 1.8e-4; residual and solution, binary64: 1.8e-4, 1.7e-4, 1.7e-4, 1.0e-4; residual and solution, exact: 1.8e-4, 1.7e-14, zero, zero after none to three steps.012310⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²steps of refinementrelative error in the solutionsolution alone, residual in binary64solution alone, residual exactresidual and solution, binary64residual and solution, exactκ = 10⁷ · tan θ = 1 · 24 × 6 · floored at 10⁻¹⁷one route of four moves

solution alone, residual in binary64: 1.8e-4, 1.8e-4, 1.8e-4, 1.8e-4; solution alone, residual exact: 1.8e-4, 1.8e-4, 1.8e-4, 1.8e-4; residual and solution, binary64: 1.8e-4, 1.7e-4, 1.7e-4, 1.0e-4; residual and solution, exact: 1.8e-4, 1.7e-14, zero, zero after none to three steps.

show: "lr-steps", kappa: 10000000

The arguments are the ones Refining the solution alone refines nothing passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The relative error of a least-squares solution against the exact solution of the stored data, after each step of four refinements of QR's answer, at a condition number of ten to the seventh and a tangent of one, median of five drawssolution alone, residual in binary64: 1.8e-4, 1.8e-4, 1.8e-4, 1.8e-4; solution alone, residual exact: 1.8e-4, 1.8e-4, 1.8e-4, 1.8e-4; residual and solution, binary64: 1.8e-4, 1.7e-4, 1.7e-4, 1.0e-4; residual and solution, exact: 1.8e-4, 1.7e-14, zero, zero after none to three steps.012310⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²steps of refinementrelative error in the solutionsolution alone, residual in binary64solution alone, residual exactresidual and solution, binary64residual and solution, exactκ = 10⁷ · tan θ = 1 · 24 × 6 · floored at 10⁻¹⁷one route of four moves

solution alone, residual in binary64: 1.8e-4, 1.8e-4, 1.8e-4, 1.8e-4; solution alone, residual exact: 1.8e-4, 1.8e-4, 1.8e-4, 1.8e-4; residual and solution, binary64: 1.8e-4, 1.7e-4, 1.7e-4, 1.0e-4; residual and solution, exact: 1.8e-4, 1.7e-14, zero, zero after none to three steps.

show: "lr-kappa"

The arguments are the ones Refining the solution alone refines nothing passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The relative error of a least-squares solution after one step of each refinement, against the condition number, at a tangent of one, median of five draws, with QR's own errorQR alone: 4.8e-16 at 10, 2.5e-14 at 100, 1.5e-12 at 1000, 1.3e-10 at 10000, 1.3e-8 at 100000, 5.3e-7 at 1000000, 1.8e-4 at 10000000. After one step: solution alone, residual in binary64 4.4e-16, 2.2e-14, 1.5e-12, 1.3e-10, 1.3e-8, 5.3e-7, 1.8e-4; solution alone, residual exact 3.5e-16, 2.2e-14, 1.5e-12, 1.3e-10, 1.3e-8, 5.3e-7, 1.8e-4; residual and solution, binary64 3.3e-16, 1.6e-14, 1.5e-12, 1.1e-10, 1.3e-8, 7.4e-7, 1.7e-4; residual and solution, exact zero, zero, zero, zero, zero, 1.4e-17, 1.7e-14.10¹10²10³10⁴10⁵10⁶10⁷10⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²condition numberrelative error after one stepsolution alone, residual in binary64solution alone, residual exactresidual and solution, binary64residual and solution, exactQR, before any steptan θ = 1 · 24 × 6 · floored at 10⁻¹⁷three lines on the square

QR alone: 4.8e-16 at 10, 2.5e-14 at 100, 1.5e-12 at 1000, 1.3e-10 at 10000, 1.3e-8 at 100000, 5.3e-7 at 1000000, 1.8e-4 at 10000000. After one step: solution alone, residual in binary64 4.4e-16, 2.2e-14, 1.5e-12, 1.3e-10, 1.3e-8, 5.3e-7, 1.8e-4; solution alone, residual exact 3.5e-16, 2.2e-14, 1.5e-12, 1.3e-10, 1.3e-8, 5.3e-7, 1.8e-4; residual and solution, binary64 3.3e-16, 1.6e-14, 1.5e-12, 1.1e-10, 1.3e-8, 7.4e-7, 1.7e-4; residual and solution, exact zero, zero, zero, zero, zero, 1.4e-17, 1.7e-14.

show: "lr-angle"

The arguments are the ones Refining the solution alone refines nothing passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The relative error of a least-squares solution at a condition number of ten to the seventh after one step of each refinement, at four angles between the data and the column space, median of five drawsa zero residual: QR 6.3e-11, solution alone, residual in binary64 7.4e-11, solution alone, residual exact zero, residual and solution, binary64 7.4e-11, residual and solution, exact zero; tan θ = 10⁻³: QR 1.8e-7, solution alone, residual in binary64 1.8e-7, solution alone, residual exact 1.8e-7, residual and solution, binary64 8.0e-8, residual and solution, exact 2.4e-17; tan θ = 1: QR 1.8e-4, solution alone, residual in binary64 1.8e-4, solution alone, residual exact 1.8e-4, residual and solution, binary64 1.7e-4, residual and solution, exact 1.7e-14; tan θ = 10³: QR 1.8e-1, solution alone, residual in binary64 1.8e-1, solution alone, residual exact 1.8e-1, residual and solution, binary64 2.3e-1, residual and solution, exact 1.7e-11.10⁻¹⁶10⁻¹²10⁻⁸10⁻⁴1a zero residualQR alone6e-11solution alone, residual in binary647e-11solution alone, residual exactzeroresidual and solution, binary647e-11residual and solution, exactzerotan θ = 10⁻³QR alone2e-7solution alone, residual in binary642e-7solution alone, residual exact2e-7residual and solution, binary648e-8residual and solution, exact2e-17tan θ = 1QR alone2e-4solution alone, residual in binary642e-4solution alone, residual exact2e-4residual and solution, binary642e-4residual and solution, exact2e-14tan θ = 10³QR alone2e-1solution alone, residual in binary642e-1solution alone, residual exact2e-1residual and solution, binary642e-1residual and solution, exact2e-11relative error after one stepκ = 10⁷ · floored at 10⁻¹⁷the angle decides the alone route

a zero residual: QR 6.3e-11, solution alone, residual in binary64 7.4e-11, solution alone, residual exact zero, residual and solution, binary64 7.4e-11, residual and solution, exact zero; tan θ = 10⁻³: QR 1.8e-7, solution alone, residual in binary64 1.8e-7, solution alone, residual exact 1.8e-7, residual and solution, binary64 8.0e-8, residual and solution, exact 2.4e-17; tan θ = 1: QR 1.8e-4, solution alone, residual in binary64 1.8e-4, solution alone, residual exact 1.8e-4, residual and solution, binary64 1.7e-4, residual and solution, exact 1.7e-14; tan θ = 10³: QR 1.8e-1, solution alone, residual in binary64 1.8e-1, solution alone, residual exact 1.8e-1, residual and solution, binary64 2.3e-1, residual and solution, exact 1.7e-11.

show: "lr-slope"

The arguments are the ones Refining the solution alone refines nothing passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The fitted slope of the solution's error against the condition number, from a hundred to ten to the seventh at a tangent of one, before refinement and after one and three steps of three refinementssolution alone, residual in binary64, before: 1.94; solution alone, residual in binary64, after 1: 1.95; solution alone, residual in binary64, after 3: 1.95; solution alone, residual exact, before: 1.94; solution alone, residual exact, after 1: 1.95; solution alone, residual exact, after 3: 1.95; residual and solution, binary64, before: 1.94; residual and solution, binary64, after 1: 1.98; residual and solution, binary64, after 3: 1.97. The fourth route has no slope: its error is zero after two steps at every condition number.00.511.522.5solution alone, residual in binary64, before1.94solution alone, residual in binary64, after 11.95solution alone, residual in binary64, after 31.95solution alone, residual exact, before1.94solution alone, residual exact, after 11.95solution alone, residual exact, after 31.95residual and solution, binary64, before1.94residual and solution, binary64, after 11.98residual and solution, binary64, after 31.97slope of the error against κ, both on logarithmic axestwo is the square of the condition numberno step takes it off

solution alone, residual in binary64, before: 1.94; solution alone, residual in binary64, after 1: 1.95; solution alone, residual in binary64, after 3: 1.95; solution alone, residual exact, before: 1.94; solution alone, residual exact, after 1: 1.95; solution alone, residual exact, after 3: 1.95; residual and solution, binary64, before: 1.94; residual and solution, binary64, after 1: 1.98; residual and solution, binary64, after 3: 1.97. The fourth route has no slope: its error is zero after two steps at every condition number.

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.

12 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.

a condition number the dial offers

a gap inside the range drawn

a kind of problem the refinement study builds

a kind of problem this file builds

an angle the dial offers

and what leaves the plane is the sine of the angle it turned through

at least one row

curves with points on them

Jacobi needs a symmetric matrix

matmul shapes agree

the plane has barely moved

the two unperturbed vectors are drawn at a right angle because they are at one

Against the rule

The rule does not apply to it. It factorises nothing, so there is no residual it could be withholding. That is worth stating rather than leaving blank: a site that reported the rule as satisfied by every generator would be counting mostly generators the rule never reached.

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.

Least squares, and the road not to take

Refining the solution alone refines nothing

QR's least-squares error at a tangent of one grows as the square of the condition number, against the exact solution of the stored data, and the prediction was that refinement in working precision would not help while a residual computed in twice the precision would take the term down by four decades. The first half holds. The second fails completely: refining the solution with an exactly computed residual leaves the error at 1.8 times ten to the minus four at a condition of ten to the seven, unchanged in every digit shown, and the slope stays at 1.95. The same exact residual used to refine the residual and the solution together, through the augmented system and the same QR, takes it to ten to the minus fourteen in one step and to the exact solution in two.

Eigenvalues, singular values, rank

The plane survives what its vectors do not

At a gap of 10⁻⁹ a perturbation of 10⁻⁶ turns the two eigenvectors through half a radian and turns the plane they span through 7.6·10⁻⁸ — a ratio of six million. Ask for the subspace instead of the vectors and a hopeless computation becomes a well-conditioned one, with no change to the arithmetic.

Least squares, and the road not to take

The projection and the right angle

The least-squares solution is the one whose residual is perpendicular to everything the columns can reach. That is not a mnemonic — it is an equation, Aᵀr = 0, and the computed answer satisfies it to 10⁻¹⁶.

Least squares, and the road not to take

Where QR pays the square

The road through the normal equations squares the condition number, and the road through QR keeps every step orthogonal, so the condition number is untouched. That is true of the triangular system QR ends in, and it is not a statement about the answer. Measured against the exact solution of the stored data, QR's error in a least-squares solution goes as the square of the condition number too, once the data lie well away from the column space: 2·10⁻⁴ at κ = 10⁷ and a tangent of one, five orders above the condition number's own reading. The residual does not pay it. And the normal equations' famous disadvantage is seven decades on a consistent system, one decade at a tangent of one, and nothing at all at a thousand.

The whole library · All essays · What must fail