The matrix a constraint makes

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

Worth reading first: A factorisation with nothing to pivot for · The condition number is an amplifier · Elimination is a sequence of choices.

Every matrix this collection has had trouble with so far has been difficult for a reason the arithmetic supplied. A Hilbert matrix arrives ill conditioned and an exact rational inverse says by how much. A Wilkinson matrix grows under elimination until the bound that is never attained is attained after all. A kernel matrix has no zeros at all and is affordable anyway. In every case the algebra was willing and the numbers were not, and the repair was arithmetic: pivot, rescale, carry more bits.

This field opens on the first matrix here whose difficulty is algebraic, and the difference shows up as an absence rather than as a large number.

Where it comes from, which is one line of calculus

Minimise ½xᵀHx − fᵀx subject to Ax = g, with H symmetric positive definite and A of full row rank. Introduce a multiplier y for each constraint and the Lagrangian is that objective plus yᵀ(Ax − g). Setting both gradients to zero gives

Hx + Aᵀy = f Ax = g

which is one linear system in the stacked unknown, with the matrix

K = [ H Aᵀ ] [ A 0 ]

The zero block is the second derivative of the Lagrangian with respect to the multipliers, and a Lagrangian is linear in them. So the zero is a theorem. That is the whole difference between this field and the sparsity one: spmat.js stores a zero because a particular problem happened not to couple two particular unknowns, and a different problem of the same kind would not have it. Here every problem of this kind has it, in the same place, at every size.

The pivots Cholesky computes on a saddle-point matrix, and the one it stops at — row 11 of 14Every pivot Cholesky forms on K = [[H, Aᵀ], [A, 0]], in order, with the 10 taken inside H drawn as positive and the 11-th, which is not, drawn as the failure. It is not a near miss and it is not a rounding accident: the leading n × n block is positive definite, so the first 10 pivots are positive at any conditioning, and the next one is 0 − a₁ᵀH⁻¹a₁ where a₁ᵀ is the first row of A. That equals −(AH⁻¹Aᵀ)₁₁ = -3.7312, and the pivot the routine actually reports is -3.7312 — the same number to 15 digits. The failure has an address and a value, and both were available before the factorisation started.02468101210⁻³10⁻²10⁻¹110¹10²pivot, in order|pivot|negative, at row 11|S₁₁| from AH⁻¹Aᵀa failure with an addressrows before it10the pivot-3.7−(AH⁻¹Aᵀ)₁₁-3.7disagreement3.6·10⁻¹⁶it does not fail somewhereit fails at the constraint
Fig. 1 Two decades of conditioning: the factorisation stops at row 11 of 14 and the pivot is −3.7312, exactly −S₁₁.

The row is the thing to watch rather than the pivot, and it is what a single frame cannot establish.

The pivots Cholesky computes on a saddle-point matrix, and the one it stops at — row 11 of 14Every pivot Cholesky forms on K = [[H, Aᵀ], [A, 0]], in order, with the 10 taken inside H drawn as positive and the 11-th, which is not, drawn as the failure. It is not a near miss and it is not a rounding accident: the leading n × n block is positive definite, so the first 10 pivots are positive at any conditioning, and the next one is 0 − a₁ᵀH⁻¹a₁ where a₁ᵀ is the first row of A. That equals −(AH⁻¹Aᵀ)₁₁ = -328.56, and the pivot the routine actually reports is -328.56 — the same number to 13 digits. The failure has an address and a value, and both were available before the factorisation started.02468101210⁻⁵10⁻³10⁻¹10¹10³pivot, in order|pivot|negative, at row 11|S₁₁| from AH⁻¹Aᵀa failure with an addressrows before it10the pivot-329−(AH⁻¹Aᵀ)₁₁-329disagreement8.8·10⁻¹⁴it does not fail somewhereit fails at the constraint
Fig. 2 What that costs the first factorisation anybody would reach for.

Why it is called a saddle point

