Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
A linear Diophantine equation of the form ax + by = c has solutions if and only if (a, b) | c. There is a
similar result for linear Diophantine equations in more than 2 variables.
A Diophantine problem is one in which the solutions are required to be integers. Abusing terminology,
Ill refer to Diophantine equations, meaning equations which are to be solved over the integers.
Example. Since (9, 100) = 1, there are integers x and y such that 9x + 100y = 1.
For example, 9 (11) + 100 1 = 1, and 9 89 + 100 (8) = 1. That is, the Diophantine equation
9x + 100y = 1 has solutions in fact, infinitely many solutions.
ax + by = c.
b a
x= k + x0 , y = k + y0 .
d d
Before I give the proof, Ill give some examples, and also discuss the three variable equation ax+by+cz =
d.
Since (6, 9) = 3 | 21, there are infinitely many solutions. By trial and error, x = 7, y = 7, is a
particular solution. Hence, the general solution is
x = 3k 7, y = 2k + 7.
1
Example. Solve 6x + 9y = 5.
Since (6, 9) = 3 6 | 5, the equation has no solutions.
Example. Solve
3x + 3y + 5z = 10.
First, Ill factor (3, 3) out of the first two coefficients:
3 3
(3, 3) x+ y + 5z = 10.
(3, 3) (3, 3)
3
Notice that (3, 3) = 3, so those two fractions are actually integers. Im not simplifying so that
(3, 3)
you can see whats going on.
Let
3 3
w= x+ y.
(3, 3) (3, 3)
The equation becomes
(3, 3)w + 5z = 10, or 3w + 5z = 10.
(3, 5) = 1 | 10, so this two variable equation is solvable. w = 5, y = 1, is a particular solution, so the
general solution is
w = 5s + 5, z = 3s 1.
Now I have to find x and y:
3 3
w= x+ y, so w = x + y.
(3, 3) (3, 3)
Thus,
x + y = 5s + 5.
This is a two variable equation. Since (1, 1) = 1 | 5s + 5, its solvable. x = 5, y = 5s, is a particular
solution. Therefore, the general solution is
x = t + 5, y = 5s t.
All together, the general solution to the original three variable equation is
x = t + 5, y = 5s t, z = 3s 1.
a1 x1 + an xn = c,
the solution will depend on n 1 parameters exactly as youd expect from linear algebra.
Proof. (two variable case) Consider the linear Diophantine equation
ax + by = c.
(a, b) | ax + by = c.
2
This contradiction shows that there cannot be a solution.
Case 2. Suppose (a, b) | c. Write c = k(a, b) for k Z. There are integers m and n such that
am + bn = (a, b).
Then
amk + bnk = (a, b)k = c.
Hence, x = km, y = kn, is a solution.
Suppose x = x0 , y = y0 , is a particular solution. Then
b a ab ab
a k + x0 + b k + y0 = k k + (ax0 + by0 ) = 0 + c = c.
d d d d
b a
This proves that x = k + x0 , y = k + y0 is a solution for every k Z.
d d
Finally, I want to show that every solution has this form. Suppose then that (x, y) is a solution. Then
ax + by = c and ax0 + by0 = c imply
a(x x0 ) + b(y y0 ) = c c = 0.
Therefore,
a b
(x x0 ) + (y y0 ) = 0,
(a, b) (a, b)
a b
(x x0 ) = (y y0 ).
(a, b) (a, b)
a a b
Now divides the left side, so it divides the right side. However, , = 1. Therefore,
(a, b) (a, b) (a, b)
a a
y y0 , or y y0 = k for some k.
(a, b) (a, b)
Thus,
a
y = y0 + k .
(a, b)
Substitute this back into the last x-y equation:
a b b a
(x x0 ) = (y y0 ) = k ,
(a, b) (a, b) (a, b) (a, b)
b
x x0 = k ,
(a, b)
b
x = x0 k .
(a, b)
This is the result stated in the theorem (with an unimportant switch of k and k.)
c 2008 by Bruce Ikenaga 3