How this calculation works
Find one integer pair and the steps that generate every other solution.
ax+by=c has integer solutions exactly when gcd(a,b) divides cA worked example
15×6 + 21×(−4) = 6. Other solutions add multiples of 7 to x and subtract multiples of 5 from y.
Good to know
Both coefficients must be positive integers.
Reference: NIST DLMF, Functions of Number Theory (opens in a new tab) ↗
Read the result
Find one integer pair and the steps that generate every other solution.
The primary result is labeled “A particular solution”. Keep the input definitions in view when comparing this result with another method.
Try a related calculation
Both coefficients must be positive integers.
For a related exercise, try the greatest common divisor.
A few questions, answered
How can I check the default inputs by hand?
15×6 + 21×(−4) = 6. Other solutions add multiples of 7 to x and subtract multiples of 5 from y.
Which rule does this calculator apply?
ax+by=c has integer solutions exactly when gcd(a,b) divides c