Playground

Simulations

103 interactive simulations, grouped by area. Everything runs live in the browser, drag, tune and watch the maths move. Open an area to see what is in it.

Calculus16

Limits, derivatives, integrals and the geometry behind them.

Derivative as a Limit

Slide the secant line as h shrinks to zero and watch it settle into the tangent, then zoom in until the curve itself is a straight line, unless there is a corner.

Open simulator→

Partial Derivatives

A surface has a slope for every direction you could walk. Freeze one variable and slide a plane through it for ∂f/∂x or ∂f/∂y, then turn the plane to any direction u and watch D_u f = ∇f·u peak along the gradient.

Open simulator→

The Fundamental Theorem

Sweep a point across a curve and watch the area behind it grow into a new function, whose slope at every point is the height of the curve. Riemann sums, signed area and the +C included.

Open simulator→

Derivative Rules

Sum, product and chain in one place. Stacked graphs make the slopes add, a growing rectangle leaves two strips and a doomed corner, and a step stretched twice multiplies the factors.

Open simulator→

Second Derivatives & Curvature

Join the two points either side of you with a straight line. The curve misses the middle of it, and that gap is the second derivative. Halve the spacing and the gap falls to a quarter.

Open simulator→

Integration by Parts

Two areas that tile one rectangle: the integral you were asked for and the one you are handed back. Choosing u is choosing which of the two you would rather do.

Open simulator→

Differential Equations

An equation for the slope instead of the value. Draw it everywhere and the plane fills with segments; a solution is any curve that stays tangent to them the whole way, and a swarm of particles shows them all at once.

Open simulator→

Taylor Series

Add polynomial terms one by one and watch the approximation hug a curve near a point, then fall apart past its radius of convergence, set by the nearest singularity in the complex plane.

Open simulator→

Fourier Series

Multiply the signal by one frequency and add up the area. If the wave fits, the product sits above the axis; if it does not, the halves cancel to exactly zero. Every coefficient is that one measurement.

Open simulator→

Laplace Transform

Plot |F(s)| as a landscape over the complex plane, where poles become spikes and the Fourier transform is the slice above the imaginary axis.

Open simulator→

The Hessian

A surface bends by a different amount in every direction, and four numbers hold all of them. Its eigenvectors are the sharpest and gentlest directions, and their signs decide bowl, dome or saddle.

Open simulator→

Lagrange Multipliers

Optimize along a constraint and watch the objective contour kiss the constraint curve, exactly where the two gradients line up.

Open simulator→

Line Integrals

Ride a bead along a curve through a field in 3D, adding up only the part of the field that points your way. Then bend the path and see whether the total cared.

Open simulator→

Stokes' Theorem

Stretch any surface across a loop and chop it into patches. Neighbours walk every shared edge both ways, so the sum collapses onto the one curve around the edge. Lay it flat and this is Green's theorem; bend it and the answer refuses to move.

Open simulator→

Gauss's Divergence Theorem

Fill a lumpy region with little boxes and count what leaks out of each. Every inner wall is shared by two boxes and cancels, leaving only the outer skin.

Open simulator→

Divergence & Curl

Two numbers at every point of a flow. Drop in a material patch and its area grows or shrinks with the divergence; drop in a paddle wheel and it spins with the curl.

Open simulator→

Linear Algebra11

Vectors, matrices and the transformations they encode.

Linear Transformations

Drag the matrix entries and watch the plane deform with them, carrying the grid and the two basis vectors along for the ride.

Open simulator→

Matrix Multiplication

Multiplying two matrices chains their maps: AB means apply B, then A. Run both orders side by side and watch the letter F end up in two different places.

Open simulator→

The Determinant

One number for what a matrix does to area. Squash the parallelogram to nothing and the map has thrown a dimension away; push past that and the plane comes back inside out.

Open simulator→

Systems of Equations

Two equations in two unknowns, seen two ways at once: as lines that cross, and as columns that add up to b. Elimination turns the lines about the answer without ever moving it.

Open simulator→

Column Space & Null Space

A matrix squeezes its input space onto its column space and crushes its null space to zero. Drag a point along the null line and its image never moves; pull a column into the plane of the others and watch rank fall as nullity rises.

Open simulator→

Change of Basis

The same arrow, watched through two different grids and written down as two different pairs of numbers. The dictionary between them is a matrix, the pairs it can reach are the span of the basis, and a transformation translated is the sandwich.

Open simulator→

Eigenvectors & Eigenvalues

A matrix knocks almost every vector off its own line. Aim v until Av lands back on it: that is an eigenvector, and the stretch is λ.

Open simulator→

