Canonical: https://knowlpedia.com/algebra-rings/ufd-implies-gcd-exists/

# UFD implies GCDs exist

In a unique factorization domain, any two elements admit a gcd unique up to associates.

**UFD implies GCDs exist**: Let \(R\) be a UFD and let \(a,b\in R\) be not both zero. Then there exists \(d\in R\) such that (i) \(d\mid a\) and \(d\mid b\), and (ii) if \(c\mid a\) and \(c\mid b\) then \(c\mid d\). Any two such \(d\) differ by multiplication by a unit; one writes \(d=\gcd(a,b)\).

## Remarks

In a [unique factorization domain](https://knowlpedia.com/algebra-rings/ufd/), write \(a\) and \(b\) as products of [prime elements](https://knowlpedia.com/algebra-rings/prime-element/) and take the product of the common primes with minimal exponents to obtain a [greatest common divisor](https://knowlpedia.com/algebra-rings/gcd/). Uniqueness is up to [associates](https://knowlpedia.com/algebra-rings/associated-elements/), and in a UFD prime elements coincide with [irreducible elements](https://knowlpedia.com/algebra-rings/irreducible-element/).
