4.4  Evaluation, Substitution, and Polynomial Functions

A polynomial, in this chapter, is a sequence of coefficients (Definition 4.1.1), not a function. But every polynomial defines a function: put an element c of the ring in place of x and add up. More generally we can put in place of x a class modulo n, or another polynomial, after first moving the coefficients into the ring where the substitution happens. This section proves one theorem, the substitution principle, that covers all of these at once, because each is a ring homomorphism out of R[x] determined by where it sends the constants and x. Then it compares a polynomial with its function, and shows that over every finite ring other than the zero ring the passage from polynomials to functions loses information.

Throughout, R and S are commutative rings (Number Systems: From N to R, Definition 2.3.1), and powers sn and finite sums are those of Lemma 4.1.1.

4.4.1. Evaluating a polynomial

To evaluate a polynomial at c, replace each monomial axk by the element ack and add.

Definition 4.4.1 (Evaluation, Root, Polynomial Function)

Let R be a commutative ring, p∈R[x] and c∈R. The value of p at c is p(c):=∑k=0Npkck∈R, for any N∈N with pk=0 for every k>N. The element c is a root of p if p(c)=0. The polynomial function of p is the function R→R, c↦p(c).

In words: the value is the finite sum of the coefficients times the powers of c, with c0=1, so the constant coefficient enters as itself. The sum runs far enough to include every non-zero coefficient, and how far beyond that is our choice. Only finitely many coefficients are non-zero, and this is what makes the sum finite; a sequence such as (1,1,1,…) would ask for an infinite sum, which a ring does not provide.

Well-definedness. The definition allows many N, and they all give the same element: enlarging N only adds terms 0⋅ck=0. The fold below writes this out.

Second readingWhy the value does not depend on the bound

Let N be admissible for p. We show by Logic and Proof, Axiom 4.2.1 on j (through Number Systems: From N to R, Corollary 1.7.3 (b)) that ∑k=0N+jpkck=∑k=0Npkck. The case j=0 is trivial, and the sum recursion of Lemma 4.1.1 (a) gives ∑k=0N+j+1pkck=∑k=0N+jpkck+pN+j+1cN+j+1=∑k=0N+jpkck+0, since pN+j+1=0 and 0⋅cN+j+1=0 (Number Systems: From N to R, Proposition 2.3.2 (b) with (F6)); then (F3) and the hypothesis finish. Any two admissible N and N′ differ in this way, the larger being the smaller plus some j∈N. So p(c) depends only on p and c.

Examples.

  • In Q[x], let p=x2−3x+2, with coefficients 2,−3,1. Then p(0)=2, p(1)=1−3+2=0 and p(2)=4−6+2=0: 1 and 2 are roots.
  • In F3[x], let p=x3+2. Its values at 0,1,2 are 2, 1+2=3=0 and 8+2=10=1 (in F3). Its only root in F3 is 1.
  • A monomial. For axm, take N=m: every term with k≠m is 0⋅ck=0, so (Σ3) of Lemma 4.1.1 gives (axm)(c)=acm. In particular a constant a=ax0 has value ac0=a⋅1=a at every c, and x=1x1 has value 1⋅c1=c.

Warning. p(2) is a value; p2 is a coefficient. For p=x2−3x+2∈Z[x], p2=1 but p(2)=0. At 0 the two always agree, p(0)=p0, because 0k=0 for k≥1; at any other position they differ in general. Over Z both are integers, which is why this book never writes p(k) for a coefficient.

4.4.2. Evaluation respects the operations

At school, “substitute x=c” is done after or before multiplying out, with the same answer. In our setting that is a theorem: evaluation at c turns sums and products of polynomials into sums and products in R.

Theorem 4.4.1 (Evaluation Respects the Operations)

Let R be a commutative ring, p,q∈R[x] and c∈R. Then (p+q)(c)=p(c)+q(c),(pq)(c)=p(c)q(c), and a(c)=a for every constant a, and x(c)=c.

Idea. Sums are coefficientwise, and the sum rule (Σ1) splits the defining sum. For products, the move is check on monomials, extend by additivity (Lemma 4.2.3): both sides are additive in p and in q, and on monomials the product rule is the power law cm+n=cmcn together with one reordering of factors in R.

Proof. Sums. Let N be admissible for both p and q (the larger of an admissible N for each). Then N is admissible for p+q, and (p+q)(c)=∑k=0N(pk+qk)ck=∑k=0N(pkck+qkck)=p(c)+q(c), by Definition 4.2.1, then (F6) and (F9) in each term, then (Σ1) of Lemma 4.1.1.

Constants and x. These are the monomial example after Definition 4.4.1: a(c)=ac0=a and x(c)=1⋅c1=c.

Products. Define Φ,Ψ:R[x]×R[x]→R by Φ(p,q):=(pq)(c) and Ψ(p,q):=p(c)q(c). Both are additive in each argument. For Φ in the first argument, Φ(p+p′,q)=(pq+p′q)(c)=(pq)(c)+(p′q)(c)=Φ(p,q)+Φ(p′,q), by the distributive law of the ring R[x] (Theorem 4.2.4 (a)) and the sum rule just proved. For Ψ, (p(c)+p′(c))q(c)=p(c)q(c)+p′(c)q(c) by the sum rule, (F6) and (F9). The second argument is the same with p(q+q′)=pq+pq′.

