1.1.2. Greatest common divisor

This section is based on part of [BUR11, Sec. 2.3].

Proposition 1.1.2.1.

Let a∈ℤ{a\in\mathbb{Z}}. Then a≠0{a\neq 0} if and only if aa has finitely many divisors.

Proof.

Let a≠0{a\neq 0}. Let dd be a divisor of aa and write a=k⁢da=kd with k∈ℤk\in\mathbb{Z} non-zero. Then d≠0d\neq 0 and

|a|=|k|⁢|d|≥|d|>0|a|=|k||d|\geq|d|>0

since |k|≥1|k|\geq 1. Since there are only finitely many integers dd such that 0<|d|≤|a|{0<|d|\leq|a|}, the claim follows. For the converse, observe that every integer divides 0 (Proposition 1.1.1.6(2)). ∎

The following definition is as fundamental as Definition 1.1.1.1.

Definition 1.1.2.2.

Let a,b∈ℤ{a,b\in\mathbb{Z}}. A common divisor of aa and bb is an integer dd such that d∣a{d\mid a} and d∣b{d\mid b}. If aa and bb are not both zero, we define the greatest common divisor (gcd) of aa and bb to be

gcd⁡(a,b)\displaystyle\gcd(a,b) ≔max⁡{d∈ℤ:d⁢ is a common divisor of a and b}\displaystyle\coloneqq\max\{d\in\mathbb{Z}\colon{d\text{ is a common divisor % of $a$ and $b$}}\}
=max⁡({d∈ℤ:d∣a}∩{d∈ℤ:d∣b}).\displaystyle=\max(\{d\in\mathbb{Z}\colon{d\mid a}\}\cap\{d\in\mathbb{Z}\colon% {d\mid b}\}).

This is a well-defined integer by Proposition 1.1.1.6(1) and Proposition 1.1.2.1. If gcd⁡(a,b)=1{\gcd(a,b)=1}, we say that aa and bb are coprime.

Remark 1.1.2.3.

When considering the gcd of a pair of integers, we always assume that this is defined, that is, that the two integers are not both zero.

Example 1.1.2.4.

Not covered in the lecture We have

gcd⁡(6,3)\displaystyle\gcd(6,3) =max⁡({d∈ℤ:d∣6}∩{d∈ℤ:d∣3})\displaystyle=\max(\{d\in\mathbb{Z}\colon{d\mid 6}\}\cap\{d\in\mathbb{Z}\colon% {d\mid 3}\})
=max⁡({±1,±2,±3,±6}∩{±1,±3})\displaystyle=\max(\{\pm 1,\pm 2,\pm 3,\pm 6\}\cap\{\pm 1,\pm 3\})
=max⁡{±1,±3}\displaystyle=\max\{\pm 1,\pm 3\}
=3.\displaystyle=3.

Similarly, since

{d∈ℤ:d∣3}={d∈ℤ:d∣−3},\{d\in\mathbb{Z}\colon{d\mid 3}\}=\{d\in\mathbb{Z}\colon{d\mid-3}\},

we also have gcd⁡(6,−3)=3{\gcd(6,-3)=3}.

The greatest common divisor of a pair of integers has the following properties.

Proposition 1.1.2.5.

Let a,b∈ℤ{a,b\in\mathbb{Z}} be not both zero. The following statements hold:

  1. (1)
    ​

    gcd⁡(0,a)=|a|{\gcd(0,a)=|a|} if a≠0{a\neq 0}.

  2. (2)
    ​

    gcd⁡(1,a)=1{\gcd(1,a)=1}.

  3. (3)
    ​

    gcd⁡(a,b)=gcd⁡(b,a){\gcd(a,b)=\gcd(b,a)}.

  4. (4)
    ​

    gcd⁡(a,b)=gcd⁡(|a|,b)=gcd⁡(|a|,|b|){\gcd(a,b)=\gcd(|a|,b)=\gcd(|a|,|b|)}.

Proof.

The first three statements are trivial. We prove (4). The equality gcd⁡(a,b)=gcd⁡(|a|,b){\gcd(a,b)=\gcd(|a|,b)} follows from the fact that aa and |a||a| have the same set of divisors (Proposition 1.1.1.6(7)). Finally, by what we just proved,

gcd⁡(|a|,b)=gcd⁡(b,|a|)=gcd⁡(|b|,|a|)=gcd⁡(|a|,|b|).∎\gcd(|a|,b)=\gcd(b,|a|)=\gcd(|b|,|a|)=\gcd(|a|,|b|).\qed
Remark 1.1.2.6.

It follows from the definition of the gcd that the gcd of a pair of numbers is always positive (since 11 is always a common divisor). Moreover, the gcd of a pair of integers aa and bb does not change if we change the sign of either of them (compare with Example 1.1.2.4).

Remark 1.1.2.7.

In view of Remarks 1.1.1.7 and 1.1.2.6, many questions concerning divisibility can be reduced to the case of positive or non-negative integers. This approach is taken in many introductory books on number theory.

End of Lecture 1