Let . We say that divides , written , if there’s an integer such that
$b = na
If divides , then is divisible by , and is a divisor or factor of . Also, is called a multiple of .
Additional properties of the relation :
- if and then .
- if and then .
- if and then .
- if and then for any integers .
Proof.
- if and , then $c=(nm)a.
- if and , then $bd=(nm)ac.
- if and , then $a + b=(m + n)d.
- if , , then and ; therefore, .
Division algorithm
Let with , then there exists such that
$a = bq + r, \quad \text{where }
Proof. If is the largest multiple of that does not exceed , then is positive, and since , then
Also, if , then , which implies that .
Greatest common divisor
Let , the greatest common divisor of and , written as or , is the element in such that , and , and every common divisor of and also divides .
Let and be two numbers in , the value of is a linear combination of and i.e. there exists in such that
Proof.
Let be the least positive integer that is a linear combination of and
First, let’s show that . By the division algorithm, we know that
It follows that
We can see that is a linear combination of and . Since and considering that we defined as the least positive linear combination of and , it follows that (if then would be the least possible linear combination, which is a contradiction); therefore, .
In a similar fashion, ; therefore, by the divisibility property #4
The next thing to prove is that is the greatest common divisor of and
. To prove this lets show that if is any other common divisor of and
then .
If and then by the divisibility property #4 it divides any other linear combination of and , since is one linear combination of and it follows that so either or , finally we can conclude that
Euclidean Algorithm
A very efficient method to compute the greatest common denominator
Suppose be integers with
- Apply the division algorithm
- Rename as and as and repeat 1 until
The last nonzero remainder is the greatest common divisor of and
The euclidean algorithm depends on the following lemma
Let be integers with . Let be the remainder of dividing by then
Proof. Let be the quotient of dividing by so that . If then it must divide any other linear combination of and like , therefore . Finally we can conclude that .
Proof of the theorem If we keep on repeating the division algorithm we have:
Therefore:
Extended Euclidean Algorithm
One of the applications of the euclidean algorithm is the calculation of the integers satisfying
First note that if then , now assume that there are integers and so that
Since
Then
Comparing it to we obtain the required coefficients and based on the following recursive equations