Bezout's Identity

Take two integers, say 252252 and 105105. Can you always find whole numbers xx and yy, possibly negative? These numbers should satisfy 252x+105y252x + 105y equals their greatest common divisor. This question looks innocent. But it sits at the foundation of nearly all elementary number theory. It is the precise statement that the greatest common divisor is not just a number you can compute. It is also a number you can build out of the original two integers. This construction uses only addition, subtraction, and integer scaling. Bézout's identity answers this question completely, and does more. It characterizes exactly which integers arise as 252x+105y252x+105y for varying x,yx,y. These are namely all multiples of gcd⁡(252,105)=21\gcd(252,105)=21, and nothing else. This dual nature — an existence statement and a classification statement — is what makes the identity so load-bearing. It converts a purely multiplicative notion (divisibility, common divisors) into an additive, linear one (integer combinations). That translation is the single most useful trick in the elementary theory of integers. The identity is the theoretical engine behind the Euclidean Algorithm. Run in reverse, the algorithm's steps produce the coefficients x,yx,y explicitly. This gives the Extended Euclidean Algorithm. It is also the quiet reason Euclid's Lemma holds (if a prime divides a product it divides a factor). It is the reason linear Diophantine equations ax+by=cax+by=c are solvable exactly when gcd⁡(a,b)∣c\gcd(a,b)\mid c. And it is the reason modular inverses exist whenever gcd⁡(a,n)=1\gcd(a,n)=1. This is the starting point for solving Linear Congruences. This article states and proves Bézout's identity from first principles. It uses only the Well-Ordering Principle and the division algorithm. It proves the full converse characterizing representable integers. It works two concrete asymmetric examples by hand. And it shows exactly which hypothesis cannot be dropped (that a,ba,b are not both zero).

Key takeaways
  • For integers a,ba,b not both zero, there exist integers x,yx,y with ax+by=gcd⁡(a,b)ax+by=\gcd(a,b).
  • The set of all values {ax+by:x,y∈Z}\{ax+by : x,y \in \mathbb{Z}\} equals exactly the set of multiples of gcd⁡(a,b)\gcd(a,b).
  • The coefficients x,yx,y are never unique; the full solution set is an explicit line of lattice points.
  • Proved via the well-ordering principle: take the smallest positive value of ax+byax+by, show it divides both aa and bb.
  • The identity is the theoretical justification for the Extended Euclidean Algorithm and for solvability of ax+by=cax+by=c.
  • Key idea: the gcd is the smallest positive integer expressible as an integer linear combination of aa and bb.

Where this lives today

Bézout's identity is the computational backbone of modular arithmetic in cryptography: the Extended Euclidean Algorithm uses exactly the back-substitution shown above to compute modular inverses, the core operation inside RSA key generation, Diffie–Hellman exchange setup, and elliptic curve cryptography. In coding theory, it underlies the Chinese Remainder Theorem's constructive proof, which reconstructs a number from its residues by explicitly building Bézout coefficients for the moduli. In computer algebra systems, solving linear Diophantine equations ax+by=cax+by=c is done by first checking gcd⁡(a,b)∣c\gcd(a,b)\mid c and then scaling a Bézout pair — precisely the argument used in Example 2. In abstract algebra, the identity generalizes verbatim to any Principal Ideal Domain (polynomial rings over a field, Gaussian integers, and more), where it is the statement that every ideal is principal and generated by a gcd; this generalization is one of the first deep structural facts students meet when moving from Z\mathbb{Z} to ring theory. In numerical analysis and lattice-based cryptography, Bézout-type combinations appear in lattice reduction algorithms (e.g. the LLL algorithm) that search for short integer combinations of basis vectors, a higher-dimensional analogue of exactly this identity.

Ask the tutor: Can you show me step by step how the Extended Euclidean Algorithm recovers a Bézout pair for gcd(1740, 493)?

DefinitionBézout's Identity

Let a,b∈Za,b \in \mathbb{Z}, not both zero, and let d=gcd⁡(a,b)d = \gcd(a,b) denote their greatest common divisor: the unique positive integer dividing both aa and bb that is divisible by every common divisor of aa and bb.

Bézout's identity is the statement that there exist integers x,y∈Zx,y \in \mathbb{Z} such that