The name is not decoration and it says what the matrix is. The Lagrangian is a function of both x and y, and at the solution it is minimised in x and maximised in y: moving along a feasible direction raises the objective, and moving the multipliers raises the penalty for infeasibility. A stationary point that is a minimum in some directions and a maximum in others is a saddle, and the second derivative at a saddle is an indefinite matrix. So the indefiniteness is not a property of a particular H and A; it is the shape of the stationary point the problem asks for.

That also says what would have to change for the matrix to be definite: the problem would have to stop having constraints. Every technique in this field is therefore a way of living with indefiniteness rather than removing it — which is why the two rebuilds in the next essay both work by eliminating one block, and why the two preconditioners two essays on both keep the zero where it is.

Where these matrices come from, which is nearly everywhere

Four families produce this exact block structure, and they have nothing else in common.

Constrained least squares. Fit a curve required to pass through a point, or a set of coefficients required to sum to one. The (1, 1) block is AᵀA, the constraint is the requirement, and the essay on the weighted version shows what happens when the requirement is imposed by a penalty instead.

Incompressible flow. Discretise a velocity field and a pressure, require the velocity to be divergence-free, and the pressure is the multiplier: the (2, 2) block is zero because pressure does not appear in the momentum equation except through its gradient.

Network and structural equilibrium. A flow that must balance at every node, a truss whose displacements must satisfy a support condition. The constraint rows are the topology and the multipliers are the node potentials or the reaction forces.

Every step of an interior-point method for a constrained optimisation problem, which is what the fifth essay in this field is about — and where the matrix is deliberately driven towards singularity, iteration after iteration, as the algorithm works.

The list matters because it says the shape is not an artefact of writing the Lagrangian down. It is what a constraint looks like once it has been differentiated, whatever it was a constraint on.

The count is settled before anything runs

A congruence X ↦ SᵀXS with S nonsingular does not preserve eigenvalues, and does preserve their signs. That is Sylvester’s law of inertia, and it is the most useful theorem in this field because the block elimination

[ I 0 ] [ H Aᵀ ] [ I −H⁻¹Aᵀ ] [ H 0 ] [ −AH⁻¹ I ] [ A 0 ] [ 0 I ] = [ 0 −AH⁻¹Aᵀ ]

is a congruence, written out. H is positive definite by hypothesis. AH⁻¹Aᵀ is positive definite whenever A has full row rank, because vᵀAH⁻¹Aᵀv = ‖H⁻¹ᐟ²Aᵀv‖² and Aᵀv is nonzero for v ≠ 0. So the inertia of K is

(n positive, m negative, 0 zero)

exactly, for every H, every A, every conditioning and every size. The hero figure is that statement measured: n marks above zero and m below, and the counts printed beside them.

This is stronger than it sounds. Every other spectral claim on this site is a computation whose result has a tolerance attached — an eigenvalue one vector cannot see, a rank that is a decision about a gap, a condition number that is only as meaningful as the units it was measured in. The inertia of a saddle-point matrix is a pair of integers that is known before the matrix exists.

Cholesky does not fail somewhere

The first thing anybody does with a symmetric matrix is try a Cholesky, because it costs half what an LU costs and because it fails if and only if the matrix is not positive definite, which makes the failure a useful test rather than an inconvenience.

Run it on K and it does not fail at an unpredictable place. The leading n × n block is H, which is positive definite, so the first n pivots are positive at any conditioning whatever. The (n + 1)-th pivot is the first diagonal entry of the Schur complement the elimination has been building, and that entry is

0 − a₁ᵀH⁻¹a₁ = −(AH⁻¹Aᵀ)₁₁ < 0

where a₁ᵀ is the first row of A. So the failure has an address — row n + 1 — and a value, and both were available before the factorisation started. The figure above prints both and the gap between them: the pivot the routine reports and the entry of AH⁻¹Aᵀ computed independently, agreeing to every bit at κ(H) = 1 and to nine digits at κ(H) = 10¹⁰, which is the arithmetic showing through a claim that is otherwise exact.

