Definition:Greatest Common Divisor

Equivalence of Definitions
In GCD iff Divisible by Common Divisor it is demonstrated that the definition of GCD as specified for the integers is logically equivalent to the definition as given for the GCD as specified for an integral domain.

Note, however, that an integral domain is not an ordered set and so the definition as given for integers can not apply, as there is then no concept of largest (formally: maximal).

The definition for the integral domain is an abstraction from the definition as initially encountered in grade-school arithmetic, and many treatments of number theory and abstract algebra start with the definition as given for an integral domain on which the ordering $\le$ is then applied.

When considering an ordered integral domain, it is of course possible to use either definition. It is as well to make sure which one is meant.

Variants of Notation
Alternatively, $\gcd \left\{{a, b}\right\}$ is written in some texts as $\left({a, b}\right)$, but this notation can cause confusion with ordered pairs. The notation $\gcd \left({a, b}\right)$ is also seen, but the set notation, although arguably more cumbersome, can be argued to be preferable.

It is also known as the highest common factor (abbreviated HCF or hcf) and written $\operatorname{hcf} \left\{{a, b}\right\}$ or $\operatorname{hcf} \left({a, b}\right)$.