On monomials axm and bxn, Lemma 4.2.2 (b) gives (axm)(bxn)=(ab)xm+n, so Φ(axm,bxn)=(ab)cm+n=(ab)(cmcn)=(acm)(bcn)=Ψ(axm,bxn), by the value of a monomial, the power law cm+n=cmcn (Lemma 4.1.1 (c)), and (F5) and (F6) to move b past cm. By Lemma 4.2.3 with two arguments and T=R, Φ=Ψ. This proves the theorem.

Remark. The monomial line moves the coefficient b past the power cm; that is the one step that needs two elements of R to commute. Elsewhere (F6) is used only to get the mirror forms of (F7), (F9) and Number Systems: From N to R, Proposition 2.3.2 (b), namely 1⋅c=c, (a+b)c=ac+bc and 0⋅c=0. The same proof works for substituting a square matrix into a polynomial with coefficients in a field, as in the linear-algebra companion, Chapter 0, because there the mirror laws hold for matrices too, b is a scalar, and scalars commute with every matrix; two matrices need not commute, and nothing in the proof asks them to.

Two consequences are used constantly. First, a root of a factor is a root of the product: if q(c)=0, then (pq)(c)=p(c)⋅0=0. Second, if R has no zero divisors, the converse holds: (pq)(c)=p(c)q(c)=0 forces p(c)=0 or q(c)=0. This is the school method for solving (x−1)(x−2)=0. In Q[x], (x−1)(x−2)=x2−3x+2 by the product formula, so, since Q is an integral domain (Example (Which Rings Are Integral Domains)) and (x−a)(c)=c−a by the sum rule and the value of a constant, the roots of x2−3x+2 in Q are exactly the c with c−1=0 or c−2=0: the numbers 1 and 2 found above, and no others.

4.4.3. Ring homomorphisms

Evaluation at c is a map R[x]→R that respects +, ⋅ and 1. The quotient map Z→Z/nZ of Number Systems: From N to R, Theorem 3.4.1 (c) does the same, and so does the map of the Chinese remainder theorem. Maps of this kind recur in every chapter from here on.

A ring homomorphism is a map between rings that turns sums into sums, products into products, and the one into the one.

Definition 4.4.2 (Ring Homomorphism)

Let R and S be commutative rings. A ring homomorphism φ:R→S is a function such that, for all a,b∈R, φ(a+b)=φ(a)+φ(b),φ(ab)=φ(a)φ(b), and φ(1)=1.

In words: computing in R and then applying φ gives the same result as applying φ and then computing in S. The sum and product on the left are those of R, on the right those of S. The condition on 1 is not a consequence of the other two, as the zero map below shows.

Between two fields this is exactly a homomorphism of fields (Definition 2.4.1). The consequences below are the ring versions of Proposition 2.4.1 (a), the composites in (e) and the powers in (f), with the same proofs. Parts (b)–(d) of that proposition do not carry over: the quotient map Z→Z/nZ of Example (Ring Homomorphisms and Two Impostors) (i) is not injective.

Consequences. Let φ:R→S be a ring homomorphism.

  • φ(0)=0. Let z:=φ(0). Then z+z=φ(0+0)=z, by (F3) in R. Adding −z to both sides and using (F2), (F4) and (F3) in S gives z=0. (This is cancellation, not the uniqueness of 0 in Number Systems: From N to R, Proposition 2.3.2 (a): uniqueness concerns an element that is neutral for every element, and we only know z+z=z.)
  • φ(−a)=−φ(a): φ(a)+φ(−a)=φ(a+(−a))=φ(0)=0, and negatives are unique (Number Systems: From N to R, Proposition 2.3.2 (a)). Hence also φ(a−b)=φ(a)−φ(b).
  • φ(sn)=φ(s)n for s∈R and n∈N, by Logic and Proof, Axiom 4.2.1 on n: φ(s0)=φ(1)=1=φ(s)0, and φ(sn+1)=φ(sns)=φ(s)nφ(s)=φ(s)n+1.
  • If ψ:S→T is another ring homomorphism, then so is ψ∘φ:R→T: ψ(φ(a+b))=ψ(φ(a)+φ(b))=ψ(φ(a))+ψ(φ(b)), the same for products, and ψ(φ(1))=ψ(1)=1.
Example (Ring Homomorphisms and Two Impostors)

Which of the following are ring homomorphisms? (i) The quotient map Z→Z/nZ, a↦[a], for n∈Z>0. (ii) The constants R→R[x], a↦ax0. (iii) The map Z/mnZ→Z/mZ×Z/nZ, [a]mn↦([a]m,[a]n), for coprime m,n∈Z>0. (iv) Z→Z, a↦2a. (v) The zero map Z→Z, a↦0.

Solution.

Complex conjugation z↦z― on C, whose rules are proved in Chapter 1, is another example; we use it only in a review exercise of the next section.

4.4.4. The substitution principle

Evaluation puts an element of R in place of x. Reduction modulo n changes the coefficients from Z to Z/nZ and keeps x. Composition puts a polynomial in place of x. The next theorem does all three: it moves the coefficients along a ring homomorphism φ and puts an element s in place of x, and it says that there is exactly one way to do so that respects the operations.

Theorem 4.4.2 (Substitution Principle)

Let R and S be commutative rings, φ:R→S a ring homomorphism, and s∈S. Define Φ:R[x]→S by Φ(p):=∑k=0Nφ(pk)sk, for any N admissible for p.

  • (a) Φ is well defined, and it is a ring homomorphism with Φ(a)=φ(a) for every constant a∈R and Φ(x)=s.
  • (b) Φ is the only ring homomorphism R[x]→S with these two properties.