How the agreement degrades is worth a number, because the obvious guess is wrong in the useful direction:

   κ(H)      relative gap    digits agreeing
   1          0                  16+
   10²        5.88·10⁻¹⁶         15.2
   10⁴        1.41·10⁻¹⁴         13.9
   10⁶        1.34·10⁻¹²         11.9
   10⁸        3.73·10⁻¹¹         10.4
   10¹⁰       6.70·10⁻¹⁰          9.2
   10¹²       1.04·10⁻⁶           6.0

A κ(H)·u argument would say one digit lost per decade of conditioning. The fitted exponent is 0.78 — three quarters of a digit per decade — so at κ(H) = 10¹⁰ the check still carries nine digits where the linear estimate allows six.

The reason is that neither quantity is computed by an operation whose error is κ(H) times a rounding. The Cholesky pivot accumulates the Schur complement through n steps of elimination on a positive definite block, which is growth factor exactly one; the independent route solves with H once. Both inherit some of κ(H) and neither inherits all of it, and the exponent is where the two land.

The last row is outside that law by two orders, and the break is informative. Two decades past κ(H) = 10¹⁰ the gap jumps by more than a hundredfold, which is H’s own factorisation beginning to lose the Schur complement rather than the comparison losing accuracy — so the sub-linear regime has an end, it is at about κ(H) = 10¹¹, and past it the two routes are no longer two routes to one number.

What that check is for, and why it is not the usual one

It is worth separating this comparison from the site’s ordinary two-routes habit, because it is doing a different job and the difference is the essay’s subject.

Everywhere else on this site, two routes to one number are run because neither is known to be right and agreement is evidence. Here the algebra is not in doubt: the (n+1)-th pivot is −(AH⁻¹Aᵀ)₁₁, exactly, by the congruence written out above, and no measurement could make that more or less true. What the comparison measures is not whether the claim holds but how much of it survives the arithmetic — which is the same question the whole site asks about every other identity and which is almost never asked about this one, because a claim that is exact invites being taken as exact.

That reframes what the table is evidence for. Nine digits at κ(H) = 10¹⁰ is not evidence that the inertia result holds; it is a measurement of the distance between an exact statement and a computed one, and the exponent 0.78 is the rate at which that distance opens.

The practical consequence is small and real. A routine that used the predicted pivot as a check on the factorisation — did the Cholesky stop where the algebra says it must — has a tolerance to choose, and the table says what it should be: about 10⁻¹⁶·κ(H)^0.78, which is nine digits at κ(H) = 10¹⁰ and six at 10¹². A check written with a fixed tolerance of 10⁻¹² would pass everywhere below κ(H) = 10⁷ and start firing spuriously above it, on a matrix where nothing whatever has gone wrong.

The refusal this page publishes is the reading that would otherwise survive: that a factorisation which fails is failing on the numbers, so a better pivot rule or more bits will get through. The assertion is fed the run at κ(H) = 1, where H is the identity and every entry of the matrix is of order one, and required to fail. It does. There is nothing wrong with the numbers.

