◄ WORLD V · SONNY 5DART 168 · a helldive at the net

GAUSSIAN ELIMINATION eliminate downward, then substitute back up

To solve a system of linear equations, eliminate one unknown at a time: subtract a multiple of one row from the rows below so their leading coefficient becomes zero, until the matrix is triangular — then read the last unknown directly and substitute back up for the rest. Two sweeps, and any solvable linear system falls out. It is the workhorse under every linear solver.

THE TECHNIQUE forward eliminate, back-substitute

Solve 2x + y = 5, x + 3y = 10. One elimination step zeros the x in row 2; back-substitution then gives y, then x. Watch the multiplier, the row update, and the two unknowns resolve: live demo


HISTORY & CREDIT Nine Chapters ~179 CE; not Gauss

“Gauss invented Gaussian elimination.” — no. The method is in the Chinese “Nine Chapters on the Mathematical Art” (chapter Fangcheng, ~179 CE), roughly 1,600 years before Gauss, and Newton taught it in the 1670s. Gauss (1809) used it for least squares and lent it his name; the algorithm is far older. cited

~179 CE · Nine Chapters on the Mathematical Art (China) — the Fangcheng chapter solves linear systems by exactly this row reduction, on a counting board.
1670s · Isaac Newton — lectures the elimination method; it enters European texts.
1809 / 1810 · Carl Friedrich Gauss — uses it in his least-squares work on orbits; Jordan & Clasen (1888) give the Gauss-Jordan full-reduction form.

Naive elimination can divide by a tiny pivot and amplify error — the fix is partial pivoting (swap in the largest available pivot), the standard practical form (Wilkinson’s error analysis, 1961). Nine Chapters, ~179 CE

RECOMMEND FOR I-13 the solution, computed

Forward elimination and back-substitution run on the canonical compiler:

$ i13 run gauss.i13 # 2x+y=5, x+3y=10 m = 0.5 a22p = 2.5 b2p = 7.5 -- row2 -= 0.5*row1 zeros the x y = 3 x = 1 -- back-substitute: y=7.5/2.5=3, x=(5-3)/2=1
Recommend: Gaussian elimination is LIT and the core of an I-13 linear-algebra layer — verified it solves 2x+y=5, x+3y=10 to x=1, y=3 by one elimination step (multiplier 0.5, row update) and back-substitution, all native f64 on an augmented-matrix array. It is the routine under any I-13 that fits a line, solves a circuit, or inverts a small matrix; add partial pivoting (a row swap chosen by the largest pivot) for stability. The bounded 2-D array (PS-004) would let it scale past the hand-unrolled 2×2.