A small library and a set of interactive explainers for max-plus algebra — the linear algebra of scheduling, synchronization, and shortest paths.
Max-plus algebra — also called tropical algebra — is ordinary linear algebra with its two operations swapped. "Addition" becomes take the larger (a ⊕ b = max(a, b)), and "multiplication" becomes add (a ⊗ b = a + b). Nothing else changes: you still have matrices, powers, eigenvalues, and eigenvectors — they just mean something new.
That single substitution turns matrix multiplication into an optimization. The (i, j) entry of a max-plus matrix power is the heaviest path of a given length between two nodes; the eigenvalue is the steady-state rate — the maximum mean of any cycle in the graph; and the eigenvector fixes the relative timing of everything else. Swap the max for a min and the very same machinery becomes shortest-path dynamic programming.
This makes max-plus the natural language for systems ruled by "wait for the slowest" constraints: manufacturing lines, railway timetables, project critical paths, network performance — and, as one of the demos here explores, the stepping rhythm of molecular motors. Everything on this site is built around one small, dependency-free library, tropmat.py, that runs anywhere Python does, including a NumWorks calculator.
The NumWorks / MicroPython max-plus library: matrix products, powers, the Karp eigenvalue, Kleene star, and irreducibility checks — no dependencies.
A live max-plus model of two-headed motor stepping: eigenvalue as step period, eigenvector as gait, and the kinked crossover between regimes.
Why shortest-path DP is tropical linear algebra: the Bellman update is a matrix product, and Floyd–Warshall is a Kleene star. With a live widget.