Advanced maths

Eisenstein integer prime factorization calculator

Eisenstein integers have the form a+b omega, where omega is a primitive cube root of unity satisfying omega²+omega+1=0.

Your numbers

Exact input in the convention explained below.
Exact input in the convention explained below.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Eisenstein integers have the form a+b omega, where omega is a primitive cube root of unity satisfying omega²+omega+1=0. Their lattice is triangular, unlike the square lattice of Gaussian integers. The norm a²−ab+b² is a nonnegative ordinary integer and multiplies under products. This page factors an entered Eisenstein integer into Eisenstein primes together with a unit, retaining enough coordinate information to multiply the answer back to the original input exactly.

THE FORMULAN(a+bω)=a²−ab+b²; ω²+ω+1=0.

A worked example

The default input is 5+omega, whose norm is 25−5+1=21. Both rational primes three and seven are relevant. Exact coordinate division separates norm-three and norm-seven factors, with a possible remaining unit depending on the chosen associates. The product of factor norms, counted with multiplicities, equals 21. More importantly, multiplying their coordinate pairs and the unit reproduces (5,1). That second check distinguishes the correct conjugate factor from another element having the same norm.

Good to know

Nonzero Eisenstein integers a+b omega with coordinates±10000 and norm≤1000000. Exact coordinate factorization, omega²+omega+1=0, deterministic associate representatives and full product check; no large-integer service.

What this calculation determines

Eisenstein integers have the form a+b omega, where omega is a primitive cube root of unity satisfying omega²+omega+1=0. Their lattice is triangular, unlike the square lattice of Gaussian integers.

The norm a²−ab+b² is a nonnegative ordinary integer and multiplies under products. This page factors an entered Eisenstein integer into Eisenstein primes together with a unit, retaining enough coordinate information to multiply the answer back to the original input exactly.

Eisenstein integer prime factorization worked exampleEisenstein triangular latticeN(5+ω)=21=3×7
Scroll across to see the full diagram.
The default input is 5+omega, whose norm is 25−5+1=21. Both rational primes three and seven are relevant. Exact coordinate division separates norm-three and norm-seven factors, with a possible remaining unit depending on the chosen associates. The product of factor norms, counted with multiplicities, equals 21. More importantly, multiplying their coordinate pairs and the unit reproduces (5,1). That second check distinguishes the correct conjugate factor from another element having the same norm.

Compare this with the Gaussian integer prime factorization calculator. Factor a plus b omega in the triangular Eisenstein integer lattice, whose units and splitting law differ from Gaussian integers.

Enter the data in the stated convention

Enter signed integer coordinates a and b. The zero element has no finite prime factorization and is rejected. Units have norm one and return without nonunit prime factors.

The implementation bounds the norm rather than only the separate coordinates, because trial division cost depends on the norm. Negative coordinates are legitimate lattice points, not a request to factor an absolute value. Factoring only the positive ordinary integer norm would discard which conjugate prime divides the entered algebraic integer.

How the mathematics works

Rational primes follow three patterns. Three ramifies through an Eisenstein prime of norm three. A prime congruent to two modulo three stays prime and has Eisenstein norm p squared.

A prime congruent to one modulo three splits into conjugate factors of norm p. The algorithm searches an exact lattice representative for the split factor and repeatedly tests coordinate divisibility using conjugation and the norm. No floating complex-number division is used to decide whether a quotient remains an Eisenstein integer.

Work through the default example

The default input is 5+omega, whose norm is 25−5+1=21. Both rational primes three and seven are relevant. Exact coordinate division separates norm-three and norm-seven factors, with a possible remaining unit depending on the chosen associates.

The product of factor norms, counted with multiplicities, equals 21. More importantly, multiplying their coordinate pairs and the unit reproduces (5,1). That second check distinguishes the correct conjugate factor from another element having the same norm.

Read the returned certificate

The output lists the factor coordinates, exponent and norm for each selected prime. Associate representatives are deterministic but are not promised to match another program's preferred angular sector.

Multiplying a prime by any of the six units gives an equally valid associate; compensating in the overall unit leaves the represented element unchanged. Therefore compare reconstructed products and prime norms before interpreting different-looking factor lists as contradictory factorizations. Factor order likewise has no mathematical significance because the ring is commutative.

Assumptions and supported limits

Unique factorization holds in the Eisenstein integer ring, but the implementation still checks the reconstructed product to catch arithmetic or representative errors. Its trial search is deliberately bounded and is not appropriate for cryptographic-size inputs.

The displayed factors are algebraic integers, not ideals in a general quadratic ring. Extending the same algorithm to a different quadratic radicand would be unsafe: many such rings are not Euclidean and some do not have unique factorization of elements at all.

Use the result with related calculations

Use the page when working with cubic-root-of-unity arithmetic, triangular-lattice divisibility or norm identities. The basis convention is essential: replacing omega with its conjugate sends a+b omega to (a−b)−b omega and conjugates the prime factors.

A rational integer input has b=0, but its Eisenstein factorization may still contain nonreal factors when it has rational prime divisors congruent to one modulo three. Retaining the final unit makes the factorization an equality rather than an equality only up to associates. Conjugation sends omega to omega squared, so the conjugate of a+b omega has coordinates (a−b,−b). Multiplying these two coordinate pairs yields (N,0), which is a direct way to verify the norm convention before factoring anything. For the default element the conjugate is 4−omega, and their product is the ordinary integer twenty-one. A sign error in the mixed term would break this identity and invalidate every later divisibility decision.

A few questions, answered

How many units are there?

There are six units in the Eisenstein integer ring, all with norm one.

Why can another program show different prime coordinates?

It may choose different unit associates or conjugation conventions; compare the reconstructed element and prime norms.

Can I factor zero?

No. Zero has no finite prime factorization, while nonzero units return an empty nonunit factor list.

Is factoring the norm sufficient?

No. The norm loses conjugate and unit information; exact coordinate divisibility determines factors of the entered element.

Find your calculator

Start typing to explore the library.