The Hodge conjecture explained for programmers

The Hodge conjecture explained for programmers
$1,000,000prize from the Clay Institute, offered in 2000
1950Hodge proposes it at the International Congress of Mathematicians
1, 2 and 3the complex dimensions where it's already proved
4the first dimension where it's still open in general
The Hodge Conjecture: the million-dollar problem, explained for programmers
I also explain it in this video, on my channel Articulator EN. The donuts in the video and in this post are drawn point by point with NumPy.

Shapes made of equationslink

Let's start with the simplest thing. If you write x² + y² = 1 and paint every point that satisfies it, you get a circle. If you've ever written a shader, this will sound familiar: it's an implicit function, f(x, y) = 0, and the shape is the set of points where it equals zero. Change the equation and the drawing changes: with y² = x³ − x you get a curve in two pieces. Shapes born this way, from polynomial equations, are called algebraic varieties.

Now, the trick that makes everything harder: in the Hodge conjecture the coordinates are complex numbers. Every complex number carries two real numbers inside, like a two-component vector. So a complex curve, with just one free coordinate, is really a surface. The curve y² = x³ − x, seen with complex numbers (and with its points at infinity), is a donut: the surface of a torus. With two complex coordinates you already have four real dimensions, and from there on there's no way to draw it.

The conjecture isn't about just any shape, either: it asks for it to be projective and smooth. Smooth means no spikes or creases, like a well-built mesh. Projective means, roughly, that it's closed: you add the points at infinity and no loose edge is left, like a watertight mesh with no cracks.

Counting holeslink

To understand the conjecture, you have to count holes. That's the job of topology, the branch of math that only cares about what doesn't change when you stretch and bend without tearing. To a topologist, a coffee mug and a donut are the same thing (you can deform the mug until only the handle is left), but a sphere is different: it has no hole at all, and there's no way to give it one without tearing it.

There's a very programmer way to build a donut: the screen of a classic video game like Asteroids. When you leave on the right, you show up on the left; when you leave at the top, you show up at the bottom. If you glue the edges of that screen, what you get is a torus.

A flat screen rolls into a cylinder when top is glued to bottom, and the cylinder closes into a torus when left is glued to right
Glue top to bottom and you get a tube; then glue left to right and you get a donut.

So what exactly is a hole? Draw a loop on the surface, like a rubber band. If you can shrink it to a point without leaving the surface, it surrounds nothing. If you can't, it's trapped around a hole. On the torus there are two basic loops, one going around horizontally and one vertically, and any other loop is a combination: for example, going around twice horizontally and three times vertically. There are also higher-dimensional holes: a sphere encloses a void you can't catch with a rubber band, but you can with a bubble.

Two tori: on the first, a red horizontal loop and a blue vertical loop; on the second, an orange loop that winds twice one way and three times the other
The two basic loops of the torus, and a loop that is their combination (2, 3).

If you code, you already know a cousin of this: the Euler characteristic. Take a triangle mesh, count the vertices, subtract the edges and add the faces: V − E + F. For any mesh of a sphere you get 2; for any mesh of a donut you get 0. It doesn't matter how many triangles you use: the result only depends on the holes. At the end of the post, in Try it yourself, we get the exact number of holes in each dimension with a few lines of Python.

Measuring the holeslink

Here comes the key idea. To each loop you can assign a vector: how many times it winds around each hole. The loop that goes twice horizontally and three times vertically is the vector (2, 3). All these vectors form a vector space, and mathematicians call that kind of space cohomology (simplifying: strictly speaking, cohomology is the "dual" of this space of loops, but the picture is good enough to understand the conjecture). It's a kind of database of the shape's holes, with one column per basic hole, and with rational coordinates: integers and fractions.

Now comes Hodge's ingredient. Since our shapes use complex numbers, every vector in that space can be split into channels, just like a color splits into red, green and blue. Each channel carries a label with two numbers, (p, q), that say how many complex directions it has "of one kind" and how many "of the conjugate kind". Hodge proved that this decomposition always exists for the shapes we're talking about, and it's as exact as a Fourier transform: nothing is lost, it's just shared out.

