Skip to content

Quadratic Fields

This article briefly introduces the concepts related to quadratic fields. Two important examples associated with it are Gaussian integers and Eisenstein integers, which can be used to solve some number theory problems.

Basic Concepts

This section first introduces a series of basic concepts. Quadratic fields and quadratic integer rings are special cases of the more general concepts of algebraic field extensions and algebraic integer rings. Therefore, almost all definitions and conclusions in this section can be appropriately generalized to the general case. The discussion in this section will be limited to the special case of quadratic fields, without introducing excessive algebraic number theory content.

Quadratic Field

Elements of a quadratic field are all quadratic algebraic numbers.

Quadratic algebraic numbers are complex numbers that can be expressed as solutions of a quadratic equation with integer coefficients. From the quadratic formula, all quadratic algebraic numbers can be expressed in the form

\[ a+b\sqrt{d} \]

where \(a\) and \(b\) are rational numbers, and \(d\) is an integer without square factors. Any number of this form is also a quadratic algebraic number. Quadratic algebraic numbers can be divided into rational numbers and quadratic irrational numbers. Clearly, the representation of a quadratic irrational number in the above form is unique.

For any square-free integer \(d\neq 0,1\), it can be verified that the set \(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(\sqrt{d})\) is called a quadratic field. Every quadratic field contains all rational numbers, so they are all quadratic extensions of the rational number field \(\mathbf Q\). When \(d>0\), all numbers in the quadratic field \(\mathbf Q(\sqrt{d})\) are real numbers, and \(\mathbf Q(\sqrt{d})\) is called a real quadratic field; when \(d<0\), all numbers in the quadratic field except rational numbers are complex numbers, and \(\mathbf Q(\sqrt{d})\) is called an imaginary quadratic field.

Conjugate and Norm

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

In any quadratic field, equations generated by the four arithmetic operations cannot distinguish conjugates. That is, if every number in an equation is replaced by its conjugate (i.e., the sign of every square root is changed), the equation still holds.

Using conjugates, several mappings from quadratic algebraic numbers to rational numbers can be constructed, which can transform discussions about quadratic algebraic numbers into discussions about rational numbers. A simpler one is the trace of a quadratic algebraic number \(\alpha\), which is the sum of the number and its conjugate, denoted as \(\operatorname{tr}(\alpha)\). Since this is simply twice 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:

\[ N(a+b\sqrt{d})=a^2-db^2 \]

Clearly, in an imaginary quadratic field, the concept of norm coincides with the square of the modulus of a complex number; however, in a real quadratic field, these two concepts are not consistent.

The norm has good properties. First, because \(d\) is square-free and cannot be a perfect square, only the norm of \(0\) is \(0\). Second, the norm preserves multiplication and division:

\[ 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})), \]
\[ \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). \]

Additionally, the reciprocal of a quadratic algebraic number is the ratio of its conjugate to its norm:

\[ \dfrac{1}{a+b\sqrt{d}}=\frac{a-b\sqrt{d}}{N(a+b\sqrt{d})}. \]

Using Vieta's theorem, a quadratic algebraic number \(\alpha\) is actually a root of the equation

\[ x^2-\operatorname{tr}(\alpha)x+N(\alpha)=0. \]

The discriminant of this equation is also called the discriminant of the quadratic algebraic number, denoted as \(\operatorname{disc}(\alpha)\), with value \(4db^2\).

Matrix Representation

Similar to complex numbers, quadratic algebraic numbers can also be represented by matrices. Let \(d\neq 0,1\) be a square-free integer and \(a,b\) be rational numbers. Then \(a+b\sqrt{d}\) can be represented as the matrix

