mathematics

Unofficial, machine-generated summaries, as of 2026-11-09.

grantsandersonSphere Intersection Puzzle Corrected
  • Puzzle: find the expected volume where two random intersecting spheres overlap. Both spheres have radius 1. Equivalently, fix one at the origin and pick the second's centre uniformly at random within distance 2 of it, which guarantees an intersection whose shape depends on where that centre lands. He poses it as this month's puzzle without solving it. Solutions to several monthly puzzles will be bundled into fuller videos near the end of the year, with previews for Patreon supporters meanwhile.
grantsandersonThere's never been a better time to go into math
synopsis

Sanderson argues that this is the best time to go into math, and the best time to fund it. Even if machines eventually do everything mathematicians do, the institution survives largely intact. The real change is that proof stops being the measure of credit and becomes raw data for theory building. His reason for optimism is not AI's new tools. It is that a field that knows it must change can be shaped by the people entering it now.

The framework. Mathematicians do four things: prove theorems, decide which questions are worth asking, build theory, and find applications, with communication running through all of them. He compares theory building to Descartes's coordinates, Galois's seeds of group theory, and Grothendieck's "rising sea". Math is valuable for three reasons: applications, often centuries downstream (cubics in the 1500s led to complex numbers and then quantum mechanics), transferable problem-solving skill, and aesthetic joy. Funding comes from teaching, which is the largest source, NSF grants, the Simons Foundation and industry. He argues that skill and joy reach the money mainly through students.

If machines prove theorems. He says AI's current position is overrated but its velocity is not. Four years ago models could not add; now they solve IMO and serious Erdős problems. Assuming they prove better than people, value and funding barely move, because applications come from theory. Problem-solving skill is unaffected for the same reason lifting weights still helps you when machines lift more. Joy splits two ways. Some feel the wind has gone out of their sails, while others, like a researcher at the Institute for Advanced Study he quotes, are exhilarated. He traces much of the resentment to two causes: poor machine exposition, which he expects to improve, and cultural inertia that treats proof as the goal.

If machines also pose questions and build theory. Each step makes human theory builders more leveraged, or leaves people needed to connect theory to fusion, cancer or superconductors. He separates two kinds of joy. The joy of doing math at any level survives and is amplified by company. The pioneer's joy of being first is a real loss.

Anything you can do, I can do better. If machines handle applications too, the funding rationale tied to applications points toward "a big blob of compute". He expects wealthy AI founders to fund that privately, and doubts policymakers will redirect public money. Public funding would instead rest on training problem solvers and on math as an art. Teaching still dominates, because learning is limited by motivation. He points to Numberphile and Martin Gardner as evidence of public appetite.

What to do tomorrow. Pursue whatever you love about math, whether that's model-assisted theory, math by humans for humans, or, in his own case, visual exposition as a thesis. Give many talks. Take a long walk with a fellow student and talk through why each of you chose math.

  • Proof should now be treated as raw data, not the goal. For most of math's history proof stood in for understanding: a problem counted as solved the moment it was proved. He argues machine proofs turn proof into something like numerical calculation or more digits of pi. The prize belongs to whoever turns a proof's ideas into coherent theory, such as a Navier–Stokes blow-up result, and he calls proof "overvalued for decades".
  • Machine theorem-proving barely touches math's value or its funding. He lists three sources of value: applications, transferable problem-solving skill, and aesthetic joy. Applications almost always come from theory building, as with Galois's group theory rather than the quintic result, or the theory grown around Fermat's Last Theorem. So public and private funding stays rational, and theory builders gain leverage. What changes is the culture and how credit is assigned.
  • Skill and joy need human engagement, like lifting weights. Machines lifting more than you doesn't make your own gym work pointless, and the same holds for doing proofs yourself. Teaching is math's biggest funding source, and it pays for exactly these individual goods. He argues education is limited by motivation, not by how clear the explanation is, and motivation is social. That makes teaching one of the jobs safest from AI displacement.
  • AI's current position is overrated, but its velocity is not. This is his conclusion from interviews with mathematicians that he has recorded since mid-2025. In 2023 DeepMind's Olympiad geometry system looked bespoke and brute-force. Within a couple of years general language models could solve IMO problems by any reasonable standard. Machine proofs of Erdős problems went from dismissed as low-hanging fruit to serious results, though the frontier is "spiky at a fractal level".
  • It's a good time to enter because the field must change. His reason isn't new AI tools. Newcomers can shape the field at a pivotal moment while it looks for guidance. As a 2026 PhD student he would try to get visual explanation like 3Blue1Brown's accepted as a thesis. His other advice is to give lots of talks, since oral presentation will increasingly be how understanding is measured. He also says to walk with a fellow student and talk through what each loves about math.