With that, we can meet the main character. A Hodge class is a vector that passes two tests at once:

  1. Rational coordinates. This comes from topology, from counting windings.
  2. All its energy in the balanced channels, the ones where p = q (the diagonal). This comes from complex analysis.
Any vector has energy in channels (2,0), (1,1) and (0,2) and fails the diagonal test; a Hodge class only has channel (1,1) and passes both tests
The two tests look at the shape from different worlds; almost every vector fails one of them.

The strange thing is for something to pass both: the first test is arithmetic and the second is analytic, and there's no reason for them to agree.

The algebraic pieceslink

Now, the other side of the story. Inside our shape you can draw smaller shapes by using more equations. For example, you slice the donut with a plane and you're left with a curve (this is an illustration: in the complex version, the slices are also made with equations). These sub-shapes defined by equations are called algebraic cycles. They're the Lego bricks of algebra: you can add them, subtract them and multiply them by fractions to build combinations. And every combination, just like a loop, has its vector in the database of holes.

And here's the easy part: any algebraic piece automatically passes both tests. Its coordinates are rational, because it counts whole windings, and its energy lands on the diagonal, because a shape defined by complex equations is "balanced" on the inside. So we have one safe direction: everything algebraic is a Hodge class. The million dollar question is the way back.

The conjecturelink

The Hodge conjecture

On a smooth projective algebraic variety, every Hodge class is a combination, with rational coefficients, of classes of algebraic cycles.

Put another way: if something looks like it comes from equations, then it does come from equations. Topology and analysis give you a signal, and the conjecture promises that behind that signal there's always a concrete geometric shape, made of polynomials, that produces it.

For a programmer, the best picture is this. You have a validator (the two tests) and a generator (the combinations of algebraic pieces). Everything that comes out of the generator passes the validator; we already know that. The conjecture says the generator is complete: anything the validator accepts, the generator can produce. It's like asking whether your grammar generates every string your regular expression accepts. Except that here there are infinitely many cases, in dimensions nobody can draw.

Diagram: the generator of combinations of algebraic pieces sends everything to the validator of the two tests; the arrow back, with a question mark, is the conjecture
The forward direction is proved; the way back is worth a million dollars.

Why does it matter? Because it connects two worlds that speak different languages. Topology is soft: everything stretches. Algebra is rigid: everything is exact equations. If the conjecture is true, the soft shape tells you which rigid structures are hidden inside it. Grothendieck built an entire theory, the theory of motives, that would work beautifully if this conjecture and its relatives (the standard conjectures) were true.

William Hodge proposed it in 1950, at the International Congress of Mathematicians. In 2000, the Clay Institute picked it as one of its seven Millennium Problems and asked Pierre Deligne to write the official description. Of those seven, only one has been accepted as solved: the Poincaré conjecture, which Perelman proved more than twenty years ago.

Why it's so hardlink

  • Existence with no recipe. The tests tell you a class is good, but they don't give you a single equation to build its piece. It's like knowing a problem has a solution without having any algorithm to find it.
  • Dimensions you can't draw. The hard cases start at complex dimension four, which is eight real dimensions. There's no visual intuition to guide you there: only calculation.
  • Two worlds that don't fit. The tools that detect Hodge classes are continuous (integrals, derivatives, things you can nudge a little), but algebraic pieces are discrete and rigid: either a curve with that equation exists, or it doesn't. If you deform the shape just a bit, Hodge classes can appear and disappear. Going from one world to the other is like recovering source code from a screenshot: you know what it does, but not how it's written.

