← LibraryThe Fundamental Unit of a Real Quadratic FieldEngineering · MathematicsLesson 310/385← PrevNext →
ArticlePublished 7 Aug 20262 min readBy Kevin Joginfundamental unitreal quadraticPell equationcontinued fraction

Quadratic Fields

The Fundamental Unit of a Real Quadratic Field

Computing the fundamental unit of a real quadratic field by continued fractions, its connection to the Pell equation, and its size.

Engineering / MathematicsQuadratic Fields2 min readKV-MATH-0607

A real quadratic field has unit rank one, so its unit group is generated by a single fundamental unit together with plus and minus one. Finding it is the classical Pell equation problem.

The Pell equation

x^2 - m y^2 = 1 (or -1)Solutions correspond to units of the order generated by the square root of m.

Solution by continued fractions

Fundamental unit by continued fractions

  1. ExpandCompute the continued fraction expansion of the square root, using exact surd arithmetic.
  2. Detect the periodThe expansion is periodic; identify the period length.
  3. Take the convergentThe convergent at the end of the period gives the fundamental solution.
  4. Adjust for the discriminantAccount for the case split in the integral basis, which changes which solution is fundamental in the field.

Size

This is why the regulator, the logarithm of the fundamental unit, is the quantity usually reported. The unit itself may be impractical to write down.

The order-versus-field distinction

Cost

Period length ~ sqrt(D) in the worst caseMaking the classical method sub-exponential only in a weak sense.

Relation to the general case

For fields of higher unit rank there is no continued fraction analogue that works. Units are found through relation collection — see regulator recovery.

Source. Henri Cohen, A Course in Computational Algebraic Number Theory, Springer GTM 138 — 5.4. Structural reference unverified: the source file was not available during authoring; chapter and section numbers are taken from the published edition and have not been checked against a physical copy.

Continue learning

Reduction of Indefinite Forms and the Cycle StructureArticle · MathematicsNEXT LESSON →Sub-exponential Class Group Computation for Quadratic FieldsArticle · MathematicsClass Numbers from Analytic Class Number FormulasArticle · MathematicsComputing the Structure of Residue RingsArticle · Mathematics