The GCD and linear combinations

July 10th, 2009 at 7:49 am

A linear combination of a and b is some integer of the form ma+nb, where m,n\in \mathbb{Z}.

There’s a very interesting theorem that gives a useful connection between linear combinations and the GCD of a and b, called Bézout’s identity:

Bézout’s identity: (a,b) (the GCD of a and b) is the smallest positive linear combination of non-zero a and b.

Both Bézout’s identity and its corollary I show below are very useful tools in elementary number theory, being used for the proofs of many of the most fundamental theorems. Let’s see why it’s true.

(I) Intuition: First I’d like to explain this (surprising at first sight) theorem intuitively. By defintion, any common divisor of a and b will divide ma+nb for all m,n\in \mathbb{Z}. In particular, (a,b) also divides any ma+nb.

Now, assume we’ve found some small x=ma+nb which isn’t the GCD. But we’ve just said that (a,b) divides all linear combinations, so it also divides x. Therefore, x can not be smaller than the GCD. In other words, the smallest positive linear combination can only be (a,b) itself.

Corollary: An integer is a linear combination of a and b IFF it is a multiple of their GCD.

To prove Bézout’s identity more formally, and along the way to see why the corollary is also true, let’s first prove the following:

(III) Let I be a nonempty set of integers that is closed under addition and subtraction, and contains at least one non-zero integer. Then there exists a smallest positive element b\in I, and I consists of all multiples of b (I=b\mathbb{Z}).

Proof: I contains at least one non-zero integer. Then it definitely contains at least one positive integer, because it is closed under addition and subtraction. Assume we have a\in I for some 0>a. Therefore a-a=0\in I and then also 0-a=-a\in I. Thus we have positive integers in I. According to the well-ordering principle, I has a smallest positive element which we’ll call b.

Now we’ll want to show that I=b\mathbb{Z}. As usual, to prove equalities of sets, it will be shown that they contain one another.

I\supseteq b\mathbb{Z} is obvious - since I contains b and is closed under addition and subtraction, it contains all the multiples of b.

To prove I\subseteq b\mathbb{Z} we’ll demonstrate that any element c\in I is a multiple of b. Using the division algorithm we write c=bq+r for some integers q and 0 <= r < b. But this means that r\in I (because I contains bq and c and is closed under subtraction and addition). However, recall that b was chosen to be the smallest positive element of I, so r must be equal to 0. Therefore c is a multiple of b, and we have shown that I\subseteq b\mathbb{Z}. Q.E.D.

Now back to Bézout’s identity. We’ll define:

I=\{x\in \mathbb{Z}|x=ma+nb; m,n\in \mathbb{Z}\}

This I is obviously non-empty and is closed under addition and subtraction (by its definition as a linear combination). Note, in particular, that it also contains a and b. By (III), I consists of all multiples of its smallest positive element, which we’ll call d here.

To show that d=(a,b) we have to show that d|a, d|b and if c|a and c|b then c|d. First, by definition d is a divisor of any element in I, so it also divides a and b. If c|a and c|b, say a=cq and b=cp, then:

d=ma+mb=m(cq)+n(cp)=c(mq+np)

So d|c, which completes our proof that d=(a,b). Q.E.D.

Regarding the corollary, it stems trivially from the definition of I and the proof above.

Related posts:

  1. A group-theoretic proof of Euler’s theorem
  2. mathematical musing
  3. application of combinations
  4. The well-ordering principle

Leave a Reply

To post code with preserved formatting, enclose it in `backticks` (even multiple lines)