# Pell Equations

## Quadratic Diophantine Equations

A Pell equation is a Diophantine equation of the form

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

where $D$ is a positive integer that is not a perfect square.

$$
x^2-Dy^2=1
$$

The unknowns $x$ and $y$ 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,
$$

the equation becomes

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

One solution is

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

since

$$
3^2-2(2^2)=9-8=1.
$$

Another is

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

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

## Why $D$ Must Not Be a Square

If $D$ is a perfect square, say

$$
D=k^2,
$$

then the equation factors as

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

so

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

Since both factors are integers, the only possibilities are

$$
x-ky=\pm1,\qquad x+ky=\pm1.
$$

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

## First Examples

Consider

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

Trying small values of $y$:

- $y=1$:

$$
x^2=4,
$$

so

$$
x=2.
$$

Thus

$$
(2,1)
$$

is a solution.

Now consider

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

Trying small values:

- $y=1$:

$$
x^2=6,
$$

not a square.

- $y=2$:

$$
x^2=21,
$$

not a square.

- $y=4$:

$$
x^2=81,
$$

so

$$
x=9.
$$

Hence

$$
(9,4)
$$

is a solution.

The smallest nontrivial solution is called the fundamental solution.

## Generating Infinitely Many Solutions

Suppose

$$
(x_1,y_1)
$$

is a solution of

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

Define

$$
x_1+y_1\sqrt D.
$$

Multiplication preserves the equation because

$$
(x+y\sqrt D)(x-y\sqrt D)=x^2-Dy^2.
$$

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

For example, if

$$
3+2\sqrt2
$$

corresponds to the solution of

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

then

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

giving the new solution

$$
(17,12).
$$

Similarly,

$$
(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,

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

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

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

## Algebraic Interpretation

The Pell equation can be viewed inside the quadratic number field

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

The expression

$$
x+y\sqrt D
$$

is an algebraic integer whose norm is

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

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

$$
\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

$$
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.