Dot Product

One length times the shadow the other casts on it, with the component formula falling straight out of that one picture.

Open simulator→

Projections & Gram–Schmidt

The closest point of a plane to a vector is where the error meets it at a right angle. The same picture fits a line to data, and done one direction at a time it straightens any basis into an orthonormal frame, A = QR.

Open simulator→

Cross Product

Two vectors span a patch of area. Its size is the length of the answer, its tilt is the direction, and each component is a shadow of that patch.

Open simulator→

Singular Value Decomposition

Watch any matrix turn a circle into an ellipse as rotate, stretch, rotate, the geometry of A = U Σ Vᵀ. Then keep only the biggest singular values and compress a picture.

Open simulator→

Statistics10

Randomness, distributions and the patterns that emerge from them.

Central Limit Theorem

Add up n draws from any distribution, over and over. The sums and the means pile into a bell whatever the source looked like, and with ±1 coin steps each sum is a random walk spreading like √n.

Open simulator→

Joint, Marginals & Conditionals

Every pair of values gets a square whose area is its probability. Drag a box over the table and read the joint, the marginals and a conditional off one selection.

Open simulator→

Covariance Matrix

Every point and the mean are opposite corners of a rectangle, positive or negative by where the point sits. Covariance is the average of those signed areas, the variances are the squares, and correlation is what is left once the units are divided out.

Open simulator→

Probability Density

Grains of sand fall where a random quantity lands and pile up; per unit of width the pile becomes the density curve. Then the area is the share of grains, a squeezed pile climbs past 1, and one exact point catches nothing.

Open simulator→

Monte Carlo

Throw random darts at a box and count the hits: the fraction times the box is the area. Estimate π, the area under a curve or a ball's volume in ten dimensions, and watch the error fall like 1/√n.

Open simulator→

Bayes' Theorem

See why a 90% accurate test for a rare disease is usually wrong when it says positive. 1,000 people as dots make the posterior obvious.

Open simulator→

Maximum Likelihood

Slide a Gaussian over sample data and watch the likelihood rise and fall. The best fit lands on the sample mean and the spread that divides by n, not n − 1.

Open simulator→

Wasserstein Distance

Measure the distance between two distributions as the least work to reshape one into the other, the area between their CDFs.

Open simulator→

Information and Entropy

A bit is one yes/no answer. Find a card in 16 with four of them, see why rare news takes more questions, send the weather in 1.75 bits a day, and pour the questions flat to find the entropy.

Open simulator→

KL Divergence

The extra surprise of believing Q while the world draws from P. Watch samples land and their surprise add up, see the gap as red and blue area, find why the two directions differ wildly, and fit a bell both ways.

Open simulator→

Machine Learning11

Clustering, model fitting and the ideas that turn data into predictions.

k-Means

Assign points to the nearest center, move each center to its mean, repeat. Watch clusters snap into place, and sometimes into the wrong place.

Open simulator→

Gaussian Mixtures

k-means hands every point to one cluster and draws only circles. A mixture gives every point a share of each cluster instead, and lets a cluster stretch and tilt, so a point between two of them can finally say so.

Open simulator→

DBSCAN

Density-based clustering that finds arbitrary shapes and flags outliers as noise, with no need to choose the number of clusters up front. A second view works out reachability and connectivity on small cases, one point at a time.

Open simulator→

Hierarchical Clustering

Merge the two closest groups over and over until everything is one, watch the dendrogram grow branch by branch, and drag a cut across it to choose the clusters.

Open simulator→

Clustering Metrics

Silhouette, Davies–Bouldin and DBCV judge a clustering by its geometry alone; purity, the Rand index and ARI hold it up against the true classes. Split, scramble and hand-edit clusters and watch where the six scores part ways.

Open simulator→

Linear Models

Linear and logistic regression score the input with the same line, z = wx + b. Draw each residual as a literal square, snap to the least-squares optimum, and watch the same descent fit both models.

Open simulator→

Overfitting

Raise a polynomial’s degree until it threads every training point yet fails on new data, then tame it with regularization.

Open simulator→

The Curse of Dimensionality

Add axes and space stops behaving: data thins out, a ball keeps its volume in a paper-thin crust, and near and far collapse into the same distance.

Open simulator→

Principal Component Analysis

Keep one number per point: its shadow on a line. Turn the line and watch the spread it keeps rise and fall; the best line keeps the most, loses the least, and is the top eigenvector of the covariance.

Open simulator→

Perplexity of a Neighbourhood

Put a Gaussian on one point and its neighbours become probabilities. Perplexity counts how many of them really count, and a binary search finds the width that makes the count come out right: narrow in a crowd, wide for a loner.