What we already knowlink

  • Lefschetz (1924). Long before Hodge stated it, Lefschetz proved the case of pieces with one dimension less than the whole shape (the (1,1) theorem, "divisors"). With that, the conjecture is true for every shape of complex dimension 1, 2 and 3. The trouble starts right at 4.
  • The integer version is false. Hodge stated it with integer coordinates. In 1962, Atiyah and Hirzebruch found a class that passes the tests but doesn't come from any integer combination of pieces. Later, Kollár found even stranger cases: the class itself can't be built, but some multiple of it can. That's why the million dollar version allows fractions. A bug in the original spec, and its patch.
  • The precondition matters. There are smooth, closed shapes with a complex structure that don't come from equations: Kähler manifolds. In 2002, Claire Voisin proved that for them the analogous version is false. Like a function's contract: remove the precondition (that the shape comes from polynomials) and the guarantee no longer holds.
  • Abelian varieties. They're the many-dimensional version of the Asteroids screen: a space that repeats in every direction. In 1977 Weil proposed some specific classes as a test bench, and in 2025 Eyal Markman proved the conjecture for every abelian variety of dimension four.
  • Hints in its favor. In 1995, Cattani, Deligne and Kaplan proved that the places where Hodge classes appear as you deform the shape are themselves described by equations: exactly what would happen if the conjecture were true. And Deligne had already proved that on abelian varieties these classes behave as if they were algebraic in every way anyone knew how to check.

Among abelian varieties there are some special ones, those with complex multiplication (CM). Picture the repeating grid: if it's just any grid, rotating it 90° makes it stop matching itself; if it's square, it matches. That extra symmetry creates new Hodge classes, and also new curves that build them (like the graph of that rotation). On the product of two donuts, E × E, an ordinary grid gives three independent classes of type (1,1), and the square one gives four. They're the perfect lab to put the conjecture to the test.

Two grids of dots with a copy rotated 90 degrees on top: the ordinary grid doesn't match its copy; the square one does
The square grid has an extra symmetry: complex multiplication.
Timeline of the Hodge conjecture from 1924 to 2026
A century of partial progress, counterexamples to neighboring versions, and hints.

Fall 2026link

OpenAI has a public repository with more than seven hundred math manuscripts produced by an unnamed internal model. They describe them as "raw research data" and warn that some unformalized results could have issues.

September 30 · CM

The manuscript "The rational Hodge conjecture for CM abelian varieties" claims to prove the fractions version of the conjecture for every abelian variety with complex multiplication, in any dimension and codimension. According to the paper itself, the Tate conjecture for abelian varieties over finite fields and the Hodge standard conjecture for abelian varieties follow from it. On October 26 they added a Lean formalization.

October 7 · Withdrawal

According to their history, a sign error in "Algebraicity of Weil classes on split abelian eightfolds" invalidated the construction used by two dependent papers. They withdrew three manuscripts at once, including the one on the conjecture for products of K3 surfaces. Like a dependency with a bug that breaks everything importing it. The withdrawal is not a counterexample to the conjecture.

The status, carefully

The CM result is a preprint: if it survives the community's review, it's an important step, but it covers one specific family, not every shape, so there's no prize at stake. OpenAI says it defers to mathematicians on credit. As of December 2, 2026, the Clay Institute's page still lists the Hodge conjecture as "Unsolved".

Try it yourselflink

If you want to get your hands on this, start with the holes. Build the mesh of a torus as a grid with glued edges (the % plays the role of the Asteroids screen), write two matrices, which vertices touch each edge and which edges surround each triangle, and compute their ranks. Out come the Betti numbers: 1, 2, 1. One connected piece, two loops and one cavity.

import numpy as np

n = 6                                   # n×n grid with glued edges (like the Asteroids screen)
V = lambda i, j: (i % n) * n + j % n    # the % glues the edges
E, T = {}, []
for i in range(n):
    for j in range(n):
        a, b, c, d = V(i, j), V(i+1, j), V(i, j+1), V(i+1, j+1)
        for e in [(a, b), (a, c), (a, d)]:
            E.setdefault(tuple(sorted(e)), len(E))
        T += [(a, b, d), (a, c, d)]     # two triangles per cell

d1 = np.zeros((n*n, len(E)))            # which vertices touch each edge
for (p, q), k in E.items():
    d1[p, k], d1[q, k] = -1, 1
