Euclidean Algorithm/Demonstration

Example of use of Euclidean Algorithm
Using the Euclidean Algorithm, we can investigate in detail what happens when we apply the Division Theorem repeatedly to $a$ and $b$.

From the Division Theorem, we know that the remainder is always strictly less than the divisor.

That is, in $a = q b + r$:
 * $0 \le r < \left \lvert{b}\right\rvert$

So we know that:
 * $b > r_1 > r_2 > \ldots > r_{n-2} > r_{n-1} > r_n > 0$

So the algorithm has to terminate.