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
Solution by continued fractions
Fundamental unit by continued fractions
- ExpandCompute the continued fraction expansion of the square root, using exact surd arithmetic.
- Detect the periodThe expansion is periodic; identify the period length.
- Take the convergentThe convergent at the end of the period gives the fundamental solution.
- 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
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.
