null-basis-bars
At its defaults it draws three bases for the same null space, at 10 unknowns and 4 constraints. The same constrained problem solved three times, differing only in which basis Z is used for the null space of A. The orthonormal basis, from a QR of Aᵀ, has κ(Z) = 1 exactly and is dense — 100 per cent of its entries are nonzero. The fundamental basis built on the first 4 columns has κ(Z) = 1.994·10⁸, and its reduced Hessian comes out at 3.801·10¹⁶, which is κ(Z)² to within a factor of 0.956 — the square attained rather than bounded. Its answer is wrong by 0.05179, against 1.07·10⁻¹⁵ for the orthonormal one. Choosing the same kind of basis by pivoting instead gives κ(Z) = 2.06, an error of 6.71·10⁻¹⁶, and the same 50 per cent density: all of the sparsity and none of the loss.
null-basis-bars is one function in lib/figures/nullbasis.js —
the basis of a constraint — three spans of one null space, and the square between them. 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 same constrained problem solved three times, differing only in which basis Z is used for the null space of A. The orthonormal basis, from a QR of Aᵀ, has κ(Z) = 1 exactly and is dense — 100 per cent of its entries are nonzero. The fundamental basis built on the first 4 columns has κ(Z) = 1.994·10⁸, and its reduced Hessian comes out at 3.801·10¹⁶, which is κ(Z)² to within a factor of 0.956 — the square attained rather than bounded. Its answer is wrong by 0.05179, against 1.07·10⁻¹⁵ for the orthonormal one. Choosing the same kind of basis by pivoting instead gives κ(Z) = 2.06, an error of 6.71·10⁻¹⁶, and the same 50 per cent density: all of the sparsity and none of the loss.
gamma: 1
The arguments are the ones A preconditioner that need not know the constraint passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.
The same constrained problem solved three times, differing only in which basis Z is used for the null space of A. The orthonormal basis, from a QR of Aᵀ, has κ(Z) = 1 exactly and is dense — 100 per cent of its entries are nonzero. The fundamental basis built on the first 4 columns has κ(Z) = 4.436, and its reduced Hessian comes out at 83.77, which is κ(Z)² to within a factor of 4.26 — the square attained rather than bounded. Its answer is wrong by 1.26·10⁻¹⁵, against 1.29·10⁻¹⁵ for the orthonormal one. Choosing the same kind of basis by pivoting instead gives κ(Z) = 2.258, an error of 1.41·10⁻¹⁵, and the same 50 per cent density: all of the sparsity and none of the loss.
gamma: 100000000
The arguments are the ones A preconditioner that need not know the constraint passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.
The same constrained problem solved three times, differing only in which basis Z is used for the null space of A. The orthonormal basis, from a QR of Aᵀ, has κ(Z) = 1 exactly and is dense — 100 per cent of its entries are nonzero. The fundamental basis built on the first 4 columns has κ(Z) = 1.994·10⁸, and its reduced Hessian comes out at 3.801·10¹⁶, which is κ(Z)² to within a factor of 0.956 — the square attained rather than bounded. Its answer is wrong by 0.05179, against 1.07·10⁻¹⁵ for the orthonormal one. Choosing the same kind of basis by pivoting instead gives κ(Z) = 2.06, an error of 6.71·10⁻¹⁶, and the same 50 per cent density: all of the sparsity and none of the loss.
gamma: 10000
The arguments are the ones The basis nobody chose on purpose passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.
The same constrained problem solved three times, differing only in which basis Z is used for the null space of A. The orthonormal basis, from a QR of Aᵀ, has κ(Z) = 1 exactly and is dense — 100 per cent of its entries are nonzero. The fundamental basis built on the first 4 columns has κ(Z) = 1.997·10⁴, and its reduced Hessian comes out at 5.845·10⁸, which is κ(Z)² to within a factor of 1.47 — the square attained rather than bounded. Its answer is wrong by 8.504·10⁻¹⁰, against 2.25·10⁻¹⁵ for the orthonormal one. Choosing the same kind of basis by pivoting instead gives κ(Z) = 2.06, an error of 1.33·10⁻¹⁵, and the same 50 per cent density: all of the sparsity and none of the loss.
gamma: 100
The arguments are the ones The basis nobody chose on purpose passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.
The same constrained problem solved three times, differing only in which basis Z is used for the null space of A. The orthonormal basis, from a QR of Aᵀ, has κ(Z) = 1 exactly and is dense — 100 per cent of its entries are nonzero. The fundamental basis built on the first 4 columns has κ(Z) = 205.7, and its reduced Hessian comes out at 8.39·10⁴, which is κ(Z)² to within a factor of 1.98 — the square attained rather than bounded. Its answer is wrong by 3.074·10⁻¹³, against 1.15·10⁻¹⁵ for the orthonormal one. Choosing the same kind of basis by pivoting instead gives κ(Z) = 2.061, an error of 2.88·10⁻¹⁶, and the same 50 per cent density: all of the sparsity and none of the loss.
gamma: 10000000000
The arguments are the ones The basis nobody chose on purpose passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.
The same constrained problem solved three times, differing only in which basis Z is used for the null space of A. The orthonormal basis, from a QR of Aᵀ, has κ(Z) = 1 exactly and is dense — 100 per cent of its entries are nonzero. The fundamental basis built on the first 4 columns has κ(Z) = 1.994·10¹⁰, and its reduced Hessian comes out at 4.871·10¹⁸, which is κ(Z)² to within a factor of 0.0123 — the square attained rather than bounded. Its answer is wrong by 0.3173, against 8.67·10⁻¹⁶ for the orthonormal one. Choosing the same kind of basis by pivoting instead gives κ(Z) = 2.06, an error of 8.07·10⁻¹⁶, and the same 50 per cent density: all of the sparsity and none of the loss.
What it checked while drawing
Every figure above asserted its own claims on the way to being drawn, and a claim that failed
would have failed the build rather than drawn a wrong picture. Those assertions 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 badness the double can hold
a basis rule this file implements
a constraint no larger than the problem
a finite double, since an infinity is not a rational
a problem the exact solve can afford
and pivoting improves on the naive choice
fewer constraints than unknowns
fewer constraints than unknowns, so something is left to minimise
LU is for square matrices
matmul shapes agree
the orthonormal basis has condition number one exactly
while the fundamental bases are the sparse ones
Against the rule
It draws a decomposition and prints its residual. It calls
basisComparison,
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 165
of 306 generators —
150 print a residual and
15 are exempt with a published reason;
141 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.
A preconditioner that need not know the constraint
Keep the constraint block exactly and replace the objective block by anything positive definite on the null space. The preconditioned matrix then has 2m eigenvalues at exactly one, and its remaining n − m are the generalised eigenvalues of a pencil in which the constraint does not appear. Sweep its condition number over six decades and they do not move in six digits.
Orthogonality, measuredThe basis nobody chose on purpose
A method that eliminates a constraint has to pick a basis for its null space, and every basis is correct. Their condition numbers are eight orders apart, the reduced problem inherits the square, and the choice is usually made by a one-line rule nobody thought of as a numerical decision.
Randomised, and the guarantee that changes kindThe half of a problem a sketch may touch
A sketch guarantees that a norm is preserved to within a factor. An equality constraint is a statement that a quantity is zero, and no multiplicative guarantee says anything about zero. Sketch a constrained problem written as a weighted one and the constraint is not destroyed — it is demoted, from a violation of 1/τ² to one of ε/τ, exactly half the exponent.
The matrix a constraint makesThe zero that is not a missing entry
A constrained minimisation produces a matrix with a zero block, and the zero is a theorem rather than a sparsity pattern. No pivot order makes it positive definite, no precision changes that, and Cholesky does not fail somewhere on it — it fails at the first constraint row, on a number the problem already contained.
The matrix a constraint makesTwo ways to remove a constraint
A constrained system can be reduced by eliminating the multipliers or by eliminating the constrained directions. Both give the same answer in exact arithmetic and inherit different condition numbers — one of them squares the constraint's, and the other does not contain it at all.