Lably
Skip to content

Bézout's identity

Relating two numbers and their greatest common divisor

  • 6 min read
  • 5 chapters

Related on Lably

Through Mathematics, Theorem and Integer

Bézout's identity—Let a and b be integers with greatest common divisor d. Then there exist integers x and y such that ax + by = d. Moreover, the integers of the form az + bt are exactly the multiples of d.

(The greatest common divisor of 0 and 0 is taken to be 0.) The integers x and y are called Bézout coefficients for (a, b); they are not unique. The extended Euclidean algorithm can be used to compute a minimal pair of Bézout coefficients, meaning they satisfy |x|≤|b/d| and |y|<|a/d|; equality occurs only if one of a and b is a multiple of the other, and otherwise there exist exactly two minimal pairs.

As an example, the greatest common divisor of a=15 and b=69 is d=3, which can be written as the linear combination ax+by=15(−9)+69(2)=3 with Bézout coefficients (x,y)=(−9,2), which are minimal since 9<69/3=23 and 2<15/3=5. The other minimal Bézout coefficients are (x,y)=(−9+23,2−5)=(14,−3).

Many other theorems in elementary number theory, such as Euclid's lemma or the Chinese remainder theorem, can be formally deduced from Bézout's identity.

A Bézout domain is an integral domain in which Bézout's identity holds. In particular, Bézout's identity holds in principal ideal domains. Every theorem that results from Bézout's identity is thus true in all principal ideal domains.

Structure of solutions

If a and b are not both zero and one pair of Bézout coefficients (x, y) has been computed (for example, using the extended Euclidean algorithm), all pairs can be represented in the form (x−kbd,y+kad), where k is an arbitrary integer, d is the greatest common divisor of a and b, and the fractions simplify to integers.

If a and b are both nonzero and none of them divides the other, then exactly two of the pairs of Bézout coefficients satisfy |x|<|bd|and|y|<|ad|. If a and b are both positive, one has x>0 and y<0 for one of these pairs, and x<0 and y>0 for the other. If a > 0 is a divisor of b (including the case b=0), then one pair of Bézout coefficients is (1, 0).

This relies on a property of Euclidean division: given two non-zero integers c and d, if d does not divide c, there is exactly one pair (q, r) such that c = dq + r and 0 < r < |d|, and another one such that c = dq + r and −|d| < r < 0.

The two pairs of minimal Bézout coefficients are obtained from the given one (x, y) by choosing for k in the above formula either of the two integers nearest to ⁠x/b/d⁠.

The extended Euclidean algorithm always produces one of these two minimal pairs.

Example

Let a = 12 and b = 42, then gcd (12, 42) = 6. Then the following Bézout's identities are displayed with the Bézout coefficients written in red for the minimal pairs and in blue for the other ones.

⋮12×(−10)+42×3=612×(−3)+42×1=612×4+42×(−1)=612×11+42×(−3)=612×18+42×(−5)=6⋮

If (x, y) = (18, −5) is the original pair of Bézout coefficients, then ⁠18/42/6⁠ ∈ [2, 3] yields the minimal pairs via k = 2, respectively k = 3; that is, (18 − 2 ⋅ 7, −5 + 2 ⋅ 2) = (4, −1), and (18 − 3 ⋅ 7, −5 + 3 ⋅ 2) = (−3, 1).

Sign in to keep reading

4 more chapters are free with a Lably account.

More in Number theory