Algebraic Number Theory × Geometry

The Hexagonal Pythagorean Theorem

The Pythagorean equation has a twin, living on the hexagonal lattice. Its solutions split into exactly three classes — and the reason reaches all the way to quadratic reciprocity.

Lee McCulloch-James · Dwight School London · February 2026

Read the paper on ResearchGate ↗ · DOI: 10.13140/RG.2.2.29669.67047

SCROLL TO EXPLORE

Two lattices, two equations

The Pythagorean equation x² + y² = z² lives on the square lattice of the Gaussian integers ℤ[i]. Every primitive solution comes from squaring a Gaussian integer: (p + qi)² gives the triple (p² − q², 2pq, p² + q²). The parity condition p ≢ q (mod 2) ensures coprimality.

But the square lattice isn't the only game in town. The plane admits exactly two regular lattices with a Euclidean domain: the square lattice (ℤ[i]) and the hexagonal lattice (ℤ[ω]), where ω = e2πi/3. Moving to the hexagonal lattice transforms the norm form from a² + b² to a² − ab + b², and the Pythagorean equation becomes:

The Eisenstein–Pythagorean Equation
a² − ab + b² = c²

The change of sign from +ab to −ab reflects the angle change from 90° to 120°. The solutions are Eisenstein–Pythagorean triples, and their structure is richer than the classical case in every way.

The square and hexagonal lattices are the only two regular lattices
admitting a Euclidean domain with nontrivial rotational symmetry.

Squaring on the hexagonal lattice

Just as Pythagorean triples come from squaring Gaussian integers, Eisenstein–Pythagorean triples come from squaring Eisenstein integers. If γ = m + nω with gcd(m,n) = 1 and m > n > 0, then:

Eisenstein Squaring Principle
(m + nω)² → (a, b, c)
a = m² − n²    b = n(2m − n)    c = m² − mn + n²

The triple satisfies a² − ab + b² = c² automatically, because c = Nρ(γ) is the Eisenstein norm, and N(γ²) = N(γ)² = c².

The moral is identical to the Gaussian case: Eisenstein–Pythagorean triples are norms of squares of Eisenstein integers. But the classification of which triples are primitive is governed by a ternary condition, not a binary one, precisely because the ramified prime has norm 3, not 2.

Explore the triples

Pick generator values m and n (with m > n > 0 and gcd(m,n) = 1) and see the resulting Eisenstein–Pythagorean triple, its classification, and conjugate.

5
2

Three classes, not two

In the Gaussian case, parity is binary: p and q are either the same parity (even triple) or different (primitive triple). Two classes. In the Eisenstein case, the "even prime" is β = 1 − ω with norm 3, so the quotient ring ℤ[ω]/⟨β⟩ has three residue classes that are isomorphic to ℤ₃ giving a ternary parity:

Eisenstein Parity (Hadi et al.): For γ = m + nω, the residue class (m + n) mod 3 determines parity: 0 → even, 1 → odd-1, 2 → odd-2.

This ternary parity completely governs which triples are primitive, and within the primitive class, conjugation symmetry (γ ↔ γ̄) creates a canonical/conjugate distinction. The result is a three-way partition:

Non-primitive

m + n ≡ 0 (mod 3)

gcd(a, b, c) = 3. The generator γ is "even" so divisible by β = 1−ω.

Canonical Primitive

m + n ≢ 0, m > 2n

gcd(a, b, c) = 1 with a > b. The natural representative of the conjugate pair.

Conjugate Primitive

m + n ≢ 0, m < 2n

gcd(a, b, c) = 1 with a < b. The a ↔ b mirror of a canonical triple.

Each class contains asymptotically one-third of all coprime parameter pairs. The boundary m = 2n (where a = b) forces m + n = 3n ≡ 0 (mod 3), so it falls into the non-primitive class. This means no self-conjugate primitive triple exists.

No primitive Eisenstein–Pythagorean triple has a = b.
The boundary is necessarily non-primitive.

The parameter sieve

Each cell below represents a coprime pair (m, n) with m > n > 0. The colour shows its classification that is determined entirely by (m + n) mod 3 and the ratio m : 2n. Hover to see the triple.

Canonical (a > b)
Conjugate (a < b)
Non-primitive
gcd ≠ 1

Classification table

The first Eisenstein–Pythagorean triples, sorted by class. Conjugate pairs share the same c-value.

Why parity governs primitivity

