Skip to content

Bezout Identities

Let $a$ and $b$ be integers. An integer of the form

Linear Combinations

Let aa and bb be integers. An integer of the form

ax+by ax+by

where

x,yZ x,y\in\mathbb{Z}

is called an integer linear combination of aa and bb.

For example, if a=18a=18 and b=30b=30, then

2ab=21830=6 2a-b=2\cdot18-30=6

is a linear combination of 1818 and 3030.

Linear combinations are important because divisibility behaves well under addition and subtraction. If an integer dd divides both aa and bb, then dd divides every linear combination

ax+by. ax+by.

Indeed, if

a=dm,b=dn, a=dm, \qquad b=dn,

then

ax+by=dmx+dny=d(mx+ny). ax+by=dmx+dny=d(mx+ny).

Thus every common divisor of aa and bb divides every integer linear combination of aa and bb.

Statement of Bezout’s Identity

Bezout’s identity states that if aa and bb are integers, not both zero, then there exist integers xx and yy such that

gcd(a,b)=ax+by. \gcd(a,b)=ax+by.

The integers xx and yy are called Bezout coefficients.

For example,

gcd(18,30)=6. \gcd(18,30)=6.

One representation is

6=218130. 6=2\cdot18-1\cdot30.

Thus x=2x=2 and y=1y=-1 are Bezout coefficients for 1818 and 3030.

Why the Identity Matters

Bezout’s identity gives a constructive meaning to the greatest common divisor.

The gcd is not merely the largest positive integer dividing both aa and bb. It is also the smallest positive integer that can be written as a linear combination of aa and bb.

This second description is often more useful. It connects common divisors, linear equations, congruences, and modular inverses.

For example, if

gcd(a,n)=1, \gcd(a,n)=1,

then Bezout’s identity gives

ax+ny=1. ax+ny=1.

Reducing modulo nn, this becomes

ax1(modn). ax\equiv1\pmod n.

Hence xx is an inverse of aa modulo nn.

Proof Using the Euclidean Algorithm

The extended Euclidean algorithm proves Bezout’s identity directly.

Consider

a=1071,b=462. a=1071, \qquad b=462.

The Euclidean algorithm gives

1071=4622+147, 1071=462\cdot2+147, 462=1473+21, 462=147\cdot3+21, 147=217+0. 147=21\cdot7+0.

The gcd is the last nonzero remainder:

gcd(1071,462)=21. \gcd(1071,462)=21.

Now rewrite the remainders backward.

From

462=1473+21, 462=147\cdot3+21,

we get

21=4621473. 21=462-147\cdot3.

From

1071=4622+147, 1071=462\cdot2+147,

we get

147=10714622. 147=1071-462\cdot2.

Substituting,

21=4623(10714622). 21=462-3(1071-462\cdot2).

Therefore

21=31071+7462. 21=-3\cdot1071+7\cdot462.

This is a Bezout identity.

The Smallest Positive Linear Combination

There is another useful proof of Bezout’s identity using the well-ordering principle.

Let

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

This set is nonempty because at least one of aa or bb is nonzero. By the well-ordering principle, SS has a least element. Call it dd. Then

d=ax0+by0 d=ax_0+by_0

for some integers x0,y0x_0,y_0.

One can show that

da d\mid a

and

db. d\mid b.

Indeed, divide aa by dd:

a=dq+r,0r<d. a=dq+r, \qquad 0\le r<d.

Since

d=ax0+by0, d=ax_0+by_0,

we have

r=adq=aq(ax0+by0)=a(1qx0)+b(qy0). r=a-dq =a-q(ax_0+by_0) =a(1-qx_0)+b(-qy_0).

Thus rr is also a linear combination of aa and bb. If r>0r>0, this contradicts the minimality of dd. Hence

r=0. r=0.

Therefore

da. d\mid a.

The same argument shows that

db. d\mid b.

Thus dd is a common divisor of aa and bb.

Since every common divisor of aa and bb divides every linear combination, every common divisor divides dd. Therefore dd is the greatest common divisor:

d=gcd(a,b). d=\gcd(a,b).

Hence

gcd(a,b)=ax0+by0. \gcd(a,b)=ax_0+by_0.

Non-Uniqueness of Bezout Coefficients

Bezout coefficients are generally not unique.

For example,

6=218130. 6=2\cdot18-1\cdot30.

But also

6=718430. 6=7\cdot18-4\cdot30.

Both identities are valid.

In general, if

d=gcd(a,b) d=\gcd(a,b)

and

d=ax0+by0, d=ax_0+by_0,

then all solutions to

ax+by=d ax+by=d

are given by

x=x0+bdt, x=x_0+\frac{b}{d}t, y=y0adt, y=y_0-\frac{a}{d}t,

where

tZ. t\in\mathbb{Z}.

Thus Bezout representations form an infinite family.

Coprimality Criterion

Bezout’s identity gives a powerful criterion for coprimality.

Two integers aa and bb are coprime if and only if there exist integers xx and yy such that

ax+by=1. ax+by=1.

Indeed, if

gcd(a,b)=1, \gcd(a,b)=1,

Bezout’s identity gives such xx and yy.

Conversely, if

ax+by=1, ax+by=1,

then any common divisor of aa and bb must divide 11. Hence the greatest common divisor is 11.

Role in Number Theory

Bezout identities are among the most useful tools in elementary number theory. They convert a divisibility statement into an explicit equation.

They are used to prove Euclid’s lemma, solve linear Diophantine equations, find modular inverses, prove the Chinese remainder theorem, and analyze coprime factorizations.

The central idea is that the greatest common divisor is the arithmetic content common to aa and bb, and Bezout’s identity shows that this content can be recovered from aa and bb by integer linear combination.