Two integers $a$ and $b$, not both zero, are called coprime if their greatest common divisor is $1$:
Definition
Two integers and , not both zero, are called coprime if their greatest common divisor is :
They are also called relatively prime.
Coprimality means that and have no common positive divisor except . For example,
so and are coprime.
The integers themselves need not be prime. Both and are composite, but they share no prime factor.
Examples
The integers and are coprime because
and the two factorizations have no prime factor in common.
The integers and are not coprime because
Indeed,
They share the prime factors and .
Bezout Criterion
Bezout’s identity gives a fundamental test for coprimality.
Integers and are coprime if and only if there exist integers and such that
If
then Bezout’s identity gives the equation above.
Conversely, suppose
Any common divisor of and must divide every linear combination of and . Hence it divides . Therefore the greatest common divisor of and is .
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
and
then
To prove this, use Bezout’s identity. Since , there exist integers and such that
Multiplying by , we get
Now clearly. Also, by assumption, so
Therefore divides the sum
Hence
Euclid’s lemma is one of the key ingredients in the proof of unique prime factorization.
Pairwise Coprime Integers
A collection of integers
is called pairwise coprime if
whenever
For example,
are pairwise coprime because
Pairwise coprimality is stronger than saying that all numbers have no common divisor greater than .
For example,
have no common divisor greater than , since
But they are not pairwise coprime because
Coprimality and Products
Coprimality behaves well with products.
If
and
then
This follows from Bezout’s identity. Choose integers such that
and
Multiplying the two equations gives
Expanding,
Thus is an integer linear combination of and , so
This property is frequently used in factorization and congruence arguments.
Coprimality and Modular Inverses
Coprimality exactly characterizes when modular inverses exist.
An integer has a multiplicative inverse modulo if and only if
Indeed, has an inverse modulo if there exists an integer such that
This congruence means that
for some integer . Equivalently,
Thus is a linear combination of and , which is equivalent to
For example,
so has an inverse modulo . One such inverse is , since
Reduced Fractions
Coprimality also describes fractions in lowest terms.
A rational number
with is in reduced form if
For example,
is not reduced because
Dividing numerator and denominator by , we get
Since
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 .
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
is therefore one of the most important hypotheses in elementary and modern arithmetic.