Skip to content

Pell Equations

A Pell equation is a Diophantine equation of the form

Quadratic Diophantine Equations

A Pell equation is a Diophantine equation of the form

x2Dy2=1, x^2-Dy^2=1,

where DD is a positive integer that is not a perfect square.

x2Dy2=1 x^2-Dy^2=1

The unknowns xx and yy are required to be integers. Equations of this type occupy a central position in classical number theory because they possess infinitely many solutions and exhibit deep algebraic structure.

For example, when

D=2, D=2,

the equation becomes

x22y2=1. x^2-2y^2=1.

One solution is

x=3,y=2, x=3,\qquad y=2,

since

322(22)=98=1. 3^2-2(2^2)=9-8=1.

Another is

x=17,y=12. x=17,\qquad y=12.

The remarkable fact is that all solutions can be generated systematically from a smallest nontrivial solution.

Why DD Must Not Be a Square

If DD is a perfect square, say

D=k2, D=k^2,

then the equation factors as

x2k2y2=1, x^2-k^2y^2=1,

so

(xky)(x+ky)=1. (x-ky)(x+ky)=1.

Since both factors are integers, the only possibilities are

xky=±1,x+ky=±1. x-ky=\pm1,\qquad x+ky=\pm1.

This yields only trivial solutions. Thus the interesting case occurs when DD is nonsquare.

First Examples

Consider

x23y2=1. x^2-3y^2=1.

Trying small values of yy:

  • y=1y=1:
x2=4, x^2=4,

so

x=2. x=2.

Thus

(2,1) (2,1)

is a solution.

Now consider

x25y2=1. x^2-5y^2=1.

Trying small values:

  • y=1y=1:
x2=6, x^2=6,

not a square.

  • y=2y=2:
x2=21, x^2=21,

not a square.

  • y=4y=4:
x2=81, x^2=81,

so

x=9. x=9.

Hence

(9,4) (9,4)

is a solution.

The smallest nontrivial solution is called the fundamental solution.

Generating Infinitely Many Solutions

Suppose

(x1,y1) (x_1,y_1)

is a solution of

x2Dy2=1. x^2-Dy^2=1.

Define

x1+y1D. x_1+y_1\sqrt D.

Multiplication preserves the equation because

(x+yD)(xyD)=x2Dy2. (x+y\sqrt D)(x-y\sqrt D)=x^2-Dy^2.

If two numbers have norm 11, then their product also has norm 11.

For example, if

3+22 3+2\sqrt2

corresponds to the solution of

x22y2=1, x^2-2y^2=1,

then

(3+22)2=17+122, (3+2\sqrt2)^2=17+12\sqrt2,

giving the new solution

(17,12). (17,12).

Similarly,

(3+22)3=99+702, (3+2\sqrt2)^3=99+70\sqrt2,

which gives another solution.

Thus a single nontrivial solution generates infinitely many others.

Continued Fractions

The systematic solution of Pell equations depends on continued fractions. The square root of a nonsquare integer has a periodic continued fraction expansion.

For example,

2=[1;2,2,2,]. \sqrt2=[1;2,2,2,\ldots].

The convergents provide rational approximations to D\sqrt D, and certain convergents yield solutions of the Pell equation.

This connection explains why Pell equations always possess infinitely many integer solutions when DD is positive and nonsquare.

Algebraic Interpretation

The Pell equation can be viewed inside the quadratic number field

Q(D). \mathbb{Q}(\sqrt D).

The expression

x+yD x+y\sqrt D

is an algebraic integer whose norm is

N(x+yD)=x2Dy2. N(x+y\sqrt D)=x^2-Dy^2.

Thus solving the Pell equation is equivalent to finding units of norm 11 in the ring

Z[D]. \mathbb{Z}[\sqrt D].

This interpretation connects Pell equations with algebraic number theory, class groups, and unit groups of number fields.

Geometric Interpretation

The equation

x2Dy2=1 x^2-Dy^2=1

defines a hyperbola. Pell equations ask which lattice points lie on this curve.

Unlike circles, hyperbolas associated with Pell equations often contain infinitely many lattice points. These points are distributed in highly structured arithmetic patterns generated by repeated multiplication of the fundamental solution.

Historical Remarks

Although the equation is called Pell’s equation, the name is historically inaccurate. The problem was extensively studied by Indian mathematicians such as entity[“people”,“Brahmagupta”,“Indian mathematician”] and entity[“people”,“Bhāskara II”,“Indian mathematician”] centuries before European mathematicians investigated it systematically.

Later, entity[“people”,“Pierre de Fermat”,“French mathematician”] posed difficult examples that stimulated further work. The modern theory emerged through the contributions of entity[“people”,“Joseph-Louis Lagrange”,“French mathematician”], who proved the periodicity of continued fractions for quadratic irrationals.