Quadratic Fields

This article briefly introduces quadratic fields. Two important related examples are Gaussian integers and Eisenstein integers, which can be used to solve problems in number theory.

Basic Concepts

This section first introduces a number of basic concepts. Quadratic fields and rings of quadratic integers are special cases of the more general notions of algebraic field extensions and rings of algebraic integers, respectively. Thus, nearly all definitions and results in this section can be appropriately generalized to the general setting. The discussion here is restricted to the special case of quadratic fields, without introducing too much algebraic number theory.

Quadratic Fields

Every element of a quadratic field is a quadratic algebraic number.

A quadratic algebraic number (quadratic algebraic number) is a complex number that can be expressed as a root of an integer-coefficient quadratic equation. From the quadratic formula, every quadratic algebraic number can be written in the form

a+bda+b\sqrt{d}

where aa and bb are rational numbers, and dd is a square-free integer. Every number of this form is also a quadratic algebraic number. Quadratic algebraic numbers can be divided into rational numbers and quadratic irrational numbers (quadratic irrational number). Clearly, a quadratic irrational has a unique representation in the form above.

For any square-free integer d≠0,1d\neq 0,1, it can be verified that the set Q(d)={a+bd:a,b∈Q}Q(\sqrt{d})=\{a+b\sqrt{d}:a,b\in\mathbf Q\} is closed under addition, subtraction, multiplication, and division. Since a set closed under the four arithmetic operations is called a field, the set Q(d)Q(\sqrt{d}) is called a quadratic field (quadratic field). Every quadratic field contains all rational numbers, so each is a quadratic extension of the field of rational numbers Q\mathbf Q. When d>0d>0, every number in the quadratic field Q(d)\mathbf Q(\sqrt{d}) is real, and Q(d)\mathbf Q(\sqrt{d}) is called a real quadratic field; when d<0d<0, every non-rational number in the quadratic field is complex, and Q(d)\mathbf Q(\sqrt{d}) is called an imaginary quadratic field.

Conjugation and Norm

The conjugate (conjugate) of the quadratic irrational a+bda+b\sqrt{d} is defined as a−bda-b\sqrt{d}. The conjugate quadratic irrationals are the two distinct roots of the same integer-coefficient quadratic equation. In a real quadratic field, the conjugate of a quadratic irrational is not the same as its complex conjugate; in an imaginary quadratic field, the conjugate of a quadratic irrational is its complex conjugate. Finally, the conjugate of a rational number is defined to be the number itself. This defines conjugation for all quadratic algebraic numbers.

An equation obtained using addition, subtraction, multiplication, and division in any quadratic field cannot distinguish between conjugates. In other words, replacing every number in an equation by its conjugate—that is, changing the sign of every quadratic radical—leaves the equation valid.

Using conjugation, we can construct several maps from quadratic algebraic numbers to rational numbers, converting discussions about quadratic algebraic numbers into discussions about rational numbers. The simplest is the trace (trace) of a quadratic algebraic number α\alpha: the sum of a number and its conjugate, denoted by tr⁡(α)\operatorname{tr}(\alpha). Since this is just 22 times its rational part, it does not provide much information.

More useful is the norm of a quadratic algebraic number. The product of a quadratic algebraic number and its conjugate is called its norm (norm):

N(a+bd)=a2−db2N(a+b\sqrt{d})=a^2-db^2

Clearly, in an imaginary quadratic field, the norm agrees with the square of the complex modulus; in a real quadratic field, however, the two notions do not agree.

The norm has useful properties. First, because dd is square-free, it cannot be a square, so only 00 has norm 00. Second, the norm preserves multiplication and division:

N(a1+b1d)N(a2+b2d)=N((a1+b1d)(a2+b2d)),N(a_1+b_1\sqrt{d})N(a_2+b_2\sqrt{d})=N((a_1+b_1\sqrt{d})(a_2+b_2\sqrt{d})), N(a1+b1d)N(a2+b2d)=N(a1+b1da2+b2d).\frac{N(a_1+b_1\sqrt{d})}{N(a_2+b_2\sqrt{d})}=N\left(\frac{a_1+b_1\sqrt{d}}{a_2+b_2\sqrt{d}}\right).

Also, the reciprocal of a quadratic algebraic number is its conjugate divided by its norm:

1a+bd=a−bdN(a+bd).\dfrac{1}{a+b\sqrt{d}}=\frac{a-b\sqrt{d}}{N(a+b\sqrt{d})}.

