On this page
Interactive
Bézout coefficients travel alongside the remainders
Extended Euclidean table for a = 30, b = 18
| q | r | x | y | a·x + b·y |
|---|
Press Extend to compute the next remainder and its coefficients.
a·x + b·y = gcd(a, b)
A greatest common divisor is more than a number that divides two inputs: it is itself an integer linear combination of them. This fact is useful, for example, when constructing modular inverses. For and , the Euclidean algorithm gives , , and , so
The identity below explains why such coefficients always exist, including when the inputs are negative.
Bézout’s identity for integers
Let be not both zero and put . Then there are integers such that
Moreover, the integer linear combinations of are exactly the multiples of :
Proof by the least positive combination
Consider
This set is nonempty: since at least one input is nonzero, its absolute value is a positive combination (choose its coefficient to be or as needed, and the other coefficient ). By well-ordering, has a least element .
Divide by : with . Since ,
so is also an integer linear combination. If , it would be in and smaller than , a contradiction. Hence , so . Applying the same argument to gives .
Every common divisor of divides every linear combination, including . Thus is a positive common divisor divisible by every common divisor: it is . Its defining expression proves .
Since divides both inputs, it divides every . Conversely, multiplying by any integer shows . Therefore the combinations are precisely .
Polynomial version—over a field
This is a separate statement with a different coefficient domain. Let be a field, and let not both be zero. Let be the ideal they generate; if is their monic greatest common divisor, then
To see this, take the nonzero elements of , choose one of least degree, and scale it to be monic; call it . Polynomial division over gives , where or . As , also ; minimality forces , so . The same argument gives . Every common divisor of divides every element of , including , so is their monic gcd. Because , it has a representation . All combinations are divisible by , and multiplying this representation by any polynomial shows every multiple of is a combination. Hence . This proof uses division with remainder over a field; it does not assert the result for arbitrary coefficient rings.
Source and attribution
The polynomial extension was prompted by Tistory ID 25, published on 2022-04-03 by 0archlinux0 / MINJUN PARK and marked CC BY 4.0. That source states the polynomial analogue but does not prove it there; the field-based proof above is supplied separately.