grantsandersonThe Phone Number puzzle
  • A phone number has a multiple made of ones and zeros. Multiplying any whole number by some positive integer can yield a larger result whose digits are entirely 1s and 0s, and if the original number ends in 1, 3, 7, or 9, a multiple whose digits are entirely 1s can be found instead. This is posed as the month's puzzle, left for the viewer to prove rather than solved on screen.
  • A naive brute-force search for this multiple is computationally infeasible. He notes that understanding why the result holds points toward a smarter, more targeted brute-force search that could actually find it within reach.
grantsandersonThe last IMO problem AI could not solve
  • A once-impossible AI benchmark fell within two years. Google DeepMind's model answered four of six questions on the 2024 IMO; by 2025 several organizations' models answered every question but one; by 2026, publicly available reasoning models could answer all six just from prompting.
  • Problem six of the 2025 IMO stumped AI entirely. Only six of the 603 competitors — each already among the top problem-solvers in their own country — earned full marks on it, and it was the sole question none of the AI systems solved that year.
  • The puzzle asks for the fewest possible tiles. On the grid described in the actual IMO problem — 2025 by 2025 unit squares, shown smaller here for illustration — non-overlapping tiles whose edges align with the grid must cover the board so that every row and every column has exactly one uncovered unit square; the task is to find the minimum tile count achieving this.
  • The real challenge is proving the minimum, not just finding it. The task isn't merely a numerical answer or even a construction that achieves it — it requires a rigorous proof that no other tiling arrangement can use fewer tiles, which the video calls a path into "intuition and discovery."
grantsandersonThe last IMO problem AI could not solve
synopsis

The video proves that on a grid of side length k², the fewest tiles leaving exactly one gap per row and column is k²+2k−3, achieved by a windmill arrangement of k×k squares. Since 2025=45², k=45 gives the numeric answer for the actual IMO problem — but the real content is the proof: a correspondence between highlighted edges of the gaps and the tiles covering them, sharpened by splitting the grid into four regions along two paths through the gaps, and closed with a permutation theorem proved from scratch.

A motivating side puzzle. Before attacking problem 6, the video poses a simpler question: cutting a 3×3×3 cube into 27 unit cubes using the fewest planar slices, with pieces allowed to be rearranged between cuts. Six slices works; proving fewer cannot rests on the cube's central unit cube, whose six faces each require their own unique slice — a one-to-one correspondence between faces and cuts that becomes the template for the tiling proof.

The construction. Placing gaps at the shared corner of four square tiles arranged in a windmill, then tiling outward, builds a grid of side k² using (k−1)² interior tiles plus 4(k−1) boundary tiles, totaling k²+2k−3. This matches the floor tiling at the airport where the 2025 contestants landed.

Why naive edge-counting falls short. Highlighting all four edges of every gap, and noting each tile touches at most four, gives a bound of only k²−1 tiles — too weak. Highlighting just one direction's edges instead reveals why: tiles it misses cluster on one side of the grid, showing the approach is directionally biased.

The fix, and the tight bound. Treating gap positions as a permutation, the proof draws a longest increasing and a longest decreasing path through them, splitting the grid into four regions; each gap's edge is highlighted by region, with two edges for gaps on both paths. Since no tile ever touches more than one highlighted edge, the tile count is at least k² plus the two paths' lengths minus a small correction — enough once those lengths are shown to sum to at least 2k.

Erdős–Szekeres, proved rather than cited. That claim follows from the Erdős–Szekeres theorem — that the product of a permutation's longest increasing and decreasing subsequence lengths is at least its size — via the arithmetic-geometric mean inequality. The video proves this from scratch by labeling each element with the lengths of the increasing and decreasing subsequences ending there; these label-pairs are always distinct, so plotting them as lattice points shows the bounding box's area must cover all n points.

Close. With k=45 the formula gives the actual answer, but the video closes by noting only six of 603 competitors solved this — the sole 2025 problem no AI could — and reflects, via DeepMind's Tang Luong on models' lack of patience, that since the proof already existed elsewhere, the real contribution here is a "motivated explanation": a narrative making a hard result feel discoverable, which deserves the same credit as proof as AI increasingly generates proofs without it.

  • A cube-slicing puzzle supplies the key proof strategy: one edge, one tile. Proving a 3×3×3 cube needs at least six planar slices to cut into 27 unit cubes — even allowing pieces to be rearranged between cuts — rests on the fact that each of the inner unit cube's six faces requires its own unique slice, a one-to-one correspondence between faces and cuts. That same "count what needs its own tile" logic becomes the template for the harder tiling proof.
  • The optimal tiling is a windmill of squares, using k²+2k−3 tiles. Stacking k×k square tiles so each gap sits at the shared corner of four tiles, in a windmill pattern, builds a grid of side k² using (k−1)² interior tiles plus 4(k−1) boundary tiles. Since 2025=45², k=45 gives the answer — and, Grant notes, happens to match the floor tiling at the airport where the 2025 contestants landed.
  • A two-path trick reduces the proof to a classic permutation theorem. Highlighting only one edge per gap proves at best k²−1 tiles, too weak, because the tiles it misses cluster on one side; drawing a longest increasing and a longest decreasing path through the gaps instead splits the grid into four regions, each with its own highlighted edge, closing the gap to the tight bound via the Erdős–Szekeres theorem.
  • Human understanding, not the proof itself, is what math should credit. DeepMind's Tang Luong told Grant models struggle because they aren't trained to be patient enough to understand a problem before attacking it; since a correct proof of this result already existed on YouTube, the video's own contribution is what Grant calls a "motivated explanation" — a narrative that makes the discovery feel inevitable rather than a "bolt from the blue," which he argues deserves the same academic credit as the proof itself.
