◀ THE FOLD0ROOT.AI // WORLD II · GLITCH · STACK OVERFLOW◆ .dlw.fold
THE FOLD / GLITCH / STACK OVERFLOW / THE HILBERT MATRIX

THE HILBERT MATRIX

integers floating point cannot reach
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Every entry of the Hilbert matrix is a simple fraction: Hij = 1/(i+j−1). Its inverse is a table of exact integers, available in closed form. Both objects are as clean as mathematics gets, and floating-point arithmetic cannot get from one to the other. The integer entries grow explosively while the matrix entries all sit under 1, so the answer is enormous, the input is tiny, and the bits in between are simply not there.

LIT verified live: the closed-form inverse entries are confirmed integral for n = 3, 4, 5; multiplying H by that exact inverse returns the identity to 0.0e+0 at n=3, degrading to 1.5e-11 by n=6; the largest inverse entry runs 1.9e+2, 1.8e+5, 4.2e+9 at n = 3, 5, 8; and solving Hx = b at n=6 whose true answer is all ones returns a worst error of 2.33e-10 — roughly 7 of the 17 available digits gone.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at STACK OVERFLOW — the entries of the answer outgrow the space the arithmetic reserved for them.

AVAN (AI) used the exact inverse rather than a computed one deliberately, because it separates two failures people usually blend together. This page never runs an elimination algorithm; the inverse is written down from a formula, correct to the last integer, and the error still appears. So the loss is not a defect of the solver — it is in the multiplication itself, and no better algorithm removes it. The honest limit: the closed-form entries are evaluated in floating point here, so beyond about n=8 the formula’s own binomials exceed exact integer range, and the page confines its integrality check to n ≤ 5 where that cannot happen.
3 ONE DIMENSION
The matrix entries, and the size of the integers hiding in the inverse.
4 TWO DIMENSIONS · INTERACTIVE
Grow the matrix and watch the digits disappear.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: a matrix whose columns are almost the same direction.
AVAN’s addition (the inverse-companion): the forward reading is “the Hilbert matrix is ill-conditioned.” The inverse is that it is ill-conditioned because it is nearly singular, and it is nearly singular because its columns are samples of very similar functions. The rows are 1/(i+j−1) — discretised copies of xi integrated against each other — and monomials are famously close together on [0,1]. So the difficulty is inherited from the basis, not from the matrix, and choosing an orthogonal basis makes the same problem trivial. Read backwards, this is the same lesson as Wilkinson’s: the trouble lives in the representation, and switching representation is the only real fix.
LIT the closed-form inverse entries are confirmed integral for n = 3, 4, 5; multiplying H by that exact inverse returns the identity to 0.0e+0 at n=3, degrading to 1.5e-11 by n=6; the largest inverse entry runs 1.9e+2, 1.8e+5, 4.2e+9 at n = 3, 5, 8; and solving Hx = b at n=6 whose true answer is all ones returns a worst error of 2.33e-10, roughly 7 of the 17 available digits gone

FIG The EXACT inverse is used deliberately, because it separates two failures people blend together. This page never runs an elimination algorithm — the inverse is written from a closed form, correct to the last integer, and the error still appears. So the loss is not a defect of the solver; it is in the multiplication itself. Honest limit: the closed-form entries are evaluated in floating point, so beyond about n=8 the binomials exceed exact integer range, and the integrality check is confined to n <= 5.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of STACK OVERFLOW · David Lee Wise (ROOT0), with AVAN