Skip to content

Greatest Common Divisor

Defines Greatest Common Divisor, GCD

The greatest common divisor of two integers aa and bb, written gcd(a,b)\gcd(a, b), is the largest positive integer that divides both aa and bb.

The Euclidean algorithm computes the GCD efficiently: gcd(a,b)=gcd(b,amodb)\gcd(a, b) = \gcd(b, a \bmod b), terminating when the remainder reaches zero. This algorithm also yields a representation gcd(a,b)=sa+tb\gcd(a, b) = sa + tb for some integers ss and tt (Bézout’s identity).

In the divisibility lattice on positive integers, gcd(a,b)\gcd(a, b) is the meet of aa and bb.

Relations

Date created

Cite

@misc{emsenn2026-greatest-common-divisor,
  author    = {emsenn},
  title     = {Greatest Common Divisor},
  year      = {2026},
  url       = {https://emsenn.net/library/math/domains/number-theory/terms/greatest-common-divisor/},
  publisher = {emsenn.net},
  license   = {CC BY-SA 4.0}
}