grantsandersonThe jumping pegs puzzle
  • The setup starts three pegs at three corners of a square. The legal move is a jump-over: a peg leaps over an adjacent peg to land an equal distance beyond it on the opposite side, and this can be repeated indefinitely.
  • Jumps aren't limited to straight lines — diagonal jumps are also legal. Two pegs can hop over each other repeatedly along a straight line, but a peg can also jump diagonally over another, opening up different angles of movement across the board.
  • The question: can a peg ever reach the square's fourth, empty corner? If it's possible, the puzzle asks for the smallest number of moves required, with a proof that no faster route exists.
  • If it's impossible, that too has to be proven, not just asserted. The puzzle offers no hint as to which outcome holds — reaching the corner or ruling it out both demand a rigorous argument, in keeping with the video's puzzle-of-the-month format.
grantsandersonThe 64 sugar cubes puzzle
  • The setup: 64 sugar cubes fill a 4×4×4 block, each colored. Every cube is white, blue, or brown, and the arrangement of colors across the 64 positions can be anything at all.
  • The task: prove six same-colored pairs always exist, no matter the coloring. That means finding 12 individual cubes total — grouped into six pairs, each pair a single matching color — regardless of how the 64 cubes happen to be colored.
  • A further constraint: the six pairs' distances between centers must all match. For each pair, measure the distance between the centers of its two cubes; the puzzle requires that all six of these distances come out equal to each other.
  • The puzzle comes from the 2024 British Math Olympiad. It's presented as part of Grant's recurring "puzzle of the month" series, posed without a solution in this short.
grantsandersonBut what is cross-entropy? | Compression is Intelligence Part 2
synopsis

The video reframes language-model training: using cross-entropy loss is the same as training the model to be the best possible text compressor. Cross entropy is the average bits per symbol when a code built for one distribution is used on messages that actually follow another, and it's minimized exactly when the two match — at which point it equals the true distribution's own entropy.

Compression origins. Cross entropy is motivated with a toy robot-instruction example: a code optimized for a 50/25/12.5/12.5% distribution over "up/down/left/right" costs one, two, and three bits per symbol respectively. When the true distribution shifts to favor "right" (50%) while "up"/"down" drop to 12.5% and "left" stays at 25%, but the old code is still used, the average cost rises to 2.625 bits per instruction.

The minimizing property. Graphing cross entropy for two-outcome distributions shows it forms a curve in Q that bottoms out exactly where Q equals P, and that minimum traces out the entropy of P as P varies — the property that makes cross entropy a natural loss function.

An unexpected 2002 precedent. A paper on "language trees and zipping" showed gzip alone — appending a snippet of one document to another and comparing compressed sizes — approximates cross entropy well enough to cluster documents by language and reconstruct trees of linguistic relatedness, with no built-in knowledge of linguistics.

Training as compression. A language model's pre-training loss is the average information — negative log probability — it assigns the true next token: literally the cross entropy of the model's predictions against the one-hot true tokens. A Lagrange-multiplier argument on a repeated pattern like "my name is ___" shows the logarithm isn't arbitrary: it's the only per-token loss function that forces the total loss to be minimized exactly when the model's output matches the data's true statistics.

Distillation and KL divergence. Training a small model against a large model's full output distribution, instead of one-hot targets, gives a richer per-example signal. The video closes by defining KL divergence as the gap between cross entropy and entropy — the bits wasted by an imperfect code — an asymmetric quantity that also underlies distillation.

  • Cross entropy measures the cost of using the wrong code. It's the average bits per symbol when a code optimized for one distribution (Q) gets used on symbols that actually follow another (P). In the video's robot-instruction toy example, a code optimized for a 50/25/12.5/12.5% split costs 2.625 bits per instruction once the true distribution shifts to 12.5/12.5/25/50%.
  • Cross entropy hits its minimum only when the two distributions match. At that point its value equals the entropy of the true distribution P — the reason it makes a sound loss function. A Lagrange-multiplier argument on a "my name is ___" example shows this property forces the per-token loss to be a logarithm specifically, rather than any other decreasing function of probability.
  • A 2002 gzip trick reconstructs language-family trees from compression alone. Appending a snippet of one document to another and comparing the compressed file sizes approximates cross entropy — how well one text's patterns compress another's — letting researchers cluster and even rank the relatedness of languages purely from resulting file sizes, without any built-in linguistic knowledge.