ax+by=d.ax + by = d.

Such a pair (x,y)(x,y) is called a Bézout pair for (a,b)(a,b), and any integer of the form ax+byax+by is called an integer linear combination of aa and bb. The strong form of the identity further asserts that the set of all such combinations,

S={ ax+by:x,y∈Z },S = \{\, ax+by : x,y \in \mathbb{Z} \,\},

is exactly the set of all integer multiples of dd, i.e. S=dZS = d\mathbb{Z}.

Intuition

Think of aa and bb as two step sizes you are allowed to walk, forward or backward, along the number line, and you may combine any number of steps of each kind (that is what "integer multiple" means). The set of all positions you can reach, S={ax+by}S = \{ax+by\}, turns out to be beautifully rigid: it is always an evenly spaced grid of points, a copy of dZd\mathbb{Z} for some d≥0d\ge 0. Bézout's identity says this dd is precisely gcd⁡(a,b)\gcd(a,b) — the largest common divisor is also the smallest positive reachable distance. The key structural fact hiding underneath is that SS is closed under addition, subtraction, and scaling by any integer — it is what algebraists call an ideal of Z\mathbb{Z} — and every such subset of Z\mathbb{Z} that contains a nonzero element is automatically the multiples of its own smallest positive element. This is why the proof does not need to mention the Euclidean Algorithm at all: it is a direct consequence of the Well-Ordering Principle, the fact that every nonempty set of positive integers has a least element.

Figure
Reachable combinations of a=252, b=105 form exactly the multiples of d=21
−42 −21 0 21 42 63 d = gcd(252, 105) = 21 Every point 252x + 105y lands exactly on a multiple of 21

Prime-power lattice picture

A second way to see the identity is geometrically, through the lattice of pairs (x,y)(x,y) and the linear map (x,y)↦ax+by(x,y)\mapsto ax+by.

Figure
Lattice points (x,y) mapped by 252x+105y always hit multiples of 21
(0,0) ↦ 0 (2,-9) ↦ 504-945=-441=-21·21 (-2,5) ↦ -504+525=21 x - y integer lattice; map (x,y) ↦ 252x + 105y always lands in 21ℤ

Both pictures illustrate the same content: no matter how you combine 252252 and 105105 with integer coefficients, you can never escape the multiples of 2121, and 2121 itself is achievable, e.g. with (x,y)=(−2,5)(x,y) = (-2,5): 252(−2)+105(5)=−504+525=21252(-2) + 105(5) = -504+525 = 21.

TheoremBézout's Identity, strong form

Let a,b∈Za, b \in \mathbb{Z} with not both aa and bb equal to 00, and let d=gcd⁡(a,b)d=\gcd(a,b). Then: 1. (Existence) There exist x,y∈Zx,y \in \mathbb{Z} such that ax+by=dax+by=d. 2. (Characterization) { ax+by:x,y∈Z }=dZ={…,−2d,−d,0,d,2d,…}\{\, ax+by : x,y\in\mathbb{Z}\,\} = d\mathbb{Z} = \{\ldots,-2d,-d,0,d,2d,\ldots\}.

LemmaLeast positive element of an integer combination set

Let a,b∈Za,b\in\mathbb{Z}, not both zero, and let

S={ax+by:x,y∈Z}.S = \{ax+by : x,y\in\mathbb{Z}\}.

Then SS contains a smallest positive element mm, and every element of SS is a multiple of mm.

Proof

Non-emptiness of positive elements. Since a,ba,b are not both zero, at least one of a,−a,b,−ba,-a,b,-b is a positive integer (if a≠0a\neq 0 then aa or −a-a is positive; similarly for bb). Each of a,−a,b,−ba, -a, b, -b lies in SS, taking (x,y)(x,y) to be (1,0),(−1,0),(0,1),(0,−1)(1,0),(-1,0),(0,1),(0,-1) respectively. Hence the set S+=S∩Z>0S^+ = S \cap \mathbb{Z}_{>0} of positive elements of SS is nonempty.

Existence of a least element. By the Well-Ordering Principle, every nonempty set of positive integers has a least element. Let m=min⁡S+m = \min S^+, and fix integers x0,y0x_0,y_0 with ax0+by0=max_0+by_0 = m.

