← LibraryDiscriminants and Integral BasesEngineering · MathematicsLesson 4/7← PrevNext →
GuidePublished 6 Aug 20265 min readBy Kevin JoginComputational Number TheoryNumber Fields IField DiscriminantIntegral Basis
Skip to the main content

MathematicsNumber Fields I

Discriminants and Integral Bases

Finding the ring of integers — the computation that inherits the difficulty of integer factorisation.

Executive summary

The gap between ℤ[θ] and ℤK is measured by a square

The obvious ring inside a number field is ℤ[θ], generated by the defining root. It is rarely the full ring of integers. The two differ by a finite index whose square relates the polynomial discriminant to the field discriminant, so identifying ℤK means finding the square factors of disc(T) — a factoring problem, and the reason this step dominates the cost of setting up a number field.

Learning objectives

  • Define the discriminant of a basis and of a field.
  • Relate the polynomial discriminant to the field discriminant via the index.
  • Explain why the maximal order computation is as hard as factoring.
  • Apply the Dedekind criterion to test maximality at a prime.
  • Interpret the discriminant as the ramification locus.

Section 01Discriminant of a basis

For a ℚ-basis (ω1, …, ωn) of K, the discriminant is

disc(ω1, …, ωn) = det(Tr(ωiωj)) = det(σij))2

Changing basis by a matrix U multiplies the discriminant by (det U)2. For two integral bases U is unimodular, so the discriminant is the same — it is an invariant of the field, written dK.

dKfield discriminant — a basis-independent invariant
signnegative exactly when r<sub>2</sub> is odd
≡ 0 or 1modulo 4, by Stickelberger's theorem

Section 02The index and the factoring obstruction

The equation order ℤ[θ] sits inside ℤK with finite index, and

disc(T) = [ℤK : ℤ[θ]]2 · dK

So the polynomial discriminant — easy to compute by a resultant — equals the field discriminant times a perfect square. Extracting dK requires knowing which square divisors of disc(T) belong to the index.

This is where the difficulty lives

Deciding whether a large square divides the index requires knowing the factorisation of disc(T), which can be an enormous integer even for modest defining polynomials. No algorithm is known that determines ℤK unconditionally without this factorisation. In practice systems factor as far as is feasible and return an order that is maximal at all primes that were resolved — and this qualification must be recorded with the result.

  1. Stage 01Compute disc(T)By the subresultant algorithm — exact and fast.
  2. Stage 02Factor the square partTrial division, then Pollard ρ, ECM and the quadratic sieve as needed. The bottleneck.
  3. Stage 03Test each primeFor each p whose square divides disc(T), decide whether ℤ[θ] is maximal at p.
  4. Stage 04Enlarge where neededWhere it is not, compute the p-maximal overorder and merge into a single integral basis.

Section 03The Dedekind criterion

Before doing expensive work at a prime p, a cheap test decides whether ℤ[θ] is already maximal there. The criterion works entirely with polynomial factorisation modulo p.

AlgorithmDedekind criterion at pin: T, prime p  →  out: whether ℤ[θ] is p-maximal
  1. Factor T modulo p as ∏ g̅iei.
  2. If every ei = 1, then p does not divide the index — ℤ[θ] is maximal at p. Stop.
  3. Otherwise set g ← ∏ gi and h ← T/g computed modulo p, using arbitrary lifts.
  4. Set F ← (gh − T)/p, reduced modulo p.
  5. ℤ[θ] is maximal at p if and only if gcd(F̅, g̅, h̅) = 1 in Fp[x].
Cost is one factorisation modulo p and a few GCDs — negligible next to computing the p-maximal order, so it is always run first.
Only squares matter

A prime can divide the index only if its square divides disc(T). The squarefree part of the discriminant can therefore be ignored entirely, which usually removes most of the factoring burden before it begins.

Section 04Discriminant as ramification locus

A rational prime ramifies in K — meaning some prime ideal above it occurs with exponent greater than 1 — exactly when it divides dK. Only finitely many primes ramify, and the discriminant lists them.

Consequence

Prime decomposition

For unramified p, factoring T modulo p directly gives the prime ideals above p — the simple algorithm applies.

Consequence

Minkowski's theorem

|dK| > 1 for every field other than ℚ, so some prime always ramifies in a non-trivial extension.

Consequence

Field tabulation

Discriminant bounds constrain the fields of a given degree and signature, which is how number field tables are organised and searched.

ReferenceFrequently asked questions

Can the ring of integers be computed without factoring the discriminant?

Not unconditionally by any known method. There are algorithms that produce an order maximal at all primes below a chosen bound, which is often sufficient in practice, but the result must then be reported as conditional on the unfactored part being squarefree.

Is Z[theta] ever the full ring of integers?

Frequently — it happens exactly when the polynomial discriminant equals the field discriminant, that is when the index is 1. It is guaranteed for cyclotomic fields with the standard generator, and for quadratic fields when D is squarefree and congruent to 2 or 3 mod 4.

What does the Hermite&ndash;Minkowski theorem tell me?

That only finitely many number fields have discriminant below any given bound, and that the discriminant grows with the degree. This is what makes exhaustive tabulation of small-discriminant fields a finite and well-posed computation.

NavigateContinue in this stream

Curated next steps from this page. The site also surfaces algorithmically related reading below.

ProvenanceSources and further reading

This page is an original KEVOS explanatory article. It presents the underlying mathematics — definitions, algorithms, complexity results and selection criteria — in KEVOS editorial voice. No text is reproduced from any copyrighted source. Where numerical tables are relevant, KEVOS links to live authoritative databases rather than republishing static values.

Page ID
KV-MATH-0027
Taxonomy
ENG-MATH — Engineering / Mathematics
Collection
COL-CANT-001
Topic stream
CANT-NUMBER-FIELDS
Version
1.1.0 / content 2026.08
Last reviewed
2026-08-06

Continue learning

Trace, Norm and the Characteristic PolynomialGuide · MathematicsNEXT LESSON →Orders and Ideals in Number FieldsGuide · MathematicsRepresenting Algebraic NumbersGuide · MathematicsDecomposition of Prime Numbers in Number FieldsGuide · Mathematics