Skip to content

Coprime Integers

Two integers $a$ and $b$, not both zero, are called coprime if their greatest common divisor is $1$:

Definition

Two integers aa and bb, not both zero, are called coprime if their greatest common divisor is 11:

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

They are also called relatively prime.

Coprimality means that aa and bb have no common positive divisor except 11. For example,

gcd(8,15)=1, \gcd(8,15)=1,

so 88 and 1515 are coprime.

The integers themselves need not be prime. Both 88 and 1515 are composite, but they share no prime factor.

Examples

The integers 1414 and 2525 are coprime because

14=27,25=52, 14=2\cdot7, \qquad 25=5^2,

and the two factorizations have no prime factor in common.

The integers 1818 and 3030 are not coprime because

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

Indeed,

18=232,30=235. 18=2\cdot3^2, \qquad 30=2\cdot3\cdot5.

They share the prime factors 22 and 33.

Bezout Criterion

Bezout’s identity gives a fundamental test for coprimality.

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

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

If

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

then Bezout’s identity gives the equation above.

Conversely, suppose

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

Any common divisor of aa and bb must divide every linear combination of aa and bb. Hence it divides 11. Therefore the greatest common divisor of aa and bb is 11.

This criterion is often more useful than the definition because it gives explicit coefficients.

Euclid’s Lemma

A central consequence of coprimality is Euclid’s lemma.

If

abc a\mid bc

and

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

then

ac. a\mid c.

To prove this, use Bezout’s identity. Since gcd(a,b)=1\gcd(a,b)=1, there exist integers xx and yy such that

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

Multiplying by cc, we get

acx+bcy=c. acx+bcy=c.

Now aacxa\mid acx clearly. Also, abca\mid bc by assumption, so

abcy. a\mid bcy.

Therefore aa divides the sum

acx+bcy. acx+bcy.

Hence

ac. a\mid c.

Euclid’s lemma is one of the key ingredients in the proof of unique prime factorization.

Pairwise Coprime Integers

A collection of integers

a1,a2,,an a_1,a_2,\ldots,a_n

is called pairwise coprime if

gcd(ai,aj)=1 \gcd(a_i,a_j)=1

whenever

ij. i\ne j.

For example,

5,8,9 5,8,9

are pairwise coprime because

gcd(5,8)=1,gcd(5,9)=1,gcd(8,9)=1. \gcd(5,8)=1, \qquad \gcd(5,9)=1, \qquad \gcd(8,9)=1.

Pairwise coprimality is stronger than saying that all numbers have no common divisor greater than 11.

For example,

6,10,15 6,10,15

have no common divisor greater than 11, since

gcd(6,10,15)=1. \gcd(6,10,15)=1.

But they are not pairwise coprime because

gcd(6,10)=2,gcd(6,15)=3,gcd(10,15)=5. \gcd(6,10)=2, \quad \gcd(6,15)=3, \quad \gcd(10,15)=5.

Coprimality and Products

Coprimality behaves well with products.

If

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

and

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

then

gcd(a,bc)=1. \gcd(a,bc)=1.

This follows from Bezout’s identity. Choose integers x,y,u,vx,y,u,v such that

ax+by=1 ax+by=1

and

au+cv=1. au+cv=1.

Multiplying the two equations gives

(ax+by)(au+cv)=1. (ax+by)(au+cv)=1.

Expanding,

a(axu+xcv+buy)+bc(yv)=1. a(axu+xcv+buy)+bc(yv)=1.

Thus 11 is an integer linear combination of aa and bcbc, so

gcd(a,bc)=1. \gcd(a,bc)=1.

This property is frequently used in factorization and congruence arguments.

Coprimality and Modular Inverses

Coprimality exactly characterizes when modular inverses exist.

An integer aa has a multiplicative inverse modulo nn if and only if

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

Indeed, aa has an inverse modulo nn if there exists an integer xx such that

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

This congruence means that

ax1=ny ax-1=ny

for some integer yy. Equivalently,

axny=1. ax-ny=1.

Thus 11 is a linear combination of aa and nn, which is equivalent to

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

For example,

gcd(7,26)=1, \gcd(7,26)=1,

so 77 has an inverse modulo 2626. One such inverse is 1515, since

715=1051(mod26). 7\cdot15=105\equiv1\pmod{26}.

Reduced Fractions

Coprimality also describes fractions in lowest terms.

A rational number

ab \frac ab

with b0b\ne0 is in reduced form if

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

For example,

1421 \frac{14}{21}

is not reduced because

gcd(14,21)=7. \gcd(14,21)=7.

Dividing numerator and denominator by 77, we get

1421=23. \frac{14}{21}=\frac{2}{3}.

Since

gcd(2,3)=1, \gcd(2,3)=1,

the fraction is now reduced.

Role in Number Theory

Coprimality expresses arithmetic independence. Two integers may both be large and composite, yet from the viewpoint of divisibility they behave independently when their gcd is 11.

This idea appears throughout number theory. It governs modular inverses, the Chinese remainder theorem, reduced fractions, multiplicative arithmetic functions, primitive solutions of Diophantine equations, and factorization arguments.

The condition

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

is therefore one of the most important hypotheses in elementary and modern arithmetic.