Every element of SS is a multiple of mm. Let s=ax+by∈Ss = ax+by \in S be arbitrary. Apply the division algorithm to divide ss by mm: there exist unique integers q,rq,r with

s=qm+r,0≤r<m.s = qm + r, \qquad 0 \le r < m.

Then

r=s−qm=(ax+by)−q(ax0+by0)=a(x−qx0)+b(y−qy0),r = s - qm = (ax+by) - q(ax_0+by_0) = a(x - qx_0) + b(y-qy_0),

so r∈Sr \in S as well, being an integer linear combination of aa and bb. If r>0r > 0, then r∈S+r \in S^+ and r<mr < m, contradicting the minimality of mm. Hence r=0r = 0, so s=qms = qm, i.e. ss is a multiple of mm. This shows S⊆mZS \subseteq m\mathbb{Z}. Conversely, since m∈Sm \in S and SS is closed under integer scaling — for any k∈Zk\in\mathbb{Z}, km=k(ax0+by0)=a(kx0)+b(ky0)∈Sk m = k(ax_0+by_0) = a(kx_0) + b(ky_0) \in S — we get mZ⊆Sm\mathbb{Z} \subseteq S. Hence S=mZS = m\mathbb{Z}. ■\blacksquare

∎
Proof

Proof of the Theorem, using the Lemma. Let S={ax+by:x,y∈Z}S = \{ax+by : x,y\in\mathbb{Z}\} and let mm be the least positive element of SS, which exists and satisfies S=mZS = m\mathbb{Z} by the preceding lemma. We show m=d=gcd⁡(a,b)m = d = \gcd(a,b); this simultaneously proves existence (part 1) and the characterization (part 2), since S=mZ=dZS = m\mathbb{Z} = d\mathbb{Z}.

Step 1: mm divides both aa and bb. Since a=a⋅1+b⋅0∈S=mZa = a\cdot 1 + b \cdot 0 \in S = m\mathbb{Z}, mm divides aa. Since b=a⋅0+b⋅1∈S=mZb = a \cdot 0 + b\cdot 1 \in S = m\mathbb{Z}, mm divides bb. So mm is a common divisor of aa and bb.

Step 2: every common divisor of a,ba,b divides mm. Let cc be any common divisor of aa and bb, so c∣ac \mid a and c∣bc \mid b. Write m=ax0+by0m = ax_0+by_0 for some integers x0,y0x_0,y_0 (possible since m∈Sm \in S). Since c∣ac \mid a and c∣bc\mid b, we have c∣ax0c \mid ax_0 and c∣by0c \mid by_0, hence cc divides their sum ax0+by0=max_0+by_0 = m.

Step 3: conclude m=dm=d. By definition, d=gcd⁡(a,b)d=\gcd(a,b) is the unique positive common divisor of a,ba,b that is divisible by every common divisor of a,ba,b (equivalently: the greatest common divisor, since among positive common divisors, the divisibility order and the size order coincide — a common divisor cannot exceed ∣a∣|a| or ∣b∣|b| unless one of them is 00, and the case both zero is excluded by hypothesis). From Step 1, mm is a positive common divisor of a,ba,b. From Step 2, every common divisor of a,ba,b divides mm; in particular d∣md \mid m. Since dd is itself a common divisor and mm is the smallest positive combination, and since dd is a positive common divisor of a,ba,b, Step 2 applied with c=dc=d gives d∣md \mid m; and Step 1 shows mm is a common divisor of a,ba,b, so by the defining maximality property of dd (every common divisor divides dd), m∣dm \mid d as well. Two positive integers dividing each other are equal: m=dm = d. Hence S=mZ=dZS = m\mathbb{Z} = d\mathbb{Z}, proving the characterization, and d=m=ax0+by0∈Sd = m = ax_0+by_0 \in S exhibits the required x0,y0x_0,y_0 with ax0+by0=dax_0+by_0 = d, proving existence. ■\blacksquare

∎
CorollaryUniqueness up to the kernel

If ax0+by0=d=gcd⁡(a,b)ax_0+by_0=d=\gcd(a,b) is one Bézout pair, then the complete set of integer pairs (x,y)(x,y) with ax+by=dax+by=d is

