Linear Diophantine Equations
Existence First, Then a Complete Integer Family
For integers a, b, and c with a and b not both zero, let d = gcd(a,b) > 0. The equation ax + by = c asks for integer pairs (x,y).
Every expression ax + by is divisible by d, so d | c is necessary. Bézout’s identity also makes it sufficient: the extended Euclidean algorithm finds integers u,v with au+bv=d; multiplying by c/d gives a particular solution.
If (x₀,y₀) is one solution, all integer solutions are x = x₀ + (b/d)t and y = y₀ − (a/d)t, where t is any integer.
The signs matter: adding b/d to x raises ax by ab/d, so y must drop by a/d to keep the sum fixed.
In applications with nonnegative counts, impose x ≥ 0 and y ≥ 0 after finding the full family; do not stop at the first Bézout solution.
For example, an equation with coefficients 13 and 24 has gcd 1, so every integer right side is attainable. That observation says nothing yet about nonnegative feasibility; bounds on the parameter supply that extra condition.
Suppose 7(−2) + 11(3) = 19. Which pair is a particular integer solution of 7x + 11y = 76 obtained by scaling this identity?
One solution of 9x + 15y = 12 is (x₀,y₀)=(−2,2). Which expression gives all integer solutions?