By Vieta's formulas, a quadratic algebraic number α\alpha is in fact a root of the equation

x2−tr⁡(α)x+N(α)=0x^2-\operatorname{tr}(\alpha)x+N(\alpha)=0

The discriminant of this equation is also called the discriminant (discriminant) of the quadratic algebraic number, denoted by disc⁡(α)\operatorname{disc}(\alpha), and has value 4db24db^2.

Matrix Representation

Like complex numbers, quadratic algebraic numbers can also be represented by matrices. Let d≠0,1d\neq 0,1 be a square-free integer and let a,ba,b be rational numbers. Then a+bda+b\sqrt{d} can be represented by the matrix

(abdba).\begin{pmatrix}a & b \\ db & a\end{pmatrix}.

It can be verified that the results of addition, subtraction, multiplication, and division of this matrix correspond to the results of the same operations on the quadratic algebraic number. The trace and determinant of the matrix correspond respectively to the trace and norm of the quadratic algebraic number, and the discriminant of the matrix's characteristic polynomial is the discriminant of the quadratic algebraic number. The adjugate matrix corresponds to the conjugate of the quadratic algebraic number.

Ring of Quadratic Integers

A particularly important class of quadratic algebraic numbers is the quadratic integers. A quadratic integer (quadratic integer) is a complex number that can be expressed as a root of a monic integer-coefficient quadratic equation. Its only difference from a quadratic algebraic number is the restriction on the coefficient of the quadratic term. By the quadratic formula, the two roots of x2+px+q=0x^2+px+q=0 are

−p±p2−4q2.\frac{-p\pm\sqrt{p^2-4q}}{2}.

If pp is even, namely p=2kp=2k, the two roots can be written as −k±k2−q-k\pm\sqrt{k^2-q}; if pp is odd, namely p=2k+1p=2k+1, the two roots can be written as −k−1±4(k2+k−q)+12-k-\dfrac{1\pm\sqrt{4(k^2+k-q)+1}}{2}. These two cases show that every quadratic integer in Q(d)\mathbf Q(\sqrt{d}) must be expressible in the form

a+bωa+b\omega

where aa and bb are integers, and

