Alexander Bass
This note is one of many taken during 2025

Clever proof of solutions to linear diophantine equation

A simple result in elementary number theory relates to the linear diophantine equation

ax+by=c ax + by = c

a,x,b,y,c∈Z a,x,b,y,c \in \mathbb{Z}

A property of this equation (which is not proven here) is that it has infinitely many (x,y)(x,y) solutions if cc is a multiple of gcd⁡(a,b)\gcd(a,b), otherwise it has none.

The clever part is, after finding the first solution we can find the rest. Suppose there exists a solution (x,y)(x,y), and that (x′,y′)(x',y') is another solution:

c=ax+by=ax′+by′ c = ax+by = ax'+by'

Rearrange equation

a(x−x′)=−b(y−y′) a(x-x') = -b(y-y')

Let d=gcd⁡(a,b)d = \gcd(a,b). Naturally, aa and bb are both divisible by dd. Divide by dd

ad(x−x′)=−bd(y−y′) \frac{a}{d}(x-x') = -\frac{b}{d}(y-y')

Now, a/da/d and b/db/d share no common factors, therefor a/da/d does not divide b/db/d and b/db/d does not divide a/ba/b. Note however that b/db/d does divide the right side of the equation, and therefor must divide the left side of the equation. Because we already determined that b/db/d does not divide a/da/d, b/db/d must divide (x−x′)(x-x'), thus (x−x′)(x-x') must be a multiple of b/db/d (likewise (y−y′)(y-y') is a multiple of a/da/d).

State that (x−x′)(x-x') is a multiple of b/db/d in a new equation:

bnd=x−x′ \frac{bn}{d} = x - x'

Likewise of yy

and=y−y′ \frac{an}{d} = y - y'

Thus, given the initial solutions of x,yx,y, the other solutions are found as:

bnd+x=x′ \frac{bn}{d}+x = x'

and+y=y′ \frac{an}{d}+y = y'

This proof is not complete but highlights the clever trick of extracting an equation based on divisibility. It comes down to the (often subtle) fact that when xx divides yy, y=xqy=xq.

This note is one of many taken during 2025