Convergents are Best Approximations/Corollary

Corollary to Convergents are Best Approximations
Let $x$ be an irrational number.

Let $(p_n)_{n\geq0}$ and $(q_n)_{n\geq0}$ be the numerators and denominators of its continued fraction expansion.

Each convergent $\dfrac {p_n} {q_n}$ is a best rational approximation to $x$.

That is, for any rational number $\dfrac a b$ such that $1 \le b \le q_n$:
 * $\left\vert{x - \dfrac {p_n} {q_n}}\right\vert \le \left\vert{x - \dfrac a b}\right\vert$

The equality holds only if $a = p_n$ and $b = q_n$.

Proof
Assume otherwise:
 * $\exists \dfrac a b$ such that $1 \le b \le q_n$

and:
 * $\left\vert{x - \dfrac {p_n} {q_n}}\right\vert > \left\vert{x - \dfrac a b}\right\vert$

Then:

which contradicts the result of Convergents are Best Approximations.