Notes 6: Polynomials in One Variable Definition. Let f(x) = b 0 x n + b x n + + b n be a polynomial of degree n, so b 0 0. The leading term of f is LT (f) = b 0 x n. We begin by analyzing the long division algorithm for polynomials. Let g = x, f = x 3 + x 2. Here is the whole division process: x 2 + 2x + 2 Our input data is the the polynomials g, f.. The first step is + 2x 2x + 2 x 2 We have taken the polynomial f and subtracted a multiple of g from f. What is the multiple? It is LT (f)/lt (g) = x 3 /x = x 2. We set a 0 := LT (f)/lt (g). Hence we have f f LT (f)/lt (g)g = f a 0 g = =: f. This is (almost) what is on the bottom line of the first step in the long division process. 2. Here is the second step: x 2 + 2x + 2x We repeat what we did in the first step except we now try to divide g(x) into f (x) := f(x) (LT (f)/lt (g))g =.
In the second step we subtract (LT (f )/LT (g))g = 2x g from f (x). This gives us ( ) 2x(x ) =. If we write a = LT (g )/LT (f), then step two changes f to f 2 = f a g =. 3. Here is the third step: x 2 + 2x + 2 + 2x 2x + 2 We repeat the process above. Let a 2 = LT (f 2 )/LT (g) = 2. Replace f 2 with f 3 = f 2 a 2 g =. 4. We must now stop since we can not divide LT (g) into LT (f 3 ). We put this together. We start with two polynomials f, g. We subtract multiples of g from f until we can do this no longer. Denote the sum of the multiples by q. Our result is f qg = r and the degree of r is strictly less than the degree of g. This is the condition that must hold to stop the algorithm from taking another step. Theorem. Let f, g k[x]. We can write f = qg + r for some q k[x] so that the degree of r is strictly less than the degree of g. Furthermore q, r are unique and there is an algorithm for finding them. Proof. We only have to show the uniqueness. Assume that f = gq + r = gq 2 + r 2 and that deg(r ) and deg(r 2 ) are both strictly less than deg(g). From r r 2 = g(q 2 q ) we see that the only way that the degree of r r 2 can be less than deg(g) is for q 2 q to be zero. This says that r = r 2. Corollary. Let f k[x] have degree m. Then f has less than or equal to m roots. 2
Proof. The proof is by induction. If deg(f) =, then f has a single root. To see this we just solve for the root. By induction we may assume that any polynomial of degree m has less than or equal to m roots. Assume that deg(f) = m. If f has no roots we are done. Assume that it has at least one root, say a. The division algorithm implies that we can write f(x) = (x a)q(x) + r with deg(r) <. This says that r is a constant. We claim that r = 0. To see this substitute x = r into the equation f(x) = (x a)q(x) + r. Any root of f is either a root of q(x) or it is equal to a. Since the degree of q(x) is m, by the induction hypothesis it has less than or equal to m roots. Thus f has less than or equal to m roots. We can described any ideal in k[x] very simply. And explicitly. Corollary 2. Let I k[x] be an ideal. Then there is an element f k[x] so that I =< f >. This says that I consists of all the multiples of a single element f. The above proof does NOT give us a method of finding the generator of I. Definition 2. Let f, g k[x]. The greatest common divisor of f and g is an element h k[x] so that The polynomial h divides both f and g. If p divides f and p divides g, then p divides h. We denote the greatest common divisor of fand g by GCD(f, g). Theorem 2. Let f, g k[x]. Then A. GCD(f, g) exists and is unique up to multiplication by a non-zero element of k. B. GCD(f, g) is a generator of the ideal < f, g >. C. There is an algorithm for computing GCD(f, g). Proof. We omit the proof of part A and part B of the theorem. See the text for those proofs. We prove C. We know that GCD(f, g) is the generator of the ideal < f, g > and the generator of this ideal is the non-zero element of the ideal with the smallest degree. Denote the ideal < f, g >= I. We look for elements in I of small degree. The division algorithm gives us such elements. Assume that deg(g) deg(f). The division algorithm gives us an element r = f gq whose degree is less than deg(g). We also have that I =< f, g >=< g, r >. 3
We first show that < f, g > < g, r >. We have f = gq + r so f < g, r >, and, clearly, g < g, r >. We show that < g, r > < f, g >. Clearly g < f, g >. We have r = f qg so r < f, g >. Iterate this process. At each step we obtain a new pairs of generators of the ideal I so that the minimal degree of the two elements is less than the minimal degree of the generators of I in the previous step. Eventually we get generators I =< f, g > so that the degree of one of the generators is 0. We take that generator to be g. Since deg(g ) = 0, g k. There are two cases to consider. Case One: If g = 0, then I =< f, g >=< f, 0 >=< f >. Case Two: If g 0, then we proceed one more step. The division by g automatically has remainder equal to zero. We are in case one. In both cases we have found a generator of the ideal I. This is called the Euclidean algorithm. It applies to integers as well. Instead of using degree to measure the size of an integer we use its absolute value. Everything else works exactly the same. Given polynomials f, g k[x] with deg(g) deg(f), the Euclidean algorithm produces an element h k[x] so that < f, g >=< h >. This says that h = Af + Bg for some elements A, B k[x]. The Euclidean algorithm actually computes the elements A, B. We try to write down this extension of the Euclidean algorithm. The Euclidean algorithm proceeds as follows: We start with elements f, g which we call f, g. At each step we get a new pair At each step we have (f, g ) (f 2, g 2 ) (f 3, g 3 ). I :=< f, g >=< f, g >=< f 2, g 2 >. We stop at level s when we have a pair of the form (f s, g s ) = (f s, 0). We then have I =< f s, g s >=< f s >. We now start the business of finding out how to write f s = Af + Bg. At each stage we write f i, g i in the form f i = A i f + B i g, g i = C i f + D i g. When we have done the last step we have our answer: f s = A s f + B s g. We start the process of writing out this algorithm:. Set f = f, g = g, A =, B = 0, C = 0, D =, so we have f = A f + B g, g = C f + D g. 4
2. We compute f = q g + r with deg(r ) < deg(g ). We set f 2 = g g 2 = r. Since we have f 2 = g = C f + D g, we set A 2 = C, B 2 = D. We have so Hence g 2 = r = f q g = A f + B g q (C f + D g), g 2 = (A q C )f + (B q D )g. C 2 = A q C, D 2 = B q D. 5