Divisibility and factorization · Definition

Linear Diophantine equation

elementary number theorydivisibility and factorization

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.

\[x=x_0+\frac{b}{d}t,\quad y=y_0-\frac{a}{d}t,\quad t\in\mathbb{Z}\]

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

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