The pivots Cholesky computes on a saddle-point matrix, and the one it stops at — row 11 of 14Every pivot Cholesky forms on K = [[H, Aᵀ], [A, 0]], in order, with the 10 taken inside H drawn as positive and the 11-th, which is not, drawn as the failure. It is not a near miss and it is not a rounding accident: the leading n × n block is positive definite, so the first 10 pivots are positive at any conditioning, and the next one is 0 − a₁ᵀH⁻¹a₁ where a₁ᵀ is the first row of A. That equals −(AH⁻¹Aᵀ)₁₁ = -0.082076, and the pivot the routine actually reports is -0.082076 — the same number to 16 digits. The failure has an address and a value, and both were available before the factorisation started.02468101210⁻³10⁻²10⁻¹110¹10²pivot, in order|pivot|negative, at row 11|S₁₁| from AH⁻¹Aᵀa failure with an addressrows before it10the pivot-0.082−(AH⁻¹Aᵀ)₁₁-0.082disagreement0it does not fail somewhereit fails at the constraint
Fig. 3 The same figure with H the identity, where every entry of the matrix is of order one and the factorisation stops at exactly the same row — with a pivot of −0.082076, which is again exactly −S₁₁.
The pivots Cholesky computes on a saddle-point matrix, and the one it stops at — row 11 of 14Every pivot Cholesky forms on K = [[H, Aᵀ], [A, 0]], in order, with the 10 taken inside H drawn as positive and the 11-th, which is not, drawn as the failure. It is not a near miss and it is not a rounding accident: the leading n × n block is positive definite, so the first 10 pivots are positive at any conditioning, and the next one is 0 − a₁ᵀH⁻¹a₁ where a₁ᵀ is the first row of A. That equals −(AH⁻¹Aᵀ)₁₁ = -3.189·10⁴, and the pivot the routine actually reports is -3.189·10⁴ — the same number to 11 digits. The failure has an address and a value, and both were available before the factorisation started.02468101210⁻⁷10⁻⁵10⁻³10⁻¹10¹10³10⁵pivot, in order|pivot|negative, at row 11|S₁₁| from AH⁻¹Aᵀa failure with an addressrows before it10the pivot-3.2·10⁴−(AH⁻¹Aᵀ)₁₁-3.2·10⁴disagreement3.4·10⁻¹²it does not fail somewhereit fails at the constraint
Fig. 4 And six orders the other way, κ(H) = 10⁶, where the pivot is −3.189·10⁴ and the row is 11 of 14.

Ten orders of magnitude of conditioning, and the factorisation stops in the same place every time. Row 11 of 14 at κ(H) = 1, 100, 10⁴, 10⁶, 10⁸ and 10¹⁰ alike. A numerical failure would move — a matrix ten orders harder would break something earlier, or would not break on the easy one at all. This one is a property of where the (2, 2) block starts, and no amount of conditioning puts it anywhere else.

The pivots Cholesky computes on a saddle-point matrix, and the one it stops at — row 11 of 14Every pivot Cholesky forms on K = [[H, Aᵀ], [A, 0]], in order, with the 10 taken inside H drawn as positive and the 11-th, which is not, drawn as the failure. It is not a near miss and it is not a rounding accident: the leading n × n block is positive definite, so the first 10 pivots are positive at any conditioning, and the next one is 0 − a₁ᵀH⁻¹a₁ where a₁ᵀ is the first row of A. That equals −(AH⁻¹Aᵀ)₁₁ = -3.1398·10⁸, and the pivot the routine actually reports is -3.1398·10⁸ — the same number to 7 digits. The failure has an address and a value, and both were available before the factorisation started.02468101210⁻¹⁰10⁻⁷10⁻⁴10⁻¹10²10⁵10⁸pivot, in order|pivot|negative, at row 11|S₁₁| from AH⁻¹Aᵀa failure with an addressrows before it10the pivot-3.1·10⁸−(AH⁻¹Aᵀ)₁₁-3.1·10⁸disagreement3.5·10⁻⁸it does not fail somewhereit fails at the constraint
Fig. 5 The end of the slider, κ(H) = 10¹⁰: pivot −3.1398·10⁸, row 11 of 14.

And the pivot moves the wrong way. Its magnitude reads 0.082, 3.73, 328.6, 3.19·10⁴, 3.16·10⁶ and 3.14·10⁸ across those six stops, and the ratio per two decades of κ(H) is 45.5, 88.1, 97.1, 98.9 and 99.5 — converging on exactly a hundred. The failing pivot is asymptotically proportional to κ(H), so the harder the problem, the further from zero the offending number sits.

That rules out the reading the title is warning against. A pivot that failed because it was a small number lost in rounding would shrink towards zero as the problem worsened, and the repair would be a tolerance. This one reaches −3·10⁸, is negative at every stop, and equals −S₁₁ to every digit printed at every stop. There is nothing for a tolerance to catch, because nothing here is nearly anything.

What the repair is, and what it is not