ω={1+d2,d≡1(mod4),d,d≡2,3(mod4).\omega=\begin{cases} \dfrac{1+\sqrt{d}}{2}, & d\equiv 1\pmod 4,\\ \sqrt{d}, & d\equiv 2,3\pmod 4. \end{cases}

Conversely, every complex number of this form is a quadratic integer. Every non-rational quadratic integer has a unique representation in this form.

The set of all quadratic integers in the quadratic field Q(d)\mathbf Q(\sqrt{d}) is denoted by Z[ω]\mathbf Z[\omega]. Since this set is closed under addition, subtraction, and multiplication, it is also called the ring of quadratic integers (quadratic integer ring). The rational numbers in the ring of quadratic integers are exactly all integers. Taking the set of all quotients of quadratic integers in Z[ω]\mathbf Z[\omega] gives the corresponding quadratic field Q(d)\mathbf Q(\sqrt{d}).

The trace, norm, and discriminant of a quadratic integer are all integers. The minimum discriminant among all quadratic irrationals in the ring of quadratic integers Z[ω]\mathbf Z[\omega] is also called the discriminant of the corresponding quadratic field Q(d)\mathbf Q(\sqrt{d}). When d≡1(mod4)d\equiv 1\pmod 4, the discriminant is dd; when d≡2,3(mod4)d\equiv 2,3\pmod 4, it is 4d4d.

Divisibility, Associates, and Units

As with integers, a theory of divisibility can also be developed for quadratic integers. The discussion must of course take place within a single ring of quadratic integers.

For quadratic integers α\alpha and β\beta in the ring Z[ω]\mathbf Z[\omega], if there is a quadratic integer γ\gamma in the same ring such that β=αγ\beta=\alpha\gamma, then α\alpha is said to divide β\beta, written α∣β\alpha\mid\beta. Divisibility is a partial order relation on the ring of quadratic integers. If both α∣β\alpha\mid\beta and β∣α\beta\mid\alpha hold, then α\alpha and β\beta can be regarded as the same number for the purposes of divisibility theory; they are called associates (associate). The associate relation is an equivalence relation on the ring of quadratic integers.

In the divisibility theory of integers, being associates simply means being opposites. Divisibility theory usually only needs to consider natural numbers, without considering negative numbers. For quadratic integers, however, the associate relation can be more complicated. If quadratic integers α\alpha and β\beta are associates, then there are quadratic integers γ\gamma and δ\delta such that β=αγ\beta=\alpha\gamma and α=βδ\alpha=\beta\delta. Thus, the quotient γ\gamma of β\beta and α\alpha must be a special quadratic integer: there is a quadratic integer δ\delta such that γδ=1\gamma\delta=1. Such a quadratic integer γ\gamma is called a unit (unit), also called an invertible element. Two quadratic integers are associates if and only if their quotient is a unit. Therefore, understanding the associate relation in a ring of quadratic integers requires understanding the structure of its units.

Since the norm preserves multiplication and the norm of a quadratic integer is always an integer, the norm can convert divisibility among quadratic integers into divisibility among integers. That is, if α∣β\alpha\mid\beta, then necessarily N(α)∣N(β)N(\alpha)\mid N(\beta). Likewise, a quadratic integer α\alpha is a unit if and only if its norm satisfies N(α)=±1N(\alpha)=\pm 1. Thus, to obtain all units in the ring of quadratic integers Z[ω]\mathbf Z[\omega], it suffices to solve the Diophantine equation:

N(a+bd)=1,N(a+b\sqrt{d})=1,

where the norm is given by

N(a+bd)={a2+ab+1−d4b2,d≡1(mod4),a2−db2,d≡2,3(mod4).N(a+b\sqrt{d})=\begin{cases} a^2+ab+\dfrac{1-d}{4}b^2, & d\equiv 1\pmod 4,\\ a^2-db^2, & d\equiv 2,3\pmod 4. \end{cases}

For an imaginary quadratic ring of integers, namely when d<0d<0, the norm is necessarily a nonnegative integer. It is easy to verify that for every negative square-free d≠−1,−3d\neq -1,-3, the only solutions are (a,b)=(±1,0)(a,b)=(\pm 1,0). Thus, except for Z[−1]\mathbf Z[\sqrt{-1}] and Z[1+−32]\mathbf Z[\frac{1+\sqrt{-3}}{2}], the only units in an imaginary quadratic ring of integers are ±1\pm 1. Let i=−1\mathrm{i}=\sqrt{-1}. Then the ring of quadratic integers Z[i]\mathbf Z[\mathrm{i}] is also called the ring of Gaussian integers, and its set of units is {±1,±i}\{\pm 1,\pm\mathrm{i}\}. Let ω=1+−32\omega=\frac{1+\sqrt{-3}}{2}. Then the ring of quadratic integers Z[ω]\mathbf Z[\omega] is also called the ring of Eisenstein integers, and its set of units is {±1,±ω,±ω2}\{\pm 1,\pm\omega,\pm\omega^2\}.

For a real quadratic ring of integers, namely when d>0d>0, the situation is more complicated and can be reduced to a discussion of the corresponding Pell equation. The relevant results about Pell equations show that the set of all units can then be written as {±uk:k∈Z}\{\pm u^k:k\in\mathbf Z\}, where uu is called a fundamental unit (fundamental unit). A fundamental unit can be found by solving the corresponding Pell equation. A fundamental unit is not unique: if uu is a fundamental unit, then its conjugate uˉ\bar u, as well as −u-u and −uˉ-\bar u, are also fundamental units.

The structure of units in rings of quadratic integers generalizes to general rings of algebraic integers. The Dirichlet unit theorem in algebraic number theory states that the units of every ring of algebraic integers form a finitely generated Abelian group, and the theorem also gives the rank of this group.

The greatest common divisor, division with remainder, Bezout's theorem, the unique factorization theorem, and other parts of the divisibility theory of integers can all be generalized to some or all rings of quadratic integers. Whether such a generalization is possible for a particular ring of quadratic integers reflects how closely its properties resemble those of the ring of integers. The unique factorization theorem does not hold in every ring of quadratic integers; among the rings where it does hold, only some also support division with remainder. For a discussion of these topics, see the ring of quadratic integers section in the ring theory chapter or the relevant books.

Unique Factorization

If the unique factorization theorem for integers can be generalized to rings of quadratic integers, it should have the following form: every quadratic integer in the ring Z[ω]\mathbf Z[\omega] can be written as a product of several irreducible elements, and this factorization is unique up to associates and order. An irreducible element is a quadratic integer that cannot be further factored as a product of non-units, analogous to a prime in the unique factorization theorem for integers. As mentioned above, the unique factorization theorem does not hold in every ring of quadratic integers.

For example, in Z[−5]\mathbf Z[\sqrt{-5}] we have the factorization 9=3×3=(2+−5)×(2−−5)9=3\times 3=(2+\sqrt{-5})\times(2-\sqrt{-5}), but 33 and 2±−52\pm\sqrt{-5} are all already irreducible, so the factorization is not unique. To show that these three numbers are irreducible, we can examine their norms: all of their norms are 99. If they could be factored into a product of non-units, the norms of the resulting factors would have to be 33, but there is no quadratic integer of norm 33 in Z[−5]\mathbf Z[\sqrt{-5}].

The main reason that unique factorization fails in general rings of quadratic integers is that factorization using only quadratic integers is not sufficiently fine. For example, when factoring the product abcdabcd, if the only available basic elements are {ab,cd,ac,bd}\{ab,cd,ac,bd\}, the resulting factorization is naturally not unique; to obtain unique factorization, we must consider {a,b,c,d}\{a,b,c,d\} as well. In a ring of quadratic integers, the finer structure than quadratic integers is the ideal of the ring of quadratic integers. Mapping a quadratic integer to its corresponding principal ideal embeds its associate equivalence class into the set of ideals, so factorization of integers is just a special case of factorization of ideals. If we consider factorization of ideals in a ring of quadratic integers, it can be proved that every ideal in every ring of quadratic integers has a unique factorization as a product of prime ideals. This means that rings of quadratic integers are all Dedekind domains. More generally, all rings of algebraic integers are Dedekind domains.

If the unique factorization theorem holds in a ring of quadratic integers, then its prime ideals correspond one-to-one with irreducible elements (equivalence classes under association). Therefore, for this class of rings, factoring an ideal into prime ideals is equivalent to factoring a quadratic integer into irreducibles. In this case, irreducible elements are also called prime elements, corresponding to the notion of primes among the integers. The discussion below uses prime ideals and related concepts. Readers unfamiliar with these concepts may replace them word for word with prime elements; the statements are then also correct whenever the unique factorization theorem holds.

To fully understand unique factorization in a general ring of quadratic integers Z[ω]\mathbf Z[\omega], we need to know which prime ideals occur in Z[ω]\mathbf Z[\omega]. First, every prime ideal in Z[ω]\mathbf Z[\omega] divides its norm (more precisely, the principal ideal generated by its norm). Factoring its norm over the integers as a product of primes, the unique factorization theorem implies that this prime ideal must divide one of those prime factors (more precisely, its principal ideal). Therefore, prime ideals in Z[ω]\mathbf Z[\omega] arise by further factoring the rational primes. To list all prime ideals in Z[ω]\mathbf Z[\omega], it is enough to give the unique factorization in Z[ω]\mathbf Z[\omega] of the prime pp in Z\mathbf Z (more precisely, of its principal ideal). Since the norm of the prime pp (of the principal ideal) in Z[ω]\mathbf Z[\omega] is p2p^2, and factoring it into prime ideals means that the norm of a prime ideal must divide p2p^2, it can only be pp or p2p^2. Thus there are only three possibilities:

  1. pp is inert (inert) in Z[ω]\mathbf Z[\omega], meaning that (p)(p) remains a prime ideal in Z[ω]\mathbf Z[\omega];
  2. pp splits (split) in Z[ω]\mathbf Z[\omega], meaning that (p)(p) can be written as the product of two distinct conjugate prime ideals in Z[ω]\mathbf Z[\omega];
  3. pp ramifies (ramify) in Z[ω]\mathbf Z[\omega], meaning that (p)(p) can be written as the square of a prime ideal in Z[ω]\mathbf Z[\omega].

It can further be proved that, to determine which of these three cases a prime pp belongs to, it is enough to compute the Kronecker symbol (Dp)\left(\dfrac{D}{p}\right) for the discriminant DD of the quadratic field containing Z[ω]\mathbf Z[\omega] and the prime pp. The three cases correspond respectively to the three values −1-1, +1+1, and 00 of the Kronecker symbol. When pp is odd, the Kronecker symbol is the Legendre symbol, and the three cases correspond respectively to DD being a quadratic nonresidue modulo pp, DD being a quadratic residue modulo pp, and pp dividing DD. When p=2p=2, the three cases correspond respectively to D≡±3(mod8)D\equiv \pm 3\pmod 8, D≡±1(mod8)D\equiv \pm 1\pmod 8, and 22 dividing DD.

Gaussian Integers

In this section, let i=−1\mathrm{i}=\sqrt{-1} denote the imaginary unit. The quadratic field Q(i)\mathbf Q(\mathrm{i}) is also called the Gaussian field; it is also the fourth cyclotomic field. The corresponding ring of quadratic integers Z[i]\mathbf Z[\mathrm{i}] is also called the ring of Gaussian integers, whose elements are called Gaussian integers (Gaussian integer). The ring has four units, namely ±1\pm 1 and ±i\pm\mathrm{i}, so every nonzero Gaussian integer has four associates, including itself. In the complex plane, Gaussian integers represent all lattice points with integer coordinates, and the Gaussian integer norm N(a+bi)=a2+b2N(a+b\mathrm{i})=a^2+b^2 is the squared Euclidean distance from the origin.

Figure: gaussian integer

Gaussian integers admit division with remainder: for Gaussian integers aa and b≠0b\neq 0, there always exist Gaussian integers qq and rr such that a=bq+ra=bq+r and N(r)<N(b)N(r)<N(b). To carry out such a division, first compute ab\dfrac{a}{b} in Q(i)\mathbf Q(\mathrm{i}), then find the nearest lattice point in the complex plane as qq, and finally compute r=a−bqr=a-bq; the resulting remainder always satisfies N(r)≤12N(b)N(r)\le\dfrac{1}{2}N(b). Using division with remainder, the Euclidean algorithm and Bezout's theorem can be transferred to Gaussian integers, yielding unique factorization.

Gaussian Primes

The result of the preceding section can be used to determine the prime elements (also called Gaussian primes) among Gaussian integers. Since the discriminant of the ring of Gaussian integers is −4-4, the Kronecker symbol (−4n)\left(\dfrac{-4}{n}\right) is 00 for even nn and, for odd nn, equals (−1n)=(−1)(n−1)/2\left(\dfrac{-1}{n}\right)=(-1)^{(n-1)/2}, so

(−4n)={+1,n≡1(mod4),−1,n≡3(mod4),0,2∣n.\left(\dfrac{-4}{n}\right) = \begin{cases} +1,& n\equiv 1\pmod 4,\\ -1,& n\equiv 3\pmod 4,\\ 0,& 2\mid n. \end{cases}

Therefore, Gaussian primes fall into the following three classes:

  1. Primes of the form 4k+34k+3 among the integers;
  2. The two conjugate Gaussian prime factors of an integer prime of the form 4k+14k+1;
  3. The factor 1+i1+\mathrm{i} of the prime 22, whose conjugate is an associate of it.

For example, in Z[i]\mathbf Z[\mathrm{i}] we have 60=22×3×5=−(1+i)4×3×(2+i)×(2−i)60=2^2\times 3\times 5=-(1+\mathrm{i})^4\times 3\times(2+\mathrm{i})\times(2-\mathrm{i}).

The question of whether a prime pp can be further factored in Z[i]\mathbf Z[\mathrm{i}] is equivalent to whether pp can be written as a sum of integer squares a2+b2a^2+b^2. Therefore, the result above implies that a prime pp can be written as a sum of squares if and only if p=2p=2 or p≡1(mod4)p\equiv 1\pmod 4. This is Fermat's theorem on sums of two squares.

Lattice Points on a Circle

In the complex plane, Gaussian integers represent all lattice points. The norm of a Gaussian integer is the square of the Euclidean distance from the lattice point to the origin. Therefore, quadratic integers with the same norm correspond to lattice points on a circle centered at the origin in the complex plane. In other words, the number of lattice points on the circle x2+y2=nx^2+y^2=n is the number of Gaussian integers x+yix+y\mathrm{i} whose norm equals nn.

To solve N(x+yi)=nN(x+y\mathrm{i})=n, consider factoring the Gaussian integer x+yix+y\mathrm{i} into prime factors; the product of the norms of these factors is then nn. Thus, once the factorization of nn is known, the prime factors of nn tell us which prime factors x+yix+y\mathrm{i} may have. Let the prime factorization of the integer nn be

n=2kp1r1⋯pℓrℓq1s1⋯qmsm,n=2^kp_1^{r_1}\cdots p_\ell^{r_\ell}q_1^{s_1}\cdots q_{m}^{s_m},

where p1,⋯ ,pℓp_1,\cdots,p_\ell are prime factors of the form 4k+14k+1, and q1,⋯ ,qmq_1,\cdots,q_m are prime factors of the form 4k+34k+3.

First, the equation N(x+yi)=nN(x+y\mathrm{i})=n has a solution if and only if the exponents s1,⋯ ,sℓs_1,\cdots,s_\ell of the prime factors of the form 4k+34k+3 in nn are all even. This is because q1,⋯ ,qmq_1,\cdots,q_m are also Gaussian primes, and their norms equal their own squares, so they must occur in pairs in the prime factorization of the norm.

Now suppose the equation has a solution. Then every solution must have the form

u(1+i)k(a1+b1i)r1+(a1−b1i)r1−⋯(aℓ+bℓi)rℓ+(aℓ−bℓi)rℓ−q1s1/2⋯qmsm/2,u(1+\mathrm{i})^k(a_1+b_1\mathrm{i})^{r_{1}^+}(a_1-b_1\mathrm{i})^{r_{1}^-}\cdots(a_\ell+ b_\ell\mathrm{i})^{r_\ell^+}(a_\ell-b_\ell\mathrm{i})^{r_\ell^-}q_1^{s_1/2}\cdots q_{m}^{s_m/2},

where uu is a unit, aj±bjia_j\pm b_j\mathrm{i} are the conjugate prime factors of pjp_j in the ring of Gaussian integers, and rj++rj−=rjr_j^++r_j^-=r_j. Therefore, the number of solutions is

4(1+r1)⋯(1+rℓ).4(1+r_1)\cdots(1+r_\ell).

Let f(n)f(n) denote the number of integer solutions to x2+y2=nx^2+y^2=n. When it has solutions, f(n)f(n) is given by the expression above; otherwise, f(n)=0f(n)=0. It is easy to verify that 14f(n)\dfrac14f(n) is a multiplicative function. The values of a multiplicative function are determined by its values on prime powers. From the expression for f(n)f(n), the values of 14f(n)\dfrac14f(n) on prime powers pkp^k are as follows:

  1. If pp is a prime of the form 4k+34k+3, then 14f(1)=1,14f(p)=0,14f(p2)=1,14f(p3)=0,⋯\dfrac14f(1)=1,\dfrac14f(p)=0,\dfrac14f(p^2)=1,\dfrac14f(p^3)=0,\cdots;
  2. If pp is a prime of the form 4k+14k+1, then 14f(pk)=k+1\dfrac14f(p^k)=k+1;
  3. If p=2p=2, then 14f(2k)=1\dfrac14f(2^k)=1.

It is easy to verify that all three cases can be written as

14f(pk)=∑j=0k(−4p)k=∑j=0k(−4pk)=∑d∣pk(−4d).\dfrac14f(p^k) = \sum_{j=0}^k\left(\dfrac{-4}{p}\right)^k = \sum_{j=0}^k\left(\dfrac{-4}{p^k}\right) = \sum_{d\mid p^k}\left(\dfrac{-4}{d}\right).

Since the Kronecker symbol (−4n)\left(\dfrac{-4}{n}\right) is completely multiplicative, we obtain

f(n)=4∑d∣n(−4d)=4∑d∣nχ4,3(d).f(n) = 4\sum_{d\mid n}\left(\dfrac{-4}{d}\right)=4\sum_{d\mid n}\chi_{4,3}(d).

The notation in the sum on the right uses the fact that the Kronecker symbol (−4n)\left(\dfrac{-4}{n}\right) is the real Dirichlet character modulo 44.

Pythagorean Equation

The general solution to the Pythagorean equation can be obtained using Gaussian integers. The Pythagorean equation is the following quadratic Diophantine equation:

x2+y2=z2.x^2+y^2=z^2.

Comparing with the preceding section, this is equivalent to solving N(x+yi)=z2N(x+y\mathrm{i})=z^2. Suppose the prime factorization of zz in Z\mathbf Z is

z=2kp1r1⋯pℓrℓq1s1⋯qmsm,z=2^kp_1^{r_1}\cdots p_\ell^{r_\ell}q_1^{s_1}\cdots q_{m}^{s_m},

Then its solution x+yix+y\mathrm{i} has the following prime factorization in Z[i]\mathbf Z[\mathrm{i}]:

x+yi=u(1+i)2k(a1+b1i)r1+(a1−b1i)r1−⋯(aℓ+bℓi)rℓ+(aℓ−bℓi)rℓ−q1s1⋯qmsmx+y\mathrm{i} = u(1+\mathrm{i})^{2k}(a_1+b_1\mathrm{i})^{r_{1}^+}(a_1-b_1\mathrm{i})^{r_{1}^-}\cdots(a_\ell+ b_\ell\mathrm{i})^{r_\ell^+}(a_\ell-b_\ell\mathrm{i})^{r_\ell^-}q_1^{s_1}\cdots q_{m}^{s_m}

and rj++rj−=2rjr_j^++r_j^-=2r_j. Computing the greatest common divisor of x+yix+y\mathrm{i} and zz gives the following integer:

κ=2kp1min⁡{r1+,r1−}⋯pℓmin⁡{rℓ+,rℓ−}q1s1⋯qmsm.\kappa = 2^kp_1^{\min\{r_1^+,r_1^-\}}\cdots p_\ell^{\min\{r_\ell^+,r_\ell^-\}}q_1^{s_1}\cdots q_m^{s_m}.

After removing this common factor, κ−1(x+yi)\kappa^{-1}(x+y\mathrm{i}) contains only prime factors of the form aj±bjia_j\pm b_j\mathrm{i}. Conjugate factors do not occur in pairs, and the exponents ∣rj+−rj−∣|r_j^+-r_j^-| of these factors must be even, because their sum 2rj2r_j is even. Therefore, κ−1(x+yi)\kappa^{-1}(x+y\mathrm{i}) is the square of a quadratic integer u+viu+v\mathrm{i}. We obtain

x+yi=κ(u+vi)2, z=κN(u+vi).x+y\mathrm{i} = \kappa(u+v\mathrm{i})^2,\ z=\kappa N(u+v\mathrm{i}).

Over the integers Z\mathbf Z, this is the system

x=κ(u2−v2), y=2κuv, z=κ(u2+v2).x = \kappa(u^2-v^2),\ y = 2\kappa uv,\ z = \kappa(u^2+v^2).

Conversely, for any integers uu and vv, the (x,y,z)(x,y,z) obtained from these expressions satisfies the Pythagorean equation. Thus, this is the general solution to the Pythagorean equation.

The preceding argument shows that in a primitive Pythagorean triple (x,y,z)(x,y,z), meaning that the common divisor of x,y,zx,y,z is one, the variables x,yx,y must have opposite parity, while zz is odd and has only prime factors of the form 4k+14k+1.

Similar methods can also give the general solution to x2+y2=z3x^2+y^2=z^3, or prove that x4+y4=z4x^4+y^4=z^4 has no solution. In fact, using the general solution to the Pythagorean equation together with infinite descent, one can prove the stronger result that x4+y4=z2x^4+y^4=z^2 has no solution.

Eisenstein Integers

In this section, let ω=−1+3i2=e2πi/3\omega=\dfrac{-1+\sqrt{3}\mathrm{i}}{2}=e^{2\pi\mathrm{i}/3}. 1 The quadratic field Q(3i)\mathbf Q(\sqrt{3}\mathrm{i}) is the third and sixth cyclotomic field, and its algebraic integers are called Eisenstein integers. The ring formed by all Eisenstein integers, Z[ω]\mathbf Z[\omega], is called the ring of Eisenstein integers. The ring of Eisenstein integers has six units, namely ±1\pm 1, ±ω\pm\omega, and ±ω2\pm\omega^2. In the complex plane, all Eisenstein integers form a triangular lattice. Unlike Gaussian integers, the points of this lattice are generally not integer lattice points.

Figure: eisenstein integer

The norm of an Eisenstein integer is

N(a+bω)=a2−ab+b2,N(a+b\omega) = a^2-ab+b^2,

which is also the square of the distance from the corresponding lattice point to the origin in the complex plane.

Eisenstein integers are quite similar to Gaussian integers. On Eisenstein integers, we can likewise define division with remainder using the norm N(⋅)N(\cdot), and establish the Euclidean algorithm, Bezout's theorem, unique factorization, and related results. As above, this yields the factors of primes in the ring of Eisenstein integers. For this purpose, note that the discriminant of Z[ω]\mathbf Z[\omega] is −3-3, while the Kronecker symbol is

(−3n)={+1,n≡1(mod3),−1,n≡2(mod3),0,3∣n,\left(\dfrac{-3}{n}\right) = \begin{cases} +1, & n\equiv 1\pmod 3,\\ -1, & n\equiv 2\pmod 3,\\ 0, & 3\mid n, \end{cases}

Therefore, the prime elements in the ring of Eisenstein integers, namely Eisenstein primes, fall into the following three classes:

  1. Primes of the form 3k+23k+2 among the integers, namely 22 and primes of the form 6k+56k+5;
  2. The two conjugate Gaussian prime factors of an integer prime of the form 3k+13k+1 (equivalently, of the form 6k+16k+1);
  3. The factor (3+3i)/2(3+\sqrt{3}\mathrm{i})/2 of the prime 33, whose conjugate is an associate of it.

Using the method from the preceding section, we can find the number of Eisenstein integers with norm nn. Let this number be f(n)f(n). Then

f(n)=6∑d∣n(−3d)=6∑d∣nχ3,2(d).f(n)=6\sum_{d\mid n}\left(\dfrac{-3}{d}\right)=6\sum_{d\mid n}\chi_{3,2}(d).

Here, χ3,2(n)=(−3n)\chi_{3,2}(n)=\left(\dfrac{-3}{n}\right) is the real Dirichlet character modulo 33. This expression shows that such an Eisenstein integer exists if and only if the exponents of all prime factors of the form 3k+23k+2 in nn are even.

Using the norm formula above, f(n)f(n) is also the number of integer solutions to the Diophantine equation x2−xy+y2=nx^2-xy+y^2=n or to x2+xy+y2=nx^2+xy+y^2=n. Geometrically, it is the number of lattice points on the oblique ellipse x2±xy+y2=nx^2\pm xy+y^2=n.

Closely related to these equations is another Diophantine equation, x2+3y2=nx^2+3y^2=n, whose integer solutions correspond to lattice points on a standard ellipse. The substitutions x=(u+v)/2x=(u+v)/2 and y=(u−v)/2y=(u-v)/2 transform it into the already solved equation u2−uv+v2=nu^2-uv+v^2=n. However, although every integer solution of x2+3y2=nx^2+3y^2=n corresponds to an integer solution of u2−uv+v2=nu^2-uv+v^2=n, the converse is not necessarily true. If nn is even, then uu and vv must both be even, which means that xx and yy are necessarily integers; in this case, the number of integer solutions of x2+3y2=nx^2+3y^2=n is still f(n)f(n). If nn is odd, however, uu and vv may have opposite parity or may both be odd, so the corresponding xx and yy may both be half-integers or both be integers. This case requires a more careful discussion.

When an integer solution (u,v)(u,v) of u2−uv+v2=nu^2-uv+v^2=n is known, the integer solutions corresponding to the Eisenstein integers associated with u+vωu+v\omega, including itself, are respectively

(u,v),(u−v,u),(−v,u−v),(−u,−v),(v−u,−u),(v,v−u).(u,v),(u-v,u),(-v,u-v),(-u,-v),(v-u,-u),(v,v-u).

Since, unless the three integers u,v,u−vu,v,u-v are all even, they consist of two odd numbers and one even number, among these six integer solutions there are necessarily two in which both entries are odd and four in which one entry is odd and the other even. Thus, when nn is odd, only 13\dfrac13 of the integer solutions of u2−uv+v2=nu^2-uv+v^2=n have both entries odd; only these correspond to integer solutions of x2+3y2=nx^2+3y^2=n. Therefore, when nn is odd, the number of integer solutions of x2+3y2=nx^2+3y^2=n is 13f(n)\dfrac13f(n).

Finally, methods similar to those used for the Pythagorean equation can use Eisenstein integers to solve the following Diophantine equations:

x2−xy+y2=z2x^2-xy+y^2=z^2 x2+xy+y2=z2x^2+xy+y^2=z^2 x2+3y2=z2x^2+3y^2=z^2 x2+3y2=z3x^2+3y^2=z^3

Their general solutions are omitted here. Similar methods can also be used to prove that x3+y3=z3x^3+y^3=z^3 has no solution.

References and Notes

Footnotes

  1. Note that the choice of ω\omega here differs from the choice above. By convention, when discussing general rings of quadratic integers, one usually takes ω=(1+d)/2\omega=(1+\sqrt{d})/2 (when d≡1(mod4)d\equiv 1\pmod4), whereas for the ring of Eisenstein integers one often takes ω=(−1+−3)/2\omega=(-1+\sqrt{-3})/2. This difference has no substantive effect, but it may change the form of some expressions. Note that the ring of Eisenstein integers should not be written as Z[−3]\mathbf Z[\sqrt{-3}]. ↩

This content comes from OI Wiki: Quadratic Fields. See the original for authors and revision history. AIOJ has adapted the formatting, in-site links, and resource paths.

Content is shared under CC BY-SA 4.0 and SATA license; additional terms are governed by the original notice. Thanks to the OI Wiki authors and contributors; per the SATA terms, please visit the OI Wiki repository and star it to show your support.