In words: (a) says that substituting s for x, after moving each coefficient to S by φ, respects sums, products and 1; (b) says that a ring homomorphism out of R[x] is pinned down by what it does to the constants and to x.

Try it first (ten minutes): take R=Z, S=Z/5Z, φ the quotient map, and s=[2]. Which value must a ring homomorphism Φ with Φ(a)=[a] for constants and Φ(x)=[2] give to 3x2+1? Why is there no choice?

Idea. The attempt finds the value at once: 3x2+1 is the constant 3 times x times x, plus the constant 1 (Theorem 4.2.4 (c)), so a homomorphism must send it to [3][2][2]+[1]=[13]=[3]. The same reasoning applies to every polynomial: a homomorphism has no freedom, because it must send axn to φ(a)sn, and then the sum of the monomials to the sum of their images. That proves (b) and shows that the formula for Φ is forced. The only work is (a), showing that the forced formula respects products, and that is again a check on monomials, with the coefficients now computed in S.

Before reading on: where is S commutative used, and where φ(1)=1?

Proof. (a) Well defined. If N is admissible, then so is N+j, and each added term is φ(0)sk=0⋅sk=0, by φ(0)=0 (after Definition 4.4.2) and Number Systems: From N to R, Proposition 2.3.2 (b) with (F6); as for Definition 4.4.1, the value does not depend on N. Taking N=m for a monomial, (Σ3) of Lemma 4.1.1 gives Φ(axm)=φ(a)sm.

Additive. Let N be admissible for p and q. Then Φ(p+q)=∑k=0Nφ(pk+qk)sk=∑k=0N(φ(pk)sk+φ(qk)sk)=Φ(p)+Φ(q), by additivity of φ, (F6) and (F9) in S, and (Σ1).

Multiplicative. The maps (p,q)↦Φ(pq) and (p,q)↦Φ(p)Φ(q), from R[x]×R[x] to S, are additive in each argument: the first by the distributive laws of R[x] (Theorem 4.2.4 (a)) and additivity of Φ, the second by additivity of Φ and (F9), (F6) in S. On monomials, by Lemma 4.2.2 (b), multiplicativity of φ, the power law of Lemma 4.1.1 (c), and (F5), (F6) in S, Φ((axm)(bxn))=Φ((ab)xm+n)=φ(ab)sm+n=φ(a)φ(b)smsn=(φ(a)sm)(φ(b)sn)=Φ(axm)Φ(bxn). By Lemma 4.2.3 with two arguments and T=S, Φ(pq)=Φ(p)Φ(q) for all p,q.

The one, the constants, x. Φ(1)=Φ(1x0)=φ(1)s0=1⋅1=1. For a constant, Φ(ax0)=φ(a)s0=φ(a). And Φ(x)=Φ(1x1)=φ(1)s1=s. So Φ is a ring homomorphism with the two properties.

(b) Let Ψ:R[x]→S be a ring homomorphism with Ψ(ax0)=φ(a) for every a∈R and Ψ(x)=s. By Theorem 4.2.4 (c), the monomial axn is the product of the constant a and the n-th power of x, so Ψ(axn)=Ψ(ax0)Ψ(x)n=φ(a)sn=Φ(axn), by multiplicativity and the power property of ring homomorphisms (after Definition 4.4.2). Both Ψ and Φ are additive maps R[x]→S that agree on monomials, so Ψ=Φ by Lemma 4.2.3 with one argument. This proves the theorem.

The answer to the prompt. Commutativity of S does real work in one place, the middle line of the monomial computation, where it moves φ(b) past sm. Its other uses (0⋅sk=0, the right distributive law (u+v)w=uw+vw in the additivity steps, and 1⋅s=s) only supply the mirror forms of Number Systems: From N to R, Proposition 2.3.2 (b), (F9) and (F7), which a two-sided list of ring axioms gives directly. The condition φ(1)=1 is used twice, for Φ(1)=1 and for Φ(x)=s. If S is not commutative but satisfies those two-sided laws, the same proof goes through provided s commutes with every φ(b), since that is all the monomial line asks; this is the case of a square matrix and scalar coefficients, from the remark after Theorem 4.4.1.

Remark. With S=R, φ=idR and s=c, the map Φ is p↦p(c), and part (a) contains Theorem 4.4.1. We proved evaluation first because it is the case used most, and its proof is the substitution proof with φ invisible.

We call the move of (b) a homomorphism out of R[x] is fixed by the constants and x: to show that two ring homomorphisms out of R[x] agree, check that they agree on constants and on x.

4.4.5. Changing coefficients and composing

Two special cases of the substitution principle get names: the change of coefficients, which the algebra volumes of the series use for reduction modulo a prime, and composition, which Section 4.5 uses.

The first moves the coefficients and keeps x: take the target S[x], the homomorphism “φ, then a constant of S[x]”, and s=x.

Corollary 4.4.3 (Changing the Coefficient Ring)

Let φ:R→S be a ring homomorphism. For p∈R[x], let φ∗(p) be the sequence with (φ∗(p))k:=φ(pk). Then φ∗(p)∈S[x], and φ∗:R[x]→S[x] is a ring homomorphism with φ∗(axn)=φ(a)xn. Moreover deg⁡φ∗(p)≤deg⁡p for every p, and for p≠0, equality holds if and only if φ(lc(p))≠0.