(x,y)=(x0+t⋅bd,  y0−t⋅ad),t∈Z.\left(x,y\right) = \left(x_0 + t\cdot \frac{b}{d},\; y_0 - t\cdot \frac{a}{d}\right), \qquad t \in \mathbb{Z}.

In particular, when a,b≠0a,b \ne 0, the Bézout pair is never unique.

Proof

Suppose ax+by=d=ax0+by0ax+by = d = ax_0+by_0. Subtracting, a(x−x0)=b(y0−y)a(x-x_0) = b(y_0-y). Divide through by dd: writing a=da′a = d a', b=db′b=db' with gcd⁡(a′,b′)=1\gcd(a',b') = 1 (dividing a common divisor's defining coprime cofactors is standard: if gcd⁡(a′,b′)=g>1\gcd(a',b')=g>1 divided dd's cofactors, then dgdg would be a larger common divisor of a,ba,b, contradicting maximality of dd), we get

a′(x−x0)=b′(y0−y).a'(x-x_0) = b'(y_0 - y).

Since gcd⁡(a′,b′)=1\gcd(a',b')=1 and b′∣a′(x−x0)b' \mid a'(x-x_0), Euclid's Lemma gives b′∣(x−x0)b' \mid (x - x_0) — this instance of Euclid's Lemma for coprime a′,b′a',b' is itself a direct corollary of the theorem just proved, applied to (a′,b′)(a',b'): as gcd⁡(a′,b′)=1\gcd(a',b')=1, there are u,vu,v with a′u+b′v=1a'u+b'v=1, so x−x0=(x−x0)(a′u+b′v)=u⋅a′(x−x0)+v(x−x0)b′x-x_0 = (x-x_0)(a'u+b'v) = u\cdot a'(x-x_0) + v(x-x_0)b'; since b′∣a′(x−x0)b' \mid a'(x-x_0) by hypothesis, b′b' divides both terms, hence b′∣(x−x0)b' \mid (x-x_0). Write x−x0=tb′=t⋅b/dx - x_0 = t b'= t\cdot b/d for some t∈Zt \in \mathbb{Z}. Substituting back into a′(x−x0)=b′(y0−y)a'(x-x_0) = b'(y_0-y) gives a′tb′=b′(y0−y)a' t b' = b'(y_0-y), and since b′≠0b' \ne 0 (as b≠0b\ne0; the case b=0b=0 is degenerate and handled separately below), we cancel to get y0−y=ta′=t⋅a/dy_0 - y = t a' = t\cdot a/d, i.e. y=y0−ta/dy = y_0 - t a/d. This confirms every solution has the claimed form, and direct substitution shows every such pair does solve ax+by=dax+by=d. (If b=0b = 0 then d=∣a∣d = |a| and any yy works with x=±1x = \pm1 fixed — a genuinely different, degenerate parametrization, consistent with b/d=0b/d = 0 making the xx-coordinate rigid, matching the formula.) ■\blacksquare

∎

Worked examples

Example 1: a=462a = 462, b=195b = 195. Run the Euclidean Algorithm forward to find d=gcd⁡(462,195)d=\gcd(462,195), recording each quotient and remainder:

462=2⋅195+72462 = 2\cdot 195 + 72
195=2⋅72+51195 = 2\cdot 72 + 51
72=1⋅51+2172 = 1\cdot 51 + 21
51=2⋅21+951 = 2\cdot 21 + 9
21=2⋅9+321 = 2\cdot 9 + 3
9=3⋅3+0.9 = 3\cdot 3 + 0.

The last nonzero remainder is d=3d = 3, so gcd⁡(462,195)=3\gcd(462,195) = 3. Now unwind the steps (back-substitution), which is exactly the theorem's proof made algorithmic — the Extended Euclidean Algorithm:

