If are nonzero integers, , and is one solution of the linear Diophantine equation , then all solutions areSubtract two solutions and use the fact that and are coprime integers. The linear Diophantine equation solvability criterion says that a particular solution exists exactly when divides ; the extended Euclidean algorithm constructs one. This parametrization separates existence from the complete family of answers.
Bézout's identity 2026-10-13
For integers not both zero, there are integers such that . The extended Euclidean algorithm constructs them. For example, and ; the second identity also gives the modular inverse of modulo .
The identity converts a greatest common divisor into a solvability certificate. The linear Diophantine equation is solvable in integers precisely when divides . Every common divisor divides any integer linear combination; conversely, multiplying a Bézout identity by constructs a solution when that quotient is integral. The coefficients generally are not unique, as the description of all solutions of a linear Diophantine equation makes explicit.
Extended Euclidean algorithm Created 2026-09-29 Updated 2026-10-20
The extended Euclidean algorithm also computes integers satisfying , as in Bézout's identity. Back-substitution in the calculation under the Euclidean algorithm givesThus solves . The linear Diophantine equation is solvable exactly when divides : necessity follows from common divisibility, and multiplying this identity proves sufficiency. For coprime integers , the coefficient of is a modular inverse of modulo , and the coefficient of is a modular inverse of modulo , when the respective modulus is greater than one.
Number theory Created 2026-09-24 Updated 2026-10-13
Number theory studies integers, their divisibility, and the patterns created by prime numbers. Its questions often have short statements but rigid answers: which integers divide a given one, when does an equation have integer solutions, and when can arithmetic with congruence classes be reversed? The Euclidean algorithm and modular multiplicative inverses connect these questions through explicit calculations.
For example, and . Their shared prime factors give greatest common divisor . The Euclidean algorithm reaches that answer without finding either complete prime factorization. It also produces , an instance of Bézout's identity. This relation certifies every common divisor at once and solves an associated linear Diophantine equation.
Modular arithmetic retains only remainders, but the lost information can be surprisingly controlled. Multiplication by modulo is a permutation of all residue classes, because has modular inverse . Multiplication by modulo collapses fifteen residue classes to three. Thus an apparently small change in the modulus changes whether a calculation can be reversed. The Chinese remainder theorem explains another kind of compression: remainders modulo coprime integers can be combined into one remainder modulo their product.
Simple restrictions help reveal the structure without telling the whole story. Every prime number greater than three is congruent to or modulo : the other four residue classes force divisibility by or . The converse fails because and lie in those classes but are composite numbers. Necessary conditions are useful filters, not substitutes for primality testing.
The subject's appeal lies partly in this tension: prime factorization gives a clean description of every positive integer, while identifying factors and predicting their distribution lead to substantial further questions. Analytic number theory uses tools from analysis to study global patterns, and algebraic number theory extends arithmetic into number fields. Applications include cryptography and error-correcting codes; MIT's discrete applied mathematics course develops modular structures for both purposes. [ref]
https://ocw.mit.edu/courses/18-200-principles-of-discrete-applied-mathematics-spring-2024/mit18_200_s24_lec15.pdf. Ankur Moitra, MIT 18.200, Modular Arithmetic and Elementary Algebra, 2024, introduction
Euclid's Elements already gives a greatest-common-measure construction in Book VII, Proposition 2, and the argument that a finite list cannot exhaust the prime numbers in Book IX, Proposition 20. These are documented ancient treatments, rather than evidence that all of number theory began with one author. [ref]
https://mathcs.clarku.edu/~djoyce/java/elements/bookVII/propVII2.html. Euclid, Elements VII.2, translated text hosted by David Joyce
[ref]https://mathcs.clarku.edu/~djoyce/java/elements/bookIX/propIX20.html. Euclid, Elements IX.20, translated text hosted by David Joyce
Past exam of the mathematics course of the University of Cambridge 2012 ia Paper 4 1D i Solution Created 2026-09-24 Updated 2026-10-07
Use the Euclidean algorithm: , , , and . Back-substitution gives the Bezout identity . Multiplying by gives one solution of the linear Diophantine equation, and shifting the coefficients by multiples of reduces it toIndeed, . More generally all solutions are , , : subtracting this particular solution gives , and the coprime integers force .
Past exam of the mathematics course of the University of Cambridge 2014 ia Paper 4 1E Solution Created 2026-09-24 Updated 2026-10-06
The Euclidean algorithm givesThus the greatest common divisor is . The extended Euclidean algorithm reverses these divisions:This supplies the Bezout identity with , .
To obtain all solutions of a linear Diophantine equation, subtract this particular solution from any other and divide by . The result is . Since and are coprime integers, divides , givingEvery displayed pair satisfies the original linear Diophantine equation, so the parametrization is exhaustive.
For the modular arithmetic calculation, , so is the modular inverse of . Multiplication gives . The admissible integers are for , ending at ; the next is . There are such integers.
The greatest common divisor of and is , which divides . Divide the linear Diophantine equation by to obtainReducing modulo gives , so . Substitution gives the complete family of integer solutionsEvery such pair satisfies the equation, and every solution must have this residue for , so none are omitted. Positivity requires and . For integer these are exactly . Thus the pairs with both entries positive are
Back-substitute in the Euclidean algorithm to obtain an integer linear combination:Multiplying by gives the particular solution of the linear Diophantine equation. Subtracting it from any other solution and dividing by givesThe integers and are coprime, so divides . Writing forces . Conversely these expressions satisfy the original equation for every integer . Thus all solutions of a linear Diophantine equation here are
Back-substitution in the Euclidean algorithm gives the Bezout identityMultiplying by five produces a particular solution . Since and are coprime integers, all solutions of the linear Diophantine equation areReplacing by gives the smaller equivalent starting solutionIndeed . Conversely, subtracting this solution from any other gives . Coprimality forces to divide , and then is the corresponding multiple of . This proves completeness of the family.