Greatest common divisor: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Peter Schmitt
(additional characterization)
imported>Peter Schmitt
(Sections -- but are sections too short in this case?)
Line 9: Line 9:


The greatest common divisor can also be characterized by the following property:
The greatest common divisor can also be characterized by the following property:
<br> It is a common divisor, and every common divisor divides it evenly.
: It is a common divisor, and every common divisor divides it evenly.


Numbers for which the greatest common divisor is 1 are called '''relatively prime'''.
Numbers for which the greatest common divisor is 1 are called '''relatively prime'''.
Line 17: Line 17:
The greatest common divisor of two numbers ''a'' and ''b''
The greatest common divisor of two numbers ''a'' and ''b''
usually is written as gcd(''a'',''b''), or, if no confusion is to be expected, simply as (''a'',''b'').
usually is written as gcd(''a'',''b''), or, if no confusion is to be expected, simply as (''a'',''b'').
== Examples ==


For instance,  
For instance,  
Line 24: Line 26:
: The same holds for 4,9,10 &mdash; (4,9) = (9,10) = (4,9,10) = 1, but (4,10) = 2 &mdash;,
: The same holds for 4,9,10 &mdash; (4,9) = (9,10) = (4,9,10) = 1, but (4,10) = 2 &mdash;,
: while 1 = (7,9) = (7,10) = (9,10) = (7,9,10) are ''pairwise relatively prime'', and therefore also relatively prime.
: while 1 = (7,9) = (7,10) = (9,10) = (7,9,10) are ''pairwise relatively prime'', and therefore also relatively prime.
== Finding the gcd ==


A theoretically important method to determine the greatest common divisor uses [[prime factorization]]:
A theoretically important method to determine the greatest common divisor uses [[prime factorization]]:
Line 39: Line 43:
and thus (in the language of [[ring theory]])
and thus (in the language of [[ring theory]])
the ideal generated by ''a'' and ''b'' is a principal ideal generated by (''a'',''b'').
the ideal generated by ''a'' and ''b'' is a principal ideal generated by (''a'',''b'').
== Applications ==


In elementary arithmetic, the greatest common divisor is used to simplify expressions  
In elementary arithmetic, the greatest common divisor is used to simplify expressions  
Line 46: Line 52:
Moreover, the gcd can be used to calculate the [[least common multiple]]:
Moreover, the gcd can be used to calculate the [[least common multiple]]:
lcd(''a'',''b'') = ''ab''/gcd(''a'',''b'').
lcd(''a'',''b'') = ''ab''/gcd(''a'',''b'').
== Generalizations ==
== Formulas ==


: <math> 1 \le \mathop{\rm gcd} (a,b) \le \min(a,b) </math>
: <math> 1 \le \mathop{\rm gcd} (a,b) \le \min(a,b) </math>

Revision as of 18:54, 17 August 2009

This article is developing and not approved.
Main Article
Discussion
Related Articles  [?]
Bibliography  [?]
External Links  [?]
Citable Version  [?]
Tutorials [?]
 
This editable Main Article is under development and subject to a disclaimer.

The greatest common divisor (often abbreviated to gcd, or g.c.d., sometimes also called highest common factor) of two or more natural numbers is the largest number which divides evenly both (or all) the numbers. Since 1 divides all numbers, and since a divisor of a number cannot be larger than that number, the greatest common divisor of some numbers is a number between 1 and the smallest of the numbers, and therefore can be determined (at least in principle) by testing finitely many numbers.

The greatest common divisor can also be characterized by the following property:

It is a common divisor, and every common divisor divides it evenly.

Numbers for which the greatest common divisor is 1 are called relatively prime. If (for three or more numbers) any two of them are relatively prime, they are called pairwise relatively prime.

The greatest common divisor of two numbers a and b usually is written as gcd(a,b), or, if no confusion is to be expected, simply as (a,b).

Examples

For instance,

(4,9)=1, (4,6)=2, and (4,12)=4,
for 72 =2.2.2.3.3, 108 =2.2.3.3.3 there is (72,108) = 2.2.3.3 = 36,
for 6 =2.3, 10 =2.5, 15 =3.5 there is gcd(6,10,15) = 1, (6,10) = 2, (6,15) = 3, (10,15) = 5
and thus 6, 10, and 15 are relatively prime, but not pairwise relative prime.
The same holds for 4,9,10 — (4,9) = (9,10) = (4,9,10) = 1, but (4,10) = 2 —,
while 1 = (7,9) = (7,10) = (9,10) = (7,9,10) are pairwise relatively prime, and therefore also relatively prime.

Finding the gcd

A theoretically important method to determine the greatest common divisor uses prime factorization: Every prime factor of a common divisor must be a prime factor of all the numbers. The greatest common divisor therefore is the product of all common prime factors taken with the highest power common to all the numbers. However, since prime factorization is not efficient, this is at most practical for small numbers (or for numbers whose factorization is already known).

Fortunately, the Euclidean algorithm provides an efficient means to calculate the greatest common divisor. It also shows that the greatest common divisor can be expressed as an integer linear combination of the numbers (a,b) = ka + lb (with integers k and l). Since every such linear combination is divisible by all divisors common to a and b, this in turn shows that it is the smallest positive linear combination and thus (in the language of ring theory) the ideal generated by a and b is a principal ideal generated by (a,b).

Applications

In elementary arithmetic, the greatest common divisor is used to simplify expressions by reducing the size of numbers involved, e.g., given some fraction p/q, then p/(p,q) / q/(p,q) is its reduced representation. Similarly, equations can be simplified. Moreover, the gcd can be used to calculate the least common multiple: lcd(a,b) = ab/gcd(a,b).

Generalizations

Formulas

If

then