3=21−2⋅93 = 21 - 2\cdot 9
=21−2(51−2⋅21)=5⋅21−2⋅51= 21 - 2(51 - 2\cdot 21) = 5\cdot 21 - 2\cdot 51
=5(72−51)−2⋅51=5⋅72−7⋅51= 5(72 - 51) - 2\cdot 51 = 5\cdot 72 - 7\cdot 51
=5⋅72−7(195−2⋅72)=19⋅72−7⋅195= 5\cdot 72 - 7(195 - 2\cdot 72) = 19\cdot 72 - 7\cdot 195
=19(462−2⋅195)−7⋅195=19⋅462−45⋅195.= 19(462 - 2\cdot 195) - 7\cdot 195 = 19\cdot 462 - 45\cdot 195.

Check: 19×462=877819 \times 462 = 8778, and 45×195=877545 \times 195 = 8775, so 19⋅462−45⋅195=8778−8775=319\cdot 462 - 45\cdot 195 = 8778 - 8775 = 3. ✓ So (x,y)=(19,−45)(x,y) = (19,-45) is a Bézout pair: 462(19)+195(−45)=3=gcd⁡(462,195)462(19) + 195(-45) = 3 = \gcd(462,195). By the corollary, every Bézout pair is (19+65t,  −45−154t)\left(19 + 65t,\; -45 - 154t\right) for t∈Zt\in\mathbb{Z}, since b/d=195/3=65b/d = 195/3=65 and a/d=462/3=154a/d=462/3=154. Checking t=−1t=-1: (x,y)=(−46,109)(x,y)=(-46,109), and 462(−46)+195(109)=−21252+21255=3462(-46)+195(109) = -21252 + 21255 = 3. ✓

Example 2: a=1001a = 1001, b=336b = 336 (asymmetric, testing the characterization half of the theorem). Euclidean algorithm:

1001=2⋅336+3291001 = 2\cdot 336 + 329
336=1⋅329+7336 = 1\cdot 329 + 7
329=47⋅7+0.329 = 47\cdot 7 + 0.

So d=gcd⁡(1001,336)=7d = \gcd(1001,336) = 7. Back-substitute:

7=336−3297 = 336 - 329
=336−(1001−2⋅336)=3⋅336−1001.= 336 - (1001 - 2\cdot 336) = 3\cdot 336 - 1001.

Check: 3(336)−1001=1008−1001=73(336) - 1001 = 1008 - 1001 = 7. ✓ So (x,y)=(−1,3)(x,y) = (-1,3) works: 1001(−1)+336(3)=71001(-1)+336(3) = 7. Now use the characterization half of the theorem to test membership: is 9191 an integer combination of 10011001 and 336336? Since 91=13⋅791 = 13\cdot 7 is a multiple of d=7d=7, the theorem guarantees yes, and gives an explicit witness by scaling: 91=13⋅7=1001(−13)+336(39)91 = 13\cdot 7 = 1001(-13) + 336(39). Verify: 1001×(−13)=−130131001\times(-13) = -13013, 336×39=13104336\times 39 = 13104, sum =91= 91. ✓ Is 1010 an integer combination of 10011001 and 336336? Since gcd⁡(1001,336)=7\gcd(1001,336)=7 and 7∤107 \nmid 10, the theorem's characterization (S=7ZS = 7\mathbb{Z}) guarantees this is impossible — no integers x,yx,y satisfy 1001x+336y=101001x + 336y = 10, regardless of how cleverly chosen. This negative conclusion is exactly the power of the "only multiples of dd" half of Bézout's identity: it is not merely an existence result but a complete classification.

CounterexampleWhy "not both zero" cannot be dropped

Drop the hypothesis that a,ba,b are not both zero: set a=0a = 0, b=0b=0. Then gcd⁡(0,0)\gcd(0,0) is conventionally undefined or set to 00 by convention (there is no largest common divisor, since every integer divides 00, so there is no maximum). Even granting the convention gcd⁡(0,0):=0\gcd(0,0):=0, the identity's content collapses: the set

S={0⋅x+0⋅y:x,y∈Z}={0}S = \{0\cdot x + 0 \cdot y : x,y\in\mathbb{Z}\} = \{0\}

