Linear Diophantine Equation Calculator
Enter a, b and c to find every whole-number solution of ax + by = c.
The coefficient of x.
The coefficient of y.
The number on the right.
Try
Result
You entered
Particular solution
gcd
Show the work
Solvability test
The gcd of the coefficients must divide . Here divides , so integer solutions exist.
Using
A particular solution from the extended Euclidean algorithm
The extended Euclidean algorithm gives . Multiplying through by turns this into a solution of the equation.
General solution
Adding to and taking from leaves unchanged, and every solution arises this way for a whole number .
Using
Check with t = 0
Putting back into the equation confirms the particular solution.
Result
So every solution has and for a whole number .