Idea. Substitute x for x, after moving each coefficient to S: the substitution principle then hands us a ring homomorphism, and its formula is the coefficientwise image. The degree can only drop, and it drops exactly when the leading coefficient is sent to 0.

Proof. If pk=0 for k>N, then φ(pk)=φ(0)=0 for k>N, so φ∗(p) is a polynomial over S. Let γ:R→S[x], γ(a):=φ(a)x0: the composite of φ and the constants of S[x], a ring homomorphism (Example (Ring Homomorphisms and Two Impostors) (ii) and the composite rule after Definition 4.4.2). Theorem 4.4.2 with target S[x], γ and s=x gives a ring homomorphism Φ:R[x]→S[x] with Φ(p)=∑k=0N(φ(pk)x0)xk=∑k=0Nφ(pk)xk=φ∗(p), where the middle equality is Theorem 4.2.4 (c) in S[x], and the last is Proposition 4.2.1 applied to φ∗(p)∈S[x]. So φ∗=Φ is a ring homomorphism, and φ∗(axn)=φ(a)xn by definition.

For the degree: if p=0, then φ∗(p)=0. Otherwise let d:=deg⁡p. For k>d, φ(pk)=φ(0)=0, so deg⁡φ∗(p)≤d; and the coefficient of φ∗(p) at d is φ(lc(p)), so the degree is exactly d if and only if this element is non-zero.

The main example is reduction modulo n: the quotient map Z→Z/nZ gives Z[x]→(Z/nZ)[x], which reads every coefficient modulo n and respects sums and products. For n=2, 2x2+3x−1 ⟼ 0x2+1x+1=x+1∈F2[x], since 2=0, 3=1 and −1=1 in F2: the degree drops from 2 to 1, because the leading coefficient 2 reduces to 0. The opening computation of Section 4.3 is another instance: modulo 6, 6x3+5x2+x reduces to [5]x2+x, of lower degree because its leading coefficient 6 reduces to [0]. The algebra volumes of the series test integer polynomials for factorization by reducing them modulo a prime in exactly this way.

The second special case substitutes a polynomial for x: take S=R[x], φ the constants (Example (Ring Homomorphisms and Two Impostors) (ii)) and s=q.

Definition 4.4.3 (Composition of Polynomials)

Let R be a commutative ring and p,q∈R[x]. The composition p∘q∈R[x] is Φ(p) for the homomorphism Φ of Theorem 4.4.2 with S=R[x], φ:a↦ax0 and s=q: p∘q=∑k=0Npkqk(N admissible for p).

By Theorem 4.4.2 (a), p↦p∘q is a ring homomorphism R[x]→R[x] that fixes every constant, a∘q=a, and sends x to x∘q=q. Substituting x itself changes nothing: p∘x=∑kpkxk=p, by Theorem 4.2.4 (c) and Proposition 4.2.1. For example, in Z[x], (x2+1)∘(x+1)=(x+1)2+1=x2+2x+2, where (x+1)2=x2+2x+1 by the product formula. The polynomial p(−x):=p∘(−x) has coefficients (−1)kpk, since (−x)k=(−1)kxk: it is the sign-change map σ of Exercise (B2: Changing the sign of x), which the substitution principle shows once more to be multiplicative.

Quick check. In (Z/8Z)[x], evaluate x2−1 at [3]. Which ring homomorphism of Theorem 4.4.2 is “evaluate at [3]”?

Solution. [3]2−[1]=[9−1]=[8]=[0], so [3] is a root. Evaluation at [3] is the Φ of Theorem 4.4.2 with R=S=Z/8Z, φ=idZ/8Z and s=[3].

4.4.6. Polynomials and polynomial functions

Every polynomial p∈R[x] has a polynomial function R→R. The functions R→R form a ring of their own, and passing from a polynomial to its function respects the operations. The question is whether anything is lost on the way.

Proposition 4.4.4 (Polynomials and Their Functions)

Let R be a commutative ring.

  • (a) The set RR of functions R→R (Sets, Relations, and Cardinality, Definition 1.4.1), with the pointwise operations (f+g)(c):=f(c)+g(c) and (fg)(c):=f(c)g(c), is a commutative ring, whose zero and one are the constant functions with values 0 and 1.
  • (b) The map ε:R[x]→RR, ε(p):=(c↦p(c)), is a ring homomorphism.
  • (c) For all p,q∈R[x] and c∈R, (p∘q)(c)=p(q(c)): composition of polynomials matches composition of their functions.
  • (d) If R is finite with 1≠0, then ε is not injective. Explicitly, if c1,…,cr lists the elements of R without repetition, then P:=∏j=1r(x−cj) is monic of degree r, so P≠0, yet P(c)=0 for every c∈R.

Idea. Parts (a) and (b) are bookkeeping: every ring law holds value by value, and evaluation respects the operations value by value. Part (c) compares two ring homomorphisms R[x]→R and uses the move just named: they agree on constants and on x. Part (d) builds a polynomial with a factor vanishing at each element of R, and the degree, computed by multiplying monic factors, shows it is not the zero polynomial.

Proof. (a) The two rules define functions R→R, so + and ⋅ are operations on RR. Each of (F1)–(F7) and (F9) is an equation between functions with domain and codomain R, so by Sets, Relations, and Cardinality, Proposition 1.4.1 it suffices that the two sides agree at every c∈R, and there it is the same law in R: for example (f(g+h))(c)=f(c)(g(c)+h(c))=f(c)g(c)+f(c)h(c)=(fg+fh)(c). The zero is the constant function 0 by (F3) in R, the negative of f is c↦−f(c) by (F4), and the one is the constant function 1 by (F7).

