GCD and LCM [00EV]
- April 16, 2026
Definition GCD [00EW]
- April 16, 2026
Let a, b \in \mathbb {N}. Then the greatest common divisor of a and b, written \gcd (a,b), is the unique natural number such that for all d \in \mathbb {N}, (d \mid \gcd (a,b)) \leftrightarrow (d \mid a \land d \mid b).
In the left-to-right direction, this says that anything which divides \gcd (a,b) must be a common divisor of a and b. Because divisibility is transitive, this will clearly be the case when \gcd (a,b) is a divisor of both a and b. And in fact, picking d = \gcd (a,b) shows that this must be the case. In the right-to-left direction, this says that any common divisor of a and b must divide their GCD. This is what makes it the “greatest” common divisor: there can’t be any common divisor d which is “above” the GCD.
Remark [00EX]
- April 16, 2026
Note that this definition doesn’t say anything about \leq ! The word greatest in the phrase greatest common divisor should really be taken to mean highest in the divisibility diagram, not “greater than” in the usual \geq sense.
Example GCD examples [00EY]
- April 16, 2026
\begin {align*} \gcd (6,10) &= 2 \\ \gcd (2,3) &= 1 \\ \gcd (2,4) &= 2 \\ \gcd (3,3) &= 3 \\ \gcd (0,7) &= 7 \\ \gcd (0,0) &= 0 \end {align*} If we took the word “greatest” in GCD to refer to the \leq relation, then we would have to say \gcd (0,0) is undefined; every natural number is a common divisor of 0 and 0, and there is no greatest natural number. However, if “greatest” means “highest in the divisibility diagram” then clearly the answer should be 0. And indeed, we can easily check that 0 satisfies the definition: for every d \in \mathbb {N}, (d \mid 0) \leftrightarrow (d \mid 0 \land d \mid 0) is trivially true.
Definition LCM [00EZ]
- April 16, 2026
The least common multiple of a, b \in \mathbb {N}, written \mathrm {lcm}(a,b), is the unique natural number such that for all m \in \mathbb {N}, (\mathrm {lcm}(a,b) \mid m) \leftrightarrow (a \mid m \land b \mid m).
We won’t talk much more about \mathrm {lcm}—it has very similar properties to \gcd but with everything flipped.