7.2 Highest common
factors and the Euclidean algorithm revisited
We have already seen that polynomials have an arithmetic quite similar
to that of : we have addition, subtraction and multiplication;
division causes problems, but as in we have the concept of
‘‘division with remainder’’, performed using the division
algorithm. In this section we shall continue to see how far we can
take the analogy.
The next thing we did in was to take two integers and consider
the set of their common factors, found by taking the two sets of their
factors separately and then forming their intersection. In theory we
can do the same thing for two polynomials; but there is a complication
here. Given a non-zero integer , any factor must be smaller
than in the sense that ; thus there are only finitely many possible factors (as they must all lie between
and ), and in principle we can check each one to determine
the set of factors, which must thus be finite.
In contrast, given a non-zero polynomial , any factor
must be smaller than in the sense that ; but there are infinitely many possible such factors
, so checking them all is rather tricky! Indeed, the set of
factors will certainly be infinite, because if is a factor
of , so that for some
, then for any we have
|
|
|
so that is also a factor of .
The fact that it may be hard to determine the set of factors of a
given polynomial may make it difficult to do examples, but it should
not prevent us from trying to develop a theory (indeed, we shall see
that ultimately this is not too severe an obstacle). However, the
point about being able to multiply factors by arbitrary elements of
can and should be addressed. One approach would
be to define an equivalence relation on the set of polynomials by
setting for all ; we would
then work with equivalence classes of polynomials when it came to
considering factors. Alternatively, we could choose the class
representative whose leading term has coefficient ; such a
polynomial is called monic (for example,
is monic but is not). Less formally, we can just
regard and as being ‘‘equally good’’ factors, and allow
ourselves to interchange between them freely.
Now the reason we considered the set of common factors of two integers
was that it enabled us to define the highest common factor as the
largest one. Here there will be no unique ‘‘largest’’ common factor
(meaning one of greatest degree) because of the ‘‘scalars’’ issue;
even if we were to demand that we choose a monic polynomial,
uniqueness would not be clear. We need to take a slightly different
approach, based on the equivalence of conditions (a)
and (c) of Proposition 4.4.1.
Definition 7.2.1
Given two polynomials and (not both
zero), a polynomial is called a highest common factor
(or hcf) of them if
-
(i)
is a common factor of and and
-
(ii)
any other common factor of and is a factor of .
This definition makes no claim for the uniqueness of . However,
if and are both highest common factors, then
so that for some
polynomial , and
|
|
|
On the
other hand, we also have , and thus
Hence we conclude that
, so that , and therefore is a non-zero
scalar. Thus if there is a highest common factor, it is unique up to
multiplication by non-zero scalars, so in this sense we may speak of
‘‘the’’ highest common factor.
However, it is far from clear that there will be any such
polynomial . To show that there is, we use linear combinations
of polynomials and imitate the proof of Theorem 4.2.17.
Definition 7.2.2
A (polynomial) linear combination of two polynomials
and is a polynomial which can be written in the form
for some polynomials and
.
Example 7.2.3
Let and . Then
|
|
|
|
|
|
|
|
|
|
|
|
is a polynomial linear combination of and ,
corresponding to the choice and in the definition above.
As in the case of , we have the following result.
Lemma 7.2.4
Let be a common factor of the polynomials and
. Then is a factor of every polynomial linear
combination of and .
Proof. Suppose that is a polynomial linear combination of and
, say
|
|
|
for some polynomials
and . By assumption, we can write and for some polynomials
and . Hence we have
|
|
|
|
|
|
|
|
so that divides as desired.
Corollary 7.2.5
Let and be non-zero polynomials, and suppose that
is a common factor of and and also a polynomial linear
combination of them. Then is a highest common factor of
and .
Example 7.2.6
Let and as in
Example 7.2.3. We saw there that
|
|
|
and hence
|
|
|
is a
polynomial linear combination of and . Since
|
|
|
the Factor Theorem implies that is also a
common factor of and , so it must be a highest common
factor.
Proof. Lemma 7.2.4 implies that every
common factor of and is a factor of ,
so is a highest common factor.
Theorem 7.2.7
Let
and be non-zero polynomials. Then there exists a non-zero
polynomial linear combination of them of the smallest
possible degree, and is a highest common factor of and
.
Proof. Let be the set of non-zero polynomial linear combinations of
and :
|
|
|
We note that is non-empty (as
), so it
contains a polynomial of the smallest possible degree. Choose
polynomials and such that
. We shall prove that
is a highest common factor of and .
To see that , we use polynomial division with remainder
(Theorem 7.1.10) to find polynomials
and such that
and either or
. Then we have
|
|
|
|
|
|
|
|
|
|
|
|
Hence if we would have , contrary to the minimality of the degree of ; so we must
have , and so ,
i.e., .
Similarly we see that , and so is a common factor of
and . Since is also a polynomial linear
combination of and , Corollary 7.2.5 shows that
is a highest common factor.
In Examples 7.2.3 and 7.2.6 the polynomials
and appeared to come out of thin air; we need a
systematic way to determine a highest common factor of two given
polynomials and to express it as a polynomial linear combination of
them. Just as in , we use the Euclidean algorithm. It operates
exactly as before, but to perform each division we may use the
division algorithm.
Example 7.2.8
Find a highest common factor of
and , and express it as a polynomial linear combination of
and .
Solution. Since , we begin by dividing by
:
|
|
|
so that
|
|
|
(7.2.1) |
Next, we divide by the remainder:
|
|
|
Hence the algorithm has terminated, so the last non-zero remainder,
, is a highest common factor of and .
To write this highest common factor as a polynomial linear
combination of and , we simply
rearrange (7.2.1) to obtain
|
|
|
Example 7.2.9
Find a highest common factor of
and , and express it
as a polynomial linear combination of and .
Solution. Since , we first divide
by :
|
|
|
so that Next, we divide by
the remainder:
|
|
|
so that Since
, we conclude
that is a highest common factor.
Working backwards, we obtain
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|