# Solution of Pell's Equation is a Convergent

## Theorem

Let $x = a, y = b$ be a positive solution to Pell's Equation $x^2 - n y^2 = 1$.

Then $\dfrac a b$ is a convergent of $\sqrt n$.

## Proof

Let $a^2 - n b^2 = 1$.

Then we have:

$\left({a - b \sqrt n}\right) \left({a + b \sqrt n}\right) = 1$.

So:

$a - b \sqrt n = \dfrac 1 {a + b \sqrt n} > 0$

and so $a > b \sqrt n$.

Therefore:

 $\displaystyle \left\vert{\sqrt n - \frac a b}\right\vert$ $=$ $\displaystyle \frac {a - b \sqrt n} b$ $\displaystyle$ $=$ $\displaystyle \frac 1 {b \left({a + b \sqrt n}\right)}$ $\displaystyle$ $<$ $\displaystyle \frac 1 {b \left({b \sqrt n + b \sqrt n}\right)}$ $\displaystyle$ $=$ $\displaystyle \frac 1 {2 b^2 \sqrt n}$ $\displaystyle$ $<$ $\displaystyle \frac 1 {2 b^2}$

The result follows from Condition for Rational to be a Convergent.

$\blacksquare$