Advanced maths

Quadratic number field arithmetic calculator with norm and trace

Perform exact arithmetic in a quadratic number field using coordinates a plus b times the square root of a squarefree integer d.

Your numbers

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

Perform exact arithmetic in a quadratic number field using coordinates a plus b times the square root of a squarefree integer d. The result includes sum, difference, product, quotient when defined, conjugation, norm, trace and a minimal polynomial. Rational coordinates are retained exactly, making this different from evaluating a radical as a rounded decimal.

THE FORMULAN(a+b√d)=a²−db²; Tr=2a; conjugate=a−b√d.

A worked example

For a=1+√2 and b=1−√2, the product and the norm of a are −1. The trace of a is two, and its minimal polynomial is T²−2T−1. Division uses multiplication by the conjugate and an exact rational norm.

Good to know

Squarefree nonsquare d within ±100,000 and bounded rational coefficients. Arithmetic stays in Q(√d). A zero second element has no quotient. No general number fields, ideals, class groups or floating square-root approximation as an exact coefficient.

One shared quadratic field

Both input elements use the same squarefree parameter d. For positive d the field has two real embeddings; for negative d it is an imaginary quadratic field.

Rational coefficients can be entered as fractions. A square or zero d does not define the intended quadratic extension and is rejected. Combining radicals from two unrelated quadratic fields generally requires a larger extension, so they cannot be treated as two coordinate pairs in this single-field calculation.

Quadratic conjugates multiply to a rational norm1 + √21 − √2Product = 1 − 2 = −1Trace = 2; minimal polynomial T²−2T−1
For a=1+√2 and b=1−√2, the product and the norm of a are −1. The trace of a is two, and its minimal polynomial is T²−2T−1. Division uses multiplication by the conjugate and an exact rational norm. Static schematic; numerical labels define the example.

Handles exact real or imaginary quadratic fields with rational coefficients; ordinary complex decimals lose algebraic-field structure. The Elliptic curve point addition and order calculator over a prime field offers a complementary calculation under its own stated assumptions.

Multiplication and conjugation

Multiply the two coordinate expressions and replace the square of the radical by d. Conjugation fixes the rational part and changes the sign of the radical part.

It is a field automorphism, not always the same as complex conjugation in an arbitrary real embedding; for an imaginary quadratic field it does coincide with complex conjugation. Keeping the pair of rational coordinates avoids branch ambiguity from a numerical square-root evaluation.

Worked example and mathematical rule

For a=1+√2 and b=1−√2, the product and the norm of a are −1. The trace of a is two, and its minimal polynomial is T²−2T−1. Division uses multiplication by the conjugate and an exact rational norm.

N(a+b√d)=a²−db²; Tr=2a; conjugate=a−b√d.

Norm and trace are rational invariants

Adding an element to its conjugate gives twice the rational coordinate. Multiplying them gives a squared minus d times b squared. These values are rational even when the original element is irrational.

In a real quadratic field the norm can be negative; it is not a Euclidean distance. In an imaginary quadratic field with rational coordinates, a nonzero element has positive norm. The names norm and trace refer to field-theoretic operations.

Division through the conjugate

To divide by a nonzero element, multiply numerator and denominator by the denominator’s conjugate. The denominator becomes its rational norm, allowing exact rational arithmetic in both coordinates.

A zero denominator element has no quotient and is reported accordingly. A tiny decimal approximation of a norm should not be used to decide exact zero; the rational representation makes that decision algebraically. Large fractions can still grow in size, which is why inputs are bounded.

The minimal polynomial distinction

An element with nonzero radical coordinate satisfies the quadratic formed from its trace and norm. If the radical coordinate is zero, the element is rational and its minimal polynomial is linear instead.

Returning the quadratic in that case would give an annihilating polynomial but not the minimal one. The coefficients here are rational and the polynomial is monic. It is not automatically a primitive integer polynomial until denominators are cleared and content conventions are chosen.

What this does not classify

The calculation does not determine the full ring of integers, factor ideals or solve a general Pell equation. An arbitrary rational-coordinate element need not be an algebraic integer.

For some d, the ring of integers uses a half-integer basis, so restricting attention to integer coordinates in this basis would miss valid algebraic integers. Use the exact arithmetic to verify identities, but do not infer unique factorization or integral-basis properties from the field operations alone.

A few questions, answered

Can the norm be negative?

Yes in a real quadratic field; it is a field norm rather than a length.

Can I use two different radicals?

Not in this shared quadratic-field interface.

Why is a rational element’s minimal polynomial linear?

Its degree over the rationals is one even though it is represented inside a quadratic extension.

Are rational coordinates kept exactly?

Yes. Fractions are manipulated with exact integer numerators and denominators.

Find your calculator

Start typing to explore the library.