Definition:Greatest Common Divisor

$$\forall a, b \in \Z: a \ne 0 \lor b \ne 0$$, there exists a largest $$d \in \Z^*_+$$ such that $$d \backslash a$$ and $$d \backslash b$$.

This is called the greatest common divisor of $$a$$ and $$b$$ (abbreviated GCD or gcd) and denoted $$\gcd \left\{{a, b}\right\}$$.

Its existence is proved in Existence of Greatest Common Divisor.

Note that $$\gcd \left\{{a, b}\right\} = \gcd \left\{{b, a}\right\}$$ so the set notation is justified.

Comment
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, is preferred nowadays.

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)$$.