Skip to content
Theorem

Integer solutions of

Algebra • Equations • Linear Equations

Formula

For integers with not both zero, has an integer solution if and only if divides . When and is any one integer solution, every integer solution is , for some integer , and distinct give distinct solutions.

How to use it

  1. 1Find one solution by trying until is a multiple of ; that search ends within steps.
  2. 2Then write the whole family with the step — the coefficients swap sides, and one of them changes sign.
  3. 3To count solutions inside given bounds, impose the bound on each variable separately, intersect the two ranges of , and remember both endpoints are solutions.

Worked example

Find all integer solutions of .

Step-by-step

  1. 1
    , which divides

    Why: So integer solutions exist.

  2. 2
    works:

    Why: Testing finds the first fit.

  3. 3

    Why: Step by , which leaves unchanged.

Answer

for every integer

Watch out

The step is , not — swapping them loses every solution but the one you started from. When , divide the whole equation by first; using the undivided coefficients as the step skips out of every solutions. And means there are no integer solutions at all, which is a legitimate answer.

Builds on

Also known as

linear diophantine equation, integral solutions of ax+by=c, integer solutions of a linear equation in two variables, diophantine, general solution of ax+by=c

Appears in past papers

2020 (I)