Riemann Console dot org

An open research record on the Riemann Hypothesis.

NAV READY · TYPE SHORTCUT · ENTER EXECUTES

Greatest common divisor

Category
STANDARD MATHEMATICS
Definition
The largest positive integer that divides two integers exactly.
Math Level
GENERAL
Index Excerpt
greatest common divisor; greatest common factor; highest common factor; GCD; HCF; gcd(a,b)

Take 18 and 30\.

The positive divisors of 18 are

1,2,3,6,9,18.1,2,3,6,9,18.

The positive divisors of 30 are

1,2,3,5,6,10,15,30.1,2,3,5,6,10,15,30.

Their common divisors are 1, 2, 3 and 6\. The largest is 6\.

That number is called the \\greatest common divisor\\ of 18 and 30\. It is written

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

In British school mathematics, you may also meet the term \\highest common factor\\, or HCF. In this setting it expresses the same underlying idea.

The greatest common divisor answers a useful question: how much divisibility structure do these two integers share?

For 8 and 15,

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

So 8 and 15 are coprime.

For 8 and 12,

gcd⁡(8,12)=4,\gcd(8,12)=4,

so they are not coprime.

This measurement becomes especially useful when studying arithmetic progressions.

Suppose we begin at aa and repeatedly add qq:

a, a+q, a+2q, a+3q,…a,\ a+q,\ a+2q,\ a+3q,\ldots

If aa and qq have a common divisor d>1d>1, then every term in the progression is divisible by dd.

For example,

6,15,24,33,42,…6,15,24,33,42,\ldots

starts at 6 and advances in steps of 9\. Because

gcd⁡(6,9)=3,\gcd(6,9)=3,

every term is divisible by 3\.

So, apart from the possibility of the prime 3 itself appearing as an exceptional term in some such progression, a common factor greater than 1 prevents the progression from producing infinitely many primes.

When instead gcd⁡(a,q)=1\gcd(a,q)=1, there is no shared factor built into every term.

(This does not guarantee that individual terms are prime. It removes one systematic obstruction. Dirichlet's theorem is the much deeper result that says this condition is enough to ensure infinitely many primes in the progression.)

For small integers, we can find a gcd simply by listing divisors. For larger integers, mathematicians use efficient procedures such as the Euclidean algorithm.

The computational method can change; the meaning does not: the gcd is the largest positive integer that divides both numbers exactly.

See also: coprime, arithmetic progression, modular arithmetic, Euler's totient function, prime factorisation, Fundamental Theorem of Arithmetic.

Related glossary terms

  1. [..]Arithmetic progressionGLOSSARY · STANDARD MATHEMATICS
  2. [..]CoprimeGLOSSARY · STANDARD MATHEMATICS
  3. [..]Euler's totient functionGLOSSARY · STANDARD MATHEMATICS
  4. [..]Fundamental Theorem of ArithmeticGLOSSARY · STANDARD MATHEMATICS
  5. [..]Modular arithmeticGLOSSARY · STANDARD MATHEMATICS
  6. [..]Prime factorisationGLOSSARY · RIEMANN HYPOTHESIS

Read this term in context

  1. [..]Arithmetic progressionARTICLE · ART-RC-0120
  2. [..]CoprimeARTICLE · ART-RC-0121
  3. [..]Euler's totient functionARTICLE · ART-RC-0123