Euclidean Algorithm/Construction of Integer Combination

Construction of Integer Combination from Euclidean Algorithm
Having determined the GCD of $a$ and $b$ using the Euclidean Algorithm, we are now in a position to find a solution to $\gcd \set {a, b} = x a + y b$ for $x$ and $y$.

By Bézout's Identity it is always possible to find such an $x, y \in \Z$.

Working back through the equations generated during the course of working the Euclidean Algorithm, we get:

... and so on. The algebra gets messier the further up the tree you go, and is not immediately enlightening.

Thus eventually we arrive at $\gcd \set {a, b} = x a + y b$ where $x$ and $y$ are numbers made up from some algebraic cocktail of the coefficients of the terms involving the remainders from the various applications of the Division Theorem.

Note that $a \divides b \implies \gcd \set {a, b} = a$, from GCD of Integer and Divisor.