What Is the Four Color Theorem and How Was It Proved?

Every flat map can be colored with just four colors so no two neighboring regions match. That claim is so simple a child can check it and so hard to prove that mathematicians needed a computer to grind through 1,936 cases by hand.

By Petrus Sheya

July 25, 2026 · 8 min read

Grab any map, a country split into provinces, a stained-glass window, a soccer ball. How many crayons do you need so that no two touching regions end up the same color?

Try it. Four crayons always seem to be enough. Not five, not six. Four.

That's a strange thing to be true. There's no obvious reason a sprawling, tangled map of a hundred oddly shaped regions should ever need more than four colors. And yet it never does.

This is the Four Color Theorem, and it took mathematicians 124 years, one famous wrong proof, and eventually a computer running for over a thousand hours to actually nail it down.


Try it yourself: how few colors does a map really need?

Here's a real map, built out of hexagonal regions so every border is unambiguous. Click a region to cycle through colors. Adjacent regions that end up matching will flash red.

Pick how many colors you're allowed, then click regions to paint them. Touching regions that share a color glow red.

Conflicts0
Colored0 / 19
Colors used0

Try it with only 2 colors. You'll get stuck fast, some region always ends up boxed in by same-colored neighbors on both sides. Try 3. Better, but you'll still hit spots where three neighbors meet at a point and demand three different colors, leaving the fourth region with nowhere to go.

Now try 4. Every time, no matter how you paint it, you can always find a way to finish with zero conflicts.

That's not a coincidence for this particular map. It's true for every map you could possibly draw on a flat page. That universal claim is what needed proving.


Wait, why is this even hard?

You might think: just count the colors you need as you go; surely there's no upper limit once maps get complicated enough. That's the intuition that makes the theorem interesting. More regions, more neighbors, more tangled borders... shouldn't that eventually demand a fifth color, or a hundredth?

It doesn't. And nobody could explain why, for over a century.


Maps in disguise: turning countries into dots

Here's the first real insight, and it's the one that unlocks everything else. A map is really just a description of which regions touch which other regions. The actual shapes don't matter at all.

So we strip the shapes away. Put a dot in the middle of each region. Draw a line between two dots whenever their regions share a border. What's left is called a graph: dots (we call them vertices) connected by lines (edges).

Slide from map to graph. Every region becomes a dot, every shared border becomes a line, nothing else changes. Hover a region to see just its neighbors.

Regions (nodes)19
Shared borders (edges)42
Avg. neighbors4.42

Slide from map to graph and back. Nothing about the relationships changes, only the picture. Coloring the map so neighbors differ is now exactly the same problem as coloring the dots so connected dots differ. We write this as χ(G)4\chi(G) \le 4, where χ(G)\chi(G) (the "chromatic number") is the fewest colors a graph GG needs, and the claim is that for any graph that comes from a flat map, four is always enough.

This move, replacing shapes with dots and lines, is why the Four Color Theorem belongs to graph theory, not geography.


A fact about corners, borders, and regions

Before we get to coloring, here's a beautiful fact about flat maps that has nothing to do with color at all.

Count three things on any map: the corners where borders meet (VV), the border segments between corners (EE), and the regions they enclose (FF, including the outer background). For any map drawn on a flat page, these three numbers always satisfy:

VE+F=2V - E + F = 2

This is Euler's formula, and it holds no matter how you draw the map. Combine it with the fact that every region needs at least 3 border segments to close up, and a little algebra gives you:

E3V6E \le 3V - 6

Since the total "border count" around all regions adds up to 2E2E, this means the average region touches fewer than 6 neighbors. And an average below 6 guarantees at least one region touches 5 neighbors or fewer, always, on every possible map.

That single geometric fact, buried inside Euler's formula, is the seed the entire proof grows from.


A clever proof that was almost right