(b) For p,q∈R[x] and c∈R, Theorem 4.4.1 gives ε(p+q)(c)=p(c)+q(c)=(ε(p)+ε(q))(c) and likewise for products; and ε(1)(c)=1. By Sets, Relations, and Cardinality, Proposition 1.4.1, ε(p+q)=ε(p)+ε(q), ε(pq)=ε(p)ε(q), and ε(1) is the one of RR.

(c) Fix q and c, and consider α,β:R[x]→R, α(p):=(p∘q)(c), β(p):=p(q(c)). The map α is the composite of p↦p∘q (a ring homomorphism, after Definition 4.4.3) and evaluation at c (a ring homomorphism, Theorem 4.4.1), so it is one; β is evaluation at q(c), a ring homomorphism. On a constant a, α(a)=a(c)=a and β(a)=a. On x, α(x)=q(c) and β(x)=x(q(c))=q(c). By the uniqueness in Theorem 4.4.2 (b), with S=R, φ=idR and s=q(c), α=β.

(d) Since R is finite, there is a bijection j↦cj from {1,…,r} to R (Sets, Relations, and Cardinality, Definition 3.1.2), and r≥1 because R contains 0. The product P is the product of a finite list in the commutative ring R[x] (Lemma 4.1.1 (a)). Write Pj:=∏i=1j(x−ci), so P0=1 and Pj+1=Pj(x−cj+1). We show by induction on j≤r that Pj is monic of degree j. The base: P0=1 is monic of degree 0, as 1≠0. The step: x−cj+1 has coefficients −cj+1,1,0,…, so it is monic of degree 1; by Theorem 4.3.2 (b) in its monic case, Pj+1 has degree j+1 and leading coefficient 1⋅1=1. So P=Pr has degree r∈N, and P≠0.

Now let c∈R; then c=cl for some l, by surjectivity. By Theorem 4.4.1, Pj+1(c)=Pj(c)(c−cj+1), using (x−cj+1)(c)=c−cj+1 (the sum rule, with (−a)(c)=−a for a constant). At j+1=l the second factor is cl−cl=0, so Pl(c)=0, and each later step multiplies 0 by an element, so Pr(c)=0 (Number Systems: From N to R, Proposition 2.3.2 (b) with (F6)). Hence ε(P)=ε(0) with P≠0, and ε is not injective.

The smallest instance is the one this chapter opened with.

Example (Different Polynomials, Equal Functions)

Over F2, compare x2+x with 0, and x2 with x, first as polynomials, then as functions F2→F2.

Solution. As polynomials. x2+x has coefficient 1≠0 in position 1, so it is not the zero polynomial; it has degree 2. And x2≠x, since their coefficients differ in position 2 (and in position 1).

As functions. At 0: 02+0=0 and 02=0. At 1: 12+1=1+1=0 in F2 (Example (Arithmetic on Z/nZ and the Field F2)), and 12=1. So the function of x2+x is the zero function, and x2 and x have the same function, the identity of F2.

This is Proposition 4.4.4 (d) with R=F2, c1=0, c2=1: P=(x−0)(x−1)=x(x+1)=x2+x, since −1=1 in F2.

Warning. A polynomial is not its function. “p(c)=0 for every c∈R” does not give p=0: over every finite ring with 1≠0 the polynomial P of Proposition 4.4.4 (d) is a counterexample, and over F2 it is x2+x. Over Q the implication does hold: Chapter 5 proves it for every infinite field, by bounding the number of roots of a non-zero polynomial. Over Z it follows, though we do not prove it here: read p∈Z[x] as a polynomial with the same coefficients in Q[x], where it vanishes at infinitely many points. In this chapter, two polynomials are equal only when their coefficients are equal.

4.4.7. Exercises

A. Check your understanding

Exercise (A1)

These questions are about Theorem 4.4.2 and its proof, except the last.

  • (a) Where in the proof is φ(1)=1 used?
  • (b) Where is the commutativity of S used?
  • (c) Run the theorem with R=Z, S=Z/5Z, φ the quotient map, s=[2] and p=x2+3x+1: compute Φ(p). For the uniqueness half, explain why any ring homomorphism Ψ with Ψ(a)=[a] on constants and Ψ(x)=[2] must send 3x2 to [2].
  • (d) Give the idea of the proof in two sentences.
  • (e) In F3[x], compute the values of (x+2)(x2+x+1) at 0, 1, 2, and find all its roots in F3.

