The divisions in the Euclidean algorithm areThe last nonzero remainder is , soAs a check, and ; back-substitution also gives .
At any division step , an integer divides both exactly when it divides both : one direction uses , and the other uses . HenceStarting with , , the Euclidean division producesThe nonzero remainders form a strictly decreasing sequence of positive integers. Such a sequence must terminate, since there are only finitely many positive integers below . Suppose is the last nonzero remainder, so . The unchanged greatest common divisor at each step givesThe final equality holds because the positive common divisors of and are precisely the positive divisors of . This proves both termination and correctness of the Euclidean algorithm.
Apply the Euclidean algorithm to and :Back-substitution gives the Bézout's identityThus is one solution of the Diophantine equation. Subtracting this solution from any other givesSince and are coprime, divides . To justify that step directly, multiply by : both terms on the right are divisible by , because . Write ; substitution then gives . Therefore the complete solution set isEvery such pair satisfies the original Diophantine equation, since the terms cancel.
First recall why the two-variable Bézout's identity follows from the Euclidean algorithm. The initial values are integer linear combinations of . At every subsequent step, is again an integer linear combination of . Therefore the last nonzero remainder, which is their greatest common divisor, has that form.
Put . The preceding argument supplies integers with . Applying the same argument to gives integers such thatAn integer divides exactly when it divides : if it divides , it divides , while itself divides both . Hence . Substituting the expression for provesThusare integers satisfying . This also explains how to construct the coefficients using two applications of the Euclidean algorithm.
Articles by others on the same topic
There are currently no matching articles.