\[ \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 operations on quadratic algebraic numbers. The trace and determinant of this matrix correspond to the trace and norm of the quadratic algebraic number, respectively. The discriminant of the characteristic polynomial of this matrix is the discriminant of the quadratic algebraic number. The adjugate matrix corresponds to the conjugate of the quadratic algebraic number.

Quadratic Integer Ring

Among quadratic algebraic numbers, quadratic integers are more special. Quadratic integers are complex numbers that can be expressed as solutions of a quadratic equation with integer coefficients where the quadratic coefficient is one. The only difference from quadratic algebraic numbers is the restriction on the quadratic coefficient. According to the quadratic formula, the two roots of the equation \(x^2+px+q=0\) are

\[ \frac{-p\pm\sqrt{p^2-4q}}{2}. \]

If \(p\) is even, i.e., \(p=2k\), then the two roots can be written as \(-k\pm\sqrt{k^2-q}\); if \(p\) is odd, i.e., \(p=2k+1\), then the two roots can be written as \(-k-\dfrac{1\pm\sqrt{4(k^2+k-q)+1}}{2}\). From these two cases, it can be concluded that quadratic integers in \(\mathbf Q(\sqrt{d})\) must be of the form

\[ a+b\omega \]

where \(a\) and \(b\) are integers, and

\[ \omega=\begin{cases} \dfrac{1+\sqrt{d}}{2}, & d\equiv 1\pmod 4,\\ \sqrt{d}, & d\equiv 2,3\pmod 4. \end{cases} \]

Conversely, any complex number of this form is a quadratic integer. The representation of each non-rational quadratic integer in this form is unique.

The set of all quadratic integers in the quadratic field \(\mathbf Q(\sqrt{d})\) is denoted as \(\mathbf Z[\omega]\). Because this set is closed under addition, subtraction, and multiplication, it is also called a quadratic integer ring. The rational numbers in the quadratic integer ring are exactly all integers. If we consider the set of all ratios of quadratic integers in \(\mathbf Z[\omega]\), we obtain the corresponding quadratic field \(\mathbf Q(\sqrt{d})\).

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

Divisibility, Associates, and Units

Similar to integers, a divisibility theory can be established for quadratic integers. Of course, discussions must be conducted within the same quadratic integer ring.

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

Analogous to the divisibility theory of integers, the associate relation corresponds to being opposite numbers. Divisibility theory usually only needs to consider natural numbers, without examining negative numbers. For quadratic integers, the associate relation may be more complex. If quadratic integers \(\alpha\) and \(\beta\) are associates, then there exist quadratic integers \(\gamma\) and \(\delta\) such that \(\beta=\alpha\gamma\) and \(\alpha=\beta\delta\). Therefore, the ratio \(\gamma\) of \(\beta\) and \(\alpha\) must be a special quadratic integer, i.e., there exists a quadratic integer \(\delta\) such that \(\gamma\delta=1\). Such a quadratic integer \(\gamma\) is called a unit, also known as an invertible element. Two quadratic integers are associates if and only if their ratio is a unit. Therefore, to understand the associate relation on a quadratic integer ring, one must understand the structure of its units.

Because the norm preserves multiplication and the norm of a quadratic integer is always an integer, the divisibility relation of quadratic integers can be transformed into the divisibility relation of integers using the norm. That is, if \(\alpha\mid\beta\), then necessarily \(N(\alpha)\mid N(\beta)\). Similarly, a quadratic integer \(\alpha\) is a unit if and only if its norm \(N(\alpha)=\pm 1\). Therefore, to obtain all units in the quadratic integer ring \(\mathbf Z[\omega]\), one only needs to solve the Diophantine equation:

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

where the expression for the norm is

\[ 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 imaginary quadratic integer rings, i.e., when \(d<0\), because the norm is necessarily a non-negative integer, it is easy to verify that for all square-free negative integers \(d\neq -1,-3\), the only solutions are \((a,b)=(\pm 1,0)\). That is, except for \(\mathbf Z[\sqrt{-1}]\) and \(\mathbf Z[\frac{1+\sqrt{-3}}{2}]\), the units of imaginary quadratic integer rings are only \(\pm 1\). Let \(\mathrm{i}=\sqrt{-1}\), then the quadratic integer ring \(\mathbf Z[\mathrm{i}]\) is also called the Gaussian integer ring, and its set of units is \(\{\pm 1,\pm\mathrm{i}\}\). Let \(\omega=\frac{1+\sqrt{-3}}{2}\), then the quadratic integer ring \(\mathbf Z[\omega]\) is also called the Eisenstein integer ring, and its set of units is \(\{\pm 1,\pm\omega,\pm\omega^2\}\).

For real quadratic integer rings, i.e., when \(d>0\), the situation is more complex and can be transformed into a discussion of the corresponding Pell equation. From the relevant conclusions of Pell equations, the set of all units at this time can be written as \(\{\pm u^k:k\in\mathbf Z\}\), where \(u\) is called the fundamental unit. The fundamental unit can be solved via the corresponding Pell equation. The fundamental unit is not unique: if \(u\) is a fundamental unit, then its conjugate \(\bar u\), as well as \(-u\) and \(-\bar u\), are also fundamental units.

The structure of units in quadratic integer rings can be generalized to general algebraic integer rings. The Dirichlet unit theorem in algebraic number theory states that the set of all units of any algebraic integer ring forms a finitely generated Abelian group, and the theorem also gives the rank of this group.

Concepts from integer divisibility theory such as greatest common divisor, division with remainder, Bezout's theorem, and unique factorization theorem can be generalized to some or all quadratic integer rings. Whether such generalizations can be performed on a given quadratic integer ring reflects how closely the properties of that ring resemble those of the integer ring. The unique factorization theorem does not hold on all quadratic integer rings; among those where it does hold, only some allow division with remainder. For discussion of this content, refer to the section on quadratic integer rings in the ring theory part or related books.

Unique Factorization

If the unique factorization theorem for integers can be generalized to quadratic integer rings, it should have the following form: every quadratic integer in the ring \(\mathbf Z[\omega]\) can be written as a product of irreducible elements, and this decomposition is unique up to associates and order. Here, irreducible elements are quadratic integers that cannot be further decomposed into products of non-units, similar to prime numbers in the unique factorization theorem for integers. As mentioned earlier, not all quadratic integer rings satisfy the unique factorization theorem.

For example, in \(\mathbf Z[\sqrt{-5}]\), there is the decomposition \(9=3\times 3=(2+\sqrt{-5})\times(2-\sqrt{-5})\). However, \(3\) and \(2\pm\sqrt{-5}\) are already irreducible elements, so the decomposition is not unique. To show that these three numbers are irreducible, one can examine their norms: their norms are all \(9\). If they could be decomposed into products of non-units, the norms of the factors would have to be \(3\), but there is no quadratic integer in \(\mathbf Z[\sqrt{-5}]\) with norm \(3\).

The main reason the unique factorization theorem fails in general quadratic integer rings is that decomposition using only quadratic integers is not thorough enough. For example, to decompose the product \(abcd\), if the available basic elements are only \(\{ab,cd,ac,bd\}\), the resulting decomposition is naturally not unique; to obtain a unique factorization theorem, one must further consider \(\{a,b,c,d\}\). In quadratic integer rings, a finer structure than quadratic integers is the ideals of the quadratic integer ring. Mapping a quadratic integer to its principal ideal embeds its associate equivalence class into the set of ideals, so the decomposition of integers is a special case of the decomposition of ideals. If we consider the decomposition of ideals in quadratic integer rings, it can be proven that all ideals in quadratic integer rings can be uniquely decomposed into products of prime ideals. This shows that quadratic integer rings are all Dedekind domains. More generally, all algebraic integer rings are Dedekind domains.

If a quadratic integer ring satisfies the unique factorization theorem, then its prime ideals correspond one-to-one with irreducible elements (equivalence classes under associates). Therefore, for such quadratic integer rings, decomposing ideals into prime ideals is equivalent to decomposing quadratic integers into irreducible elements. Moreover, the irreducible elements in this case are also called prime elements, which correspond to the concept of prime numbers in integers. The following discussion will use prime ideals and related concepts. Readers unfamiliar with this concept can replace them word for word with prime elements; these statements are also correct in the case where the unique factorization theorem holds.

To fully understand unique factorization in a general quadratic integer ring \(\mathbf Z[\omega]\), one needs to know all prime ideals in \(\mathbf Z[\omega]\). First, each prime ideal in \(\mathbf Z[\omega]\) divides its norm (as a principal ideal). Decomposing its norm in integers into a product of prime numbers, according to the unique factorization theorem, the prime ideal must divide (the principal ideal of) one of these prime factors. Therefore, prime ideals in \(\mathbf Z[\omega]\) are obtained by further decomposing prime numbers from integers. To list all prime ideals in \(\mathbf Z[\omega]\), it suffices to give the unique decomposition of (the principal ideal of) a prime number \(p\) from \(\mathbf Z\) in \(\mathbf Z[\omega]\). Because the norm of (the principal ideal of) prime \(p\) in \(\mathbf Z[\omega]\) is \(p^2\), and its decomposition into prime ideals means the norms of the prime ideals must be divisors of \(p^2\), which can only be \(p\) or \(p^2\). This implies only the following three possibilities:

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

It can be further proven that to determine which of these three cases a prime \(p\) falls into, one only needs to compute the Kronecker symbol \(\left(\dfrac{D}{p}\right)\) for the discriminant \(D\) of the quadratic field containing \(\mathbf Z[\omega]\) and the prime \(p\). These three cases correspond to the three possible values of the Kronecker symbol: \(-1\), \(+1\), and \(0\). When \(p\) is an odd prime, the Kronecker symbol is the Legendre symbol, and these three cases correspond to \(D\) being a quadratic nonresidue modulo \(p\), \(D\) being a quadratic residue modulo \(p\), and \(p\) dividing \(D\), respectively. When \(p=2\), these three cases correspond to \(D\equiv \pm 3\pmod 8\), \(D\equiv \pm 1\pmod 8\), and \(2\) dividing \(D\), respectively.

Gaussian Integers

In this section, let \(\mathrm{i}=\sqrt{-1}\) denote the imaginary unit. The quadratic field \(\mathbf Q(\mathrm{i})\) is also called the Gaussian field, and it is also a quartic cyclotomic field. The corresponding quadratic integer ring \(\mathbf Z[\mathrm{i}]\) is called the Gaussian integer ring, and its elements are called Gaussian integers. There are four units in Gaussian integers: \(\pm 1\) and \(\pm\mathrm{i}\), so each non-zero Gaussian integer has four associates (including itself). In the complex plane, Gaussian integers represent all lattice points with integer coordinates, and the norm \(N(a+b\mathrm{i})=a^2+b^2\) of a Gaussian integer is the square of the distance from the origin in the complex plane.

Division with remainder can be performed on Gaussian integers: for Gaussian integers \(a\) and \(b\neq 0\), there always exist Gaussian integers \(q\) and \(r\) such that \(a=bq+r\) with \(N(r)<N(b)\). To compute such division with remainder, one can first compute \(\dfrac{a}{b}\) in \(\mathbf Q(\mathrm{i})\), then find the nearest lattice point in the complex plane as \(q\), and then compute \(r=a-bq\); the remainder obtained this way always satisfies \(N(r)\le\dfrac{1}{2}N(b)\). Using division with remainder, the Euclidean algorithm and Bezout's theorem can be extended to Gaussian integers, thereby establishing the unique factorization theorem.

Gaussian Primes

Using the conclusions from the previous section, prime elements (also called Gaussian primes) in Gaussian integers can be determined. Because the discriminant of the Gaussian integer ring is \(-4\), and the Kronecker symbol \(\left(\dfrac{-4}{n}\right)\) takes the value \(0\) for even \(n\), and for odd \(n\) equals \(\left(\dfrac{-1}{n}\right)=(-1)^{(n-1)/2}\), we have

\[ \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 categories:

  1. Primes of the form \(4k+3\) in integers;
  2. The two conjugate Gaussian prime factors of primes of the form \(4k+1\) in integers;
  3. The factor \(1+\mathrm{i}\) of the prime \(2\), which is associate to its conjugate.

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

Here, discussing whether a prime \(p\) can be further decomposed in \(\mathbf Z[\mathrm{i}]\) is equivalent to discussing whether \(p\) can be written as a sum of two integer squares \(a^2+b^2\). Therefore, from this conclusion, it can be deduced that a prime \(p\) can be written as a sum of squares if and only if \(p=2\) or \(p\equiv 1\pmod 4\). This is Fermat's theorem on sums of two squares.

Integer Points on Circles

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 integer points on a circle centered at the origin in the complex plane. That is, the number of integer points on the circle \(x^2+y^2=n\) is the number of Gaussian integers \(x+y\mathrm{i}\) with norm equal to \(n\).

To solve the equation \(N(x+y\mathrm{i})=n\), consider factoring the Gaussian integer \(x+y\mathrm{i}\) into prime factors; then the product of the norms of these prime factors equals \(n\). Therefore, by first obtaining the prime factorization of \(n\), one can determine the possible prime factors of \(x+y\mathrm{i}\) based on the prime factors of \(n\). Let the prime factorization of the integer \(n\) be

\[ n=2^kp_1^{r_1}\cdots p_\ell^{r_\ell}q_1^{s_1}\cdots q_{m}^{s_m}, \]

where \(p_1,\cdots,p_\ell\) are prime factors of the form \(4k+1\), and \(q_1,\cdots,q_m\) are prime factors of the form \(4k+3\).

First, the equation \(N(x+y\mathrm{i})=n\) has a solution if and only if the exponents \(s_1,\cdots,s_\ell\) of the \(4k+3\) type prime factors of \(n\) are all even; this is because \(q_1,\cdots,q_m\) are also Gaussian primes, their norms equal their own squares, so they must appear in pairs in the prime factorization of the norm.

Now assume the equation has a solution. Then the solutions must be of the form

\[ 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 \(u\) is a unit, \(a_j\pm b_j\mathrm{i}\) are the conjugate prime factors of \(p_j\) in the Gaussian integer ring, and \(r_j^++r_j^-=r_j\). Therefore, the number of solutions to the equation is

\[ 4(1+r_1)\cdots(1+r_\ell). \]

Let \(f(n)\) denote the number of integer solutions to the equation \(x^2+y^2=n\). When it has solutions, \(f(n)\) is given by the above expression; otherwise, \(f(n)=0\). It is easy to verify that \(\dfrac14f(n)\) is a multiplicative function. The value of a multiplicative function is determined by its values at prime powers. According to the expression for \(f(n)\), the value of \(\dfrac14f(n)\) at a prime power \(p^k\) is as follows:

  1. If \(p\) is a prime of the form \(4k+3\), then \(\dfrac14f(1)=1,\dfrac14f(p)=0,\dfrac14f(p^2)=1,\dfrac14f(p^3)=0,\cdots\);
  2. If \(p\) is a prime of the form \(4k+1\), then \(\dfrac14f(p^k)=k+1\);
  3. If \(p=2\), then \(\dfrac14f(2^k)=1\).

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

\[ \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 \(\left(\dfrac{-4}{n}\right)\) is a completely multiplicative function, we obtain

\[ f(n) = 4\sum_{d\mid n}\left(\dfrac{-4}{d}\right)=4\sum_{d\mid n}\chi_{4,3}(d). \]

The notation of the summation on the rightmost side uses the fact that the Kronecker symbol \(\left(\dfrac{-4}{n}\right)\) is a real Dirichlet character modulo \(4\).

Pythagorean Equation

Using Gaussian integers, the general solution to the Pythagorean equation can be found. The Pythagorean equation refers to the following quadratic Diophantine equation:

\[ x^2+y^2=z^2. \]

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

\[ z=2^kp_1^{r_1}\cdots p_\ell^{r_\ell}q_1^{s_1}\cdots q_{m}^{s_m}, \]

so its solution \(x+y\mathrm{i}\) has the prime factorization in \(\mathbf Z[\mathrm{i}]\)

\[ x+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} \]

with \(r_j^++r_j^-=2r_j\). The greatest common divisor of \(x+y\mathrm{i}\) and \(z\) can be computed, yielding the following integer:

\[ \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}. \]

Removing this common factor, then \(\kappa^{-1}(x+y\mathrm{i})\) contains only prime factors of the form \(a_j\pm b_j\mathrm{i}\), conjugate factors do not appear in pairs, and the exponents \(|r_j^+-r_j^-|\) of these factors must be even (because their sum \(2r_j\) is even). Therefore, \(\kappa^{-1}(x+y\mathrm{i})\) is the square of some quadratic integer \(u+v\mathrm{i}\). Thus, we obtain the following equation:

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

Within integers \(\mathbf Z\), this is equivalent to the following system of equations:

\[ x = \kappa(u^2-v^2),\ y = 2\kappa uv,\ z = \kappa(u^2+v^2). \]

Conversely, for any integers \(u\) and \(v\), the \((x,y,z)\) obtained from the above expressions satisfy the Pythagorean equation. Therefore, this is the general solution to the Pythagorean equation.

From the above process, it can be seen that in primitive Pythagorean triples \((x,y,z)\) (i.e., where \(x,y,z\) are coprime), \(x\) and \(y\) must be one odd and one even, \(z\) is odd and contains only prime factors of the form \(4k+1\).

Using similar methods, the general solution to the equation \(x^2+y^2=z^3\) can be obtained, or it can be proven that the equation \(x^4+y^4=z^4\) has no solutions. Of course, using the general solution of the Pythagorean equation and the method of infinite descent, a stronger conclusion can be proven: the equation \(x^4+y^4=z^2\) has no solutions.

Eisenstein Integers

In this section, let \(\omega=\dfrac{-1+\sqrt{3}\mathrm{i}}{2}=e^{2\pi\mathrm{i}/3}\).1 The quadratic field \(\mathbf Q(\sqrt{3}\mathrm{i})\) is a cubic and sextic cyclotomic field, and its algebraic integers are called Eisenstein integers. The ring of all Eisenstein integers, \(\mathbf Z[\omega]\), is called the Eisenstein integer ring. There are six units in the Eisenstein integer ring: \(\pm 1\), \(\pm\omega\), and \(\pm\omega^2\). In the complex plane, all Eisenstein integers form a triangular lattice. Unlike Gaussian integers, the lattice points here are generally not integer coordinate points.

The norm of an Eisenstein integer is

\[ N(a+b\omega) = a^2-ab+b^2, \]

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

Eisenstein integers are also very similar to Gaussian integers. Division with remainder can also be defined on Eisenstein integers using the norm \(N(\cdot)\), and the Euclidean algorithm, Bezout's theorem, unique factorization theorem, etc., can be established. Similar to the above, the factors of primes in the Eisenstein integer ring can be derived. For this, note that the discriminant of \(\mathbf Z[\omega]\) is \(-3\), and the Kronecker symbol

\[ \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, prime elements in the Eisenstein integer ring, i.e., Eisenstein primes, fall into the following three categories:

  1. Primes of the form \(3k+2\) in integers, i.e., \(2\) and primes of the form \(6k+5\);
  2. The two conjugate Gaussian prime factors of primes of the form \(3k+1\) in integers (i.e., primes of the form \(6k+1\));
  3. The factor \((3+\sqrt{3}\mathrm{i})/2\) of the prime \(3\), which is associate to its conjugate.

Using the method from the previous section, the number of Eisenstein integers with norm \(n\) can be found. Let this number be \(f(n)\); then it equals

\[ f(n)=6\sum_{d\mid n}\left(\dfrac{-3}{d}\right)=6\sum_{d\mid n}\chi_{3,2}(d). \]

Here, \(\chi_{3,2}(n)=\left(\dfrac{-3}{n}\right)\) is a real Dirichlet character modulo \(3\). This expression shows that such Eisenstein integers exist if and only if all exponents of prime factors of the form \(3k+2\) in \(n\) are even.

Using the norm formula from earlier, \(f(n)\) is also the number of solutions to the Diophantine equations \(x^2-xy+y^2=n\) or \(x^2+xy+y^2=n\). Its geometric meaning is the number of integer points on the slanted ellipse \(x^2\pm xy+y^2=n\).

Closely related to these equations is another Diophantine equation \(x^2+3y^2=n\), whose integer solutions correspond to integer points on a standard ellipse. The substitution \(x=(u+v)/2\) and \(y=(u-v)/2\) transforms it into the already solved equation \(u^2-uv+v^2=n\). However, although integer solutions to \(x^2+3y^2=n\) always correspond to integer solutions to \(u^2-uv+v^2=n\), the converse is not necessarily true. If \(n\) is even, then \(u\) and \(v\) must both be even, meaning \(x\) and \(y\) must be integers, and the number of integer solutions to \(x^2+3y^2=n\) is still \(f(n)\). But if \(n\) is odd, then \(u\) and \(v\) may be one odd and one even, or both odd, so the corresponding \(x\) and \(y\) may be half-integers or both integers. This case requires more detailed discussion.

Given an integer solution \((u,v)\) to the equation \(u^2-uv+v^2=n\), the Eisenstein integers associate to \(u+v\omega\) (including itself) correspond to the integer solutions

\[ (u,v),(u-v,u),(-v,u-v),(-u,-v),(v-u,-u),(v,v-u). \]

Because among the three integers \(u,v,u-v\), if not all are even, there must be two odd and one even, so among these six sets of integer solutions, there must be two sets with both odd and four sets with one odd and one even. This shows that when \(n\) is odd, only \(\dfrac13\) of the integer solutions to \(u^2-uv+v^2=n\) have both odd, and only these can correspond to integer solutions of \(x^2+3y^2=n\). Thus, when \(n\) is odd, the number of integer solutions to \(x^2+3y^2=n\) is \(\dfrac13f(n)\).

Finally, similar to the method for solving the Pythagorean equation, Eisenstein integers can be used to solve the following Diophantine equations:

\[ x^2-xy+y^2=z^2 \]
\[ x^2+xy+y^2=z^2 \]
\[ x^2+3y^2=z^2 \]
\[ x^2+3y^2=z^3 \]

Their general solutions are not repeated here. Similar methods can also be used to prove that \(x^3+y^3=z^3\) has no solutions.

References and Notes


  1. Note that the choice of \(\omega\) here is different from the choice above. By convention, when discussing general quadratic integer rings, it is often defined that \(\omega=(1+\sqrt{d})/2\) (when \(d\equiv 1\pmod4\)), while for Eisenstein integer rings, it is often defined that \(\omega=(-1+\sqrt{-3})/2\). This distinction has no substantive impact but may cause changes in the form of some expressions. Note that the Eisenstein integer ring should not be written as \(\mathbf Z[\sqrt{-3}]\). ↩