LINALG / LAB Open the lab

FROM-SCRATCH NUMERICS 01 / 04

See the machinery
behind the matrix.

A hands-on microscope for the algorithms behind linear algebra. Change a number, run the decomposition, and follow the structure all the way down.

09core routines
0black boxes
∞ways to perturb
LIVE INSTRUMENTMATRIX / 2×2 / 001
∷
A / INPUT MATRIX
det(A)10.000
A−1
[ 0.400  -0.200 ]
[−0.100   0.300 ]
partial pivotingε < 1e−12
The fastest way to understand an algorithm is to make it misbehave.
A. Every output is inspectable
B. Every input is yours to change
C. Every method has a story
02INTERACTIVE LABEDIT / RUN / INSPECT

Put the numbers
under pressure.

Start with a preset or make your own small matrix. The lab favors readable intermediate results over a single mysterious answer.

SELECT AN EXPERIMENT
EXPERIMENT 01 / LU DECOMPOSITION
INPUT / A3 × 3
Click any cell to edit
OUTPUT / TRACEREADY
03FIELD NOTESTHE METHOD MAP

Seven ways to
move information.

Decomposition is not just a computational trick. It is a decision about which structure you want to make visible.

02 / REFLECT↗

QR

Householder reflections turn a messy matrix into orthogonal directions and a triangular remainder.

stable least squares
03 / LISTEN◌

Eigen

For symmetric matrices, Jacobi rotations reveal the directions that remain themselves after transformation.

values · vectors
04 / COMPRESS⊙

SVD

Every matrix has a set of singular directions. The spectrum tells you what survives, what fades, and what can be compressed.

U · Σ · Vᵀ
05 / FIT⌁

Least squares

When no exact answer exists, find the one with the smallest residual and keep the error visible.

QR · regression
06 / REDUCE⌗

PCA

Rotate a cloud of observations toward the directions where its variance is doing the most work.

covariance · variance
07 / MODEL⌁

Polynomial fit

Use the least-squares machinery to recover a simple curve from noisy observations.

degree 2 · noise
04SOURCE REFERENCEPURE PYTHON / NO NUMPY

Read the original
instrument panel.

The browser lab is a visual companion. The source stays small enough to read in one sitting and honest enough to tinker with.

linalg_lab.py225 lines · Python 3Download source ↓
~/linear-algebra/linalg_lab.pyREAD ONLY
Loading source reference…