Solution.

  • (a) Twice: for Φ(1)=φ(1)s0=1, and for Φ(x)=φ(1)s1=s.

  • (b) Essentially once: in the monomial computation, to rewrite φ(a)φ(b)smsn as (φ(a)sm)(φ(b)sn), which moves φ(b) past sm by (F6) in S. The proof also uses (F6) in S for 0⋅sk=0, for the right distributive law in the additivity steps, and for 1⋅s=s; these uses only give the mirror forms of a⋅0=0, (F9) and (F7). An answer that lists them too, with this distinction, is correct.

  • (c) The coefficients of p are 1,3,1, so Φ(p)=[1]+[3][2]+[1][2]2=[1+6+4]=[11]=[1]. For the uniqueness half: 3x2 is the product of the constant 3 and x2 (Theorem 4.2.4 (c)), so Ψ(3x2)=Ψ(3)Ψ(x)2=[3][2]2=[12]=[2]. No other value is possible, because Ψ respects products.

  • (d) A ring homomorphism out of R[x] has no freedom: it must send axn to φ(a)sn, so the formula is forced and uniqueness follows by additivity. The only work is to show that the forced formula respects products, and that is a check on monomials, where it becomes the power law and one reordering of factors in the commutative ring S.

  • (e) Evaluation respects products (Theorem 4.4.1), so the value is the product of the values of the factors. At 0: 2⋅1=2. At 1: (1+2)(1+1+1)=0⋅0=0. At 2: (2+2)(4+2+1)=1⋅1=1 (in F3, 4=7=1). So the only root is 1. Multiplied out by the product formula, the polynomial is x3+3x2+3x+2=x3+2 in F3[x], the second example after Definition 4.4.1, whose values 2,0,1 agree.

B. Practice

Exercise (B1: The degree of a composition)

Let R be an integral domain, p,q∈R[x], p≠0, and deg⁡q≥1. Prove that deg⁡(p∘q)=deg⁡p⋅deg⁡q. Show by an example that the hypothesis deg⁡q≥1 cannot be dropped.

Solution. Let d:=deg⁡p and e:=deg⁡q≥1.

Powers of q. By Logic and Proof, Axiom 4.2.1 on k, qk≠0, deg⁡qk=ke and lc(qk)=lc(q)k. For k=0, q0=1 has degree 0 and leading coefficient 1 (as 1≠0). For the step, qk+1=qkq, and since R has no zero divisors, Theorem 4.3.2 (b) gives degree ke+e=(k+1)e and leading coefficient lc(q)klc(q).

The top term. By Definition 4.4.3 with N=d, p∘q=∑k=0dpkqk. The term pdqd is the product of the non-zero constant pd (degree 0) and qd, so by Theorem 4.3.2 (b) it has degree de. Every other term pkqk with k<d is 0 or has degree ke<de, since e≥1 (Theorem 4.3.2 (a)). By Theorem 4.3.1 and induction along the sum recursion, r:=∑k=0d−1pkqk has deg⁡r<de (for d=0, r is the empty sum 0). Then p∘q=r+pdqd, and the equality case of Theorem 4.3.1 gives deg⁡(p∘q)=de.

The hypothesis on q. Take R=Z, p=x−1 and q=1, of degree 0. Then p∘q=1−1=0, of degree −∞, while deg⁡p⋅deg⁡q=1⋅0=0. A constant q can make the top terms cancel.

Exercise (B2: All polynomials of degree at most two over the field with two elements)

List the elements of F2[x]≤2 with their degrees and their functions F2→F2 (given by the values at 0 and 1). How many functions F2→F2 are there, and how many of the eight polynomials give each one?

Solution. By Definition 4.3.3, the elements are a0+a1x+a2x2 with ai∈{0,1}; there are eight (Exercise (B3: Counting polynomials over a finite field) for F2, n=2). The value at 0 is a0, and the value at 1 is a0+a1+a2 in F2. pdeg⁡pp(0)p(1)0−∞001011x101x+1110x2201x2+1210x2+x200x2+x+1211 A function F2→F2 is determined by its two values, so there are 2⋅2=4 of them, and each occurs for exactly two polynomials in the table: (0,0) for 0 and x2+x; (1,1) for 1 and x2+x+1; (0,1) for x and x2; (1,0) for x+1 and x2+1. In each pair the two polynomials differ by x2+x, the polynomial of Example (Different Polynomials, Equal Functions).

Exercise (B3: Shifting the variable)

Let R be a commutative ring and c∈R. Define Tc:R[x]→R[x] by Tc(p):=p∘(x+c). Prove that Tc is a bijective ring homomorphism with inverse T−c.

Solution. By Definition 4.4.3, Tc is a ring homomorphism that fixes every constant and sends x to x+c; likewise T−c fixes constants and sends x to x−c. The composite T−c∘Tc is a ring homomorphism (after Definition 4.4.2) that fixes constants, and T−c(Tc(x))=T−c(x+c)=T−c(x)+T−c(c)=(x−c)+c=x. The identity map of R[x] is also a ring homomorphism that fixes constants and sends x to x. By the uniqueness in Theorem 4.4.2 (b), with S=R[x], φ the constants and s=x, T−c∘Tc=idR[x]. Exchanging c and −c (and −(−c)=c), Tc∘T−c=idR[x]. So Tc has the inverse T−c, and is a bijection (Sets, Relations, and Cardinality, Definition 1.4.5).

C. Going deeper

Exercise (C1: Exit check: the substitution principle)

State and prove Theorem 4.4.2.

Solution. Statement. Let R and S be commutative rings, φ:R→S a ring homomorphism and s∈S, and let Φ(p):=∑k=0Nφ(pk)sk for N admissible for p. Then Φ:R[x]→S is a well-defined ring homomorphism with Φ(a)=φ(a) for constants and Φ(x)=s, and it is the only ring homomorphism R[x]→S with these two properties.

Well defined. Enlarging N by one adds the term φ(0)sk=0⋅sk=0, since φ(0)+φ(0)=φ(0) gives φ(0)=0; by induction any two admissible N give the same sum. In particular Φ(axm)=φ(a)sm, the other terms being 0.

Additive. With N admissible for p and q, Φ(p+q)=∑kφ(pk+qk)sk=∑k(φ(pk)sk+φ(qk)sk)=Φ(p)+Φ(q), by additivity of φ, (F9) and (F6) in S, and (Σ1).

