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.
Number theory Created 2026-09-24 Updated 2026-09-24
Use the Euclidean algorithm: , , , and . Back-substitution gives the Bezout identity . Multiplying by gives one solution of the linear Diophantine equation, and shifting the coefficients by multiples of reduces it to
Indeed, . More generally all solutions are , , : subtracting this particular solution gives , and the coprime integers force .
The Euclidean algorithm gives
Thus the greatest common divisor is . The extended Euclidean algorithm reverses these divisions:
This supplies the Bezout identity with , .
To obtain all solutions of a linear Diophantine equation, subtract this particular solution from any other and divide by . The result is . Since and are coprime integers, divides , giving
Every displayed pair satisfies the original linear Diophantine equation, so the parametrization is exhaustive.
For the modular arithmetic calculation, , so is the modular inverse of . Multiplication gives . The admissible integers are for , ending at ; the next is . There are such integers.