The essay on symmetric indefinite factorisation has the repair: allow a 2 × 2 pivot, take two variables at once, and a factorisation exists for every symmetric nonsingular matrix with a growth factor that is bounded. That essay’s headline matrix is [[0, 1], [1, 0]] — symmetric, perfectly conditioned, and with no diagonal entry to pivot on — which is the smallest saddle-point matrix there is: H is 1 × 1 and empty, A is [1].

What that repair does not do is make the matrix definite. It makes the factorisation exist. Everything downstream of definiteness stays gone: no Cholesky, no conjugate gradients, no guarantee that a diagonal preconditioner is positive, no interpretation of the solve as a descent. The whole field is what has to be rebuilt once that is accepted, and the next essay starts on it.

The spectrum has a closed form, and it is a bracket

The inertia says how many eigenvalues are on each side. Rusten and Winther’s bounds say where, from four numbers: the extreme eigenvalues μₙ ≤ μ₁ of H and the extreme singular values σₘ ≤ σ₁ of A. The negative eigenvalues lie in

[ ½(μₙ − √(μₙ² + 4σ₁²)), ½(μ₁ − √(μ₁² + 4σₘ²)) ]

and the positive ones in [μₙ, ½(μ₁ + √(μ₁² + 4σ₁²))]. Two intervals, with a gap between them that contains zero.

That is exact ground truth for a spectrum, which this collection has had twice before — for the discrete Laplacian and for a circulant — and never in this form. Those two give the eigenvalues themselves; this gives an enclosure, so what is checked is containment, and the figure additionally reports how much room the bracket leaves over. On the hero’s matrix the extreme negative eigenvalue sits at 0.96 to 1.00 of its bound.

A bracket is what a Krylov method needs to be told. The rate the condition number predicts is a statement about a spectrum in one interval; a spectrum in two, with a hole in the middle, is a different Chebyshev problem and a different rate. Two essays further into this field, that bracket becomes a preconditioner’s design.

The 11 eigenvalues of a saddle-point matrix with 10 unknowns and 1 constraints, inside their closed-form bracketsK = [[H, Aᵀ], [A, 0]] with κ(H) = 100 and κ(A) = 100. The shaded bands are the Rusten–Winther brackets, computed from four numbers — the extreme eigenvalues of H and the extreme singular values of A — before the matrix was assembled: negative eigenvalues in [-0.995, -0.618] and positive ones in [0.01, 1.62]. The marks are the computed spectrum. There are exactly 10 above zero and 1 below, which is Sylvester's law of inertia and not a property of this matrix: K is congruent to blkdiag(H, −AH⁻¹Aᵀ), both blocks are definite, and congruence preserves signs. The two groups are separated by a gap containing zero, at a ratio of 0.018 between the innermost positive eigenvalue and the innermost negative one.-1-0.582271-0.1645420.2531860.6709151.088641.506370eigenvalue1 negative10 positivecounted before it was formedpositive10negative1at zero0innermost ratio0.018the zero block is a theoremand so is the count either side of it
Fig. 6 One constraint, so one eigenvalue below zero. The bracket around it is narrow because A has a single singular value and σₘ = σ₁.

Three routes to the same two integers

The inertia is worth having three ways, because three routes that agree are what this site means by knowing a number.

The algebra gives it in four lines, above: a congruence to a block diagonal whose blocks are definite of known sign. The spectrum gives it by counting the eigenvalues a Jacobi rotation sweep returns, which is what the hero figure draws and what costs the most — O(n³) with a large constant, and an answer whose accuracy is a tolerance. And the pivots give it from a single unpivoted elimination: the signs of the diagonal of D in an LDLᵀ, which is Sylvester’s law used as an algorithm and is the route a sparse code would actually take.

The three agree at every conditioning the library tests, and the third is the only one that scales. It is also the only one that returns an integer directly rather than by thresholding a float, which is the subject of its own essay in the spectra field: a count cannot be slightly wrong, so a computed inertia is exactly right or wrong by a whole eigenvalue, and where the second happens is measurable.