The key algebraic fact (Hadi et al., Proposition 1): for γ = m + nω with gcd(m,n) = 1, the gcd of γ with its conjugate γ̄ is either 1 (if γ is odd) or β (if γ is even). When γ is even:

β | γ and β | γ̄, so β² | γ². Since β² = −3ω, this means 3 divides both a and b. And β² | γγ̄ = c, so 3 | c. Hence gcd(a,b,c) = 3.

When γ is odd, gcd(γ, γ̄) = 1. Any prime dividing gcd(a,b,c) would divide both γ² and γγ̄, hence would divide gcd(γ, γ̄)² = 1. Contradiction. So gcd(a,b,c) = 1.

Parity multiplication collapses under squaring: both Odd-1 and Odd-2 generators square to Odd-1 outputs. This is why every primitive triple satisfies a + b ≡ 1 (mod 3) as the two odd fibres merge after squaring.

Square meets hexagon

The two theories are structurally parallel at every level. The question is: why?

Gaussian ℤ[i]

a² + b² = c²
  • Square lattice, 4-fold symmetry
  • Even prime: 1 + i, norm 2
  • Binary parity: ℤ[i]/⟨1+i⟩ ≅ ℤ₂
  • Primitivity: p ≢ q (mod 2)
  • Valid c: primes ≡ 1 (mod 4)

Eisenstein ℤ[ω]

a² − ab + b² = c²
  • Hexagonal lattice, 6-fold symmetry
  • Even prime: 1 − ω, norm 3
  • Ternary parity: ℤ[ω]/⟨1−ω⟩ ≅ ℤ₃
  • Primitivity: m + n ≢ 0 (mod 3)
  • Valid c: primes ≡ 1 (mod 3)
The mod-2 condition and the mod-3 condition
are two instances of the same theorem.

One framework, two manifestations

The parallel is not coincidence. Both theories are governed by the same pair of arithmetic principles, operating in different imaginary quadratic fields:

The Unifying Framework

Two principles

Representability — which primes can appear as c? — is controlled by splitting, determined by quadratic reciprocity. A prime p is representable by the norm form iff p splits or ramifies in OK.

Primitivity — when is the triple coprime? — is controlled by ramification. Reduction modulo the ramified prime 𝔭 gives OK/𝔭 ≅ ℤp. The generator's residue class, equivalently its "parity" determines coprimality:

Primitive triple ⟺ [γ] ≠ 0 in OK/𝔭

Gaussian: 𝔭 = (1+i), p = 2, binary parity. Eisenstein: 𝔭 = (1−ω), p = 3, ternary parity. Same principle, different ramified prime.

Splitting behaviour comes from quadratic reciprocity applied to the discriminant: (−1/p) for ℚ(√−1), giving p ≡ 1 (mod 4); (−3/p) for ℚ(√−3), giving p ≡ 1 (mod 3). Fermat's two-square theorem and its Eisenstein analogue are thus the same theorem, specialised to the two exceptional imaginary quadratic fields with class number 1 and extra units.

The six-fold symmetry

The unit group of ℤ[ω] is {±1, ±ω, ±ω²} — six elements, corresponding to 60° rotations. Every triple (a, b, c) has an orbit of six images under unit multiplication, all with the same c. For (8, 5, 7), the orbit includes (5, 3, 7) and (3, 8, 7) among the positive representatives.

The six images of (8,5)/7 on the Eisenstein unit ellipse X² − XY + Y² = 1. The hexagonal symmetry of the lattice metric makes these six points equidistant in norm.

Which primes can be c?

The representability principle makes this precise. A prime p can appear as the hypotenuse c in a primitive triple iff it's representable by the norm form . That is, iff it splits or ramifies.

GaussianEisenstein
Fieldℚ(√−1)ℚ(√−3)
Ramifiedp = 2p = 3
Splitsp ≡ 1 (mod 4)p ≡ 1 (mod 3)
Inertp ≡ 3 (mod 4)p ≡ 2 (mod 3)
Valid c2, 5, 13, 17, 25, 29 …3, 7, 13, 19, 31, 37 …

Notice 13 appears in both lists: it splits in both rings because 13 ≡ 1 (mod 4) and 13 ≡ 1 (mod 3), i.e., 13 ≡ 1 (mod 12). The two conditions are independent specialisations of the Legendre symbol.

Representability: splitting. Primitivity: ramification.
The same two principles, in both rings.