Summary
This lesson defines the greatest common divisor and the least common multiple of two natural numbers, and teaches how to compute them in two ways: by means of the prime factorization and by means of the Euclidean algorithm, which does not require factoring. From the algorithm one derives Bézout’s identity, according to which the greatest common divisor is an integer combination of the two numbers, and from it, the relation between both concepts, the character of coprime numbers, the reduction and the addition of fractions, and the complete solution of linear Diophantine equations, with their applications to problems of coins and of measuring.
Learning objectives
- Compute the greatest common divisor and the least common multiple by means of the prime factorization, and justify the relation between them.
- Apply the Euclidean algorithm and its extended version to obtain the greatest common divisor and the coefficients of Bézout’s identity.
- Recognize coprime numbers and use the greatest common divisor and the least common multiple to reduce and add fractions.
- Decide whether a linear Diophantine equation has a solution, describe all its solutions and apply it to problems with natural restrictions.
The greatest common divisor and the least common multiple
In the lesson on divisibility and division with remainder the relation between two natural numbers was studied. When two numbers are considered at once, what matters are the divisors they have in common and the multiples they share. Every pair of natural numbers and has at least one common divisor, namely , and at most finitely many of them, because no divisor of exceeds ; it has, moreover, infinitely many common multiples, among them the product . If this is so, the following definition makes sense.
Definition (greatest common divisor and least common multiple). The greatest common divisor of two natural numbers and , written , is the greatest natural number that divides both. The least common multiple, written , is the least natural number that is a multiple of both.
The second is the least element of a nonempty set of natural numbers, which exists by the well-ordering principle. The first is the greatest element of the set of common divisors, which is nonempty and bounded by ; that a nonempty set of natural numbers bounded above has a greatest element also follows from well-ordering: the set of its upper bounds is nonempty and has a least element , and belongs to the set, because otherwise every element would be less than and, since there are no natural numbers between and , not greater than , which would be an upper bound less than (if , the set is and contains ). For example, the common divisors of and are , , and , and their common multiples are , , , and so on:
Some particular cases follow immediately from the definition: and ; ; and, if divides , then and . Both operations are, moreover, symmetric: the order of the numbers does not change the result.
Computation by means of the prime factorization
By the fundamental theorem of arithmetic, every natural number greater than factors uniquely into primes. It is convenient to write and with the same primes , allowing zero exponents for the primes that appear in only one of them:
A natural number divides exactly when no primes other than those of appear in its factorization, each with an exponent not greater than the one it has in . It follows that divides both and when the exponent of each prime in exceeds neither of the two exponents; the greatest common divisor is therefore obtained by taking, for each prime, the smaller of the two exponents. Likewise, is a common multiple when the exponent of each prime in reaches both, and the least common multiple takes, for each prime, the larger of the two exponents. For example:
The method is clear, but it depends on knowing how to factor, and factoring large numbers is very costly: no fast procedure for doing so is known. The algorithm of the next section computes the greatest common divisor without factoring, with divisions alone.
Loading the content…
Completed
Sign in to save your progress