See math and code move
University-level algorithms and math, animated step by step. Change the inputs, slow it down, and watch the idea become obvious.
Open Problems
15 demosRiemann Hypothesis
Primes look random, but the zeros of zeta hide a rhythm nobody can prove.
Goldbach's Conjecture
Every even number above 2 should split into two primes. Enter one and see every way.
Ramsey Numbers
Six points always hide a one-colour triangle. Five do not. Colour and see why.
Twin Prime Conjecture
Prime pairs like (11,13) never seem to run out. Count them up to any limit.
Collatz Conjecture
Halve evens, triple-plus-one odds. Does every start fall to 1?
P vs NP
If a solution is easy to check, must it be easy to find?
Birch & Swinnerton-Dyer
Rational points on an elliptic curve meet the behaviour of an L-function.
Hodge Conjecture
Do abstract topological cycles come from tidy algebraic pieces?
Navier–Stokes Equations
Fluids obey these equations — but do smooth 3D solutions always exist?
Yang–Mills Mass Gap
The forces of particle physics need a rigorous theory — and a positive mass gap.
abc Conjecture
When a + b = c, the distinct primes of a·b·c are rarely much smaller than c.
Hadwiger–Nelson Problem
How many colours does the plane need so no two points 1 apart match?
Odd Perfect Numbers
Every perfect number found so far is even. Does an odd one exist?
Inscribed Square Problem
Does every closed loop contain four points forming a perfect square?
Union-Closed Sets (Frankl)
If a family is closed under unions, must one element appear in half the sets?
Geometry
19 demosShortest Path by Reflection
Fold the plane to turn a broken path into a straight line.
Isoperimetric Problem
For a fixed perimeter, the circle encloses the most area.
Pythagorean Theorem Proof
Rearrange the same four triangles to show a² + b² = c².
Napoleon's Theorem
Build equilateral triangles on any triangle — their centres form one too.
Fermat Point
The point that minimizes the total distance to three vertices.
Golden Ratio & Fibonacci
Squares of Fibonacci size tile a growing golden spiral.
Ant on a Cuboid: Shortest Path
Unfold the box to turn a surface path into a straight line.
The 11 Cube Nets
Only 11 flat layouts fold up into a cube.
Cross-sections of a Cube
Slice a cube and the cut can be a triangle, square, or hexagon.
Platonic Solids & Euler’s Formula
Only five regular solids exist, and V − E + F = 2 for all of them.
Great Circles & Geodesics
On a sphere, the shortest path is an arc of a great circle.
The Tesseract (4D Cube)
A 4D cube, projected into 3D and rotated, reveals its structure.
Power of a Point
From an external point, every secant gives the same product.
Radical Axis
The line where two circles have equal power.
Pick's Theorem
Lattice points count the area of a polygon on a grid.
Curves of Constant Width
The Reuleaux triangle rolls like a circle without being one.
Shortest Path on a Cylinder or Cone
Unroll the surface and the shortest path becomes a straight line.
Cavalieri's Principle
Equal slices at every height mean equal volume.
The Möbius Strip
A band with a half-twist has just one side and one edge.
Algorithms
20 demosSorting Algorithms
Watch bubble, insertion, quick, and merge sort rearrange the same array.
Dijkstra & A* Pathfinding
Compare how Dijkstra and A* explore a grid to find the shortest path.
Recursion & Fibonacci
See the call tree explode, then collapse with memoization.
0-1 Knapsack DP
Fill the DP table cell by cell and trace back the chosen items.
Edit Distance (Levenshtein)
See how insert, delete, and replace fill the distance matrix.
Binary Search
Cut the search space in half until the target appears.
Conway's Game of Life
Four rules create gliders, oscillators, and endless motion.
Sieve of Eratosthenes
Cross out multiples and watch the primes remain.
Big-O Growth Rates
Compare constant, logarithmic, linear, quadratic, and exponential growth.
Neural Network Forward Pass
Follow activations through layers of weighted connections.
Convex Hull
Wrap a cloud of points with the smallest convex polygon.
K-Means Clustering
Let centroids find groups in an unlabeled cloud of points.
Union-Find & Kruskal MST
Merge components edge by edge and build a minimum spanning tree.
Huffman Coding
Give frequent symbols short codes and watch a prefix tree grow.
N-Queens Backtracking
Place queens row by row and backtrack when a column is unsafe.
PageRank
Let random surfers vote with links until authority scores settle.
P vs NP
Checking a solution is fast. Finding one may not be.
Travelling Salesman
Visit every city once and return home with the shortest tour.
Graph Coloring
Color every node so no edge connects two equal colors.
Simulated Annealing
Sometimes accept a worse move to escape a local minimum.
Data structures
8 demosBinary Search Tree
Insert values and watch the tree grow, then search and traverse it.
Graph Traversal: BFS & DFS
Explore a graph breadth-first and depth-first, one node at a time.
Hash Table & Collisions
See how keys map to buckets, and how collisions form chains.
Binary Heap / Priority Queue
See how a complete tree keeps the maximum on top.
Linked List Operations
Insert, delete, and reverse a chain of nodes.
Topological Sort
Order tasks so every dependency comes before its dependents.
Bloom Filter
A tiny probabilistic set with no false negatives.
Trie (Prefix Tree)
Insert words into a shared prefix tree and trace their paths.
Math
46 demosFourier Series
Build complex waveforms by adding simple sine waves.
Gradient Descent
Watch a ball roll downhill on a loss surface, step by step.
Taylor Series
Approximate a curve with polynomials, one term at a time.
Mandelbrot Set
Zoom into the infinite boundary of a simple complex iteration.
Matrix Transformations
Stretch, rotate, and shear the plane with a 2×2 matrix.
Newton's Method
Use tangent lines to zoom into a root at remarkable speed.
Riemann Sums
Approximate area with rectangles and watch the error shrink.
Linear Regression
Fit a line by least squares and inspect the residuals.
Power Iteration
Repeatedly multiply a vector by a matrix to reveal its dominant eigenvector.
Lorenz Attractor
A tiny change in the start creates a completely different trail.
Bézier Curves
Drag control points and watch de Casteljau construction build the curve.
Span & Basis
See all the places two vectors can reach — and when they collapse to a line.
Column Space & Null Space
See where a matrix sends space, and what it crushes to zero.
Eigenvalues & Eigenvectors
Find the directions a matrix only stretches or rotates in place.
Orthogonal Projection
Drop a vector onto a line and see why the residual is perpendicular.
Gram-Schmidt & QR
Remove the overlap between vectors to build an orthonormal basis.
SVD Geometry
Every matrix turns a circle into an ellipse — SVD finds its axes.
Change of Basis
Same vector, different coordinates. See the grid tilt.
3D Linear Transformations
Rotate, shear, and squash a cube with a 3×3 matrix.
Dot Product & Angle
Measure alignment, angle, and projection with one product.
Cross Product & Area
One determinant gives the area of the parallelogram and its orientation.
Matrix Multiplication as Composition
Apply B, then A. The product AB records the combined transformation.
Inverse as Undo
Apply A, then A⁻¹, and return to the original shape.
Norms & Unit Balls
One vector, three different ways to measure its size.
Linear Systems as Intersections
Each equation is a line; a solution is where the lines meet.
Unit Circle & Trigonometry
Rotate a point around the unit circle and watch sine and cosine unfold.
Quadratic Functions & Parabolas
Change a, b, and c and watch the parabola move, stretch, and cross the axis.
Compound Interest
See how small monthly contributions snowball over decades.
RSA Encryption
Turn two primes into a public key, a private key, and a secret message.
Collatz Conjecture
Pick a number and watch the 3n + 1 sequence climb and crash to 1.
SIR Epidemic Model
Flatten the curve by changing transmission and recovery rates.
Double Pendulum
A tiny difference in the start creates a completely different dance.
Polar Curves
Draw roses, cardioids, and spirals with r as a function of θ.
Pascal’s Triangle
Build binomial coefficients and reveal Sierpinski patterns.
Voronoi Diagram
Divide the plane by which site is closest.
Conic Sections
One focus, one directrix, and eccentricity decide the shape.
Wave Interference
Two sources create bright and dark fringes through superposition.
Logistic Bifurcation
A one-line map walks from order into chaos.
Julia Set
Change one complex parameter and the fractal changes completely.
Euler’s Method
Follow the slope in small steps to approximate a differential equation.
Newton Fractal
Color the complex plane by which root Newton’s method finds.
Linear Programming
Maximize an objective over a polygon of constraints.
Principal Component Analysis
Find the directions where the data varies the most.
Logistic Regression
Fit a sigmoid boundary between two classes.
Lotka–Volterra Model
Predator and prey populations chase each other in cycles.
Kalman Filter
Combine noisy measurements with a model to track the truth.
Probability
10 demosMonte Carlo π
Throw random points at a square and watch π emerge.
Central Limit Theorem
Drop balls through pegs and watch a bell curve appear.
Markov Chains
Watch a probability distribution flow between states.
Birthday Paradox
With just 23 people, a shared birthday is more likely than not.
Bayesian Inference
Update a belief with test evidence and see why base rates matter.
Normal Distribution & Z-Scores
Shape the bell curve and turn any value into a standardized z-score.
Monty Hall Problem
Should you switch doors? Simulate thousands of rounds and find out.
Random Walk
Take random steps and watch diffusion spread outward.
Benford’s Law
Why 1 appears first far more often than 9 in real data.
Confidence Intervals
See how often a 95% interval actually captures the mean.
History of Math
27 demosWhy √2 Is Irrational
A unit square’s diagonal broke the belief that every length is a fraction.
Seven Bridges of Königsberg
Cross every bridge exactly once — or prove why nobody can.
Three Impossible Constructions
Trisect an angle, double a cube, square a circle — with only a straightedge and compass.
The Birth of Calculus
Tangent slopes and accumulated area turn out to be inverse problems.
Cubic Equations & Complex Numbers
Real cubic equations sometimes need imaginary numbers to find real roots.
The Unsolvable Quintic
There is no general formula for degree five — and group theory explains why.
Non-Euclidean Geometry
Drop the parallel postulate and triangles stop summing to 180°.
Cantor’s Diagonal Argument
Some infinities are larger than others — and one short diagonal proves it.
The Problem of Points
A paused gambling game helped invent probability theory.
Turing & the Halting Problem
No program can predict whether every program will stop.
The Four Color Theorem
Every flat map needs at most four colors — and the first proof needed a computer.
Quaternions & Non-Commutative Rotation
Hamilton’s three-dimensional numbers: i j is not j i.
Archimedes and the Squeeze for π
Trap π between inscribed and circumscribed polygons until the bounds agree.
Brahmagupta and the Rules of Zero
Fortunes, debts, and nothing: the 7th-century rules that made zero a number.
Hamming Codes and Self-Correcting Bits
Three parity bits can name exactly which bit flipped — and fix it.
Shannon and the Bit of Information
Measure uncertainty with a curve — and learn why one bit is a coin flip.
Diffie–Hellman Key Exchange
Two strangers agree on a secret while everyone listens.
Zu Geng and the Sphere Volume
Equal slices at every height force equal volumes — and give 4/3 πr³.
Plimpton 322 and Babylonian Triples
A 3,800-year-old clay table of right triangles — purpose still debated.
Al-Khwarizmi Completes the Square
Four rectangles and four corner squares turn x² + bx = c into a perfect square.
Madhava’s Series for π
Add and subtract odd unit fractions until π/4 appears — then speed it up.
Napier Turns Products into Sums
Two logarithmic scales replace a hard multiplication with an easy addition.
Descartes and the Coordinate Grid
One curve, one equation: how algebra and geometry learned to talk.
Euler Characteristic V − E + F
Count vertices, edges, and faces — and watch V − E + F ignore every dent.
Russell’s Paradox
The set of all sets that do not contain themselves breaks both ways.
Poincaré and the Three-Body Problem
Two almost identical starts, two wildly different futures.
Bayes’ Billiard Table
Throw balls, count left and right, and update a belief about where the white ball lies.