does trivially equal 0⋅Z={0}0\cdot\mathbb{Z} = \{0\}, so the equation is not false, but the entire proof breaks down at the first step of the lemma: there is no positive element in SS at all, so the well-ordering principle cannot be invoked to produce a least positive combination, and the argument that "mm divides aa and bb" via S=mZS = m\mathbb{Z} never gets off the ground because no such m>0m>0 exists. The theorem is vacuously consistent here but mathematically empty — no genuine Bézout pair with informative coefficients is produced, and none of the downstream uses (solving ax+by=cax+by=c, finding modular inverses) make sense when a=b=0a=b=0. This is why every careful statement of the identity explicitly excludes the case a=b=0a=b=0: the proof machinery, not merely the conclusion, requires a nonzero combination to exist to seed the well-ordering argument.

Scope, edge cases & common traps

SituationWhat holdsCommon mistake
a,ba,b both nonzeroFull theorem applies; unique family of solutions given by corollaryBelieving (x,y)(x,y) is unique
One of a,ba,b is zero, other nonzerogcd⁡(a,0)=∣a∣\gcd(a,0)=|a|; identity trivially a⋅(±1)+0⋅y=∣a∣a\cdot(\pm1)+0\cdot y = |a| for any yyForgetting yy is unconstrained here
a,ba,b both zeroTheorem hypothesis fails; no genuine contentSilently plugging in gcd⁡(0,0)=0\gcd(0,0)=0 and claiming a real Bézout pair exists
a,ba,b negativeTheorem still applies verbatim; gcd⁡\gcd always taken positiveAssuming x,yx,y must be positive or that signs of a,ba,b restrict signs of x,yx,y
Existence of some solution to ax+by=cax+by=cSolvable iff d∣cd \mid c (direct corollary of characterization)Assuming solvability whenever c>0c>0, ignoring the divisibility condition

The mathematician behind it

Origins · 1 minÉtienne Bézout and how this was discovered
ÉB
Étienne Bézout
1730–1783 · France, Ancien Régime mathematics and military examinations

Bézout was a French mathematician best known for his 1779 treatise Théorie générale des équations algébriques, which studied the elimination theory of systems of polynomial equations and established what is now called Bézout's theorem on the intersection number of plane curves. The integer identity that bears his name today is, historically, a special linear case of ideas that trace back further — to Bachet de Méziriac's 1624 work on integer solutions of linear equations, itself building on Euclid's algorithm from antiquity — but Bézout's systematic treatment of resultants and linear combinations of polynomial and integer quantities led his name to be attached to this entire family of results. He served for decades as an examiner of naval and artillery cadets in France, and wrote widely used mathematics textbooks for that purpose, making rigorous computational number theory and algebra part of standard technical education.

History
- 1624: Claude Gaspard Bachet de Méziriac publishes a method for solving linear Diophantine equations ax+by=cax+by=c using the Euclidean algorithm, in Problèmes plaisants et délectables.
- 1730: Étienne Bézout is born in Nemours, France.
- 1764–1779: Bézout develops general elimination theory for systems of polynomial equations, culminating in his theorem on intersection multiplicities of algebraic curves.
- 1783: Bézout dies; his name becomes attached both to the polynomial intersection theorem and, by extension, to the integer linear combination identity.
- 20th century: the identity is formalized as a foundational lemma in the ideal theory of Z\mathbb{Z} and generalized to principal ideal domains and Euclidean domains in abstract algebra.
Is the Bézout pair (x,y)(x,y) unique for given a,ba,b?

No. If (x0,y0)(x_0,y_0) is one Bézout pair for gcd⁡(a,b)=d\gcd(a,b)=d with a,ba,b both nonzero, then every pair of the form (x0+t⋅b/d, y0−t⋅a/d)(x_0 + t\cdot b/d,\ y_0 - t\cdot a/d) for t∈Zt\in\mathbb{Z} is also a Bézout pair, and these are all of them, as proved in the corollary above. Geometrically, the solutions form an infinite arithmetic progression of lattice points along a line of slope −a/b-a/b in the (x,y)(x,y)-plane. Algorithmically, the Extended Euclidean Algorithm returns one specific such pair — typically the one with smallest absolute values — but any valid pair works equally well for applications like computing modular inverses.

Does Bézout's identity require aa and bb to be coprime?

