# Greatest Common Divisor of Integers/Examples/-12 and 30

## Example of Greatest Common Divisor of Integers

The greatest common divisor of $-12$ and $30$ is:

$\gcd \set {-12, 30} = 6$

## Proof

The strictly positive divisors of $-12$ are:

$\set {x \in \Z_{>0}: x \divides \paren {-12} } = \set {1, 2, 3, 4, 6, 12}$

The strictly positive divisors of $30$ are:

$\set {x \in \Z_{>0}: x \divides 30} = \set {1, 2, 3, 5, 6, 10, 15, 30}$

Of these, the common divisors are:

$\set {x \in \Z_{>0}: x \divides \paren {-12} \land x \divides 30} = \set {1, 2, 3, 6}$

The greatest of these is $6$.

$\blacksquare$