existence and uniqueness of the gcd of two integers


Theorem.

Given two integers, at least one different from zero, there exists a unique natural numberMathworldPlanetmath satisfying the definition of the greatest common divisorMathworldPlanetmath.

Proof.

Let a,b∈ℤ, where at least one of a,b is nonzero. First we show existence. Define S={m⁢a+n⁢b:m,n∈ℤ⁢ and ⁢m⁢a+n⁢b>0}. Now clearly S is a subset of natural numbers, and S is also nonempty, for depending upon the signs of a and b, we may take m=n=±1 to have m⁢a+n⁢b∈S. So, by the well-ordering principle for natural numbers, S has a smallest element which we denote g. Note that, by construction, g=m0⁢a+n0⁢b for some m0,n0∈ℤ. We will show that g is a greatest common divisor of a and b. Suppose first that g∤a. Then, by the division algorithm for integers, there exist unique q,r∈ℤ, where 0≤r<g, such that a=q⁢g+r. By assumptionPlanetmathPlanetmath, g∤a, so we have

0<r=a-q⁢g=a-q⁢(m0⁢a+n0⁢b)=a-q⁢m0⁢a-q⁢n0⁢b=(1-q⁢m0)⁢a-q⁢n0⁢b<g⁢.

But then r is an element of S strictly less than g, contrary to assumption. Thus it must be that g∣a. Similarly it can be shown that g∣b. Now suppose h∈ℕ is a divisorMathworldPlanetmathPlanetmath of both a and b. Then there exist k,l∈ℤ such that a=k⁢h and b=l⁢h, and we have

g=m0⁢a+n0⁢b=m0⁢k⁢h+n0⁢l⁢h=(m0⁢k+n0⁢l)⁢h⁢,

so h∣g. Thus g is a greatest common divisor of a and b. To see that g is unique, suppose that g′∈ℕ is also a greatest common divisor of a and b. Then we have g′∣g and g∣g′, whence g=±g′, and since g,g′>0, g=g′. ∎

Title existence and uniqueness of the gcd of two integers
Canonical name ExistenceAndUniquenessOfTheGcdOfTwoIntegers
Date of creation 2013-03-22 16:28:44
Last modified on 2013-03-22 16:28:44
Owner alozano (2414)
Last modified by alozano (2414)
Numerical id 5
Author alozano (2414)
Entry type Theorem
Classification msc 11-00
Related topic GreatestCommonDivisor
Related topic DivisibilityInRings
Related topic DivisionAlgorithmForIntegers
Related topic WellOrderingPrinciple