Skip to main content
\(\require{mathrsfs}\newcommand{\abs}[1]{\left| #1 \right|} \renewcommand{\emptyset}{\varnothing} \DeclareMathOperator{\dom}{dom} \DeclareMathOperator{\range}{rng} \DeclareMathOperator{\perm}{perm} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section1.7Examples involving divisibility

Saved for a later chapter.

Definition1.7.2Greatest Common Divisor

Let \(a,b,c \in \mathbb{Z}\) be nonzero. We say \(c\) is a common divisor of \(a\) and \(b\) if and only if \(c\) divides \(a\) and \(c\) divides \(b\text{.}\) The greatest common divisor of \(a,b\) is denoted \(\gcd (a,b)\text{,}\) and is the common divisor of \(a,b\) which is greater than every other common divisor.

Let \(a,b,x,y \in \mathbb{Z}\) be arbitrary. Let \(c\) be any divisor of \(a\) and \(b\) so there exist integers \(r,s\) so that

\begin{equation*} a = rc, \quad b = sc. \end{equation*}

Thus

\begin{equation*} ax + by = (rc)x + (sc)y = c (rx+sy). \end{equation*}

Since \(rx+sy \in \mathbb{Z}\text{,}\) we have shown \(c\) divides \(ax+by\text{.}\)

The following lemma is the first proof we encounter where the key idea to get started is not obvious, even after a bit of playing around. At this point in the course, you would not be expected to come up with a proof like this, although later in the course you would.

Let \(a,b\) be arbitrary nonzero integers. Assume \(x,y \in \mathbb{Z}\) so that \(s := ax+by\) is positive, but as small as possible (i.e., it is the smallest positive linear combination of \(a,b\)).

By Division Algorithm, we may write \(a = sq + r\) for some \(q,r \in \mathbb{Z}\) with \(0 \le r \lt \abs{s} = s\text{.}\) Now

\begin{equation*} r = a - sq = a - (ax + by)q = a(1-xq) + b(yq) \end{equation*}

is another (nonnegative) linear combination of \(a,b\text{.}\) But we know \(r\) cannot be positive, otherwise it would violate the minimality of \(s\text{.}\) Therefore, \(r = 0\) and hence \(a = sq\text{.}\) Thus \(s\) divides \(a\text{.}\) A nearly identical argument shows \(s\) divides \(b\text{,}\) and so \(s\) is a common divisor.

Let \(a,b\) be arbitrary nonzero integers and let \(s\) denote their smallest positive linear combination. By Lemma 1.7.4 \(s\) is a common divisor of \(a,b\text{.}\) Let \(x\) be any other positive common divisor of \(a,b\text{.}\) By Theorem 1.7.3, we know \(t\) divides \(s\text{,}\) and so there is some (positive) integer \(k\) for which \(s = tk\text{.}\) Since \(k \in \mathbb{N}\text{,}\) we have \(k \ge 1\) and so \(s = tk \ge t\text{.}\) Therefore \(s\) is greater than any other common divisor and hence \(s = \gcd(a,b)\text{.}\)

Definition1.7.6Relatively Prime, Coprime

We say nonzero integers \(a,b\) are relatively prime, or coprime, if \(\gcd(a,b) = 1\text{.}\)

Suppose \(a,b \in \mathbb{Z}\) are relatively prime. By Theorem 1.7.5 there exist \(r,s\) so that \(ar+bs = 1\text{.}\) Then

\begin{equation*} a(rc)+b(sc) = (ar+bs)c = c. \end{equation*}

Setting \(x = rc, y = sc \in \mathbb{Z}\) proves the result.

Let \(a,b,p \in \mathbb{Z}\) with \(p\) prime and suppose \(p\) divides \(ab\text{.}\) Thus \(ab = pk\) for some integer \(k\text{.}\) Note that \(\gcd(a,p)\) can be only either \(1\) or \(p\) since \(p\) has no other divisors.

Case 1: \(\gcd(a,p) = p\).

Then \(p\) divides \(a\) and we are finished.

Case 2: \(\gcd(a,p) = 1\).

By Theorem 1.7.5 there exist \(x,y \in \mathbb{Z}\) so that \(ax + py = 1\text{.}\) Multiplying both sides by \(b\text{,}\) we obtain

\begin{equation*} b = (ax+py)b = abx+pyb = pkx+pyb = p(kx+yb). \end{equation*}

Therefore \(p\) divides \(b\text{.}\)