Learning goals and definitions
Prove divisibility results without numerical guesswork, construct rational numbers from integer pairs, and separate rational algebra from completeness of the reals. For integers , means for some integer . A prime is an integer whose positive divisors are only . The greatest common divisor of not-both-zero integers is their greatest positive common divisor.
Theorem: integer division and Bezout's identity
For integers and there are unique integers with and . For not-both-zero integers , there exist integers such that .
Proof of division. Among nonnegative integers of the form , choose the least ; such integers exist by taking sufficiently negative. If , then is a smaller nonnegative candidate, a contradiction. If two divisions exist, their remainders differ by a multiple of whose magnitude is less than , so the difference is zero and then the quotients agree.
Proof of Bezout. Positive integer combinations exist because one of is nonzero and its sign can be chosen. Choose the least such positive combination . Divide by ; its remainder is also an integer combination, so minimality forces remainder zero. Similarly . Any common divisor of divides every combination and hence . Thus is the greatest positive common divisor and has the required representation.
Consequence: Euclid's lemma. If a prime divides and does not divide , then . Write and multiply by . Each term on the left is divisible by , so . This is the missing ingredient for proving uniqueness of prime factorization, beyond the existence induction.
Return to the residue classes. For the illustration in §2.2, let . The division theorem just proved gives every integer a remainder with and divisible by , so every class is one of . If two such remainders are congruent, their difference is a multiple of with absolute value smaller than ; it is zero. Thus those classes are distinct and exhaustive. This supplies the earlier illustration's arithmetic input without using it to prove integer construction.
Proof X-ray
Minimality is used on a remainder that is itself a combination
The Bezout proof turns on one observation: dividing by gives the remainder , which is again an integer combination of and . The division theorem guarantees , and is the least positive combination, so cannot be positive; hence and . Well-ordering is used twice, once inside the division theorem and once to choose . The proof never computes : the Euclidean algorithm in the worked examples below is what finds it.
Rational numbers as equivalence classes
Take integer pairs with and define when . Reflexivity and symmetry are immediate. For transitivity, and imply ; cancelling nonzero gives . Thus the relation is an equivalence relation. Its classes are the rational numbers .
Define addition by and multiplication by . These rules must be independent of representatives. For example, if and , then , verifying product independence. The addition check follows by expanding and substituting the same two identities. Nonzero denominators are essential to the construction.
Counterexample mode
A zero denominator breaks transitivity
One might think the condition only keeps the notation meaningful. In fact it keeps the relation an equivalence. Allow the pair : then and , since and . But would require , which is false. The transitivity proof breaks exactly where it cancels the middle denominator , here equal to .
Worked examples
The Euclidean algorithm. , , , . Back-substitution gives , so the gcd is . The division steps preserve the common-divisor set because a divisor of two numbers divides their remainder and conversely.
An irrationality proof. If in lowest terms with positive integers , then . An even square has an even base, so . Substitution gives , hence is even too. Both share factor two, contradicting lowest terms. This proof excludes rational equality; it does not construct the real square root or prove completeness of .
Worked example 3.2.1
(A gcd, its Bezout coefficients and which equations they solve)
Find . The division steps are
so the last nonzero remainder, , is the gcd. Back-substitution, starting from the third line:
Check: . Multiplying by gives a solution , of . On the other hand has no integer solution, because divides every combination of and but does not divide .
The extended Euclidean algorithm used here can be run on any coefficients. The explorer below builds the same division table for and , adjusts signs to obtain with , and then decides an equation : when it lists the solutions, and otherwise it gives the divisibility reason that none exist. Its coefficients are limited to two digits; entering , reproduces the last three division steps above.
Every integer solution of ax + by = c
Choose a, b and c. The explorer runs the extended Euclidean algorithm on |a| and |b|, fixes the signs to obtain a·u + b·v = d, and then either lists the whole family x = x₀ + (b/d)t, y = y₀ − (a/d)t or gives the divisibility reason why no integer solution exists. Enter a pair of your own to see which parameter t it comes from.
Enter integers with at most four digits. Leave a box empty to clear the test.
Equation: 84x + 66y = 6
Row 0 and row 1 are |a| and |b|. Each later row is the row two above minus q times the row one above, where q is the quotient of their remainders, and satisfies |a|·s + |b|·t = r. The last nonzero r is d; multiplying s and t by the signs of a and b gives u and v.
| Row | Quotient q | Remainder r | s (for |a|) | t (for |b|) |
|---|---|---|---|---|
| 0 | — | 84 | 1 | 0 |
| 1 | — | 66 | 0 | 1 |
| 2 | 1 | 18 | 1 | −1 |
| 3 | 3 | 12 | −3 | 4 |
| 4 | 1 | 6 | 4 | −5 |
| 5 | 2 | 0 | −11 | 14 |
Bézout certificate: 84·4 + 66·(−5) = 6
Since d = 6 divides 6, put k = 6/6 = 1. Then (x₀, y₀) = (u·k, v·k) = (4, −5) is a solution, and every solution is x = 4 + 11t, y = −5 − 14t with t an integer.
| t | x | y | a·x + b·y | Equals c |
|---|---|---|---|---|
| −3 | −29 | 37 | 6 | ✓ |
| −2 | −18 | 23 | 6 | ✓ |
| −1 | −7 | 9 | 6 | ✓ |
| 0 | 4 | −5 | 6 | ✓ |
| 1 | 15 | −19 | 6 | ✓ |
| 2 | 26 | −33 | 6 | ✓ |
| 3 | 37 | −47 | 6 | ✓ |
Test your own pair
Enter both x and y to test a pair.
Line a·x + b·y = c with the integer solutions marked
Circles mark the seven members t = −3, …, 3; the table above lists the same points. The dashed line is a·x + b·y = c; solid lines are the axes. A larger filled circle is your test pair, if it is a solution inside the drawn box.
- gcd(a, b)
- 6
- Bézout certificate
- 84·4 + 66·(−5) = 6
- Integer solutions exist
- Yes
- Particular solution (x₀, y₀)
- (4, −5)
- x changes by b/d =
- 11
- y changes by −a/d =
- −14
84x + 66y = 6: d = 6 divides 6; solutions are x = 4 + 11t, y = −5 − 14t.
Enter both x and y to test a pair.
Why the family is complete
Every a·x + b·y is a multiple of d, since d divides a and b; so d ∤ c rules out solutions. If d | c, multiply the Bézout identity a·u + b·v = d by k = c/d to get a(uk) + b(vk) = c.
If (x, y) is another solution, subtracting gives a′(x − x₀) + b′(y − y₀) = 0 with a′ = a/d and b′ = b/d coprime. Then b′ divides x − x₀, say x − x₀ = b′t, and cancelling b′ gives y − y₀ = −a′t. Conversely every integer t gives a solution because the t-terms cancel.
Zero coefficients are included. If b = 0, then b′ = 0 and a′ = ±1: x stays at x₀ and the parameter is read from y. If a = 0, then b′ = ±1 and t is read from x. If a = b = 0 the equation is 0 = c: every pair when c = 0, none otherwise, and the gcd is not defined.
This figure covers |a| ≤ 99, |b| ≤ 99 and |c| ≤ 200; the family is infinite and only t = −3, …, 3 is listed. Presets and edits rebuild the whole computation. Test pairs stay on this page and are not stored.
Worked example 3.2.2
(Using Euclid's lemma twice)
Claim: if is an integer and , then .
Since and is prime, Euclid's lemma gives ; write . Likewise gives . Now is prime and , so Euclid's lemma gives , say . Then .
The primality of and is used at each step. The same claim with in place of is false: but .
Worked example 3.2.3
(Addition of rationals is independent of representatives)
Suppose and , that is and , with all denominators nonzero. We must show . The new denominators are nonzero because a product of nonzero integers is nonzero. Expanding and substituting the two identities,
This is exactly the required relation. A numerical check: with the representatives of and of , the rule gives
and because . So the sum is , as with the representatives and .
Quick check
(Find the quotient and remainder of and of on division by , with .)
For the negative dividend, choose the quotient so that the remainder is not negative.
Solution · Answer
, so , . For , the quotient would give with a negative remainder, so take : , with . The two remainders add to , as they must when .
Quick check
(Does imply or ?)
Euclid's lemma is stated for primes; try a product of a multiple of and a multiple of .
Solution · Answer
No. , but and . The proof of Euclid's lemma fails at its first step: , yet , so no combination equals .
Quick check
(Is ? Is ?)
Compare the cross products and .
Solution · Answer
For and : and , so they are equivalent; both represent . For and : but , so they are not equivalent; they represent and .
Graded practice
- Foundation. Divide by with a remainder in the required range.
- Core. Find and express it as an integer combination.
- Core. Prove is irrational, using Euclid's lemma.
- Proof. If and , prove . Give a counterexample without coprimality.
Full solutions
- , with . Using quotient would produce negative remainder and violate the chosen convention.
- , , , . Back-substitution gives , so the gcd is one.
- Suppose in lowest terms with . Then , so Euclid's lemma gives . Write to obtain , so too, contradicting coprimality.
- Bezout gives . Multiplying by , both terms on the left are divisible by because . Thus . Without coprimality, but .
Summary and term definitions
Divisibility is an integer multiple relation; a gcd is normalized positive. Coprime means gcd one; Bezout coefficients express that gcd as a linear combination. A rational number is a class of equivalent fractions, not a unique numerator–denominator pair. Each extension of a number system requires well-defined operations, while real completeness is an additional property beyond rational arithmetic.