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 $$\frac 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 = \frac 1 {a + b \sqrt n} > 0$$

and so $$a > b \sqrt n$$.

Therefore:

$$ $$ $$ $$ $$

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