Open simulator→

t-SNE

Tie each point of a 3D cloud to its neighbours with threads, throw everything on a flat page, and let the threads pull while all points push apart. The map that settles keeps who was next to whom.

Open simulator→

Deep Learning13

Optimization, neural networks and the math that trains them.

How Layers Bend Space

Every hidden layer is two units wide, so the space it makes can be drawn. Step through the layers and watch the grid fold until one line separates the classes.

Open simulator→

Backpropagation

One tiny network, one example, every number on screen. Push the input forward, send the error back down the same wires, then see why the activation's slope decides whether a gradient survives many layers.

Open simulator→

Optimizers

Six optimizers descend the same loss: a 1D slice where too big a learning rate overshoots and diverges, a surface you can click on, or a density cloud in three parameters.

Open simulator→

Batch Size & Gradient Noise

Nobody computes the real gradient. Watch which examples get drawn, watch each one pull the step its own way, and watch their average swing into line with the truth as the batch grows.

Open simulator→

Initialisation & Normalisation

Every layer multiplies the spread of the signal by a factor, and depth compounds it. Pick a weight scale and watch the activations survive, vanish or overflow, then normalise each layer and see the scale stop compounding.

Open simulator→

Softmax & Temperature

Raw scores become probabilities, and one number decides how strong an opinion that is. Drag the temperature from a single confident answer all the way to a five-way shrug.

Open simulator→

Inside a Digit Classifier

Draw a digit and watch a pretrained MNIST classifier read it, as a plain stack of layers or as a convolutional network. Every wire is lit by what it carries, and clicking a neuron opens it up to show the picture it looks for.

Open simulator→

Contrastive Learning

Nobody says where anything goes. Things of a kind are pulled together and everything else pushed apart, and the embedding arranges itself from that. Four losses say it four different ways, and you can watch each one push.

Open simulator→

Embeddings & Cosine Similarity

Every word is an arrow and meaning is the direction it points. Rank the same words by cosine, by raw dot product and by straight-line distance, and watch the level sets turn from rays into rings.

Open simulator→

Positional Encoding

Attention reads a set, so order has to be written into the vectors. Added sinusoids make a score depend on where two words sit; rotary makes it depend on their offset alone.

Open simulator→

Convolution

A window of weights slides over a grid and each position gives one number. Padding, stride and dilation decide how many positions there are, and with several channels every filter reads all of them at once and sums the slices.

Open simulator→

Receptive Field

Trace the cone of pixels one output cell can see. Depth adds to the window, stride multiplies it and costs resolution, doubling dilation grows it exponentially for free, and a repeated dilation leaves holes.

Open simulator→

Autoencoder & Latent Space

Squeeze a picture through a gap of two numbers and force the network to rebuild it. Nothing says what the numbers should mean, and they come out as a map you can drag around.

Open simulator→

Computer Vision5

What can be measured in a picture, and what has to be guessed.

Generative AI3

How models learn the shape of data and generate new samples from it.

Physics21

Fields and the equations that move energy through space.

Electromagnetic Waves

Shake a charge and watch its field ripple outward as a glowing shell, at the speed the medium allows. Build a dipole antenna to see its radiation glow as a doughnut round the wire, with E and B turning transverse in 3D, or switch to statics for Coulomb field lines and the magnetic circles round a wire.

Open simulator→

Wi-Fi in a House

Maxwell's equations on the GPU over a whole house at the true Wi-Fi wavelength: watch 2.4 and 5 GHz spill through doorways, leave dead spots a few centimetres across and fade behind brick and concrete, with the signal a phone would read in every room.

Open simulator→

Entropy

Lift the wall and a gas fills its box. Flip every velocity and it flows home; nudge one particle by a billionth and it never does. Entropy counts arrangements, and chaos makes the count win.

Open simulator→

Heat Equation

Watch heat diffuse through a 3D room as glowing fog, from a radiator to a cold window, paint in your own heat or cold, and see a thermometer settle into steady state.

Open simulator→

Wave Equation

A drum skin where every point accelerates toward the average of its four neighbours. Put a probe anywhere and watch that pull live: down on a crest, up in a trough, nothing on a straight slope. Swap in the heat equation and the same pull only slides the point into place.

Open simulator→

Normal Modes

Every object has a few shapes it can hold while it vibrates, each ringing at its own note. Pluck it and the motion splits into those notes: whole multiples on a string, an untuned jumble on a drum.

Open simulator→

Phonons

Every mass obeys Hooke’s law and pulls only on its neighbours. Out comes a pulse travelling at a speed nobody wrote down, and a shortest possible wavelength.