Multiplicative. The maps (p,q)↦Φ(pq) and (p,q)↦Φ(p)Φ(q) are additive in p for fixed q, and in q for fixed p: the first because multiplication in R[x] distributes over addition and Φ is additive, the second because Φ is additive and multiplication in S distributes. On monomials, Φ((ab)xm+n)=φ(a)φ(b)smsn=(φ(a)sm)(φ(b)sn), by multiplicativity of φ, sm+n=smsn, and (F5), (F6) in S to move φ(b) past sm. Since (axm)(bxn)=(ab)xm+n, the two maps agree on pairs of monomials, so they agree everywhere by Lemma 4.2.3.

The one, constants and x. Φ(1)=φ(1)s0=1, Φ(ax0)=φ(a), and Φ(x)=φ(1)s=s.

Uniqueness. If Ψ is a ring homomorphism with Ψ(ax0)=φ(a) and Ψ(x)=s, then, as axn is the constant a times the n-th power of x, Ψ(axn)=φ(a)sn=Φ(axn). Both maps are additive and agree on monomials, so Ψ=Φ by Lemma 4.2.3 with one argument.

Marking scheme. (10 points)

  • 1: gives the formula for Φ and proves it does not depend on N, from φ(0)=0.
  • 1: proves Φ additive.
  • 3: reduces multiplicativity to monomials (in one argument or in both), justifying the additivity it uses.
  • 2: computes the monomial case correctly, justifying the reordering of factors in S (commutativity).
  • 1: shows Φ(1)=1 and Φ(x)=s (and Φ(a)=φ(a)).
  • 2: proves uniqueness: the values on monomials are forced, then additivity.

Fatal errors (0 for the step): proving multiplicativity only for p,q of degree at most 1; assuming that a homomorphism is determined by its value at x alone, without using Ψ(a)=φ(a) on constants. A proof of multiplicativity by expanding Φ(p)Φ(q) as a double sum and regrouping by i+j=k earns the 3 points of the reduction step only if the regrouping is proved.

Exercise (C2: Composition is associative)

Let R be a commutative ring and p,q,r∈R[x]. Prove that (p∘q)∘r=p∘(q∘r).

The first half of a proof is given.

Fix q and r. Both sides are additive in p: the left side is p↦p∘q followed by u↦u∘r, two ring homomorphisms (Definition 4.4.3), and the right side is p↦p∘(q∘r), a ring homomorphism.

The second half is blank. Name the move, then complete it.

Solution. One move is check on monomials, extend by additivity.

Let p=axn. Since u↦u∘q is a ring homomorphism fixing the constant a and sending x to q, and axn is the product of a and xn (Theorem 4.2.4 (c)), (axn)∘q=(a∘q)(x∘q)n=aqn, by the power property of ring homomorphisms (after Definition 4.4.2). Applying the ring homomorphism u↦u∘r in the same way, (aqn)∘r=(a∘r)(q∘r)n=a(q∘r)n. On the other side, the same computation with q∘r in place of q gives (axn)∘(q∘r)=a(q∘r)n. So the two sides agree on every monomial. Both are additive in p, so by Lemma 4.2.3 (with one argument and T=R[x]) they agree for every p.

Also correct: the move a homomorphism out of R[x] is fixed by the constants and x. Both sides are ring homomorphisms R[x]→R[x] (composites of ring homomorphisms, after Definition 4.4.2), both fix every constant ((a∘q)∘r=a∘r=a and a∘(q∘r)=a), and both send x to q∘r: (x∘q)∘r=q∘r and x∘(q∘r)=q∘r. So they are equal by the uniqueness in Theorem 4.4.2 (b), with S=R[x], φ:a↦ax0 and s=q∘r.

Exercise (C3: The factor theorem over any commutative ring)

Let R be a commutative ring and c∈R.

  • (a) Prove that for every n≥1, xn−cn=(x−c)∑j=0n−1cn−1−jxj.
  • (b) Prove that for p∈R[x], p(c)=0 if and only if p=(x−c)q for some q∈R[x].
  • (c) In Z/8Z, find all roots of x2−1. The usual argument that a quadratic polynomial cannot have more than two roots goes: “if c1 is a root, then p=(x−c1)q with deg⁡q=1; a second root c2≠c1 has (c2−c1)q(c2)=0, so q(c2)=0”. Which step fails in Z/8Z?

Solution (Hint 1). For (a), compare coefficients: multiplying a polynomial by x shifts its coefficients up by one place (Lemma 4.2.2 (a)). For (b) (⇒), reduce to (a).

Solution (Hint 2). For (b), let N be admissible for p and start from p−p(c)=∑k=0Npkxk−∑k=0Npkck, with p(c) read as a constant.

