The Central Idea
A Diophantine equation is an equation for which the variables are required to take integer values.
A basic linear Diophantine equation has the form
\[ \boxed{ax+by=c}, \]where \(a\), \(b\), and \(c\) are integers and the unknowns \(x\) and \(y\) must also be integers.
A First Example
Consider
\[ 3x+5y=17. \]One integer solution is
\[ x=4,\qquad y=1, \]because
\[ 3(4)+5(1)=12+5=17. \]Therefore,
\[ \boxed{(x,y)=(4,1)} \]is an integer solution.
Real Solutions Are Not Enough
The equation
\[ 2x+4y=7 \]has infinitely many real solutions, but it has no integer solutions.
The left side is always even when \(x\) and \(y\) are integers, while the right side is odd.
Thus the integer restriction creates an arithmetic obstruction.
The GCD Solvability Test
For the linear Diophantine equation
\[ ax+by=c, \]let
\[ d=\gcd(a,b). \]Integer solutions exist exactly when
\[ \boxed{d\mid c}. \]Why the GCD Must Divide \(c\)
If
\[ ax+by=c \]has an integer solution, then \(c\) is an integer linear combination of \(a\) and \(b\).
Since
\[ d=\gcd(a,b) \]divides both \(a\) and \(b\), it divides every integer linear combination of them.
Therefore,
\[ \boxed{d\mid c}. \]Why the Condition Is Sufficient
Bézout's identity guarantees integers \(u\) and \(v\) such that
\[ au+bv=d, \]where
\[ d=\gcd(a,b). \]If \(d\mid c\), write
\[ c=dk. \]Multiply the Bézout identity by \(k\):
\[ a(uk)+b(vk)=c. \]Therefore an integer solution exists.
Example: No Integer Solution
Determine whether
\[ 12x+18y=5 \]has integer solutions.
Compute
\[ \gcd(12,18)=6. \]Since
\[ 6\nmid5, \]we conclude
\[ \boxed{\text{there are no integer solutions}}. \]Example: Solutions Exist
Consider
\[ 12x+18y=30. \]Again,
\[ \gcd(12,18)=6. \]Since
\[ 6\mid30, \]integer solutions exist.
Reducing by the Greatest Common Divisor
If
\[ d=\gcd(a,b) \]divides \(c\), divide the entire equation by \(d\).
For
\[ 12x+18y=30, \]divide by \(6\):
\[ \boxed{2x+3y=5}. \]The reduced coefficients \(2\) and \(3\) are relatively prime.
Finding One Particular Solution
For
\[ 2x+3y=5, \]inspection gives
\[ x=1,\qquad y=1. \]Indeed,
\[ 2(1)+3(1)=5. \]Thus
\[ \boxed{(x_0,y_0)=(1,1)} \]is one particular solution.
From One Solution to All Solutions
Suppose
\[ ax+by=c \]has one solution
\[ (x_0,y_0). \]Let
\[ d=\gcd(a,b). \]Then every integer solution is given by
\[ \boxed{ x=x_0+\frac{b}{d}t, \qquad y=y_0-\frac{a}{d}t, \qquad t\in\mathbb Z }. \]Example: Complete Solution Family
Return to
\[ 12x+18y=30. \]We found
\[ (x_0,y_0)=(1,1) \]for the reduced equation, and
\[ d=\gcd(12,18)=6. \]Therefore,
\[ x=1+\frac{18}{6}t=1+3t \]and
\[ y=1-\frac{12}{6}t=1-2t. \]Hence
\[ \boxed{ x=1+3t,\qquad y=1-2t,\qquad t\in\mathbb Z }. \]Checking the General Solution
Substitute
\[ x=1+3t \]and
\[ y=1-2t \]into
\[ 12x+18y. \]Then
\[ 12(1+3t)+18(1-2t) = 12+36t+18-36t = 30. \]The parameter cancels, so every integer \(t\) produces a valid solution.
Why the General Solution Has This Form
Suppose
\[ (x_0,y_0) \]and
\[ (x,y) \]both solve
\[ ax+by=c. \]Subtract the equations:
\[ a(x-x_0)+b(y-y_0)=0. \]Thus
\[ a(x-x_0)=-b(y-y_0). \]The relatively prime reduced coefficients force the differences to occur in fixed integer steps.
The Step Sizes
Let
\[ d=\gcd(a,b). \]Then moving
\[ x \]by
\[ \frac{b}{d} \]changes \(ax\) by
\[ a\frac{b}{d}. \]Moving
\[ y \]by
\[ -\frac{a}{d} \]changes \(by\) by the exact opposite amount.
Therefore the total remains \(c\).
Finding One Solution with the Euclidean Algorithm
Consider
\[ 35x+22y=1. \]Since
\[ \gcd(35,22)=1, \]solutions exist.
The Euclidean Algorithm gives
\[ 35=22(1)+13, \] \[ 22=13(1)+9, \] \[ 13=9(1)+4, \] \[ 9=4(2)+1. \]Back-Substitution
Start with
\[ 1=9-2(4). \]Since
\[ 4=13-9, \]substitute:
\[ 1=3(9)-2(13). \]Since
\[ 9=22-13, \]we get
\[ 1=3(22)-5(13). \]Since
\[ 13=35-22, \]substitute again:
\[ 1=-5(35)+8(22). \]A Particular Solution from Bézout's Identity
The identity
\[ 1=-5(35)+8(22) \]gives the particular solution
\[ \boxed{x_0=-5,\qquad y_0=8}. \]Therefore every solution to
\[ 35x+22y=1 \]is
\[ \boxed{ x=-5+22t,\qquad y=8-35t,\qquad t\in\mathbb Z }. \]Scaling a Bézout Identity
Suppose we want to solve
\[ 35x+22y=7. \]From
\[ 1=-5(35)+8(22), \]multiply by \(7\):
\[ 7=-35(35)+56(22). \]Therefore one solution is
\[ \boxed{x_0=-35,\qquad y_0=56}. \]All Solutions After Scaling
Since
\[ \gcd(35,22)=1, \]all solutions to
\[ 35x+22y=7 \]are
\[ \boxed{ x=-35+22t,\qquad y=56-35t,\qquad t\in\mathbb Z }. \]Different particular solutions may look different but generate the same complete family.
Finding a Simpler Particular Solution
A particular solution obtained from back-substitution may be large. The parameterized family can often be used to choose a simpler representative.
For
\[ x=-35+22t, \]choose \(t=2\):
\[ x=9. \]Then
\[ y=56-70=-14. \]Thus
\[ \boxed{(9,-14)} \]is another valid particular solution.
Connection to Linear Congruences
The equation
\[ ax+by=c \]can be reduced modulo \(b\):
\[ ax\equiv c\pmod b. \]Solving that congruence gives possible values of \(x\), after which \(y\) can be recovered from the original equation.
Thus linear Diophantine equations and linear congruences are two views of the same divisibility structure.
Example: Solve by Congruence
Solve
\[ 7x+11y=29. \]Reduce modulo \(11\):
\[ 7x\equiv29\pmod{11}. \]Since
\[ 29\equiv7\pmod{11}, \]we have
\[ 7x\equiv7\pmod{11}. \]Because \(7\) is invertible modulo \(11\),
\[ x\equiv1\pmod{11}. \]Completing the Congruence Method
Write
\[ x=1+11t. \]Substitute into
\[ 7x+11y=29: \] \[ 7(1+11t)+11y=29. \]Simplify:
\[ 7+77t+11y=29, \] \[ 11y=22-77t, \] \[ y=2-7t. \]Therefore,
\[ \boxed{ x=1+11t,\qquad y=2-7t,\qquad t\in\mathbb Z }. \]Positive Integer Solutions
Sometimes a problem requires
\[ x>0,\qquad y>0. \]After finding the full integer family, impose these additional inequalities on the parameter.
For example, from
\[ x=1+11t, \qquad y=2-7t, \]positivity restricts which integer values of \(t\) are allowed.
Example: Restricting the Parameter
Require
\[ x=1+11t>0 \]and
\[ y=2-7t>0. \]The first inequality gives
\[ t>-\frac{1}{11}, \]while the second gives
\[ t<\frac{2}{7}. \]The only integer satisfying both is
\[ t=0. \]Thus the only positive integer solution is
\[ \boxed{(x,y)=(1,2)}. \]Nonnegative Integer Solutions
In counting or allocation problems, the conditions may instead be
\[ x\ge0,\qquad y\ge0. \]The same method applies:
- find the complete integer solution family;
- translate the nonnegativity requirements into inequalities for \(t\);
- identify the allowable integer values of \(t\).
Example: A Purchase Problem
Suppose items of one type cost \(4\) units and items of another type cost \(7\) units. We want a total cost of \(39\):
\[ 4x+7y=39, \]with
\[ x\ge0,\qquad y\ge0. \]Reduce modulo \(4\):
\[ 7y\equiv39\pmod4. \]Since
\[ 7\equiv3,\qquad39\equiv3\pmod4, \]we obtain
\[ 3y\equiv3\pmod4, \]so
\[ y\equiv1\pmod4. \]Completing the Purchase Example
Write
\[ y=1+4t. \]Substitute:
\[ 4x+7(1+4t)=39. \]Then
\[ 4x=32-28t \]and
\[ x=8-7t. \]Thus
\[ x=8-7t,\qquad y=1+4t. \]Nonnegativity requires
\[ 0\le t\le1. \]Therefore the nonnegative solutions are
\[ \boxed{(8,1)\text{ and }(1,5)}. \]Geometric View
The real solutions of
\[ ax+by=c \]lie on a straight line in the coordinate plane.
The Diophantine solutions are the points on that line whose coordinates are both integers.
Depending on the GCD condition, the line may pass through no lattice points or through infinitely many regularly spaced lattice points.
Why Solutions Come in a Regular Pattern
Once one integer point lies on the line, every other integer solution is reached by adding the vector
\[ \left(\frac{b}{d},-\frac{a}{d}\right) \]an integer number of times.
Thus the integer solutions form a discrete arithmetic pattern along the line.
Common Error: Solving Over the Reals Instead of the Integers
From
\[ 3x+5y=17, \]ordinary algebra gives
\[ y=\frac{17-3x}{5}. \]But not every real \(x\) produces an integer \(y\).
A Diophantine equation requires both coordinates to be integers.
Common Error: Skipping the GCD Test
Before searching for solutions to
\[ ax+by=c, \]compute
\[ d=\gcd(a,b). \]If
\[ d\nmid c, \]no amount of trial and error can produce an integer solution.
Common Error: Giving Only One Solution
If one integer solution exists for a nondegenerate linear Diophantine equation in two variables, there are usually infinitely many integer solutions.
A complete answer should normally give the parameterized family
\[ x=x_0+\frac{b}{d}t, \qquad y=y_0-\frac{a}{d}t. \]Common Error: Using the Wrong Step Sizes
The solution increments are
\[ \frac{b}{d} \]for \(x\), and
\[ -\frac{a}{d} \]for \(y\).
The signs must be opposite so that the changes in \(ax\) and \(by\) cancel.
Common Error: Forgetting Domain Restrictions
A word problem may require positive or nonnegative values.
The general integer solution may include negative values that are mathematically valid but inappropriate for the application.
Always apply the problem's domain restrictions after finding the full integer family.
A Reliable Procedure for \(ax+by=c\)
- Compute \(d=\gcd(a,b)\).
- Check whether \(d\mid c\).
- If \(d\nmid c\), conclude that no integer solution exists.
- If \(d\mid c\), reduce the equation by \(d\) when convenient.
- Find one particular integer solution by inspection, congruence, or the Extended Euclidean Algorithm.
- Write the full family \[ x=x_0+\frac{b}{d}t,\qquad y=y_0-\frac{a}{d}t. \]
- Let \(t\in\mathbb Z\).
- Apply positivity, nonnegativity, or other restrictions if required.
- Substitute to verify the solution family.
Example: Full Workflow
Solve
\[ 18x+30y=42. \]First,
\[ d=\gcd(18,30)=6. \]Since
\[ 6\mid42, \]solutions exist.
Divide by \(6\):
\[ 3x+5y=7. \]Completing the Full Workflow
One solution to
\[ 3x+5y=7 \]is
\[ x=-1,\qquad y=2, \]because
\[ 3(-1)+5(2)=7. \]Therefore,
\[ x=-1+\frac{30}{6}t=-1+5t \]and
\[ y=2-\frac{18}{6}t=2-3t. \]Hence
\[ \boxed{ x=-1+5t,\qquad y=2-3t,\qquad t\in\mathbb Z }. \]Practice 1: Test Solvability
Determine whether
\[ 8x+14y=25 \]has integer solutions.
Practice 2: Find One Solution
Find one integer solution to
\[ 7x+5y=1. \]Practice 3: Find All Solutions
Solve completely:
\[ 7x+5y=1. \]Practice 4: Reduce by the GCD
Reduce
\[ 24x+36y=60 \]by the greatest common divisor of the coefficients.
Practice 5: Solve a Reduced Equation
Find all integer solutions to
\[ 2x+3y=5. \]Practice 6: Congruence Method
Solve
\[ 9x+14y=5 \]by first reducing modulo \(14\) or modulo \(9\).
Practice 7: Positive Integer Solutions
Find all positive integer solutions to
\[ 4x+7y=39. \]Practice 8: Nonnegative Solutions
Find all nonnegative integer solutions to
\[ 6x+9y=45. \]Practice 9: Explain the Criterion
Explain why
\[ 10x+15y=7 \]has no integer solutions.
Practice 10: Identify the Error
A student finds one solution
\[ (x,y)=(2,1) \]to
\[ 3x+5y=11 \]and says this is the complete answer.
Explain what is missing.
Practice Answers
Practice 1
\[ \gcd(8,14)=2. \]Since
\[ 2\nmid25, \]we conclude
\[ \boxed{\text{no integer solutions}}. \]Practice 2
One solution is
\[ x=3,\qquad y=-4, \]because
\[ 7(3)+5(-4)=21-20=1. \]Therefore,
\[ \boxed{(3,-4)}. \]Practice 3
Since
\[ \gcd(7,5)=1, \]and one solution is \((3,-4)\), all solutions are
\[ \boxed{ x=3+5t,\qquad y=-4-7t,\qquad t\in\mathbb Z }. \]Practice 4
\[ \gcd(24,36)=12. \]Divide by \(12\):
\[ \boxed{2x+3y=5}. \]Practice 5
One solution is
\[ (x_0,y_0)=(1,1). \]Therefore,
\[ \boxed{ x=1+3t,\qquad y=1-2t,\qquad t\in\mathbb Z }. \]Practice 6
Reduce modulo \(14\):
\[ 9x\equiv5\pmod{14}. \]The inverse of \(9\) modulo \(14\) is \(11\), because
\[ 9\cdot11=99\equiv1\pmod{14}. \]Thus
\[ x\equiv55\equiv13\pmod{14}. \]Write
\[ x=13+14t. \]Substitute:
\[ 9(13+14t)+14y=5. \]Then
\[ y=-8-9t. \]Therefore,
\[ \boxed{ x=13+14t,\qquad y=-8-9t,\qquad t\in\mathbb Z }. \]Practice 7
From the earlier parameterization,
\[ x=8-7t,\qquad y=1+4t. \]Positivity requires
\[ t=0 \]only.
Therefore,
\[ \boxed{(x,y)=(8,1)}. \]Practice 8
Divide by \(3\):
\[ 2x+3y=15. \]One solution is
\[ (x_0,y_0)=(0,5). \]Thus
\[ x=3t, \qquad y=5-2t. \]Nonnegativity requires
\[ t=0,1,2. \]Therefore,
\[ \boxed{ (0,5),\ (3,3),\ (6,1) }. \]Practice 9
\[ \gcd(10,15)=5. \]But
\[ 5\nmid7. \]Since every integer linear combination of \(10\) and \(15\) is divisible by \(5\), it cannot equal \(7\).
Therefore,
\[ \boxed{\text{no integer solutions}}. \]Practice 10
Since
\[ \gcd(3,5)=1, \]one solution generates infinitely many.
From \((2,1)\),
\[ \boxed{ x=2+5t,\qquad y=1-3t,\qquad t\in\mathbb Z }. \]The student gave only one particular solution rather than the complete solution family.
What to Remember
- A Diophantine equation requires integer solutions.
- For \(ax+by=c\), let \(d=\gcd(a,b)\).
- Integer solutions exist exactly when \(d\mid c\).
- Bézout's identity provides a systematic route to one particular solution.
- Once one solution \((x_0,y_0)\) is known, all solutions are \[ x=x_0+\frac{b}{d}t,\qquad y=y_0-\frac{a}{d}t. \]
- Linear congruences and linear Diophantine equations express the same divisibility structure in different forms.
- Positive or nonnegative applications require restricting the integer parameter.
- Always distinguish one particular solution from the complete family of solutions.
The central workflow is: test divisibility by the GCD, find one integer solution, then use the parameter step pattern to generate every solution.
Where We Go Next
Diophantine equations use divisibility and modular structure to control integer solutions. The next lesson, Fermat and Euler Relationships, develops powerful congruence results for powers and relatively prime integers, creating tools that later support modular inverses, large-exponent calculations, and introductory cryptography.