d2 = np.zeros((len(E), len(T)))         # which edges surround each triangle
for k, (p, q, r) in enumerate(T):
    for x, y, s in [(p, q, 1), (q, r, 1), (p, r, -1)]:
        d2[E[tuple(sorted((x, y)))], k] = s if x < y else -s

assert not (d1 @ d2).any()            # the boundary of a boundary is zero
r1, r2 = np.linalg.matrix_rank(d1), np.linalg.matrix_rank(d2)
print("Betti:", n*n - r1, len(E) - r1 - r2, len(T) - r2)   # → Betti: 1 2 1

The check d1 @ d2 == 0 is the most famous sentence in topology: the boundary of a boundary is zero. Change n and the result doesn't move, just like the Euler characteristic (here, 1 − 2 + 1 = 0). This is exactly the topology, with rational coefficients, that the Hodge conjecture is built on.

In shortlink

The Hodge conjecture says that, in shapes defined by polynomials, every class that passes both tests (rational coordinates and balanced channels) can be built from algebraic pieces. We know it's true in low dimensions and in specific families, and that the versions with integers or without equations fail. The rest is still waiting for someone.

In one sentence

Passing every test doesn't mean you know how to build it; the conjecture bets that, here, the tests are perfect.

Which Millennium Problem has been the hardest for you to understand?

Sourceslink

Continue reading

Last posts -->

Have you seen these projects?

Gymnasia

Gymnasia Gymnasia
Expo
React Native
TypeScript
OpenAI
Anthropic

Fitness app with two agents that run entirely on the device, with no backend, so the user's data never leaves the phone. A BYOK conversational coach with local tools and a remote system prompt with offline fallback, plus a food estimator that pulls macronutrients out of a photo of the plate, with barcode scanning against OpenFoodFacts.

LangGraph Deep Researcher

LangGraph Deep Researcher LangGraph Deep Researcher
Python
LangGraph
FastAPI
React
TypeScript
Docker

Multi-agent research system built with LangGraph. A supervisor breaks your question down into topics and launches search sub-agents in parallel; each one compresses its findings before handing them to a writer agent that produces the final sourced markdown report. Live streaming over WebSockets, a configurable model per role and bring-your-own API keys that are never persisted server-side.

Tau

Tau Tau
Python
LangChain

Multi-agent tutoring system for secondary school students, with one agent per subject and course material written and validated by a team of teachers. It was used with real students at a private school in Spain and at a secondary school in Colombia.

View all projects -->
>_ Available for projects

Do you have an AI project?

Let's talk.

maximofn@gmail.com

Machine Learning and AI specialist. I develop solutions with generative AI, intelligent agents and custom models.

Do you want to watch any talk?

Last talks -->

Do you want to improve with these tips?

Last tips -->

Use this locally

Hugging Face spaces allow us to run models with very simple demos, but what if the demo breaks? Or if the user deletes it? That's why I've created docker containers with some interesting spaces, to be able to use them locally, whatever happens. In fact, if you click on any project view button, it may take you to a space that doesn't work.

Flow edit

Flow edit Flow edit

FLUX.1-RealismLora

FLUX.1-RealismLora FLUX.1-RealismLora
View all containers -->
>_ Available for projects

Do you have an AI project?

Let's talk.

maximofn@gmail.com

Machine Learning and AI specialist. I develop solutions with generative AI, intelligent agents and custom models.

Do you want to train your model with these datasets?

short-jokes-dataset

HuggingFace

Dataset with jokes in English

Use: Fine-tuning text generation models for humor

231K rows 2 columns 45 MB
View on HuggingFace →

opus100

HuggingFace

Dataset with translations from English to Spanish

Use: Training English-Spanish translation models

1M rows 2 columns 210 MB
View on HuggingFace →

netflix_titles

HuggingFace

Dataset with Netflix movies and series

Use: Netflix catalog analysis and recommendation systems

8.8K rows 12 columns 3.5 MB
View on HuggingFace →
View more datasets -->