Open simulator→

Wave Interference

Two sources of ripples cross and combine into bright and dark fringes. Drag the sources to see the pattern behind the double-slit experiment.

Open simulator→

Ideal Gas

A few hundred atoms in a glass cylinder under a piston. Pressure is the drumming of their impacts, temperature is how fast they fly, and PV = NkT is what that adds up to: squeeze, heat or insulate and watch it hold.

Open simulator→

Stationary Action

Bend the path a particle takes between two fixed events and watch its action get worse. Rolling that downhill turns out to be Newton in disguise.

Open simulator→

Band Theory

Bring a line of atoms together and every level splits into a band. Which bands are full, and how wide the gap is, decides metal, semiconductor or rock.

Open simulator→

Quantum Tunnelling

Fire a wave packet at a wall taller than its energy. Classically it bounces straight back; as a wave, part of it leaks through the wall and out the far side.

Open simulator→

Wavefunction Collapse

A matter wave spreads through space as a cloud of probability until a measurement finds it at one single point. Fire particles at a screen one by one and the interference fringes build up dot by dot.

Open simulator→

Atomic Orbitals

The exact hydrogen orbitals drawn as glowing clouds of probability: shells and nodal planes, the phase winding of m, the signed lobes of chemistry, measurements that collapse the cloud to a point, and superpositions that slosh and emit light.

Open simulator→

Stern-Gerlach Experiment

A beam of atoms should smear into a band and arrives as two spots. Chain the analysers, turn the next one, and measuring x wipes out what was known about z.

Open simulator→

Quantum Gates

Build a circuit on two qubits and watch the amplitudes, their phases and both Bloch arrows move together. Then build the one circuit whose arrows shrink to nothing.

Open simulator→

Nuclear Fission

One neutron splits one nucleus and two more fly out. Turn the enrichment, the size and the control rods and watch the chain die, hold steady, or run away.

Open simulator→

Nuclear Fusion

Slam light nuclei together hard enough to tunnel through their own repulsion, and chase the one line every star has to cross: power out beating power lost.

Open simulator→

Special Relativity

Space and time are one fabric. Boost to a moving frame and its grid skews: clocks tick slow, rulers shrink, and simultaneity comes apart. Yet every arrow in spacetime keeps one length that all observers agree on.

Open simulator→

General Relativity

Hang two clocks above a black hole, a neutron star or the Earth: the low one runs slow, so its light flashes arrive stretched, and a clock carried down comes back younger. Then lay a ruler between two circles and it needs more rungs than their circumferences allow: space is curved too, not just time.

Open simulator→

Black Hole

See a black hole the way its light does: every pixel is a photon traced through curved spacetime, so the disk wraps over the top and the sky folds round a shadow 2.6 times the horizon. Then put a particle in orbit and watch it trace rosettes, plunge inside 3 rₛ, and its clock run slow.

Open simulator→

Cosmology5

The universe at every scale, drawn from real catalogues: how far things are, how we see them, and how space itself grows.

Electronics8

The components a circuit is built from, opened up: charge, fields and carriers doing the work.

Resistor

The field pulls an electron along and the lattice knocks it back to random, over and over. The average of that stop-start crawl is the current, and the winnings the lattice keeps are the heat.

Open simulator→

Diodes & Transistors

Pick a diode or a transistor and watch electrons and holes move through it: a one-way valve, then a valve with a knob, both built from a barrier you can raise.

Open simulator→

Capacitor

Every charge is a ball you can count. Drive the source by hand and watch electrons get dragged off one plate, round the circuit, and onto the other one.

Open simulator→

Inductor

A flywheel for charge. Shove the source and the electrons will not jump, only ramp, and cutting them off makes the collapsing field fight to keep them going.

Open simulator→

Memristor

A resistor that remembers the charge that has been through it. Watch the boundary inside the film move as you drive it, and stay put when you stop.

Open simulator→

RC, RL and RLC Circuits

A resistor, a coil and a capacitor in one loop. The two stores pass energy back and forth, so the circuit rings, and one number, the damping ratio ζ, decides whether it rings, settles as fast as it can or crawls. The same two poles decide which frequencies get through.

Open simulator→

Transmission Lines

Close a switch on a two-wire line and watch the energy travel through the space between the wires, not down the copper, as a wave at v = 1/√(LC) that the load swallows, doubles or turns upside down.

Open simulator→

MOSFET & CMOS Logic

A plate of metal that conjures a wire underneath itself and never touches it. Then stack a p-type one on an n-type one and get a gate that costs power only while it changes its mind.

Open simulator→