Advanced maths

Prime ideal splitting calculator in a quadratic number field

A rational prime can remain prime, split into two prime ideals, or ramify after passing to the ring of integers of a quadratic field.

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

A rational prime can remain prime, split into two prime ideals, or ramify after passing to the ring of integers of a quadratic field. The discriminant controls that behavior. This calculator returns prime-ideal generators, residue degrees and ramification indices rather than only deciding whether a radicand is a quadratic residue. The ideal notation matters: a prime ideal is generally generated by a rational prime together with an algebraic element, and need not be principal as an ideal of the number field.

THE FORMULAf_omega mod p: two roots→split; irreducible→inert; p|D→ramified.

A worked example

For d=5, omega satisfies omega²−omega−1=0. Modulo eleven the roots are four and eight, so (11) splits as (11,omega−4)(11,omega−8). Each factor has norm eleven and their product has norm 121. By contrast, modulo two the polynomial is x²+x+1 and has no root, so two is inert with ideal norm four. At p=5 the repeated root gives a single prime ideal appearing with ramification index two.

Good to know

Quadratic field specified by squarefree radicand; validated integral basis, rational prime at most 10000; include ramified and prime-2 cases; norm/product checks, no general higher-degree number fields.

What this calculation determines

A rational prime can remain prime, split into two prime ideals, or ramify after passing to the ring of integers of a quadratic field. The discriminant controls that behavior.

This calculator returns prime-ideal generators, residue degrees and ramification indices rather than only deciding whether a radicand is a quadratic residue. The ideal notation matters: a prime ideal is generally generated by a rational prime together with an algebraic element, and need not be principal as an ideal of the number field.

Prime ideal splitting worked example in a quadratic number field(11)(11,ω−4)(11,ω−8)norm 11norm 11D=5, roots mod11: 4,8
Scroll across to see the full diagram.
For d=5, omega satisfies omega²−omega−1=0. Modulo eleven the roots are four and eight, so (11) splits as (11,omega−4)(11,omega−8). Each factor has norm eleven and their product has norm 121. By contrast, modulo two the polynomial is x²+x+1 and has no root, so two is inert with ideal norm four. At p=5 the repeated root gives a single prime ideal appearing with ramification index two.

Compare this with the Quadratic number field integral basis and discriminant calculator. Factor a rational prime into prime ideals and provide ideal generators and residue degrees, rather than only an integral basis and discriminant.

Enter the data in the stated convention

Enter a nonsquare squarefree radicand d and a positive rational prime p. When d is congruent to one modulo four, the integral basis uses omega=(1+sqrt(d))/2 and the field discriminant is d.

Otherwise omega=sqrt(d) and the discriminant is 4d. Using sqrt(d) blindly in every case gives the wrong integral ring and can misclassify behavior at two. The calculator verifies squarefreeness and primality before using the corresponding integral defining polynomial.

How the mathematics works

Reduce the defining polynomial of omega modulo p. If it has two distinct roots, each root r gives a prime ideal (p,omega−r), with residue degree one.

An irreducible quadratic gives an inert prime of residue degree two. A repeated root corresponds to ramification, detected equivalently by p dividing the field discriminant. Because a quadratic ring of integers has this explicit integral generator, the same polynomial-root construction handles p=2 without borrowing an odd-prime Legendre-symbol rule that is invalid there.

Work through the default example

For d=5, omega satisfies omega²−omega−1=0. Modulo eleven the roots are four and eight, so (11) splits as (11,omega−4)(11,omega−8).

Each factor has norm eleven and their product has norm 121. By contrast, modulo two the polynomial is x²+x+1 and has no root, so two is inert with ideal norm four. At p=5 the repeated root gives a single prime ideal appearing with ramification index two.

Read the returned certificate

The factor list records both e, the ramification index, and f, the residue degree. The quadratic identity sum e times f equals two gives a useful dimension check.

Ideal norm is p raised to f, while reconstructing the norm of (p) also uses the factor exponent e. The displayed product norm is therefore always p squared. A ramified factor's own norm p should not be mistaken for the norm of the full ideal (p), in which that factor appears twice.

Assumptions and supported limits

The prime-ideal generators describe integral ideals, not a factorization of the integer p into individual algebraic integers. Such an element factorization can fail even when an ideal splits, because the ring may have a nontrivial class group.

This page does not assert unique factorization of elements. It also does not extend its defining-polynomial rule to arbitrary higher-degree orders, where an index obstruction can require additional care. The explicit quadratic integral basis avoids that particular ambiguity in the supported scope.

Use the result with related calculations

Use this result alongside a quadratic-field arithmetic or ideal-class calculation. Preserve the basis convention when transferring generators: replacing omega with sqrt(d) changes coordinate expressions even though the underlying field is the same.

Negative squarefree d gives an imaginary quadratic field and positive nonsquare d gives a real one; the local splitting procedure works in both cases. The bound on p keeps direct residue-root enumeration transparent and fast, rather than claiming a large-prime number-field factoring service. The root r used in the generator pair is a residue of omega, not generally a residue of sqrt(d). In the d=5 example, substituting omega=4 into sqrt(d)=2omega−1 yields seven modulo eleven, and its square is five. The other omega root eight gives sqrt(d)=four. This conversion is a useful hand check when comparing tables that use different quadratic generators; their residue labels can differ while specifying the same two prime ideals.

A few questions, answered

Why is the integral basis sometimes different?

For d congruent to one modulo four, the full ring of integers uses (1+sqrt(d))/2 rather than sqrt(d).

Does split mean p factors into algebraic integers?

Not necessarily. Prime ideals can split even when they are nonprincipal, so ideal and element factorization are distinct.

Is the prime two supported?

Yes. The integral defining polynomial is reduced modulo two directly, including repeated-root and irreducible cases.

Why does every product norm equal p squared?

The ideal (p) has norm p² in a quadratic field; ramification exponents are included in its factorization.

Find your calculator

Start typing to explore the library.