# Visual Math > 73 free interactive explainers you can run, step through and break. Each page starts with a plain-English explanation, then shows the real math and runnable code, with live labs that compute every number they show. Pages state when a model is simplified ("toy model", "idealized") and label typical or approximate real-world figures as such. Weather, physics and sound pages show imperial units by default with a metric toggle. ## Math & science - [000 N-Queens](https://visualmath.dev/n-queens/): Place N queens so none attack: backtracking, pruning and the search space, step by step. - [001 Golden ratio](https://visualmath.dev/golden-ratio/): φ in Fibonacci ratios, sunflower seeds, continued fractions and the pentagram. - [002 Graphs](https://visualmath.dev/graphs/): Shortest paths, minimum spanning trees and the bridges of Königsberg. - [003 Number theory](https://visualmath.dev/number-theory/): The sieve of Eratosthenes, the Collatz conjecture and Euclid’s algorithm. - [004 Dynamic programming](https://visualmath.dev/dynamic-programming/): Edit distance, the 0/1 knapsack and Pascal’s triangle as tables that fill themselves. - [005 Recursion & fractals](https://visualmath.dev/recursion-fractals/): The Tower of Hanoi, self-similar shapes and a zoomable Mandelbrot set. - [006 Probability](https://visualmath.dev/probability/): Monty Hall, Buffon’s needle and the Galton board. - [007 Bachet’s weights](https://visualmath.dev/bachet/): Weigh 1 to 40 with four weights: balanced ternary and why 1, 3, 9, 27 can’t be beaten. - [027 Pi](https://visualmath.dev/pi/): Squeeze π between polygons, throw darts at it, race infinite sums to it, find it hiding in primes and bell curves, then explore a million of its digits. - [028 Rubik's cube](https://visualmath.dev/rubiks-cube/): Turn a cube, count its 43 quintillion positions, treat moves as permutations with orders, and solve the 2×2 perfectly by searching every position. ## Coding problems - [008 FizzBuzz](https://visualmath.dev/fizzbuzz/): Branch order, modulo clocks and custom rule sets. - [009 Palindromes](https://visualmath.dev/palindromes/): Two pointers, expand around center and reverse-and-add. - [010 Fibonacci](https://visualmath.dev/fibonacci/): The exploding call tree, memoization, iteration and fast doubling. - [011 Two Sum](https://visualmath.dev/two-sum/): Every pair versus one pass with a hash map. - [012 Roman numerals](https://visualmath.dev/roman-numerals/): Read with one look-ahead, write greedily, explore 1 to 3999. - [013 Rotate an array](https://visualmath.dev/rotate-array/): Shifting, three reversals and cyclic replacement in gcd(n, k) cycles. - [014 Missing number](https://visualmath.dev/missing-number/): Gauss’s sum, XOR cancellation and other routes compared. - [015 Validate a BST](https://visualmath.dev/validate-bst/): Range bounds, in-order traversal and insertion order. - [016 Sudoku solver](https://visualmath.dev/sudoku/): Backtracking, smarter cell order and constraint propagation. - [017 Lowest common ancestor](https://visualmath.dev/lowest-common-ancestor/): Recursive LCA, the BST split point and binary lifting. - [018 Serialize a tree](https://visualmath.dev/serialize-tree/): Encode a tree as a string, rebuild it, and compare formats. - [019 Topological sort](https://visualmath.dev/topological-sort/): Kahn’s algorithm, DFS finishing order, cycles and counting orders. - [020 Regex matching](https://visualmath.dev/regex-matching/): The DP table, memoized recursion and catastrophic backtracking. - [021 Alien dictionary](https://visualmath.dev/alien-dictionary/): Recover an unknown alphabet with a topological sort. ## Game theory - [022 Prisoner's dilemma](https://visualmath.dev/prisoners-dilemma/): Dominant strategies, the Nash equilibrium nobody wants, and what changes when the game repeats. - [023 Guess ⅔ of the average](https://visualmath.dev/beauty-contest/): Iterated reasoning drives the equilibrium to 0. Real crowds stop a few levels short. - [024 Centipede game](https://visualmath.dev/centipede-game/): Backward induction says take the money at once. People pass anyway, and a little doubt explains why. - [025 Nim](https://visualmath.dev/nim/): P and N positions, the nim-sum, Sprague–Grundy values and the golden ratio in Wythoff’s game. - [026 Mixed strategies](https://visualmath.dev/mixed-strategies/): Rock-paper-scissors and penalty kicks: randomize so your opponent is indifferent. ## Data & statistics - [D00 Polls & margins of error](https://visualmath.dev/polls/): Why a thousand people can speak for millions, what ±3% really means, and the bias no margin can fix. - [D01 Misleading charts](https://visualmath.dev/misleading-charts/): Truncated axes, stretched pictograms, cherry-picked windows and dual axes, with the lie factor measured. - [D02 Simpson's paradox](https://visualmath.dev/simpsons-paradox/): Better in every group and worse overall: weighted averages, lurking variables, and when to split the data. - [D03 Correlation vs causation](https://visualmath.dev/correlation/): Pearson's r, confounders that fake a link, chance correlations, and why randomized experiments settle it. - [D04 Medical tests & Bayes](https://visualmath.dev/medical-tests/): Why a 99% accurate test can be wrong most of the time, Bayes' theorem drawn, and the ROC trade-off. ## Weather & sky - [W00 Hurricanes](https://visualmath.dev/hurricanes/): The Coriolis effect, angular momentum, the cube law of wind power and forecast cones. - [W01 Tornadoes](https://visualmath.dev/tornadoes/): The funnel as a pressure map, vorticity tilting, damage asymmetry and the radar couplet. - [W02 Highs & lows](https://visualmath.dev/pressure-systems/): Pressure gradient force, Coriolis and friction: why wind circles highs and lows, and how fronts lift air. - [W03 El Niño](https://visualmath.dev/el-nino/): The Pacific seesaw, Kelvin waves crossing the ocean, and the delayed oscillator behind ENSO. - [W04 Global circulation](https://visualmath.dev/global-circulation/): Hadley, Ferrel and polar cells, hydrostatic balance, and why the Hadley cell stops near 30°. - [W05 Thunderstorms](https://visualmath.dev/thunderstorms/): Parcel theory and CAPE, latent heat as the engine, and how cold pools organize storm lines. - [W06 Weather models](https://visualmath.dev/weather-models/): The primitive equations, grids and the CFL limit, and why chaos caps forecast range. - [W07 Lightning](https://visualmath.dev/lightning/): Charging a cloud, the stepped leader as a fractal, and counting the seconds to thunder. - [W08 Rainbows](https://visualmath.dev/rainbows/): Rays inside a raindrop, the 42° minimum deviation, and why the colors split. - [W09 Sky color](https://visualmath.dev/sky-color/): Rayleigh’s 1/λ⁴ law, sunset path lengths, and why clouds are white. - [W10 Tides](https://visualmath.dev/tides/): Gravity gradients raise two bulges; the Sun and Moon beat into spring and neap tides. - [W11 Jet streams](https://visualmath.dev/jet-streams/): Thermal wind builds the jet; Rossby waves bend it into the ridges and troughs that steer your weather. - [W12 Sea breezes](https://visualmath.dev/sea-breeze/): Land heats faster than water, the pressure tilts, and an afternoon breeze blows in from the sea. - [W13 Lake-effect snow](https://visualmath.dev/lake-effect/): Cold air over a warm lake: instability, fetch and wind direction decide where the snow bands land. - [W14 Monsoons](https://visualmath.dev/monsoons/): A continent-sized sea breeze: seasonal heating, winds that turn at the equator, and mountains that wring out the rain. ## Everyday physics - [E00 Bridges & arches](https://visualmath.dev/bridges/): The hanging chain's catenary, arches in pure compression, and the forces inside trusses and suspension bridges. - [E01 Why bikes stay up](https://visualmath.dev/bicycles/): Steering into the fall, trail and the self-steering front wheel, and what gyroscopes do and don't do. - [E02 Traffic jams](https://visualmath.dev/traffic/): Phantom jams from one tap of the brakes, the flow–density diagram, and why zipper merging works. - [E03 Levers, pulleys & gears](https://visualmath.dev/levers-pulleys/): Torque balance, block and tackle, gear ratios and bike gears: trading force for distance. - [E04 Why planes fly](https://visualmath.dev/flight/): Wings turn air downward, the lift equation and stall, and the four forces that set how far a plane can glide. - [E05 How sailboats sail upwind](https://visualmath.dev/sailing-upwind/): Apparent wind, sails and keels as wings, the no-go zone, and the zigzag that beats a straight line into the wind. - [E06 Hull speed & planing](https://visualmath.dev/hull-speed/): A boat makes its own bow wave and gets trapped in it. Why longer boats are faster, and how planing hulls break free. - [E07 Why sailboats don't tip over](https://visualmath.dev/sailboat-stability/): Weight down through the center of gravity, buoyancy up through the center of buoyancy, and the twist between them that rights the boat. - [E08 Navigation at sea](https://visualmath.dev/navigation/): Why a nautical mile is a minute of latitude, fixing your position from bearings, and steering at an angle to cross a current. - [E09 Tides for sailors](https://visualmath.dev/tides-for-sailors/): Read a tide curve, check the rule of twelfths, find when there's enough water to cross a bar, and time a passage to ride the tidal stream. - [E10 Tennis physics](https://visualmath.dev/tennis/): Why topspin dips, where the racket's two sweet spots are, how each court changes the bounce, and how little time a 130 mph serve leaves you. ## Sound & music - [S00 Waves & harmonics](https://visualmath.dev/waves-harmonics/): Standing waves on a string, why instruments sound different, and the beats you hear when two notes almost match. - [S01 Scales & tuning](https://visualmath.dev/musical-scales/): Why simple ratios sound sweet, the Pythagorean comma, and the twelfth root of two behind every piano. - [S02 The Fourier transform](https://visualmath.dev/fourier/): Wind a signal around a circle, split any drawn wave into frequencies, and redraw pictures with spinning circles. - [S03 Doppler & sonic booms](https://visualmath.dev/doppler/): The falling pitch of a passing siren, the Mach cone of a sonic boom, and radar guns that measure speed. - [S04 How MP3s shrink audio](https://visualmath.dev/audio-compression/): Sampling and aliasing, bit depth and noise, the sounds you can't hear, and transform coding. ## How computers work - [C00 Bits & bytes](https://visualmath.dev/bits-bytes/): How a computer stores everything as switches: binary, hex, signed numbers, size prefixes, UTF-8 text and floating point. - [C01 The CPU](https://visualmath.dev/cpu/): Logic gates that add, a toy processor you can step through fetch, decode and execute, and how pipelines and cores go faster. - [C02 Memory & RAM](https://visualmath.dev/memory/): Numbered boxes, little-endian bytes and pointers, the memory hierarchy at human scale, and why caches reward neighbors. - [C03 How the internet moves data](https://visualmath.dev/internet/): Packets and checksums, shortest-path routing, reliable delivery over a lossy network, and how far light gets in fiber. - [C04 Encryption & hashing](https://visualmath.dev/encryption/): SHA-256 and the avalanche effect, agreeing on a secret in public with Diffie–Hellman, and RSA built from number theory. ## AI & machine learning - [C05 How machines learn](https://visualmath.dev/machine-learning/): Learning as rolling downhill: gradient descent, neurons and backpropagation, and the line between memorizing and learning. - [C06 Embeddings & vector search](https://visualmath.dev/embeddings/): Meaning as coordinates: cosine similarity, semantic search, and how vector databases find neighbors without checking everything. - [C07 How a language model writes](https://visualmath.dev/llm/): Tokens, next-word probabilities, temperature and sampling, attention, and the loop that turns them into text. ## Optional - [Sitemap](https://visualmath.dev/sitemap.xml) - [Home](https://visualmath.dev/)