What the condition number does here

κ(K) is not κ(H) and not κ(A), and it is not their product either. It is set by the two brackets: the largest eigenvalue in absolute value comes from the top of the positive interval and the smallest from wherever the two intervals come nearest to zero, which is governed by σₘ — the smallest singular value of the constraint matrix.

So a saddle-point system can be badly conditioned because the objective is, or because the constraints are nearly dependent, and the two enter differently. A nearly dependent constraint is the more dangerous of the two, because it takes the matrix towards singularity rather than towards inaccuracy: at exactly dependent constraints the inertia claim above fails outright, an eigenvalue arrives at zero, and one is taken from each side. The library’s own assertion is fed that case — a third constraint row made the sum of the first two — and required to reject the count.

The two things this matrix is not

Two readings survive the argument above and are both wrong, and naming them is cheaper than having a reader carry them into the next four essays.

It is not a matrix that a better factorisation makes definite. Definiteness is a property of the quadratic form, and every congruence preserves it. There is no similarity, no scaling, no reordering and no change of basis that turns a matrix with m negative eigenvalues into one with none: the count is an invariant of the matrix and not of how it is written down. What a factorisation can do is exist — which is what the 2 × 2 pivot buys — and what a preconditioner can do is cluster the eigenvalues without moving them across zero, which is what the two essays on preconditioning measure.

And it is not ill conditioned by construction. The hero’s matrix has a condition number of about thirty. Nothing on this page is about a hard problem; it is about a matrix that a particular routine cannot factorise for a reason that has nothing to do with how hard the problem is. Conflating the two is what makes people reach for higher precision, and the refusal this page publishes exists to close that route: at κ(H) = 1, with H the identity, the factorisation stops at the same row.

What the regularisation costs, and what 0 steps of refinement take backSolving [[H + δI, Aᵀ], [A, −δI]] instead of K gives the exact answer to a different problem, so its error is proportional to δ: measured at 1489·δ across six decades, which is a slope of one and not a trend. Refining against the unregularised matrix — the residual formed with K and the correction solved with the regularised factorisation — removes that term entirely, because the perturbation was never in the residual. It works while δ is below σₘᵢₙ(K) = 6.797·10⁻⁴, marked on the axis, and stops working above it: the iteration's contraction factor is δ/σₘᵢₙ and a fixed point needs that under one. So the trade-off curve every regularisation essay on this site has drawn — a term falling in δ against a term rising in it — has, here, a left branch that can simply be removed.-14-12-10-8-6-4-210⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹log₁₀ δrelative error against the exact answerδ = σₘᵢₙ(K)no refinement0 stepsa left branch that can be removederror ÷ δ, unrefined1489σₘᵢₙ(K)6.8·10⁻⁴refined at δ = 10⁻⁶0.0014refined at δ = 10⁻²0.93the perturbation is known exactlybecause the code chose it
Fig. 7 The one thing that does move the count, from the sixth essay in this field — and what it costs to move it.

The measurement, and what it is against

Nothing on this page estimates its own error. Every finite double is a dyadic rational — m/2ᵏ with m an integer — so a matrix of doubles is a matrix of rationals with nothing approximated and nothing chosen, and exact.js now converts one. exactSolve then solves in BigInt with no rounding anywhere, and the forward error of a float solve is a difference from the answer to the problem the machine is holding rather than from a better float answer.

That extension is what lets this field measure anything at all. Until now the site could compare against a known answer only for problems whose entries were rationals before they were stored — the Hilbert matrix, and the closed forms the model problem supplies. The constrained systems here are not of that kind, and converting the stored double instead costs nothing and gives the same guarantee. Two essays later it is what makes the field’s central claim checkable.

What links here

Computed from the collection, not written here: the essays that point at this one.

Reads more easily once this is understood

Essays that name this one as worth reading first.

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.

CholeskyCondition numberConstrained minimisationExact ground truthIndefinite matrixInertiaLagrange multiplierSaddle-point systemsSchur complementSymmetric indefinite