No, and this is a common point of confusion. The identity holds for any integers a,ba,b not both zero, producing ax+by=gcd⁡(a,b)ax+by=\gcd(a,b), which need not be 11. The special case gcd⁡(a,b)=1\gcd(a,b)=1 (coprimality) is important enough to deserve its own name, sometimes stated as: a,ba,b are coprime if and only if there exist x,yx,y with ax+by=1ax+by=1. This special case is exactly what powers the proof of Euclid's Lemma and the existence of modular inverses for Linear Congruences, but the general identity applies regardless of whether a,ba,b share a common factor.

How does Bézout's identity relate to solving the general linear Diophantine equation ax+by=cax+by=c?

It gives a complete solvability criterion and construction method. First, ax+by=cax+by=c has an integer solution if and only if d=gcd⁡(a,b)d=\gcd(a,b) divides cc; this follows immediately from the characterization {ax+by}=dZ\{ax+by\}=d\mathbb{Z}. If d∣cd\mid c, write c=dkc = d k and take any Bézout pair (x0,y0)(x_0,y_0) with ax0+by0=dax_0+by_0=d; then (kx0,ky0)(kx_0, ky_0) solves ax+by=cax+by=c. All solutions then form the arithmetic family described in the corollary, scaled appropriately. This is the standard method used in both hand computation and computer algebra systems.

Why does the proof avoid using the Euclidean Algorithm directly?

To keep the logical foundations clean and non-circular. The proof given here uses only the Well-Ordering Principle and basic divisibility, which makes it independent of, and in fact more fundamental than, the algorithmic machinery of the Euclidean Algorithm. This matters because the Extended Euclidean Algorithm, which computes explicit Bézout coefficients via back-substitution, is best understood as an efficient constructive method for producing the pair (x,y)(x,y) that the well-ordering proof only asserts exists. Keeping the existence proof separate from the algorithm avoids circular reasoning and clarifies which parts of the theory are purely existential versus computational.

Does an analogous identity hold for more than two integers?

Yes. For integers a1,…,ana_1,\ldots,a_n not all zero, there exist integers x1,…,xnx_1,\ldots,x_n with a1x1+⋯+anxn=gcd⁡(a1,…,an)a_1x_1+\cdots+a_nx_n = \gcd(a_1,\ldots,a_n), and the set of all such combinations equals the multiples of that gcd. The proof is essentially identical: apply the well-ordering principle to the set of positive integer combinations of a1,…,ana_1,\ldots,a_n, show the least positive element divides every aia_i and is divisible by every common divisor. In practice one often computes the multi-integer gcd and its Bézout coefficients by repeatedly applying the two-variable case, e.g. gcd⁡(a,b,c)=gcd⁡(gcd⁡(a,b),c)\gcd(a,b,c) = \gcd(\gcd(a,b),c).

What goes wrong if I try to apply Bézout's identity to real numbers instead of integers?

The identity is specifically a statement about the integers Z\mathbb{Z}, and it fails for real numbers in the relevant sense. For real a,ba,b, the set {ax+by:x,y∈R}\{ax+by : x,y\in\mathbb{R}\} is either {0}\{0\} (if a=b=0a=b=0) or all of R\mathbb{R} (otherwise, since real linear combinations can produce any real number by scaling), so there is no analogue of "smallest positive combination" — the reals are densely ordered with no least positive element, so the well-ordering step of the proof has no foothold. The identity genuinely depends on integers forming a discrete, well-ordered structure; its natural home in abstract algebra is the broader class of Euclidean domains and principal ideal domains, not general fields or rings.

Can Bézout's identity be used to prove Euclid's Lemma, and if so how?

Yes, and this is one of its most important consequences. Euclid's Lemma states that if a prime pp divides a product abab, then p∣ap\mid a or p∣bp\mid b. Suppose p∤ap\nmid a; since pp is prime, gcd⁡(p,a)=1\gcd(p,a)=1. By Bézout's identity there exist integers x,yx,y with px+ay=1px+ay=1. Multiply both sides by bb: pbx+aby=bpbx+aby=b. Since p∣pbxp\mid pbx trivially and p∣abp \mid ab by hypothesis (so p∣abyp\mid aby), pp divides the sum pbx+aby=bpbx+aby=b. Hence p∣bp\mid b, completing the proof. This derivation is non-circular because Bézout's identity was established independently using only the well-ordering principle.

Before this

Where this leads