Divisibility and factorization · Definition
Linear Diophantine equation
Before you start you need to know
Linear Diophantine equations appear when splitting whole quantities into two types of units. Solving them relies on Bézout's identity and the greatest common divisor.
Definition
A linear Diophantine equation is \(ax+by=c\) with integer coefficients, where we seek integer pairs \(x,y\) as solutions.
If \(d=\gcd(a,b)\) divides \(c\), Bézout's identity gives integers \(x_0,y_0\) with \(ax_0+by_0=d\); multiplying by \(c/d\) yields a particular solution. Every other solution has the form \(x=x_0+\frac{b}{d}t\), \(y=y_0-\frac{a}{d}t\) with \(t\in\mathbb{Z}\), and there are no others.
If \(d\) does not divide \(c\), the equation has no integer solutions, even if it has rational ones. This condition is necessary because \(ax+by\) is always a multiple of \(d\). In \(6x+9y=10\) we have \(d=3\), which does not divide \(10\), so there are no integer solutions.
For example, for \(7x+5y=1\) the Euclidean algorithm gives \(7(3)+5(-4)=1\), so \((x_0,y_0)=(3,-4)\) is a particular solution and the general family is \(x=3+5t\), \(y=-4-7t\).
A typical mistake is forgetting to divide by \(d\) when building the general family: for \(a=4\), \(b=6\), \(c=2\), the step in \(x\) is \(6/2=3\) and in \(y\) is \(4/2=2\), not \(6\) and \(4\).
Think about it
Why must \(\gcd(a,b)\) divide \(c\) for a solution to exist?
Because \(ax+by\) is always a multiple of \(\gcd(a,b)\), so only multiples of that number can be reached.
Exercises 10
- What is the greatest common divisor of \(12\) and \(18\), which determines whether \(12x+18y=c\) has a solution?
- Which statement correctly describes when \(ax+by=c\) has integer solutions?
- What is the name of the theorem guaranteeing that \(d=\gcd(a,b)\) can be written as \(ax+by\) with integers \(x,y\)?
- What is the greatest common divisor of \(15\) and \(35\)?
- Does the equation \(4x+6y=5\) have integer solutions?
- If \(7(3)+5(-4)=1\), what is a particular solution of \(7x+5y=1\)?
- Given the particular solution \((x_0,y_0)=(2,-1)\) of \(4x+6y=2\), what is the general solution with \(t\in\mathbb{Z}\)?
- Let \(9x+15y=12\). What is the particular solution obtained from \(3=9(2)+15(-1)\)?
- For which value of \(c\) does the equation \(10x+4y=c\) have an integer solution?
- What particular solution of \(21x+14y=35\) comes from \(7=21(1)+14(-1)\)?
References
- David M. Burton, Elementary Number Theory, 7th edition, McGraw-Hill, 2011. cap. 2
- Ivan Niven, Herbert S. Zuckerman, Hugh L. Montgomery, An Introduction to the Theory of Numbers, 5th edition, Wiley, 1991. cap. 5