Mathematics · Article
Integer equations and modular methods
Find every integer solution of a two-variable linear equation, impose meaningful count restrictions, and use remainder classes to prove impossibility or solve a linear congruence. Separate an exact proof from the finite window that illustrates it.
Back to MathematicsAfter reading, you can
- Prove when ax+by=c has integer solutions and describe the complete family, including zero coefficients.
- Translate nonnegative count conditions into exact integer parameter bounds.
- Solve linear congruences with the correct reduced modulus and use modular obstructions without mistaking a necessary condition for a sufficient one.
Whole tables, rather than fractions of tables
A room needs exactly 18 seats. You can use four-seat tables and six-seat tables. Let x count the four-seat tables and y the six-seat tables. Then 4x+6y=18, with x and y nonnegative integers. Three six-seat tables work: (x,y)=(0,3). Three four-seat tables and one six-seat table also work: (3,1).
Solving the equation over real numbers gives a whole straight line, including fractional table counts. The integer solutions are only the grid points on that line. The nonnegative requirement selects fewer points again. State the equation and the permitted values together; they answer different parts of the problem.
Useful preparation is whole-number multiplication and division, negative numbers, reversible equation steps, plotting coordinate pairs, and inequality bounds. The linked published lessons supply those skills. Divisibility, greatest common divisors, Bézout’s identity and congruence notation are explained here, so you need not have read another number-theory lesson first.
On a first reading, follow the table problem, the divisibility test and the one-parameter family, then filter it to nonnegative counts. Return to the proof that the family is complete and the congruence-class count after trying the worked examples. The nonlinear section uses only the modular rules introduced here.
First check whether the target is reachable at all
An integer is one of …,−2,−1,0,1,2,…; write their set as ℤ. An equation with specified integer unknowns is called a Diophantine equation. In ax+by=c, the given coefficients a,b and target c are also integers. A negative unknown is allowed unless an additional condition excludes it.
For integers d and n, d | n means n=dk for some integer k. Thus 3 divides both 6 and 9, and it divides every integer combination 6x+9y=3(2x+3y). The equation 6x+9y=5 has no integer solution, since 5 is not divisible by 3. Finding no point in a small drawing would not establish this global impossibility.
If a,b are not both zero, g=gcd(a,b) is their greatest positive common divisor. Signs do not affect the positive common divisors; gcd(−6,9)=3 and gcd(a,0)=|a| for a≠0. Both-zero inputs have every positive integer as a common divisor and no greatest one; when needed, use the convention gcd(0,0)=0.
Because g divides a and b, any solution must satisfy g | c. This is the necessary condition. For coefficients not both zero it is also sufficient, but that direction needs an actual integer construction, supplied next. The gcd is positive in that theorem; never divide by the both-zero convention.
An integer combination of the coefficients supplies a starting point
Bézout’s identity states that, for a,b not both zero, there are integers u,v with au+bv=gcd(a,b). Here is why it holds. Start from |a| and |b|. When B>0, divide A=qB+r with 0≤r<B, and replace (A,B) by (B,r). A divisor of A and B divides r=A−qB; conversely a divisor of B and r divides A=qB+r. Thus the common-divisor set is unchanged.
The positive second entries strictly decrease, so the process stops at (g,0). Since the terminal gcd is its first entry, this is the original positive gcd. Each initial absolute value is an integer combination of the original signed inputs: |a|=a×sgn(a) and |b|=b×sgn(b), where sgn is 1,−1 or 0 according to the sign. Subtracting q times one combination from the other keeps integer coefficients. Hence the terminal g is au+bv, proving the identity, including a single zero input.
If c=gk for an integer k, multiply au+bv=g by k. Then x₀=uk and y₀=vk give ax₀+by₀=c. Combined with the necessary condition, this proves: for a,b not both zero, integer solutions exist exactly when gcd(a,b) divides c. A particular solution means one such starting pair; it need not meet later nonnegative restrictions.
For 4 and 6, the remainder 6−4=2 gives g=2 and 4×(−1)+6×1=2. Multiply by 18/2=9 to obtain (x₀,y₀)=(−9,9). It is a valid integer solution of 4x+6y=18, even though a negative number of tables would be unusable. Moving through the full family will find the usable pairs.
One integer step gives all solutions
Suppose a,b are not both zero and g | c. From any particular solution (x₀,y₀), every integer t gives x=x₀+(b/g)t and y=y₀−(a/g)t. Substituting cancels the two added terms: a(b/g)t−b(a/g)t=0. So every listed pair is a solution. The parameter t must be an integer; real t would fill the real line instead.
For 4x+6y=18, use (−9,9) and the step (3,−2). Then x=−9+3t and y=9−2t, t∈ℤ. Each move adds three four-seat tables and removes two six-seat tables, preserving 12 seats added and 12 removed. The lattice diagram shows only a bounded portion of this infinite family.
Four and six, target eighteen
Original equation and declared domain
4x+6y=18
x,y∈ℤ
Dashed orange: real equation. Filled blue circle: exact integer solution. Outlined green diamond in the count scene: both coordinates nonnegative. Small neutral dot: integer-grid position.
The line and plane scenes show only the integer points inside [−6,6]². Their finite tables do not exhaust an unbounded global family. The formulas and bounds state the full result.
Global integer solution set
- Positive gcd, or the explicit both-zero convention
- 2
- One gcd certificate with the original coefficients
- 4×(-1)+6×1=2
- Algorithm’s particular solution (x₀,y₀)
- (-9,9)
- Primitive integer step (b/g,−a/g)
- (3,-2)
- All integer parameters
- Every integer t
(x,y)=((-9)+3t,9+(-2)t), t∈ℤ
| Integer point (x,y) | Family parameter t | Original equation check | Both coordinates nonnegative |
|---|---|---|---|
| (-3,5) | 2 | 4×(-3)+6×5=18 | No |
| (0,3) | 3 | 4×0+6×3=18 | Yes |
| (3,1) | 4 | 4×3+6×1=18 | Yes |
| (6,-1) | 5 | 4×6+6×(-1)=18 | No |
The gcd 2 divides 18. Every integer solution is (−9+3t,9−2t), with t∈ℤ; the window shows only some of them.
Finite pictures illustrate the equation’s exact data. General existence, complete-family and impossibility claims follow from the proofs and conditions in the article.
Signed coefficients
Original equation and declared domain
(-2)x+3y=1
x,y∈ℤ
Dashed orange: real equation. Filled blue circle: exact integer solution. Outlined green diamond in the count scene: both coordinates nonnegative. Small neutral dot: integer-grid position.
The line and plane scenes show only the integer points inside [−6,6]². Their finite tables do not exhaust an unbounded global family. The formulas and bounds state the full result.
Global integer solution set
- Positive gcd, or the explicit both-zero convention
- 1
- One gcd certificate with the original coefficients
- (-2)×1+3×1=1
- Algorithm’s particular solution (x₀,y₀)
- (1,1)
- Primitive integer step (b/g,−a/g)
- (3,2)
- All integer parameters
- Every integer t
(x,y)=(1+3t,1+2t), t∈ℤ
| Integer point (x,y) | Family parameter t | Original equation check | Both coordinates nonnegative |
|---|---|---|---|
| (-5,-3) | -2 | (-2)×(-5)+3×(-3)=1 | No |
| (-2,-1) | -1 | (-2)×(-2)+3×(-1)=1 | No |
| (1,1) | 0 | (-2)×1+3×1=1 | Yes |
| (4,3) | 1 | (-2)×4+3×3=1 | Yes |
A convenient full family is (1+3t,1+2t), t∈ℤ. The algorithm may choose a different particular solution; shifting t gives the same set.
Finite pictures illustrate the equation’s exact data. General existence, complete-family and impossibility claims follow from the proofs and conditions in the article.
The exact step changes x and y together while preserving the original target. Every displayed point’s integer parameter is checked in the table; the full family continues beyond the plot.
Why are no integer solutions omitted? Write α=a/g and β=b/g. They are coprime: a positive common divisor h>1 would make gh a common divisor of a,b larger than g. If gcd(α,β)=1 and β | αk, Bézout gives αs+βr=1; multiply by k to see β divides k. This cancellation uses integer divisibility, rather than division of real numbers.
Subtract a particular solution from any other solution to get α(x−x₀)+β(y−y₀)=0. If b≠0, β divides α(x−x₀), so cancellation gives x−x₀=βt for an integer t. Substitute back and divide by nonzero β to obtain y−y₀=−αt. Thus the family contains every solution. If b=0 and a≠0, x is fixed while y is arbitrary; because a/g is 1 or −1, the same formula covers every integer y.
One convenient starting pair for −2x+3y=1 is (1,1). With g=1, the complete family is (x,y)=(1+3t,1+2t), t∈ℤ. Signed coefficients change the direction of the step; the proof and the positivity of g remain the same. Different particular solutions merely shift the parameter’s origin.
A free unknown and an all-plane equation are different cases
If a=0 and b≠0, the equation is by=c. It is solvable exactly when b divides c; then y=c/b and x is any integer. If b=0 and a≠0, x=c/a is fixed when integral and y is any integer. For example, −3y=6 gives y=−2 and every integer x; adding a nonnegative condition on y would make the count problem impossible.
If a=b=0 and c=0, the equation is 0=0. Every pair (x,y)∈ℤ² works, with two independent integer choices. A single line family cannot describe this whole plane. If a=b=0 and c≠0, there are no solutions. Treat both-zero cases directly instead of dividing by gcd 0.
Zero first coefficient
Original equation and declared domain
0x+(-3)y=6
x,y∈ℤ
Dashed orange: real equation. Filled blue circle: exact integer solution. Outlined green diamond in the count scene: both coordinates nonnegative. Small neutral dot: integer-grid position.
The line and plane scenes show only the integer points inside [−6,6]². Their finite tables do not exhaust an unbounded global family. The formulas and bounds state the full result.
Global integer solution set
- Positive gcd, or the explicit both-zero convention
- 3
- One gcd certificate with the original coefficients
- 0×0+(-3)×(-1)=3
- Algorithm’s particular solution (x₀,y₀)
- (0,-2)
- Primitive integer step (b/g,−a/g)
- (-1,0)
- All integer parameters
- Every integer t
(x,y)=(0+(-1)t,(-2)+0t), t∈ℤ
| Integer point (x,y) | Family parameter t | Original equation check | Both coordinates nonnegative |
|---|---|---|---|
| (6,-2) | -6 | 0×6+(-3)×(-2)=6 | No |
| (5,-2) | -5 | 0×5+(-3)×(-2)=6 | No |
| (4,-2) | -4 | 0×4+(-3)×(-2)=6 | No |
| (3,-2) | -3 | 0×3+(-3)×(-2)=6 | No |
| (2,-2) | -2 | 0×2+(-3)×(-2)=6 | No |
| (1,-2) | -1 | 0×1+(-3)×(-2)=6 | No |
| (0,-2) | 0 | 0×0+(-3)×(-2)=6 | No |
| (-1,-2) | 1 | 0×(-1)+(-3)×(-2)=6 | No |
| (-2,-2) | 2 | 0×(-2)+(-3)×(-2)=6 | No |
| (-3,-2) | 3 | 0×(-3)+(-3)×(-2)=6 | No |
| (-4,-2) | 4 | 0×(-4)+(-3)×(-2)=6 | No |
| (-5,-2) | 5 | 0×(-5)+(-3)×(-2)=6 | No |
| (-6,-2) | 6 | 0×(-6)+(-3)×(-2)=6 | No |
The fixed coordinate is y=−2 and every integer x is free. The line family is not a claim that x is zero.
Finite pictures illustrate the equation’s exact data. General existence, complete-family and impossibility claims follow from the proofs and conditions in the article.
Both zeros, target zero
Original equation and declared domain
0x+0y=0
x,y∈ℤ
Dashed orange: real equation. Filled blue circle: exact integer solution. Outlined green diamond in the count scene: both coordinates nonnegative. Small neutral dot: integer-grid position.
The line and plane scenes show only the integer points inside [−6,6]². Their finite tables do not exhaust an unbounded global family. The formulas and bounds state the full result.
For the identity 0=0, the real solution fills the plane and every integer-grid point works. The shaded panel represents the real plane, rather than a line.
Global integer solution set
- Positive gcd, or the explicit both-zero convention
- 0
Every pair in ℤ²; two independent integer choices
| Integer point (x,y) | Family parameter t | Original equation check | Both coordinates nonnegative |
|---|---|---|---|
| (-6,-6) | Two independent choices | 0×(-6)+0×(-6)=0 | No |
| (-6,-5) | Two independent choices | 0×(-6)+0×(-5)=0 | No |
| (-6,-4) | Two independent choices | 0×(-6)+0×(-4)=0 | No |
| (-6,-3) | Two independent choices | 0×(-6)+0×(-3)=0 | No |
| (-6,-2) | Two independent choices | 0×(-6)+0×(-2)=0 | No |
| (-6,-1) | Two independent choices | 0×(-6)+0×(-1)=0 | No |
| (-6,0) | Two independent choices | 0×(-6)+0×0=0 | No |
| (-6,1) | Two independent choices | 0×(-6)+0×1=0 | No |
| (-6,2) | Two independent choices | 0×(-6)+0×2=0 | No |
| (-6,3) | Two independent choices | 0×(-6)+0×3=0 | No |
| (-6,4) | Two independent choices | 0×(-6)+0×4=0 | No |
| (-6,5) | Two independent choices | 0×(-6)+0×5=0 | No |
| (-6,6) | Two independent choices | 0×(-6)+0×6=0 | No |
| (-5,-6) | Two independent choices | 0×(-5)+0×(-6)=0 | No |
| (-5,-5) | Two independent choices | 0×(-5)+0×(-5)=0 | No |
| (-5,-4) | Two independent choices | 0×(-5)+0×(-4)=0 | No |
| (-5,-3) | Two independent choices | 0×(-5)+0×(-3)=0 | No |
| (-5,-2) | Two independent choices | 0×(-5)+0×(-2)=0 | No |
| (-5,-1) | Two independent choices | 0×(-5)+0×(-1)=0 | No |
| (-5,0) | Two independent choices | 0×(-5)+0×0=0 | No |
| (-5,1) | Two independent choices | 0×(-5)+0×1=0 | No |
| (-5,2) | Two independent choices | 0×(-5)+0×2=0 | No |
| (-5,3) | Two independent choices | 0×(-5)+0×3=0 | No |
| (-5,4) | Two independent choices | 0×(-5)+0×4=0 | No |
| (-5,5) | Two independent choices | 0×(-5)+0×5=0 | No |
| (-5,6) | Two independent choices | 0×(-5)+0×6=0 | No |
| (-4,-6) | Two independent choices | 0×(-4)+0×(-6)=0 | No |
| (-4,-5) | Two independent choices | 0×(-4)+0×(-5)=0 | No |
| (-4,-4) | Two independent choices | 0×(-4)+0×(-4)=0 | No |
| (-4,-3) | Two independent choices | 0×(-4)+0×(-3)=0 | No |
| (-4,-2) | Two independent choices | 0×(-4)+0×(-2)=0 | No |
| (-4,-1) | Two independent choices | 0×(-4)+0×(-1)=0 | No |
| (-4,0) | Two independent choices | 0×(-4)+0×0=0 | No |
| (-4,1) | Two independent choices | 0×(-4)+0×1=0 | No |
| (-4,2) | Two independent choices | 0×(-4)+0×2=0 | No |
| (-4,3) | Two independent choices | 0×(-4)+0×3=0 | No |
| (-4,4) | Two independent choices | 0×(-4)+0×4=0 | No |
| (-4,5) | Two independent choices | 0×(-4)+0×5=0 | No |
| (-4,6) | Two independent choices | 0×(-4)+0×6=0 | No |
| (-3,-6) | Two independent choices | 0×(-3)+0×(-6)=0 | No |
| (-3,-5) | Two independent choices | 0×(-3)+0×(-5)=0 | No |
| (-3,-4) | Two independent choices | 0×(-3)+0×(-4)=0 | No |
| (-3,-3) | Two independent choices | 0×(-3)+0×(-3)=0 | No |
| (-3,-2) | Two independent choices | 0×(-3)+0×(-2)=0 | No |
| (-3,-1) | Two independent choices | 0×(-3)+0×(-1)=0 | No |
| (-3,0) | Two independent choices | 0×(-3)+0×0=0 | No |
| (-3,1) | Two independent choices | 0×(-3)+0×1=0 | No |
| (-3,2) | Two independent choices | 0×(-3)+0×2=0 | No |
| (-3,3) | Two independent choices | 0×(-3)+0×3=0 | No |
| (-3,4) | Two independent choices | 0×(-3)+0×4=0 | No |
| (-3,5) | Two independent choices | 0×(-3)+0×5=0 | No |
| (-3,6) | Two independent choices | 0×(-3)+0×6=0 | No |
| (-2,-6) | Two independent choices | 0×(-2)+0×(-6)=0 | No |
| (-2,-5) | Two independent choices | 0×(-2)+0×(-5)=0 | No |
| (-2,-4) | Two independent choices | 0×(-2)+0×(-4)=0 | No |
| (-2,-3) | Two independent choices | 0×(-2)+0×(-3)=0 | No |
| (-2,-2) | Two independent choices | 0×(-2)+0×(-2)=0 | No |
| (-2,-1) | Two independent choices | 0×(-2)+0×(-1)=0 | No |
| (-2,0) | Two independent choices | 0×(-2)+0×0=0 | No |
| (-2,1) | Two independent choices | 0×(-2)+0×1=0 | No |
| (-2,2) | Two independent choices | 0×(-2)+0×2=0 | No |
| (-2,3) | Two independent choices | 0×(-2)+0×3=0 | No |
| (-2,4) | Two independent choices | 0×(-2)+0×4=0 | No |
| (-2,5) | Two independent choices | 0×(-2)+0×5=0 | No |
| (-2,6) | Two independent choices | 0×(-2)+0×6=0 | No |
| (-1,-6) | Two independent choices | 0×(-1)+0×(-6)=0 | No |
| (-1,-5) | Two independent choices | 0×(-1)+0×(-5)=0 | No |
| (-1,-4) | Two independent choices | 0×(-1)+0×(-4)=0 | No |
| (-1,-3) | Two independent choices | 0×(-1)+0×(-3)=0 | No |
| (-1,-2) | Two independent choices | 0×(-1)+0×(-2)=0 | No |
| (-1,-1) | Two independent choices | 0×(-1)+0×(-1)=0 | No |
| (-1,0) | Two independent choices | 0×(-1)+0×0=0 | No |
| (-1,1) | Two independent choices | 0×(-1)+0×1=0 | No |
| (-1,2) | Two independent choices | 0×(-1)+0×2=0 | No |
| (-1,3) | Two independent choices | 0×(-1)+0×3=0 | No |
| (-1,4) | Two independent choices | 0×(-1)+0×4=0 | No |
| (-1,5) | Two independent choices | 0×(-1)+0×5=0 | No |
| (-1,6) | Two independent choices | 0×(-1)+0×6=0 | No |
| (0,-6) | Two independent choices | 0×0+0×(-6)=0 | No |
| (0,-5) | Two independent choices | 0×0+0×(-5)=0 | No |
| (0,-4) | Two independent choices | 0×0+0×(-4)=0 | No |
| (0,-3) | Two independent choices | 0×0+0×(-3)=0 | No |
| (0,-2) | Two independent choices | 0×0+0×(-2)=0 | No |
| (0,-1) | Two independent choices | 0×0+0×(-1)=0 | No |
| (0,0) | Two independent choices | 0×0+0×0=0 | Yes |
| (0,1) | Two independent choices | 0×0+0×1=0 | Yes |
| (0,2) | Two independent choices | 0×0+0×2=0 | Yes |
| (0,3) | Two independent choices | 0×0+0×3=0 | Yes |
| (0,4) | Two independent choices | 0×0+0×4=0 | Yes |
| (0,5) | Two independent choices | 0×0+0×5=0 | Yes |
| (0,6) | Two independent choices | 0×0+0×6=0 | Yes |
| (1,-6) | Two independent choices | 0×1+0×(-6)=0 | No |
| (1,-5) | Two independent choices | 0×1+0×(-5)=0 | No |
| (1,-4) | Two independent choices | 0×1+0×(-4)=0 | No |
| (1,-3) | Two independent choices | 0×1+0×(-3)=0 | No |
| (1,-2) | Two independent choices | 0×1+0×(-2)=0 | No |
| (1,-1) | Two independent choices | 0×1+0×(-1)=0 | No |
| (1,0) | Two independent choices | 0×1+0×0=0 | Yes |
| (1,1) | Two independent choices | 0×1+0×1=0 | Yes |
| (1,2) | Two independent choices | 0×1+0×2=0 | Yes |
| (1,3) | Two independent choices | 0×1+0×3=0 | Yes |
| (1,4) | Two independent choices | 0×1+0×4=0 | Yes |
| (1,5) | Two independent choices | 0×1+0×5=0 | Yes |
| (1,6) | Two independent choices | 0×1+0×6=0 | Yes |
| (2,-6) | Two independent choices | 0×2+0×(-6)=0 | No |
| (2,-5) | Two independent choices | 0×2+0×(-5)=0 | No |
| (2,-4) | Two independent choices | 0×2+0×(-4)=0 | No |
| (2,-3) | Two independent choices | 0×2+0×(-3)=0 | No |
| (2,-2) | Two independent choices | 0×2+0×(-2)=0 | No |
| (2,-1) | Two independent choices | 0×2+0×(-1)=0 | No |
| (2,0) | Two independent choices | 0×2+0×0=0 | Yes |
| (2,1) | Two independent choices | 0×2+0×1=0 | Yes |
| (2,2) | Two independent choices | 0×2+0×2=0 | Yes |
| (2,3) | Two independent choices | 0×2+0×3=0 | Yes |
| (2,4) | Two independent choices | 0×2+0×4=0 | Yes |
| (2,5) | Two independent choices | 0×2+0×5=0 | Yes |
| (2,6) | Two independent choices | 0×2+0×6=0 | Yes |
| (3,-6) | Two independent choices | 0×3+0×(-6)=0 | No |
| (3,-5) | Two independent choices | 0×3+0×(-5)=0 | No |
| (3,-4) | Two independent choices | 0×3+0×(-4)=0 | No |
| (3,-3) | Two independent choices | 0×3+0×(-3)=0 | No |
| (3,-2) | Two independent choices | 0×3+0×(-2)=0 | No |
| (3,-1) | Two independent choices | 0×3+0×(-1)=0 | No |
| (3,0) | Two independent choices | 0×3+0×0=0 | Yes |
| (3,1) | Two independent choices | 0×3+0×1=0 | Yes |
| (3,2) | Two independent choices | 0×3+0×2=0 | Yes |
| (3,3) | Two independent choices | 0×3+0×3=0 | Yes |
| (3,4) | Two independent choices | 0×3+0×4=0 | Yes |
| (3,5) | Two independent choices | 0×3+0×5=0 | Yes |
| (3,6) | Two independent choices | 0×3+0×6=0 | Yes |
| (4,-6) | Two independent choices | 0×4+0×(-6)=0 | No |
| (4,-5) | Two independent choices | 0×4+0×(-5)=0 | No |
| (4,-4) | Two independent choices | 0×4+0×(-4)=0 | No |
| (4,-3) | Two independent choices | 0×4+0×(-3)=0 | No |
| (4,-2) | Two independent choices | 0×4+0×(-2)=0 | No |
| (4,-1) | Two independent choices | 0×4+0×(-1)=0 | No |
| (4,0) | Two independent choices | 0×4+0×0=0 | Yes |
| (4,1) | Two independent choices | 0×4+0×1=0 | Yes |
| (4,2) | Two independent choices | 0×4+0×2=0 | Yes |
| (4,3) | Two independent choices | 0×4+0×3=0 | Yes |
| (4,4) | Two independent choices | 0×4+0×4=0 | Yes |
| (4,5) | Two independent choices | 0×4+0×5=0 | Yes |
| (4,6) | Two independent choices | 0×4+0×6=0 | Yes |
| (5,-6) | Two independent choices | 0×5+0×(-6)=0 | No |
| (5,-5) | Two independent choices | 0×5+0×(-5)=0 | No |
| (5,-4) | Two independent choices | 0×5+0×(-4)=0 | No |
| (5,-3) | Two independent choices | 0×5+0×(-3)=0 | No |
| (5,-2) | Two independent choices | 0×5+0×(-2)=0 | No |
| (5,-1) | Two independent choices | 0×5+0×(-1)=0 | No |
| (5,0) | Two independent choices | 0×5+0×0=0 | Yes |
| (5,1) | Two independent choices | 0×5+0×1=0 | Yes |
| (5,2) | Two independent choices | 0×5+0×2=0 | Yes |
| (5,3) | Two independent choices | 0×5+0×3=0 | Yes |
| (5,4) | Two independent choices | 0×5+0×4=0 | Yes |
| (5,5) | Two independent choices | 0×5+0×5=0 | Yes |
| (5,6) | Two independent choices | 0×5+0×6=0 | Yes |
| (6,-6) | Two independent choices | 0×6+0×(-6)=0 | No |
| (6,-5) | Two independent choices | 0×6+0×(-5)=0 | No |
| (6,-4) | Two independent choices | 0×6+0×(-4)=0 | No |
| (6,-3) | Two independent choices | 0×6+0×(-3)=0 | No |
| (6,-2) | Two independent choices | 0×6+0×(-2)=0 | No |
| (6,-1) | Two independent choices | 0×6+0×(-1)=0 | No |
| (6,0) | Two independent choices | 0×6+0×0=0 | Yes |
| (6,1) | Two independent choices | 0×6+0×1=0 | Yes |
| (6,2) | Two independent choices | 0×6+0×2=0 | Yes |
| (6,3) | Two independent choices | 0×6+0×3=0 | Yes |
| (6,4) | Two independent choices | 0×6+0×4=0 | Yes |
| (6,5) | Two independent choices | 0×6+0×5=0 | Yes |
| (6,6) | Two independent choices | 0×6+0×6=0 | Yes |
The equation is 0=0. All integer pairs work; this is a two-parameter plane rather than one line.
Finite pictures illustrate the equation’s exact data. General existence, complete-family and impossibility claims follow from the proofs and conditions in the article.
Both zeros, nonzero target
Original equation and declared domain
0x+0y=1
x,y∈ℤ
Dashed orange: real equation. Filled blue circle: exact integer solution. Outlined green diamond in the count scene: both coordinates nonnegative. Small neutral dot: integer-grid position.
The line and plane scenes show only the integer points inside [−6,6]². Their finite tables do not exhaust an unbounded global family. The formulas and bounds state the full result.
Both-zero coefficients with nonzero target give no real geometry and no integer points.
Global integer solution set
- Positive gcd, or the explicit both-zero convention
- 0
No integer solutions
| Integer point (x,y) | Family parameter t | Original equation check | Both coordinates nonnegative |
|---|
There are no integer solution points in this window.
The equation is 0=1. No real or integer pair works.
Finite pictures illustrate the equation’s exact data. General existence, complete-family and impossibility claims follow from the proofs and conditions in the article.
Compare a fixed negative coordinate with the identity 0=0 and the contradiction 0=1. An absent variable is free; two absent variables do not leave a single line.
Do not infer that a zero coefficient makes the corresponding unknown zero. It makes that unknown absent from the equation and therefore free, subject only to any additional domain restrictions. Likewise, infinitely many integer solutions need not mean infinitely many nonnegative solutions.
| Equation | All integer solutions | Nonnegative solutions |
|---|---|---|
| 0x−3y=6 | (x,−2), x∈ℤ | None |
| 5x+0y=10 | (2,y), y∈ℤ | (2,y), y≥0 integer |
| 0x+0y=0 | Every pair in ℤ² | Every nonnegative integer pair |
| 0x+0y=1 | None | None |
Translate the count restrictions into integer parameter bounds
Return to x=−9+3t and y=9−2t. The table counts require −9+3t≥0, giving t≥3, and 9−2t≥0, giving t≤9/2. Since t is an integer, t≤4. Thus t=3 or 4, giving precisely (0,3) and (3,1). This proves completeness of the usable solutions, rather than just finding two examples.
In general, a coordinate h+kt≥0 gives t≥ceil(−h/k) if k>0, and t≤floor(−h/k) if k<0. Here ceil(s) is the least integer at least s, and floor(s) the greatest integer at most s. Division by a negative number reverses the inequality. If k=0, the coordinate is constant: h≥0 imposes no bound, while h<0 excludes every parameter.
Four and six, target two
Original equation and declared domain
4x+6y=2
x,y≥0, x,y∈ℤ
Dashed orange: real equation. Filled blue circle: exact integer solution. Outlined green diamond in the count scene: both coordinates nonnegative. Small neutral dot: integer-grid position.
The line and plane scenes show only the integer points inside [−6,6]². Their finite tables do not exhaust an unbounded global family. The formulas and bounds state the full result.
Global integer solution set
- Positive gcd, or the explicit both-zero convention
- 2
- One gcd certificate with the original coefficients
- 4×(-1)+6×1=2
- Algorithm’s particular solution (x₀,y₀)
- (-1,1)
- Primitive integer step (b/g,−a/g)
- (3,-2)
- All integer parameters
- Every integer t
(x,y)=((-1)+3t,1+(-2)t), t∈ℤ
Exact nonnegative parameter restriction
No parameter satisfies both nonnegative coordinates
| Integer point (x,y) | Family parameter t | Original equation check | Both coordinates nonnegative |
|---|---|---|---|
| (-4,3) | -1 | 4×(-4)+6×3=2 | No |
| (-1,1) | 0 | 4×(-1)+6×1=2 | No |
| (2,-1) | 1 | 4×2+6×(-1)=2 | No |
| (5,-3) | 2 | 4×5+6×(-3)=2 | No |
The integer family is valid, but x≥0 requires t≥1 and y≥0 requires t≤0. No nonnegative pair survives.
Finite pictures illustrate the equation’s exact data. General existence, complete-family and impossibility claims follow from the proofs and conditions in the article.
Minus two and three, target one
Original equation and declared domain
(-2)x+3y=1
x,y≥0, x,y∈ℤ
Dashed orange: real equation. Filled blue circle: exact integer solution. Outlined green diamond in the count scene: both coordinates nonnegative. Small neutral dot: integer-grid position.
The line and plane scenes show only the integer points inside [−6,6]². Their finite tables do not exhaust an unbounded global family. The formulas and bounds state the full result.
Global integer solution set
- Positive gcd, or the explicit both-zero convention
- 1
- One gcd certificate with the original coefficients
- (-2)×1+3×1=1
- Algorithm’s particular solution (x₀,y₀)
- (1,1)
- Primitive integer step (b/g,−a/g)
- (3,2)
- All integer parameters
- Every integer t
(x,y)=(1+3t,1+2t), t∈ℤ
Exact nonnegative parameter restriction
A different particular solution shifts the parameter values without changing the solution set. The bounds below refer to the displayed algorithm’s particular solution.
- Integer lower bound
- 0
- Integer upper bound
- No bound in this direction
| Integer point (x,y) | Family parameter t | Original equation check | Both coordinates nonnegative |
|---|---|---|---|
| (-5,-3) | -2 | (-2)×(-5)+3×(-3)=1 | No |
| (-2,-1) | -1 | (-2)×(-2)+3×(-1)=1 | No |
| (1,1) | 0 | (-2)×1+3×1=1 | Yes |
| (4,3) | 1 | (-2)×4+3×3=1 | Yes |
Nonnegative coordinates have an unbounded parameter interval. In the convenient family (1+3t,1+2t), all integers t≥0 work.
Finite pictures illustrate the equation’s exact data. General existence, complete-family and impossibility claims follow from the proofs and conditions in the article.
An integer equation can be solvable while its nonnegative count restriction is empty. Mixed signs can instead leave infinitely many nonnegative pairs.
Combine all lower bounds by taking the largest and all upper bounds by taking the smallest. If the resulting lower bound exceeds the upper bound, no integer t survives. A missing bound means that direction is unbounded; it is not replaced by an arbitrary drawing limit. For 4x+6y=2, the family x=−1+3t,y=1−2t requires t≥1 and t≤0, so there is no nonnegative solution despite integer solvability.
For −2x+3y=1, the convenient family (1+3t,1+2t) is nonnegative exactly when t≥0. There are infinitely many such pairs. With positive coefficients and positive target, both counts are bounded above; with mixed coefficient signs they need not be. The finite displayed window is separate from the actual parameter bounds.
A remainder condition hides one integer unknown
For a positive integer modulus m, write z≡w (mod m) when m | z−w. The normalized residues are 0,1,…,m−1. Every signed integer has a unique such residue: choose q=floor(z/m) and r=z−qm to get 0≤r<m. Two integers have the same residue exactly when their difference is a multiple of m. For example, −3≡4 (mod 7).
The congruence ax≡c (mod m) means ax−c is a multiple of m. Equivalently there exists an integer y with ax+my=c: if ax−c=mk, choose y=−k, and the reverse implication follows by rearranging. Therefore the positive gcd g=gcd(a,m) divides c exactly when the congruence is solvable. The modulus m≥1 guarantees that the coefficients are not both zero.
Six x, target four, modulus ten
Original equation and declared domain
6x≡4 (mod 10)
x∈ℤ; the modulus is positive
Checked filled circle: accepted solution class. Crossed hollow diamond: rejected class. All normalized residues are displayed exactly once.
- Positive gcd, or the explicit both-zero convention
- 2
- Step m/g, equal to the reduced modulus
- 5
- Number of accepted classes
- 2
- All accepted normalized classes modulo the original modulus
- 4, 9
- Complete integer congruence solution family
- x=4+5t, t∈ℤ
| Input residue r | Normalized ar residue | Required target residue | Accepted class |
|---|---|---|---|
| 0 | 0 | 4 | No |
| 1 | 6 | 4 | No |
| 2 | 2 | 4 | No |
| 3 | 8 | 4 | No |
| 4 | 4 | 4 | Yes |
| 5 | 0 | 4 | No |
| 6 | 6 | 4 | No |
| 7 | 2 | 4 | No |
| 8 | 8 | 4 | No |
| 9 | 4 | 4 | Yes |
The gcd is 2. Reducing gives 3x≡2 (mod 5), so x≡4 (mod 5) and the two classes modulo 10 are 4 and 9.
Finite pictures illustrate the equation’s exact data. General existence, complete-family and impossibility claims follow from the proofs and conditions in the article.
The residue cards cover the original modulus. The reduced step describes all integer solutions and determines how many original classes remain.
One solution x₀ comes from Bézout for (a,m), multiplied by c/g. The complete integer equation family shows that all congruence solutions are x=x₀+(m/g)t, t∈ℤ. The y coordinate is unnecessary once its existence is established. This describes all integers, rather than only a short residue table.
Modulo m there are exactly g distinct solution classes, represented by x₀+j(m/g) for j=0,…,g−1, then normalized into 0,…,m−1. Two of these could agree modulo m only if g divides their index difference, which is strictly between −g and g; hence the indices must agree. Every integer t has a remainder j modulo g, proving the list is complete. For m=1 there is one residue, 0, and every integer solves every linear congruence modulo 1.
Cancel a common factor only with the correct modulus
Solve 6x≡4 (mod 10). The gcd is 2, which divides 4. Writing 6x−4=10k and dividing the whole equality by 2 gives 3x−2=5k. Thus the equivalent congruence is 3x≡2 (mod 5), with the reduced modulus 5. Since 3×2≡1 (mod 5), multiplying by 2 gives x≡4 (mod 5).
All integers are x=4+5t. The two classes modulo 10 are 4 and 9, agreeing with g=2. Keeping modulus 10 after cancelling to 3x≡2 would discard valid solutions; for example x=9 solves the original, but 27 is not congruent to 2 modulo 10.
Six x, target four, modulus ten
Original equation and declared domain
6x≡4 (mod 10)
x∈ℤ; the modulus is positive
Checked filled circle: accepted solution class. Crossed hollow diamond: rejected class. All normalized residues are displayed exactly once.
- Positive gcd, or the explicit both-zero convention
- 2
- Step m/g, equal to the reduced modulus
- 5
- Number of accepted classes
- 2
- All accepted normalized classes modulo the original modulus
- 4, 9
- Complete integer congruence solution family
- x=4+5t, t∈ℤ
| Input residue r | Normalized ar residue | Required target residue | Accepted class |
|---|---|---|---|
| 0 | 0 | 4 | No |
| 1 | 6 | 4 | No |
| 2 | 2 | 4 | No |
| 3 | 8 | 4 | No |
| 4 | 4 | 4 | Yes |
| 5 | 0 | 4 | No |
| 6 | 6 | 4 | No |
| 7 | 2 | 4 | No |
| 8 | 8 | 4 | No |
| 9 | 4 | 4 | Yes |
The gcd is 2. Reducing gives 3x≡2 (mod 5), so x≡4 (mod 5) and the two classes modulo 10 are 4 and 9.
Finite pictures illustrate the equation’s exact data. General existence, complete-family and impossibility claims follow from the proofs and conditions in the article.
Six x, target three, modulus ten
Original equation and declared domain
6x≡3 (mod 10)
x∈ℤ; the modulus is positive
Checked filled circle: accepted solution class. Crossed hollow diamond: rejected class. All normalized residues are displayed exactly once.
- Positive gcd, or the explicit both-zero convention
- 2
- Step m/g, equal to the reduced modulus
- 5
- Number of accepted classes
- 0
- All accepted normalized classes modulo the original modulus
- No accepted residue classes
- Complete integer congruence solution family
- No integer solutions
| Input residue r | Normalized ar residue | Required target residue | Accepted class |
|---|---|---|---|
| 0 | 0 | 3 | No |
| 1 | 6 | 3 | No |
| 2 | 2 | 3 | No |
| 3 | 8 | 3 | No |
| 4 | 4 | 3 | No |
| 5 | 0 | 3 | No |
| 6 | 6 | 3 | No |
| 7 | 2 | 3 | No |
| 8 | 8 | 3 | No |
| 9 | 4 | 3 | No |
The gcd 2 does not divide 3, so no residue class solves the congruence.
Finite pictures illustrate the equation’s exact data. General existence, complete-family and impossibility claims follow from the proofs and conditions in the article.
The residue cards cover the original modulus. The reduced step describes all integer solutions and determines how many original classes remain.
More generally, if g | c, division gives (a/g)x≡c/g (mod m/g). The reduced coefficient is coprime to the reduced modulus. Bézout supplies an integer u with (a/g)u≡1 (mod m/g), so x≡u(c/g) modulo the reduced modulus. If m/g=1, the congruence imposes no restriction on integers; there is no need to invoke a special inverse convention.
Do not cancel an arbitrary noninvertible factor while retaining the modulus. From 2x≡0 (mod 6), the correct conclusion is x≡0 (mod 3), not x≡0 (mod 6). The original solutions include x=3. The existence test also distinguishes 6x≡3 (mod 10): its gcd 2 does not divide 3, so no class works.
An impossible residue proves an impossible integer equation
Congruence respects sums and products. If z=r+mk and w=s+mℓ, then z+w−(r+s)=m(k+ℓ), and zw−rs=m(rℓ+sk+mkℓ). Both differences are divisible by m. In particular, squaring a residue gives the residue of the square. These rules let finite remainder cases constrain every integer, including negative ones.
Modulo 4, residues 0,1,2,3 have square residues 0,1,0,1. Thus x²+y² has only residues 0,1 or 2 modulo 4. It can never have residue 3. Therefore x²+y²=3 has no integer solution, although its real circle contains many points. The sixteen-cell residue grid checks every possible pair of residue classes, not every integer individually.
Square-sum target three
Original equation and declared domain
x²+y²=3
x,y∈ℤ
Cell number: square-sum residue modulo 4. Checked blue circle: compatible with the target residue. Crossed hollow diamond: incompatible. Compatibility is a necessary condition for an integer solution.
For these fixed nonnegative targets, the equation proves |x|,|y|≤floor(√N). The point table checks that entire finite domain; its completeness comes from this bound, not merely from the drawing window.
- Number of compatible residue pairs
- 0
- Complete number of integer pairs
- 0
- Proved coordinate bound for a nonnegative target
- |x|,|y|≤1
No compatible residue pair: a global obstruction
| Residue pair (x,y) | Square-sum residue modulo 4 | Target residue modulo 4 | Compatible |
|---|---|---|---|
| (0,0) | 0 | 3 | No |
| (1,0) | 1 | 3 | No |
| (2,0) | 0 | 3 | No |
| (3,0) | 1 | 3 | No |
| (0,1) | 1 | 3 | No |
| (1,1) | 2 | 3 | No |
| (2,1) | 1 | 3 | No |
| (3,1) | 2 | 3 | No |
| (0,2) | 0 | 3 | No |
| (1,2) | 1 | 3 | No |
| (2,2) | 0 | 3 | No |
| (3,2) | 1 | 3 | No |
| (0,3) | 1 | 3 | No |
| (1,3) | 2 | 3 | No |
| (2,3) | 1 | 3 | No |
| (3,3) | 2 | 3 | No |
| Integer pair (x,y) | Exact square-sum check |
|---|
No square-sum cell has residue 3 modulo 4. This proves that no integer pair reaches target 3.
Finite pictures illustrate the equation’s exact data. General existence, complete-family and impossibility claims follow from the proofs and conditions in the article.
The sixteen residue pairs cover every integer pair’s possible remainders. A target residue absent from the grid is impossible globally.
The same proof excludes x²+y²=N whenever N≡3 (mod 4). It gives a necessary condition, not a characterization of all representable N. Nor does a compatible cell itself give actual integers satisfying the original equality; it gives only compatible remainders. Use a separate construction or complete bounded argument to establish existence.
For example, x²=2 passes a square-residue test modulo 7: residues 3 and 4 both have square residue 2. But no integer square equals 2. If |x|≤1, then x²≤1; if |x|≥2, then x²≥4. These exhaust the integers. Passing this one modulus therefore does not establish solvability.
A proved bound can turn a search into a complete proof
For x²+y²=5, both squares are nonnegative, so x²≤5 and y²≤5. Hence integer solutions satisfy |x|≤2 and |y|≤2. Unlike an arbitrary plotting window, this bound is proved from the equation and cannot omit a solution.
The only squares in that range are 0,1 and 4. To sum to 5, one coordinate square must be 1 and the other 4. Thus the complete list is (±1,±2) and (±2,±1), with each sign independent: eight distinct ordered pairs. The equal-scale lattice picture and its exact table show all eight, while the continuous circle is only the real comparison.
Square-sum target five
Original equation and declared domain
x²+y²=5
x,y∈ℤ
Cell number: square-sum residue modulo 4. Checked blue circle: compatible with the target residue. Crossed hollow diamond: incompatible. Compatibility is a necessary condition for an integer solution.
For these fixed nonnegative targets, the equation proves |x|,|y|≤floor(√N). The point table checks that entire finite domain; its completeness comes from this bound, not merely from the drawing window.
- Number of compatible residue pairs
- 8
- Complete number of integer pairs
- 8
- Proved coordinate bound for a nonnegative target
- |x|,|y|≤2
Compatible cells pass only this residue test. The actual equation still needs a construction or a proved complete bound.
| Residue pair (x,y) | Square-sum residue modulo 4 | Target residue modulo 4 | Compatible |
|---|---|---|---|
| (0,0) | 0 | 1 | No |
| (1,0) | 1 | 1 | Yes |
| (2,0) | 0 | 1 | No |
| (3,0) | 1 | 1 | Yes |
| (0,1) | 1 | 1 | Yes |
| (1,1) | 2 | 1 | No |
| (2,1) | 1 | 1 | Yes |
| (3,1) | 2 | 1 | No |
| (0,2) | 0 | 1 | No |
| (1,2) | 1 | 1 | Yes |
| (2,2) | 0 | 1 | No |
| (3,2) | 1 | 1 | Yes |
| (0,3) | 1 | 1 | Yes |
| (1,3) | 2 | 1 | No |
| (2,3) | 1 | 1 | Yes |
| (3,3) | 2 | 1 | No |
| Integer pair (x,y) | Exact square-sum check |
|---|---|
| (-2,-1) | (-2)²+(-1)²=5 |
| (-2,1) | (-2)²+1²=5 |
| (-1,-2) | (-1)²+(-2)²=5 |
| (-1,2) | (-1)²+2²=5 |
| (1,-2) | 1²+(-2)²=5 |
| (1,2) | 1²+2²=5 |
| (2,-1) | 2²+(-1)²=5 |
| (2,1) | 2²+1²=5 |
The equation forces |x|,|y|≤2. Exact checking gives all eight pairs (±1,±2),(±2,±1). Compatible residues alone would not prove that list.
Finite pictures illustrate the equation’s exact data. General existence, complete-family and impossibility claims follow from the proofs and conditions in the article.
Square-sum target zero
Original equation and declared domain
x²+y²=0
x,y∈ℤ
Cell number: square-sum residue modulo 4. Checked blue circle: compatible with the target residue. Crossed hollow diamond: incompatible. Compatibility is a necessary condition for an integer solution.
For these fixed nonnegative targets, the equation proves |x|,|y|≤floor(√N). The point table checks that entire finite domain; its completeness comes from this bound, not merely from the drawing window.
- Number of compatible residue pairs
- 4
- Complete number of integer pairs
- 1
- Proved coordinate bound for a nonnegative target
- |x|,|y|≤0
Compatible cells pass only this residue test. The actual equation still needs a construction or a proved complete bound.
Target zero has the sole solution (0,0).
| Residue pair (x,y) | Square-sum residue modulo 4 | Target residue modulo 4 | Compatible |
|---|---|---|---|
| (0,0) | 0 | 0 | Yes |
| (1,0) | 1 | 0 | No |
| (2,0) | 0 | 0 | Yes |
| (3,0) | 1 | 0 | No |
| (0,1) | 1 | 0 | No |
| (1,1) | 2 | 0 | No |
| (2,1) | 1 | 0 | No |
| (3,1) | 2 | 0 | No |
| (0,2) | 0 | 0 | Yes |
| (1,2) | 1 | 0 | No |
| (2,2) | 0 | 0 | Yes |
| (3,2) | 1 | 0 | No |
| (0,3) | 1 | 0 | No |
| (1,3) | 2 | 0 | No |
| (2,3) | 1 | 0 | No |
| (3,3) | 2 | 0 | No |
| Integer pair (x,y) | Exact square-sum check |
|---|---|
| (0,0) | 0²+0²=0 |
Nonnegative squares sum to zero only when both are zero. The sole integer and real point is the origin.
Finite pictures illustrate the equation’s exact data. General existence, complete-family and impossibility claims follow from the proofs and conditions in the article.
For target 5, the proved bound makes the eight-point table complete. For target 0, nonnegative squares force the single origin.
For x²+y²=0, nonnegativity forces x=y=0. For a negative target there are no real or integer solutions. For x²+y²=2, the same bound gives only (±1,±1), four ordered pairs. These elementary cases do not amount to a general algorithm for every nonlinear Diophantine equation.
Separate a construction, a filter and an obstruction
For ax+by=c, first handle both-zero coefficients; otherwise compute the positive gcd and test divisibility. Construct one solution, state the complete integer family, then impose any count or interval restrictions. Check a final pair in the original equation, including its signs and domain.
For a linear congruence, require a positive modulus, use the same gcd test and reduce the modulus along with the common factor. State whether you are listing all integer solutions or their finitely many residue classes. For a nonlinear equation, a modular obstruction can rule out solutions; a passed test needs further reasoning.
Predict before revealing the explorer: will the linear equation have lattice points, will any meet the nonnegative restriction, how many residue classes will survive, or will the square-sum grid contain a compatible cell? Compare a solvable integer equation with an impossible count problem, and a modular impossibility with a complete bounded construction. The diagram’s finite limits never replace the general proof.
Predict integer solutions before revealing the exact checks
Compare a full integer family, a restricted count problem, solution residues and a square-sum obstruction. Each drawing has an exact table; a finite plotting window and a proved complete list have different meanings.
Original equation and declared domain
4x+6y=18
x,y∈ℤ
Predict existence, the surviving count bounds, the accepted residues or the number of square-sum points. Explain your prediction before revealing it.
Computed solution markers, gcd, parameter bounds, residue statuses and solution tables are hidden. The chosen equation and neutral input grid remain available.
Dashed orange: real equation. Filled blue circle: exact integer solution. Outlined green diamond in the count scene: both coordinates nonnegative. Small neutral dot: integer-grid position.
The line and plane scenes show only the integer points inside [−6,6]². Their finite tables do not exhaust an unbounded global family. The formulas and bounds state the full result.
Finite pictures illustrate the equation’s exact data. General existence, complete-family and impossibility claims follow from the proofs and conditions in the article.
Worked examples
Find every usable table arrangement
Find all nonnegative integer solutions of 4x+6y=18.
- gcd(4,6)=2 divides 18. A Bézout pair is (−1,1), giving the particular solution (−9,9).
- All integer solutions are x=−9+3t and y=9−2t, with t∈ℤ.
- The count restrictions give t≥3 and t≤4. Only t=3,4 remain; substitution gives (0,3),(3,1).
Exactly two arrangements: no four-seat tables and three six-seat tables, or three four-seat tables and one six-seat table.
Filter a different particular solution
Find every nonnegative integer solution of 6x+9y=30.
- The gcd is 3 and 6×(−1)+9×1=3. Multiply by 10 for (x₀,y₀)=(−10,10).
- The complete family is x=−10+3t,y=10−2t. Nonnegativity gives t≥ceil(10/3)=4 and t≤5.
- At t=4,5 the pairs are (2,2),(5,0). Their original sums are 12+18=30 and 30+0=30.
The complete nonnegative list is (2,2) and (5,0).
Mixed coefficient signs leave an unbounded count family
Solve −2x+3y=1 over integers and then over nonnegative integers.
- The pair (1,1) works and the gcd is 1. The complete family is (1+3t,1+2t), t∈ℤ.
- Nonnegative coordinates require t≥ceil(−1/3)=0 and t≥ceil(−1/2)=0.
- Every integer t≥0 therefore works. Values t=0,1,2 give (1,1),(4,3),(7,5), but the list continues without an upper bound.
All integer solutions use t∈ℤ; the nonnegative solutions use precisely t=0,1,2,… and are infinite.
List both the integers and the residue classes
Solve 6x≡4 (mod 10), and state all solution residues modulo 10.
- The gcd is 2 and divides 4. Reduce the full divisibility equation to 3x≡2 (mod 5).
- Since 3×2≡1 (mod 5), multiply by 2 to obtain x≡4 (mod 5).
- Thus x=4+5t for all integer t. Normalizing the two classes modulo 10 gives 4 and 9; both have 6x residue 4.
All integers are 4+5t, t∈ℤ. The two residue classes modulo 10 are 4 and 9.
Use an obstruction for one target and a bound for another
Why does x²+y²=3 fail over integers, while x²+y²=5 has eight solutions?
- Square residues modulo 4 are only 0,1. Their pairwise sums cannot be 3, excluding the first equation.
- For the second, nonnegative squares force |x|,|y|≤2. The square values available are 0,1,4.
- Only 1+4 or 4+1 reaches 5. Choose either sign independently for each nonzero coordinate.
Target 3 is impossible by residues. Target 5 has exactly (±1,±2),(±2,±1), eight ordered integer pairs.
Try it yourself
The pair (1/2,1/2) satisfies 2x+2y=2. Does it solve the corresponding integer equation? Give its complete integer solution family.
Show the answer and reasoning
No. All integer solutions are (x,y)=(t,1−t), t∈ℤ.
Both coordinates of the displayed pair are nonintegers. Divide the equation by 2 to get x+y=1; an arbitrary integer x=t determines y=1−t, and every such pair works.
Does 12x+18y=7 have an integer solution? Justify your answer for every possible integer pair.
Show the answer and reasoning
No integer solution exists.
The gcd is 6. Every integer combination 12x+18y is a multiple of 6, whereas 7 is not. A search window is unnecessary.
Give all integer solutions of 6x+4y=2, starting from (1,−1). Explain the opposite signs in the step.
Show the answer and reasoning
(x,y)=(1+2t,−1−3t), t∈ℤ.
The gcd is 2, so the step is (4/2,−6/2)=(2,−3). Its contributions 6×2+4×(−3)=0 cancel. The coprime-difference proof shows every integer solution is in this family.
Find all integer solutions of 0x−3y=6. Are any nonnegative in both coordinates?
Show the answer and reasoning
All pairs are (x,−2), x∈ℤ. None have both coordinates nonnegative.
The equation fixes y=6/(−3)=−2 and does not restrict x. The count restriction on y fails for every free x.
Solve 0x+0y=0 and 0x+0y=−2 over integers. Can the first be described by a single line step?
Show the answer and reasoning
The first has every pair in ℤ²; the second has none. The first needs two independent integer choices, rather than one line parameter.
The left side is always 0. A one-parameter line would omit integer points away from that line; dividing by gcd(0,0) would also be invalid.
Find the full integer family for 4x+6y=2 and decide whether any pair is nonnegative.
Show the answer and reasoning
The family is (−1+3t,1−2t), t∈ℤ; no nonnegative pair exists.
The particular pair (−1,1) works. The coordinate bounds require t≥1 and t≤0 simultaneously, so their intersection is empty.
For −2x+3y=1, check whether the nonnegative solution list is finite. Give its exact parameter restriction.
Show the answer and reasoning
It is infinite: (x,y)=(1+3t,1+2t) for every integer t≥0.
Both coordinates increase with t. Their lower bounds round up to 0, and neither gives an upper bound. A finite diagram cannot make the list finite.
Solve −3x≡1 (mod 7). Check the residue of the product at your answer.
Show the answer and reasoning
x≡2 (mod 7), equivalently x=2+7t for integer t.
At x=2 the product is −6, whose normalized residue modulo 7 is 1. The gcd is 1, so there is one solution class. Adding 7 to x changes −3x by a multiple of 7.
A learner cancels 2 from 2x≡0 (mod 6) and writes x≡0 (mod 6). What is the correct conclusion and a counterexample to the learner’s claim?
Show the answer and reasoning
The equivalent result is x≡0 (mod 3). The integer x=3 solves the original but not the learner’s stronger congruence.
Divisibility means 2x=6k. Dividing the equality by 2 gives x=3k, changing the modulus to 3. There are two classes modulo 6, namely 0 and 3.
Solve 0x≡0 (mod 5), 0x≡2 (mod 5), and 7x≡−2 (mod 1).
Show the answer and reasoning
The first and third have every integer x as a solution. The second has none.
The first difference is 0, divisible by 5, while −2 is not divisible by 5. Modulus 1 divides every integer difference and has just the residue class 0.
Prove that x²+y²=11 has no integer solution without searching individual integers.
Show the answer and reasoning
There is no solution because 11≡3 (mod 4), which a sum of two integer squares cannot be.
Each square has residue 0 or 1 modulo 4; their sums have residues 0,1,2. This exhaustive residue argument applies to every signed integer pair.
Both 3² and 4² have residue 2 modulo 7. Does this prove an integer solution of x²=2? Explain completely.
Show the answer and reasoning
No. There is no integer solution of x²=2.
A compatible residue is only necessary. Integers with |x|≤1 have square at most 1; those with |x|≥2 have square at least 4. These cases leave no square equal to 2.
List every integer solution of x²+y²=2 and prove that the list is complete.
Show the answer and reasoning
The four pairs are (1,1),(1,−1),(−1,1),(−1,−1).
Each coordinate has absolute value at most 1, since its square is at most 2. In that range, both squares must be 1 to sum to 2. Each coordinate can independently have either sign.
A plot contains no lattice points satisfying 6x+9y=5 inside [−6,6]². Which extra fact proves global impossibility?
Show the answer and reasoning
gcd(6,9)=3 does not divide 5.
The picture checks only finitely many integer pairs. The divisibility fact excludes every pair in ℤ², inside and outside the window. An empty finite search alone would not do so.
What to carry forward
- For coefficients not both zero, ax+by=c is integer-solvable exactly when the positive gcd divides c.
- One particular solution plus the primitive step (b/g,−a/g) gives every integer solution; handle the both-zero plane separately.
- Count restrictions filter the integer parameter and may leave a finite, empty or unbounded set.
- A linear congruence has a complete family and a known class count; cancel the modulus along with a common factor.
- An impossible residue rules out integer solutions. A compatible residue or a finite plotting window needs additional reasoning to prove existence or completeness.
References
Sources for the concepts and teaching approaches in this article.
- Number Theory: In Context and Interactive · 2023/6 Edition, 20 June 2023Karl-Dieter CrismanTextbook chapter2.4 The Bezout Identity3.1 Linear Diophantine Equations5.1 Solving Linear Congruences
- PLP: An introduction to mathematical proof · 26 January 2026 editionSeçkin Demirbaş and Andrew RechnitzerTextbook chapter5.3 Congruence modulo n