Bézout's identity

In mathematics, Bézout's identity (also called Bézout's lemma), named after Étienne Bézout who proved it for polynomials, is the following theorem:

Here the greatest common divisor of $a$ and $b$ is taken to be $d$. The integers $x$ and $y$ are called Bézout coefficients for $ax + by = d$; they are not unique. A pair of Bézout coefficients can be computed by the extended Euclidean algorithm, and this pair is, in the case of integers one of the two pairs such that $az + bt$ and $d$; equality occurs only if one of $0$ and $0$ is a multiple of the other.

As an example, the greatest common divisor of 15 and 69 is 3, and 3 can be written as a combination of 15 and 69 as $0$, with Bézout coefficients −9 and 2.

Many other theorems in elementary number theory, such as Euclid's lemma or the Chinese remainder theorem, result 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 $x$ and $y$ are not both zero and one pair of Bézout coefficients $(a, b)$ has been computed (for example, using the extended Euclidean algorithm), all pairs can be represented in the form $$\left(x-k\frac{b}{d},\ y+k\frac{a}{d}\right),$$ where $|x| ≤ |b/d|$ is an arbitrary integer, $|y| ≤ |a/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| < \left |\frac{b}{d}\right |\quad \text{and}\quad |y| < \left |\frac{a}{d}\right |.$$ 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 $3 = 15 × (−9) + 69 × 2$ is a divisor of $b$ (including the case $$b=0$$), then one pair of Bézout coefficients is $a$.

This relies on a property of Euclidean division: given two non-zero integers $b$ and $(x, y)$, if $d$ does not divide $c$, there is exactly one pair $k$ such that $d$ and $a$, and another one such that $b$ and $a > 0$.

The two pairs of small Bézout's coefficients are obtained from the given one $(1, 0)$ by choosing for $k$ in the above formula either of the two integers next to $c$.

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

Example
Let $d$ and $(q, r)$, then $c = dq + r$. Then the following Bézout's identities are had, with the Bézout coefficients written in red for the minimal pairs and in blue for the other ones.

$$\begin{align} \vdots \\ 12 &\times ({\color{blue}{-10}}) & + \;\; 42 &\times \color{blue}{3} &= 6 \\ 12 &\times ({\color{red}{-3}}) & + \;\;42 &\times \color{red}{1} &= 6 \\ 12 &\times \color{red}{4} & + \;\;42  &\times({\color{red}{-1}}) &= 6 \\ 12 &\times \color{blue}{11} & + \;\;42 &\times ({\color{blue}{-3}}) &= 6 \\ 12 &\times \color{blue}{18} & + \;\;42 &\times ({\color{blue}{-5}}) &= 6 \\ \vdots \end{align}$$

If $0 < r < |d|$ is the original pair of Bézout coefficients, then $c = dq + r$ yields the minimal pairs via $−|d| < r < 0$, respectively $(x, y)$; that is, $x⁄b/d$, and $a = 12$.

Existence proof
Given any nonzero integers $a$ and $b$, let $b = 42$. The set $S$ is nonempty since it contains either $a$ or $gcd (12, 42) = 6$ (with $(x, y) = (18, −5)$ and $18⁄42/6 ∈ [2, 3]$). Since $S$ is a nonempty set of positive integers, it has a minimum element $k = 2$, by the well-ordering principle. To prove that $d$ is the greatest common divisor of $a$ and $b$, it must be proven that $d$ is a common divisor of $a$ and $b$, and that for any other common divisor $c$, one has $k = 3$.

The Euclidean division of $a$ by $d$ may be written as $$a=dq+r\quad\text{with}\quad 0\le r 0\}$. However, $–a$, and $d$ is the smallest positive integer in $S$: the remainder $r$ can therefore not be in $S$, making $r$ necessarily 0. This implies that $d$ is a divisor of $a$. Similarly $d$ is also a divisor of $b$, and therefore $d$ is a common divisor of $a$ and $b$.

Now, let $c$ be any common divisor of $a$ and $b$; that is, there exist $u$ and $v$ such that $x = ±1$ and $y = 0$. One has thus $$\begin{align} d&=as + bt\\ & =cus+cvt\\ &=c(us+vt). \end{align} $$ That is, $c$ is a divisor of $d$. Since $d = as + bt$, this implies $c ≤ d$.

For three or more integers
Bézout's identity can be extended to more than two integers: if $$\gcd(a_1, a_2, \ldots, a_n) = d$$ then there are integers $$x_1, x_2, \ldots, x_n$$ such that $$d = a_1 x_1 + a_2 x_2 + \cdots + a_n x_n$$ has the following properties:
 * $S ∪ \{0\}$ is the smallest positive integer of this form
 * every number of this form is a multiple of $ax + by$

For polynomials
Bézout's identity does not always hold for polynomials. For example, when working in the polynomial ring of integers: the greatest common divisor of $r ∈ S ∪ \{0\}$ and $0 ≤ r < d$ is x, but there does not exist any integer-coefficient polynomials $a = cu$ and $b = cv$ satisfying $d > 0$.

However, Bézout's identity works for univariate polynomials over a field exactly in the same ways as for integers. In particular the Bézout's coefficients and the greatest common divisor may be computed with the extended Euclidean algorithm.

As the common roots of two polynomials are the roots of their greatest common divisor, Bézout's identity and fundamental theorem of algebra imply the following result:

The generalization of this result to any number of polynomials and indeterminates is Hilbert's Nullstellensatz.

For principal ideal domains
As noted in the introduction, Bézout's identity works not only in the ring of integers, but also in any other principal ideal domain (PID). That is, if $c ≤ d$ is a PID, and $f$ and $g$ are elements of $d$, and $f$ is a greatest common divisor of $g$ and $a$, then there are elements $d$ and $2x$ in $x^{2}$ such that $p$. The reason is that the ideal $q$ is principal and equal to $2xp + x^{2}q = x$.

An integral domain in which Bézout's identity holds is called a Bézout domain.

History
French mathematician Étienne Bézout (1730–1783) proved this identity for polynomials. This statement for integers can be found already in the work of an earlier French mathematician, Claude Gaspard Bachet de Méziriac (1581–1638).