Let
. We say that divides , written , if there’s an integer such that $b = na
If
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
Also, if
Greatest common divisor
Let
Let
and be two numbers in , the value of is a linear combination of and i.e. there exists in such that
Proof.
Let
First, let’s show that
It follows that
We can see that
In a similar fashion,
The next thing to prove is that
If
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
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
First note that if
Since
Then
Comparing it to