In mathematics, a quadratic irrational number (also known as a quadratic irrational or quadratic surd) is an irrational number that is the solution to some quadratic equation with rational coefficients which is irreducible over the rational numbers. Since fractions in the coefficients of a quadratic equation can be cleared by multiplying both sides by their least common denominator, a quadratic irrational is an irrational root of some quadratic equation with integer coefficients. The quadratic irrational numbers, a subset of the complex numbers, are algebraic numbers of degree 2, and can therefore be expressed as

for integers ; with , and non-zero, and with square-free. When is positive, we get real quadratic irrational numbers, while a negative gives complex quadratic irrational numbers which are not real numbers. This defines an injection from the quadratic irrationals to quadruples of integers, so their cardinality is at most countable; since on the other hand every square root of a prime number is a distinct quadratic irrational, and there are countably many prime numbers, they are at least countable; hence the quadratic irrationals are a countable set.

Quadratic irrational number

Quadratic irrationals are used in field theory to construct field extensions of the field of rational numbers . Given the square-free integer , the augmentation of by quadratic irrationals using produces a quadratic field ). For example, the inverses of elements of ) are of the same form as the above algebraic numbers:

Quadratic irrational number

Quadratic irrationals have useful properties, especially in relation to continued fractions, where we have the result that all real quadratic irrationals, and only real quadratic irrationals, have periodic continued fraction forms. For example

Quadratic irrational number

The periodic continued fractions can be placed in one-to-one correspondence with the rational numbers. The correspondence is explicitly provided by Minkowski's question mark function, and an explicit construction is given in that article. It is entirely analogous to the correspondence between rational numbers and strings of binary digits that have an eventually-repeating tail, which is also provided by the question mark function. Such repeating sequences correspond to periodic orbits of the dyadic transformation (for the binary digits) and the Gauss map for continued fractions.

Real quadratic irrational numbers and indefinite binary quadratic forms

We may rewrite a quadratic irrationality as follows:

It follows that every quadratic irrational number can be written in the form

This expression is not unique.

Fix a non-square, positive integer congruent to or modulo , and define a set as

Every quadratic irrationality is in some set , since the congruence conditions can be met by scaling the numerator and denominator by an appropriate factor.

A matrix

with integer entries and can be used to transform a number in . The transformed number is

If is in , then is too.

The relation between and above is an equivalence relation. (This follows, for instance, because the above transformation gives a group action of the group of integer matrices with determinant 1 on the set .) Thus, partitions into equivalence classes. Each equivalence class comprises a collection of quadratic irrationalities with each pair equivalent through the action of some matrix. Serret's theorem implies that the regular continued fraction expansions of equivalent quadratic irrationalities are eventually the same, that is, their sequences of partial quotients have the same tail. Thus, all numbers in an equivalence class have continued fraction expansions that are eventually periodic with the same tail.

There are finitely many equivalence classes of quadratic irrationalities in . The standard proof of this involves considering the map from binary quadratic forms of discriminant to given by

A computation shows that is a bijection that respects the matrix action on each set. The equivalence classes of quadratic irrationalities are then in bijection with the equivalence classes of binary quadratic forms, and Lagrange showed that there are finitely many equivalence classes of binary quadratic forms of given discriminant.

Through the bijection , expanding a number in in a continued fraction corresponds to reducing the quadratic form. The eventually periodic nature of the continued fraction is then reflected in the eventually periodic nature of the orbit of a quadratic form under reduction, with reduced quadratic irrationalities (those with a purely periodic continued fraction) corresponding to reduced quadratic forms.