Greatest Common Divisors

If a,bZa, b \in Z with a,b0a, b \neq 0, then the largest positive integer which divides both aa and bb is the greatest common divisor of two integers aa and bb. It is denoted gcd(a,b)gcd(a, b). By convention, we define gcd(0,0)=0gcd(0, 0) = 0. For some special case: gcd(0,x)=xgcd(0, x) = x, where xZx \in Z. It's obvious because 0=0x0 = 0 \cdot x.

Bézout's Lemma

Let a,bZa, b \in Z with a,b0a, b \neq 0, then there exist integers ss and tt such that as+bt=gcd(a,b)as + bt = gcd(a,b). That is, gcd(a,b)gcd(a, b) is a linear combination of a and b.

s,tZ:as+bt=gcd(a,b) \exists s,t \in Z: as + bt = gcd(a,b)

Proof

Consider the set S=ax+by:x,yZ(N\{0}) S = {ax + by : x, y \in Z} \cap (N \backslash \{0\}) or S=ax+by:x,yZ and ax+by>0 S = {ax + by : x, y \in Z \text{ and } ax + by > 0}

SS is definitely non-empty set. Take x=a,y=bx = a, y = b, then k=aa+bb>0k = a \cdot a + b \cdot b > 0 because a,b0a, b \neq 0. So, kSk \in S and SS \neq \emptyset.

Since SS is a nonempty subset of NN, {S}{SN}\{S \neq \emptyset \} \cap \{S \subseteq N\} , there is a least element by the Well-Ordering Principle, which we denote by dd.

Then there exist integers x0,y0x_0, y_0 such that d=ax0+by0 d = a \cdot x_0 + b \cdot y_0 , dd is the minimal positive integer in SS.

By Division Algorithm, we assume that \begin{aligned} a = q_a \cdot d + r_a \ \text{, where } q_a, r_a \in Z, q_a \text{ is the quotient and } 0 \leq r_a < d \end{aligned}

and

\begin{aligned} b = q_b \cdot d + r_b \ \text{, where } q_b, r_b \in Z, q_b \text{ is the quotient and } 0 \leq r_b < d \end{aligned}

From above, we can get: ra=aqad=aqa(ax0+by0)=a(1qax0)+b(qay0) \begin{aligned} r_a &= a - q_a \cdot d \\ &= a - q_a \cdot (a \cdot x_0 + b \cdot y_0) \\ &= a(1 - q_a \cdot x_0) + b(-q_a \cdot y_0) \end{aligned}

Thus, rar_a is a linear combination of aa and bb. If ra>0r_a > 0, then raSr_a \in S, and since ra<dr_a < d, it means that there is a element rar_a in SS smaller than dd. We have a contradiction that dd is NOT the least element of SS.

Thus, rar_a must be 00, and it means that a=qada = q_a \cdot d, so qaaq_a \mid a. In same manner, we can know b=qbdb = q_b \cdot d and qbbq_b \mid b.

Therefore, dd is a common divisor of aa and bb.

Next, we will show dd is the greatest common divisor of aa and bb.

Let cc is another positive common divisor of aa and bb, cac \mid a and cbc \mid b.

Then, d=ax0+by0=cmx0+cny0=c(mx0+ny0)=cz, where m=ac,n=bc and z is a positive integer(because c,d>0) \begin{aligned} d &= a \cdot x_0 + b \cdot y_0 \\ &= c \cdot m \cdot x_0 + c \cdot n \cdot y_0 \\ &= c \cdot (m \cdot x_0 + n \cdot y_0) \\ &= c \cdot z \end{aligned} \text{, where } m = \frac{a}{c}, n = \frac{b}{c} \text{ and } z \text{ is a positive integer(because } c, d > 0 \text{)}

Thus, we can know cdc \mid d and cdc \leq d.

In summary,

  1. dd is a common divisor of aa and bb
  2. Every positive common divisor of aa and bb, cc, can divide dd.

Therefore, d=gcd(a,b) d = gcd(a, b)

Finally, we prove that: there exist integers s,ts, t such that d=as+bt=gcd(a,b)d = as + bt = gcd(a, b).

References

https://www.math.byu.edu/~bakker/M290/Lectures/Lec30.pdf https://math.berkeley.edu/~sagrawal/su14_math55/notes_gcd.pdf

results matching ""

    No results matching ""