# Kolton Ndoj — Math Lab > An interactive learning site by Kolton Ndoj, a teenager who loves exploring the unknown. It explains math, physics, astronomy and the algorithms behind everyday technology with live visualisations, sliders and plain-language explanations. Available in English and Italian. Free, no sign-up, no cookies, no tracking. The Math Lab (https://koltondoj.com/math/) has nine interactive chambers: Fourier circles, draw-anything, a formula-to-shape forge, a sound mixer, Lissajous figures, a gravity sandbox with live Kepler's-law instruments, a formula atlas, an algorithm lab (A*/Dijkstra, PageRank, gradient descent, Monte Carlo, Game of Life) and Euler’s circle. Every formula and algorithm below also has a static page with a graph, explanation and real-world uses. ## Interactive tools - [Math Lab](https://koltondoj.com/math/): all nine interactive chambers - [All formulas](https://koltondoj.com/formulas/): 129 math, physics and astronomy formulas - [All algorithms](https://koltondoj.com/algorithms/): 30 algorithms explained ## Formulas - [Add 1 to n in one step](https://koltondoj.com/formulas/gauss-sum/): Adding the first hundred whole numbers takes one multiplication, not a hundred additions. - [Odd numbers build squares](https://koltondoj.com/formulas/odd-numbers-squares/): Add the first n odd numbers and you always land exactly on a perfect square. - [Pythagorean theorem](https://koltondoj.com/formulas/pythagoras/): In any right triangle, the squares on the two short sides together exactly cover the square on the long side. - [Area of a circle](https://koltondoj.com/formulas/circle-area/): A circle has the same area as a rectangle that is r tall and half the circumference wide. - [Infinite sums that finish](https://koltondoj.com/formulas/geometric-series/): Adding infinitely many shrinking pieces can add up to a perfectly ordinary number. - [Inverse-square law](https://koltondoj.com/formulas/inverse-square/): Go twice as far from a light and it is four times dimmer, because the same light is spread over four times the area. - [Pascal's triangle](https://koltondoj.com/formulas/pascal-triangle/): Every number in the triangle is the sum of the two above it, and each one counts a different way of choosing. - [The quadratic formula](https://koltondoj.com/formulas/quadratic-formula/): The two places a parabola crosses the axis are equally far left and right of its middle. - [Clock arithmetic](https://koltondoj.com/formulas/modular-clock/): Wrap the number line around a clock of size n and many different numbers land on the same mark. - [Collatz conjecture](https://koltondoj.com/formulas/collatz/): Pick any number, halve it if even or triple-plus-one if odd, and nobody can prove you always reach 1. - [Monty Hall: switch!](https://koltondoj.com/formulas/monty-hall/): With three doors, one car and two goats, switching after the host opens a goat door wins twice as often as staying. - [Birthday paradox](https://koltondoj.com/formulas/birthday-paradox/): In a room of just 23 people, it is more likely than not that two share a birthday. - [Euler's polyhedron formula](https://koltondoj.com/formulas/euler-polyhedron/): For any solid without holes, corners minus edges plus faces always equals 2. - [The golden ratio](https://koltondoj.com/formulas/golden-ratio/): The golden ratio is the one number that equals one plus its own reciprocal. - [Heron's formula](https://koltondoj.com/formulas/heron-formula/): You can find a triangle area from just its three side lengths, with no heights or angles. - [Binomial theorem](https://koltondoj.com/formulas/binomial-theorem/): Expanding a bracket to the power n produces coefficients that are exactly counts of choices. - [Volume of a sphere](https://koltondoj.com/formulas/sphere-volume/): A sphere takes up exactly two thirds of the cylinder that snugly wraps it. - [Trapping pi with polygons](https://koltondoj.com/formulas/archimedes-pi/): A circle is what you get when a regular polygon grows endlessly many sides. - [Small angles: sin x is about x](https://koltondoj.com/formulas/small-angle/): For tiny angles the straight vertical drop and the curved arc are almost the same length. - [Logarithms turn times into plus](https://koltondoj.com/formulas/logarithm-adds/): A logarithm measures how many times you multiplied, so multiplying numbers just adds their logs. - [e from compound interest](https://koltondoj.com/formulas/e-compound/): If you split 100 percent yearly interest into ever finer instalments, your dollar grows to a limit: e dollars. - [The harmonic series never stops](https://koltondoj.com/formulas/harmonic-series/): Even though the terms shrink to nothing, their total grows past any limit you name, just extremely slowly. - [The square root of 2 is not a fraction](https://koltondoj.com/formulas/sqrt2-irrational/): There is a length, the diagonal of a unit square, that no fraction of whole numbers can ever equal. - [Infinitely many primes](https://koltondoj.com/formulas/euclid-primes/): No list of primes can ever be complete, because from any list you can build a number that needs a new one. - [sin(a+b) is a rotation](https://koltondoj.com/formulas/sin-addition/): Adding two angles means spinning a point by a, then by b; the formula just reads off the new height. - [Double-angle formula](https://koltondoj.com/formulas/double-angle/): Doubling an angle gives a wave that wiggles twice as fast, and a height equal to twice the product of sine and cosine. - [Law of cosines](https://koltondoj.com/formulas/law-of-cosines/): Pythagoras with a correction term that depends on how far the angle is from a right angle. - [Averages calm down](https://koltondoj.com/formulas/law-of-large-numbers/): The more fair coin flips you average, the closer the average hugs the true value, but only like one over the square root of n. - [Expected value is a balance point](https://koltondoj.com/formulas/expected-value-balance/): The expected value is where a see-saw balances if you put weights equal to the probabilities at each outcome. - [Derivative: slope at a point](https://koltondoj.com/formulas/derivative-slope/): The derivative is what the slope of a secant line settles to when its two points merge. - [Integrals: area, and its link to slope](https://koltondoj.com/formulas/integral-area/): The area under a speed graph is the distance travelled, and speed is the slope of the distance graph. - [e^x grows at its own speed](https://koltondoj.com/formulas/exp-derivative/): There is exactly one base for which the curve is as steep as it is tall, everywhere. - [The dot product](https://koltondoj.com/formulas/dot-product/): The dot product measures how much two arrows point the same way: zero means perfectly sideways. - [Determinant is area](https://koltondoj.com/formulas/determinant-area/): The number ad - bc is how much a transformation stretches every area, and zero means it squashes the plane flat. - [The rotation matrix](https://koltondoj.com/formulas/rotation-matrix/): A 2 by 2 table of numbers whose entire job is to spin everything around the origin. - [The bell curve](https://koltondoj.com/formulas/normal-curve/): Add up lots of small independent random nudges and the total lands in a bell shape, whatever the nudges looked like. - [Bayes' theorem](https://koltondoj.com/formulas/bayes/): Evidence only shifts your belief in proportion to how rare the thing was to begin with. - [Beats: two waves, one slow pulse](https://koltondoj.com/formulas/beats/): Two nearly equal notes add up to one note whose loudness slowly swells and fades. - [Building a square wave from sines](https://koltondoj.com/formulas/fourier-square-wave/): Add enough smooth, rounded waves and you can make something with perfectly sharp corners. - [Taylor series: sin as a polynomial](https://koltondoj.com/formulas/taylor-sine/): A wavy function is secretly an endless polynomial whose terms fix more and more of its shape at 0. - [Taylor series: e^x](https://koltondoj.com/formulas/taylor-exp/): The exponential is the only function that equals its own slope, so each term must be the slope of the next. - [Euler's formula](https://koltondoj.com/formulas/euler-formula/): Raising e to an imaginary power means going around a circle. - [Euler's identity](https://koltondoj.com/formulas/euler-identity/): Half a turn around the unit circle takes you from +1 to -1, and that is the whole identity. - [Multiplying complex numbers](https://koltondoj.com/formulas/complex-multiplication/): Multiplying complex numbers stretches by one length and rotates by one angle, together. - [Roots of unity](https://koltondoj.com/formulas/roots-of-unity/): The n solutions of z^n = 1 are the corners of a perfectly regular n-sided polygon on the unit circle. - [Fibonacci's closed form](https://koltondoj.com/formulas/fibonacci-binet/): A sequence made only of whole numbers is given exactly by powers of the irrational golden ratio. - [Catalan numbers](https://koltondoj.com/formulas/catalan/): One sequence counts brackets, staircases, ways to cut a polygon into triangles, and dozens of other things. - [How many primes are there up to x?](https://koltondoj.com/formulas/prime-number-theorem/): Primes look random, yet their thinning-out follows an exact law: about one in every ln x numbers near x is prime. - [Euler's prime product](https://koltondoj.com/formulas/euler-product/): A sum over every whole number equals a product over only the primes. - [The Basel problem](https://koltondoj.com/formulas/basel/): The squares of side 1, 1/2, 1/3, ... have total area exactly pi squared over 6, so pi sneaks into a sum of fractions. - [Cantor's diagonal argument](https://koltondoj.com/formulas/cantor-diagonal/): Some infinities are bigger than others: there are more decimals between 0 and 1 than there are counting numbers. - [The Mandelbrot iteration](https://koltondoj.com/formulas/mandelbrot/): Take any point c in the plane, square and add c over and over: the points where it never runs away draw the infinitely detailed Mandelbrot… - [Fermat's little theorem](https://koltondoj.com/formulas/fermat-little/): Raise any number to a prime power and you get back the same number on a clock of that prime size. - [Falling Distance](https://koltondoj.com/formulas/free-fall/): Drop something and after t seconds it has fallen half of g times t squared, so doubling the time quadruples the distance. - [Distance With Acceleration](https://koltondoj.com/formulas/suvat/): Your trip is two pieces glued together: the distance you would cover coasting, plus an extra bonus from speeding up. - [Best Throwing Angle](https://koltondoj.com/formulas/projectile-range/): On flat ground with no air, the farthest throw is at 45°, and angles equally far from 45° (say 30° and 60°) land in the same spot. - [Force Makes Acceleration](https://koltondoj.com/formulas/newton-second/): The harder you push and the lighter the thing, the faster its speed changes; one newton makes one kilogram speed up by 1 m/s every second. - [Recoil and Conservation of Momentum](https://koltondoj.com/formulas/momentum-conservation/): When things push on each other with nothing else involved, the total mass-times-velocity of the whole group never changes. - [Why Speed Is Dangerous](https://koltondoj.com/formulas/stopping-distance/): Doubling your speed quadruples both your energy and the distance you need to stop. - [Height Becomes Speed](https://koltondoj.com/formulas/energy-conservation/): Energy cannot be created or destroyed, only moved around, so every metre you drop converts stored height energy into movement energy. - [Pendulum Period](https://koltondoj.com/formulas/pendulum/): A pendulum’s beat depends on its length and on gravity, and not on the weight at the end. - [Spring Force](https://koltondoj.com/formulas/hooke/): A spring pulls back in proportion to how far you stretch it, and always towards where it started. - [Speed, Frequency, Wavelength](https://koltondoj.com/formulas/wave-equation/): How fast a wave travels equals how many crests pass per second times the distance between crests. - [The Math of Musical Notes](https://koltondoj.com/formulas/music-ratios/): Each step on a piano multiplies the frequency by the same number, 2 to the power one twelfth, about 1.0595. - [Ohm’s Law](https://koltondoj.com/formulas/ohms-law/): For a given resistor, the current is proportional to the voltage across it, and larger resistance chokes it down. - [Floating and Sinking](https://koltondoj.com/formulas/buoyancy/): A floating object pushes aside exactly its own weight of liquid, so a thing sinks until the water it displaces weighs as much as it does. - [How Fast Is Light](https://koltondoj.com/formulas/speed-of-light/): Light covers about 300,000 km every second, and nothing with mass can match it. - [Inverse-Square Law](https://koltondoj.com/formulas/inverse-square-light/): Light spreads out over the surface of a growing sphere, so twice as far means a quarter of the brightness. - [The Parabola of a Throw](https://koltondoj.com/formulas/projectile-path/): A thrown object’s path is a parabola: sideways it coasts, while downwards it falls like a dropped object. - [Going Round Needs a Push Inward](https://koltondoj.com/formulas/centripetal/): Going in a circle at constant speed is still accelerating, because the direction is always changing, and the acceleration points at the… - [Universal Gravitation](https://koltondoj.com/formulas/universal-gravitation/): Every mass pulls every other mass, with a force that falls to a quarter each time the distance doubles. - [Kepler’s Third Law](https://koltondoj.com/formulas/kepler-third/): The square of a planet’s year is the cube of its distance, so far-away planets take dramatically longer. - [Orbital Speed: Falling and Missing](https://koltondoj.com/formulas/orbital-speed/): An orbit is falling around something so fast that the ground curves away beneath you as quickly as you drop. - [Escape Velocity](https://koltondoj.com/formulas/escape-velocity/): Fire something faster than this and it never returns, however much gravity tugs it back. - [Simple Harmonic Motion](https://koltondoj.com/formulas/simple-harmonic-motion/): Anything pulled back toward the middle in proportion to how far it has gone will swing like a smoothly sliding shadow of a point on a… - [Bouncing Mass Period](https://koltondoj.com/formulas/spring-period/): A heavier load bounces slower and a stiffer spring bounces faster, and the rhythm does not depend on how far you pull it. - [Beats and Superposition](https://koltondoj.com/formulas/superposition-beats/): When two waves meet they simply add, and two nearly equal notes make a throbbing sound at the difference of their frequencies. - [Standing Waves on a String](https://koltondoj.com/formulas/standing-waves/): A string fixed at both ends can only ring at special pitches, those where a whole number of half-waves fits exactly. - [Decibels](https://koltondoj.com/formulas/decibels/): The decibel scale counts powers of ten, so each +10 dB means ten times the sound power. - [Doppler Effect](https://koltondoj.com/formulas/doppler/): A siren sounds higher as it comes toward you and lower as it goes away, because the waves get squeezed together in front and stretched… - [Snell’s Law](https://koltondoj.com/formulas/snells-law/): When light enters a slower material it bends toward the perpendicular, by an amount set by the ratio of the refractive indices. - [Lens Equation](https://koltondoj.com/formulas/lens-equation/): A lens brings light from a point to a focus, and where the image appears depends on how far the object is. - [Electric Power](https://koltondoj.com/formulas/electric-power/): Power is current times voltage, and the heat in a wire grows with the square of the current. - [Coulomb’s Law](https://koltondoj.com/formulas/coulomb/): Like charges push, opposite charges pull, and the force follows the same inverse-square pattern as gravity, but is incomparably stronger. - [Ideal Gas Law](https://koltondoj.com/formulas/ideal-gas/): Squeeze a gas or heat it and the pressure rises in a perfectly predictable way. - [Skater’s Spin](https://koltondoj.com/formulas/angular-momentum/): When nothing twists you, pulling your arms in makes you spin faster, because the product of how spread out you are and how fast you spin… - [Newton’s Cooling](https://koltondoj.com/formulas/cooling/): The hotter something is compared to its surroundings, the faster it loses heat, so a hot drink cools quickly at first and then slows. - [Terminal Velocity](https://koltondoj.com/formulas/terminal-velocity/): Air pushes harder the faster you fall, until the push equals your weight and you stop speeding up. - [Wien’s Law: The Colour of Heat](https://koltondoj.com/formulas/wien-law/): Hotter things glow with a shorter-wavelength colour: red-hot metal, then white-hot, then blue-white stars. - [Why the Sky Is Blue](https://koltondoj.com/formulas/rayleigh-scattering/): Air molecules scatter short-wavelength blue light far more than red, so blue light is thrown all over the sky. - [Stefan–Boltzmann Law](https://koltondoj.com/formulas/stefan-boltzmann/): Double an object’s temperature in kelvin and it radiates sixteen times more energy. - [Bernoulli’s Principle](https://koltondoj.com/formulas/bernoulli/): Along a smooth flow, where the fluid moves faster the pressure is lower, since energy is being traded between speed, pressure and height. - [Faraday’s Law of Induction](https://koltondoj.com/formulas/faraday/): Changing a magnetic field through a loop of wire pushes a voltage into it, and spinning a coil in a magnet makes electricity. - [Magnets Make Circles](https://koltondoj.com/formulas/lorentz-circle/): A magnetic field pushes sideways on a moving charge, so it curves the path into a circle without ever speeding the particle up. - [Entropy: Counting Arrangements](https://koltondoj.com/formulas/entropy/): Entropy counts how many ways the tiny parts of a system can be arranged while it still looks the same, and things drift toward the… - [Maximum Efficiency of Engines](https://koltondoj.com/formulas/carnot/): No heat engine can turn all its heat into work: a fraction must always be dumped into the cold, set by the temperatures. - [Black Hole Radius](https://koltondoj.com/formulas/schwarzschild/): Squash any mass into a ball smaller than this radius and nothing can escape from it, not even light. - [E = mc²](https://koltondoj.com/formulas/emc2/): Mass is a very concentrated form of energy: even a small mass is equivalent to a huge energy, and energy has mass in return. - [Time Dilation](https://koltondoj.com/formulas/time-dilation/): A moving clock ticks more slowly than a clock at rest, and the effect only becomes large close to the speed of light. - [Length Contraction](https://koltondoj.com/formulas/length-contraction/): An object moving past you at nearly light speed is measured to be shorter along its direction of motion. - [GPS and Relativity](https://koltondoj.com/formulas/gps-time/): GPS satellite clocks run faster than ground clocks by about 38 millionths of a second per day, and without a correction your phone would… - [Matter Waves](https://koltondoj.com/formulas/de-broglie/): Everything, from electrons to baseballs, behaves like a wave with a wavelength that gets shorter as it gets heavier or faster. - [Uncertainty Principle](https://koltondoj.com/formulas/uncertainty/): A particle cannot have both a perfectly sharp position and a perfectly sharp momentum, and the more you pin one, the fuzzier the other… - [Photoelectric Effect](https://koltondoj.com/formulas/photoelectric/): Light hits a metal as packets of energy, and a packet only kicks an electron out if it has enough energy, however bright the light is. - [Parallax Distance](https://koltondoj.com/formulas/parallax/): Look at a star from opposite sides of Earth's orbit and it shifts a tiny bit against the background; the smaller the shift, the farther… - [Looking Back in Time](https://koltondoj.com/formulas/light-travel-time/): Light is fast but not infinitely fast, so everything you see in the sky is a message from the past: the farther away, the older the news. - [Angular Size and the Eclipse Coincidence](https://koltondoj.com/formulas/angular-size/): How big something looks depends on its size divided by its distance, so a small near thing can exactly cover a huge far thing. - [Why the Moon's Phases Take 29.5 Days](https://koltondoj.com/formulas/lunar-month/): The Moon finishes a lap around Earth in 27.3 days, but by then Earth has moved along its orbit, so the Moon needs two more days to get… - [Kepler's First Law: Orbits Are Ellipses](https://koltondoj.com/formulas/kepler-first/): Planets travel on ellipses with the Sun at one focus, so their distance from the Sun rises and falls once every orbit. - [Kepler's Second Law: Equal Areas](https://koltondoj.com/formulas/kepler-second/): The line from the Sun to a planet sweeps equal areas in equal times, so the planet speeds up when it is close and slows down when it is far. - [Synodic Period: Why Mars Comes Close Every 26 Months](https://koltondoj.com/formulas/synodic-period/): Two runners on circular tracks line up again only when the faster has gained exactly one full lap, so the meeting time depends on the… - [The Magnitude Scale (Pogson)](https://koltondoj.com/formulas/magnitude-scale/): Star brightness is measured on a backwards logarithmic scale where every 5 steps fainter means 100 times less light. - [Distance Modulus: Brightness as a Ruler](https://koltondoj.com/formulas/distance-modulus/): If you know how bright a star really is and measure how bright it looks, the difference tells you how far away it is. - [How Bright a Star Really Is](https://koltondoj.com/formulas/star-luminosity/): A star's power is its surface area times how hard each square metre glows, and the glow grows with the fourth power of temperature. - [Exoplanet Transit Depth](https://koltondoj.com/formulas/transit-depth/): When a planet passes in front of its star, it blocks a fraction of light equal to the area of its dark disc over the area of the star's… - [Hubble's Law](https://koltondoj.com/formulas/hubble-law/): On average, the farther away a galaxy is, the faster it moves away from us, in direct proportion: the signature of a universe that is… - [The Age of the Universe, Roughly](https://koltondoj.com/formulas/hubble-time/): Run the expansion backwards at constant speed and every galaxy meets at one moment, about 14 billion years ago. - [Cosmological Redshift](https://koltondoj.com/formulas/cosmological-redshift/): Light crossing an expanding universe gets stretched with it, so its wavelength grows by the same factor as the universe did during the trip. - [Seasons and the Noon Sun](https://koltondoj.com/formulas/sun-elevation/): Because Earth's axis is tilted, the noon Sun climbs high in summer and stays low in winter, and that, not distance from the Sun, makes the… - [Day Length and Latitude](https://koltondoj.com/formulas/day-length/): How long the Sun stays up depends on how far north or south you are and the time of year; at the equator it is always about 12 hours, near… - [Tides: Gravity's Stretch](https://koltondoj.com/formulas/tidal-force/): Tides are not caused by how hard the Moon pulls, but by how unevenly it pulls on the near and far sides of Earth, and that unevenness… - [The Roche Limit](https://koltondoj.com/formulas/roche-limit/): Bring a moon too close to a planet and the planet's tidal stretch beats the moon's own gravity, tearing it apart into a ring. - [The Hill Sphere: A Planet's Gravitational Territory](https://koltondoj.com/formulas/hill-sphere/): Around every planet is a bubble where it, not the Sun, is the boss; moons must live inside it, and in practice well inside. - [Lagrange Points: Parking Spots in Space](https://koltondoj.com/formulas/lagrange-points/): There are five places near two orbiting bodies where a small object can ride along with them, keeping the same position relative to both. - [The Vis-Viva Equation](https://koltondoj.com/formulas/vis-viva/): Tell me how far you are from the Sun and the size of your orbit, and I can tell you your speed, at any point of any orbit. - [Orbital Energy and the Size of an Orbit](https://koltondoj.com/formulas/orbital-energy/): An orbit's total energy sets its size: add energy and the orbit gets bigger, and, strangely, the craft ends up moving slower. - [A Planet's Equilibrium Temperature](https://koltondoj.com/formulas/equilibrium-temperature/): A planet warms until it glows away as much heat as it receives, and that balance temperature drops with the square root of distance from… - [The Drake Equation](https://koltondoj.com/formulas/drake-equation/): The number of civilisations we could hear is a chain of multiplications, from star birth to how long they keep transmitting; the first… - [Mars, a Newborn, and the Midwife](https://koltondoj.com/formulas/astrology-check/): Use Newton's law of gravity to compare the pull of Mars on a newborn baby with the pull of the person delivering it: even at Mars's… ## Algorithms - [Binary search: the 20-question superpower](https://koltondoj.com/algorithms/binary-search/): When a database finds your username among millions in a blink, or you play 'guess my number' and always win. How do you find one item in a… - [Sorting: merge sort and quicksort](https://koltondoj.com/algorithms/sorting/): Every time a leaderboard ranks scores, a shop sorts by price, or your files line up A to Z. How do you put a million things in order… - [Monte Carlo: finding π by throwing random darts](https://koltondoj.com/algorithms/monte-carlo-pi/): In weather forecasts, game AI, movie lighting and nuclear-physics simulations, which all answer hard questions with lots of random tries.… - [Conway's Game of Life](https://koltondoj.com/algorithms/game-of-life/): As a famous screensaver and coding challenge, and as the simplest window into how simple rules build complicated worlds. Can a grid of… - [Edit distance: how spell-check guesses what you meant](https://koltondoj.com/algorithms/edit-distance/): When you type 'recieve' and your device suggests 'receive', or search says 'Did you mean…?'. How many single-letter changes does it take… - [Dijkstra's algorithm: the spreading wave of shortest paths](https://koltondoj.com/algorithms/dijkstra/): Inside every route planner, and in the way internet routers pick paths for your data. What's the shortest route from here to there through… - [A*: aiming the wave, and how real map apps go even faster](https://koltondoj.com/algorithms/a-star/): When Google Maps picks the fastest route, or a game character walks around walls toward you. Dijkstra explores in every direction, even… - [Hashing: how websites check your password without knowing it](https://koltondoj.com/algorithms/password-hashing/): Every time you log in, and every time someone checks whether a downloaded file was tampered with. How can a website check your password if… - [Huffman coding: short codes for common things](https://koltondoj.com/algorithms/huffman-coding/): Inside most .zip files, PNG images and JPEG photos. How can you store text in fewer bits without losing a single letter? - [Error-correcting codes: why a torn QR code still scans](https://koltondoj.com/algorithms/error-correcting-codes/): When you scan a scratched or partly covered QR code, play a scratched disc, or get photos from a space probe. How can a message fix itself… - [Bézier curves: the smooth curves behind every letter](https://koltondoj.com/algorithms/bezier-curves/): In every font on your screen, in the pen tool of drawing apps, and in the easing of smooth animations. How does a computer store a… - [Game physics engines: faking Newton 60 times a second](https://koltondoj.com/algorithms/physics-engine/): Every time a ball bounces, a car crashes or a ragdoll flops in a video game. How does a game make objects move and collide realistically… - [Convolution: how photo apps blur and find edges](https://koltondoj.com/algorithms/convolution/): When your camera app blurs the background, sharpens a photo, or a filter outlines a face. How can one simple rule blur an image, sharpen… - [Recommenders: you are an arrow, and so is every movie](https://koltondoj.com/algorithms/cosine-similarity/): When Netflix, YouTube or Spotify suggests 'because you watched…'. How can a computer tell which people (or songs) have similar taste? - [k-means clustering: letting data sort itself into groups](https://koltondoj.com/algorithms/k-means/): A classic way to shrink a photo to 16 or 256 colours (like a GIF), and to group similar songs, shoppers or stars. How do you split a cloud… - [Minimax: how a chess computer thinks ahead](https://koltondoj.com/algorithms/minimax/): When you play chess against an app, or tic-tac-toe against a computer that never loses. How should a computer pick a move when its… - [Bloom filters: a memory that can say 'definitely not'](https://koltondoj.com/algorithms/bloom-filter/): In databases that skip pointless disk reads, and in browsers checking a website against a list of dangerous sites. How do you check… - [GPS: four clocks, four spheres, and Einstein](https://koltondoj.com/algorithms/gps-trilateration/): Whenever your phone shows the blue dot on a map. How can your phone figure out exactly where it is on Earth using satellites 20,000 km away? - [The haversine formula: distance on a ball](https://koltondoj.com/algorithms/haversine/): When a map app or fitness tracker says how far apart two places are, or why flights from London to Los Angeles often pass over Greenland.… - [PageRank: the random surfer who ranked the web](https://koltondoj.com/algorithms/pagerank/): Behind Google Search, which grew out of this idea in 1998. Out of billions of web pages, which are the most important? - [A/B testing: how apps decide with statistics](https://koltondoj.com/algorithms/ab-testing/): When two friends see a slightly different YouTube thumbnail or app button. You're probably in dozens of experiments right now.. If version… - [Gradient descent: what 'learning' actually means](https://koltondoj.com/algorithms/gradient-descent/): Every time an AI gets trained: voice assistants, photo search, chatbots, translation. How can a computer tune millions of knobs to make… - [The Mandelbrot set: infinity from z² + c](https://koltondoj.com/algorithms/mandelbrot/): In fractal art and zoom videos, and as a classic way to test how fast a computer or graphics card is. What happens if you square a number,… - [RSA: the lock anyone can close but only you can open](https://koltondoj.com/algorithms/rsa/): In the padlock icon of a website, in software updates proving they're genuine, and in signed messages. How can two strangers share a… - [The traveling salesman: easy to check, brutally hard to solve](https://koltondoj.com/algorithms/traveling-salesman/): When delivery companies plan which parcel van stops where, or a drill plans its path across a circuit board. What's the shortest round… - [Ray tracing: rendering by running light backward](https://koltondoj.com/algorithms/ray-tracing/): In Pixar movies, and in video games with 'RTX' reflections and shadows. How do you compute what a camera would see in a 3D world of… - [JPEG: your photos are secretly made of waves](https://koltondoj.com/algorithms/jpeg-dct/): Every photo you take, send or scroll past on the web. How can a photo shrink to a tenth of its size and still look almost the same? - [The Fast Fourier Transform: hearing the notes inside a sound](https://koltondoj.com/algorithms/fft/): Inside music streaming, phone calls, Wi-Fi, music visualisers and every audio app that shows a spectrum. How do you split a sound into its… - [Shazam: turning songs into star maps](https://koltondoj.com/algorithms/shazam/): When you hold up your phone in a noisy café and it names the song in seconds. How do you recognise a song from ten noisy seconds out of a… - [Neural networks and backpropagation: passing the blame backward](https://koltondoj.com/algorithms/neural-network-backprop/): When your phone recognises your face, translates a sign, or a chatbot answers you. How does a network of millions of tiny adjustable units… ## Italiano - [Laboratorio di matematica](https://koltondoj.com/it/math/): le nove stanze interattive, in italiano - [Tutte le formule](https://koltondoj.com/it/formule/): 129 formule spiegate - [Tutti gli algoritmi](https://koltondoj.com/it/algoritmi/): 30 algoritmi spiegati ## Optional - [Privacy](https://koltondoj.com/privacy/): no cookies, no tracking, nothing collected - [Full content for LLMs](https://koltondoj.com/llms-full.txt): every English explanation in one markdown file