Solution.

  • (a) Let u:=∑j=0n−1cn−1−jxj, so uj=cn−1−j for 0≤j≤n−1 and uj=0 for j≥n. By Lemma 4.2.2 (a) and Theorem 4.2.4 (d), (x−c)u=xu−cu has coefficient −cu0 at 0 and uk−1−cuk at k≥1. So:
    • at k=0: −c⋅cn−1=−cn;
    • at 1≤k≤n−1: cn−k−c⋅cn−1−k=0, by the power law;
    • at k=n: un−1−cun=c0−0=1;
    • at k>n: 0−0=0.

    These are the coefficients of xn−cn. This is Chapter 1’s difference-of-powers identity (Lemma 1.1.4), read in the commutative ring R[x] with z=x and w=c; the proof above does not use it.

  • (b) (⇐) By Theorem 4.4.1, p(c)=(c−c)q(c)=0⋅q(c)=0.

    (⇒) Let N be admissible for p. By Proposition 4.2.1 and Theorem 4.2.4 (b), (c), and since the constants respect sums, p−p(c)=∑k=0Npkxk−∑k=0Npkck=∑k=1Npk(xk−ck), where the term k=0 is p0(1−1)=0. By (a), each xk−ck with k≥1 is (x−c)u(k) for a polynomial u(k), so by the distributive law p−p(c)=(x−c)q with q:=∑k=1Npku(k). If p(c)=0, then p=(x−c)q.

  • (c) The squares in Z/8Z of [0],…,[7] are [0],[1],[4],[1],[0],[1],[4],[1] (for instance [5]2=[25]=[1], [7]2=[49]=[1]). So x2−1 has the four roots [1],[3],[5],[7]. The failing step is “(c2−c1)q(c2)=0, so q(c2)=0”: it needs Z/8Z to have no zero divisors. With c1=[1], q=x+1 and c2=[3], (c2−c1)q(c2)=[2][4]=[8]=[0], with both factors non-zero.

Chapter 5 proves the factor theorem over a field again, by division with remainder.

Exercise (C4: A second proof of Fermat’s little theorem)

Let p be a prime. Give another proof that ap−1=1 for every non-zero a∈Fp, along the following steps, and then compare xp−x with its function.

  • (a) Let a∈Fp be non-zero. Show that b↦ab is a bijection from Fp∖{0} to itself.
  • (b) Deduce that ap−1=1, by computing the product of all non-zero elements of Fp in two ways.
  • (c) Show that xp−x≠0 in Fp[x], but ε(xp−x)=0.

Solution. Write F:=Fp, a field (Definition 2.2.1); then F∖{0} has the p−1 elements 1,…,p−1 (Number Systems: From N to R, Theorem 3.4.3 (b)).

  • (a) For b∈F∖{0}, ab≠0, since F has no zero divisors (Theorem 2.1.1 (f)); so b↦ab maps F∖{0} to F∖{0}. It is injective: ab=ab′ gives a(b−b′)=0, so b=b′. Its image is a subset of the finite set F∖{0} in bijection with F∖{0}; if the image were a proper subset, this would contradict Sets, Relations, and Cardinality, Theorem 3.1.9. So the map is surjective, hence a bijection.

  • (b) A rearranged product is the same product. For a list t1,…,tr in a commutative ring and a bijection σ of {1,…,r}, we show ∏j=1rtσ(j)=∏j=1rtj, by Logic and Proof, Axiom 4.2.1 on r. For r=0 both sides are the empty product 1. For the step, first a deletion rule: for a list u1,…,ur+1 and a position k, the product equals uk times the product of the list with position k deleted. For k=r+1 this is the product recursion; for k≤r, it follows from the rule for the first r entries (induction on the length) and (F5), (F6): ∏j=1r+1uj=(∏j=1ruj)ur+1=((∏j≤r,j≠kuj)uk)ur+1=((∏j≤r,j≠kuj)ur+1)uk, and the bracket in the last line is the product of the list with position k deleted, by the product recursion, since that list ends with ur+1. Now let uj:=tσ(j) and k:=σ−1(r+1). Deleting position k leaves the list tσ′(1),…,tσ′(r), where σ′(i):=σ(i) for i<k and σ′(i):=σ(i+1) for i≥k, a bijection of {1,…,r}: its values lie in {1,…,r}, since σ(m)=r+1 only for m=k and the index used (i for i<k, i+1 for i≥k) is never k; it is injective because σ and this index map are; and every j≤r is σ(m) for some m≠k, so j=σ′(m) if m<k and j=σ′(m−1) if m>k. By the deletion rule and the hypothesis for r, ∏j=1r+1tσ(j)=(∏i=1rti)tr+1=∏j=1r+1tj.

    The two computations. List F∖{0} as b1,…,bp−1, and let Q:=∏j=1p−1bj. By (a), abj=bσ(j) for a bijection σ of {1,…,p−1}, so the list ab1,…,abp−1 is a rearrangement of b1,…,bp−1, and its product is Q. By (F5), (F6) and induction on the length, the same product is ap−1Q. So ap−1Q=Q=1⋅Q. Since Q is a product of non-zero elements of a field, Q≠0 (Theorem 2.1.1 (f), by induction), and canceling Q (Theorem 2.1.1 (b)) gives ap−1=1.

  • (c) The polynomial xp−x has coefficient 1 at position p (since p≥2, the positions p and 1 differ), and 1≠0 in F; so it is not the zero polynomial. For every c∈F, cp−c=0: if c≠0, cp=cp−1c=c by (b); and 0p=0 since p≥1. So ε(xp−x) is the zero function. This gives a second proof, by Fermat rather than by the factors x−c, that ε is not injective over Fp. The two witnesses are in fact the same polynomial: Chapter 5 shows that xp−x=∏c∈Fp(x−c), the P of Proposition 4.4.4 (d) with R=Fp (Example (Polynomial Functions over a Finite Field) (b)).

This is the second proof of Theorem 2.6.6 (b); the first, in Chapter 2, went through the Frobenius map. Part (c) also follows directly from Theorem 2.6.6 (a).