If are nonzero integers, , and is one solution of the linear Diophantine equation , then all solutions are
Subtract two solutions and use the fact that and are coprime integers. The linear Diophantine equation solvability criterion says that a particular solution exists exactly when divides ; the extended Euclidean algorithm constructs one. This parametrization separates existence from the complete family of answers.
Applying the Euclidean algorithm,
Hence . Since does not divide , the linear Diophantine equation solvability criterion gives
The linear Diophantine equation solvability criterion says that has an integer solution exactly when divides . The Euclidean algorithm gives
Thus , which divides . Therefore