In 1879, a lawyer and amateur mathematician named Alfred Kempe published a proof. His idea was elegant: find that region with 5 or fewer neighbors (Euler's formula guarantees one exists), remove it, color the rest of the smaller map by induction, then figure out how to color the removed region back in.

The trick for slotting it back in uses what's now called a Kempe chain. Watch a stuck region get freed:

Region X is surrounded by 5 neighbors using all 4 colors between them. Watch how flipping a whole chain of regions frees one up.

N1N2N3N4N5T1T2X

Blocked: all 4 colors surround X

Colors around X4 / 4
Chain length3
X colored?not yet

Region X has 5 neighbors, and between them they're using all 4 colors, so X seems trapped. But look only at the neighbors colored with colors 1 and 3, and follow the chain of regions connected through those two colors. Flip every color in that chain, 1 becomes 3 and 3 becomes 1, and nothing outside the chain notices. The rest of the map is still validly colored. But now color 1 has vanished from X's neighbors. X can take it.

Kempe's proof was accepted for eleven years. The mathematical world moved on, assuming the question was closed.


The gap nobody caught for a decade

Here's the part textbooks tend to skip: Kempe's proof was wrong.

In 1890, Percy Heawood found the hole. When a region has exactly 5 neighbors, sometimes two different Kempe chains you'd need, one for colors 1-3, another for colors 2-4, tangle around each other in a way that a flat map simply won't allow both to exist safely at once. Untangling one chain can accidentally re-trap the very neighbor you needed to free.

Heawood couldn't fix it for four colors. But he showed the same chain trick works perfectly if you're allowed five colors instead of four, giving us the Five Color Theorem, which really is provable this cleanly, no computer required.

Four colors, though, stayed broken. The chain-flipping idea was clearly the right direction. It just wasn't enough on its own.


Down to a finite, enormous checklist

The fix that eventually worked, developed over decades by Heinrich Heesch and others, was to stop trying to handle every possible troublesome region with one clever argument. Instead, mathematicians built two pieces:

An unavoidable set: a list of local neighborhood patterns such that every possible map must contain at least one of them somewhere. Euler's formula is what makes a finite unavoidable set possible at all.

A proof that each pattern in the list is reducible: if that local pattern shows up, you can always resolve its coloring using a (possibly elaborate) chain-swapping argument, the same basic move Kempe used, just worked out case by case, sometimes requiring dozens of chains checked in sequence.

If every pattern in an unavoidable list is reducible, the theorem is proved. The catch: making the list unavoidable while keeping every pattern checkably reducible required 1,936 separate configurations, each demanding its own multi-step case analysis. No person was ever going to verify that by hand.


Enter the computer

Scrub through 150 years of attempts. Notice how long the theorem stayed broken, and how big the final case count really is.

185218791890197619972005Conjecture born

Francis Guthrie is coloring a map of England's counties and notices four colors always seem to be enough.

StatusConjectured
Cases checked0

In 1976, Kenneth Appel and Wolfgang Haken did something no major theorem had needed before: they wrote a program to check all 1,936 configurations, and ran it for over 1,200 hours of computer time.

The proof went through. Every configuration was reducible. The Four Color Theorem was true.

It was also, for many mathematicians, deeply unsatisfying. A proof is supposed to be something a person can read, follow, and verify line by line. This one couldn't be, not by any single human, not in a reasonable lifetime. Some mathematicians publicly doubted whether it counted as a proof at all.


Was it really proved?

The doubts shrank over time. In 1997, Neil Robertson, Daniel Sanders, Paul Seymour, and Robin Thomas found a cleaner unavoidable set of only 633 configurations, with a simpler discharging argument behind it, still computer-checked, but far more transparent about why the case list was correct.

Then in 2005, Georges Gonthier went further still. He encoded the entire proof, definitions and all, inside the Coq proof assistant, a system that checks every logical step against raw axioms with no room for hidden assumptions or human error. It verified. The Four Color Theorem remains one of the very few major results whose truth rests, ultimately, on a machine.


The short version

Any map you draw on a flat page needs, at most, four colors so that touching regions never match. Turning the map into a graph of dots and lines shows this is really a statement about graph coloring. Euler's formula guarantees every map has a region with 5 or fewer neighbors. Kempe's 1879 chain-swapping idea handles most cases beautifully but breaks down in a specific tangle that took Heawood a decade to spot. Fixing it required trading one clever argument for a finite but enormous checklist, 1,936 configurations, each individually reducible, only checkable by computer.

It's a theorem you can verify with a box of crayons in five minutes, and a theorem whose proof no human has ever fully read start to finish. Both things are true at once, and that tension is exactly what makes it one of the strangest landmark results in all of mathematics.


All visualizations are interactive React components running entirely in your browser, built on a real hex-tiled planar map. The map-to-graph morph uses the map's actual adjacency structure, not a decorative approximation. No libraries beyond React.