4.6  The Binomial Theorem, the Frobenius Map, and Fermat’s Little Theorem

In F5, compute (1+2)5 and 15+25. The first is 35=243, and 243=48⋅5+3, so it is 3. The second is 1+32=33=6⋅5+3, so it is 3 as well. The rule “(x+y)n=xn+yn”, the classic error of school algebra, is a theorem when n is the characteristic p of the field. This section proves it, and deduces Fermat’s little theorem from it with the rigidity of Section 4.5: a homomorphism of Fp to itself is the identity.

The tool is the binomial theorem, which Chapter 1 proves in an arbitrary commutative ring, with the binomial coefficients acting as natural multiples.

4.6.1. The binomial theorem, recalled

Chapter 1 proved what this section needs about finite sums and the binomial theorem, for every commutative ring. Finite sums obey the rules of Lemma 1.1.3 (Section 1.1). The binomial coefficients (nk) are defined by Pascal’s rule, without division, in Definition 1.2.1 (Section 1.2), where the table of their first rows also stands, and they satisfy the absorption rule Proposition 1.2.1. They act on ring elements as natural multiples, with the laws of Lemma 1.1.2, which Lemma 4.5.1 extends to integer multiples in Section 4.5. And the binomial theorem itself, (x+y)n=∑k=0n(nk)⋅(xkyn−k), holds for any x,y in a commutative ring R (Theorem 1.2.3); for R=Z it is the familiar expansion, since there m⋅z=mz (Section 4.5). Chapter 1 also proves the closed form k!(nk)=n(n−1)⋯(n−k+1) (Proposition 1.2.2); this section does not use it, since in Fp the factorial p! is 0.

In row 5 of the table of Section 1.2, the four middle entries 5,10,10,5 are all multiples of 5; in row 6 the middle entries 15 and 20 are not multiples of 6. Primes are special.

Lemma 4.6.1 (A Prime Divides the Middle Binomial Coefficients)

Let p be a prime and k∈N with 0<k<p. Then p∣(pk).

Proof. We read the coefficients in N⊆Z. By Proposition 1.2.1 with n=p−1 and k−1 in place of k, k(pk)=p(p−1k−1), so p∣k(pk). Since 0<k<p, p∤k: a positive multiple of p is at least p (Number Systems: From N to R, Proposition 2.5.1 (e)). Hence gcd(p,k)=1 by Corollary 2.2.2 (a), and Theorem 2.2.1 gives p∣(pk). This proves the lemma.

The hypothesis “prime” is needed: (42)=6, and 4∤6. In the proof, 4∣2(42), but gcd(4,2)=2, so Euclid’s lemma does not apply.

Quick check. Use Proposition 1.2.1 to compute (73) from (62)=15, and check that 7 divides it.

Solution. With n=6, k=2: 3(73)=7(62)=7⋅15=105, so (73)=35, and 35=5⋅7. (By Pascal’s rule, (73)=(62)+(63)=15+20=35, the same.)

4.6.2. The Frobenius map

We can now expand (x+y)p in a field of characteristic p.

Theorem 4.6.2 (The Frobenius Homomorphism)

Let F be a field of characteristic p>0.

  • (a) For all x,y∈F, (x+y)p=xp+yp,(xy)p=xpyp, and 1p=1. So the Frobenius map Fr:F→F, Fr(x):=xp, is a homomorphism, and it is injective.
  • (b) (x−y)p=xp−yp for all x,y∈F.
  • (c) If F is finite, then Fr is an automorphism of F.

By Theorem 4.5.3, the hypothesis charF=p>0 already makes p prime.

Try it first (ten minutes): expand (x+y)5 and (x+y)6 in F5, using the rows n=5 and n=6 of the table in Section 1.2, and see which coefficients survive.

Idea. For (x+y)5 the coefficients 1,5,10,10,5,1 become 1,0,0,0,0,1 in F5, and (x+y)5=x5+y5. For (x+y)6 the coefficients 1,6,15,20,15,6,1 become 1,1,0,0,0,1,1, and (x+y)6=x6+x5y+xy5+y6: the extra terms survive because 6 is not the characteristic. So the plan is: expand by the binomial theorem; every middle coefficient (pk) is a multiple of p; and a multiple of p acts on F as 0, because p⋅1=0. The product rule and 1p=1 are power laws, and injectivity is free for a homomorphism of fields.

Before reading on: where is it used that p is prime?

Proof.

  • (a) By Theorem 1.2.3, (x+y)p=∑k=0ptk with tk:=(pk)⋅(xkyp−k). Let 0<k<p. By Lemma 4.6.1, p∣(pk), so (pk)⋅1=0 by Proposition 4.5.2 (a), and then, by Lemma 4.5.1 (c) and Theorem 4.1.1 (d), tk=((pk)⋅1)(xkyp−k)=0⋅(xkyp−k)=0. The end terms are t0=1⋅(x0yp)=yp and tp=1⋅(xpy0)=xp. Let bk:=tk for k=0 and bk:=0 otherwise, and ck:=tk for k=p and ck:=0 otherwise. Since p≠0, tk=bk+ck for every 0≤k≤p, so by Lemma 1.1.3 (a) and (d), (x+y)p=∑k=0pbk+∑k=0pck=t0+tp=yp+xp, which is xp+yp by (F1). Next, (xy)p=xpyp by Proposition 1.1.1 (c), and 1p=1 by induction (10=1, and 1n+1=1n⋅1=1). So Fr is a homomorphism (Definition 4.4.1), and it is injective by Proposition 4.4.1 (c).

  • (b) By Proposition 4.4.1 (a), Fr(x−y)=Fr(x)−Fr(y).

  • (c) The image Fr(F) is a subset of F, and Fr, with codomain Fr(F), is a bijection F→Fr(F) by (a). If Fr(F)≠F, this would be a bijection from the finite set F onto a proper subset, which Sets and Functions, Theorem 4.1.9 forbids. So Fr(F)=F, Fr is bijective, and a bijective homomorphism F→F is an automorphism (Definition 4.4.1). This proves the theorem.

Answer to the prompt. Primality is used in one place: Lemma 4.6.1, whose proof needs Euclid’s lemma, and so needs p prime. It costs nothing here, since a positive characteristic is always prime (Theorem 4.5.3).

In words: in characteristic p, raising to the p-th power respects sums. The map is not the identity in general; Exercise C3 of Section 4.5 found that on the four-element field it exchanges two elements. On Fp itself it is the identity, and that is Fermat’s little theorem.

Warning. “(x+y)n=xn+yn” is not a general rule. In a field of characteristic p>0 it holds for n=p (Theorem 4.6.2 (a)), and so for n=p2 by Exercise B2 (and in the same way for every power of p). With other exponents it can fail: in F3, (1+1)2=4=1, while 12+12=2. In a ring of composite characteristic it can fail even with n equal to the characteristic: in Z/4Z, which has characteristic 4, ([1]+[1])4=[16]=[0], while [1]4+[1]4=[2]; the middle coefficient (42)=6 is not a multiple of 4. In Z the identity fails for every n≥2: (1+1)n=2n≠2.

4.6.3. Fermat’s little theorem

On Fp, the Frobenius map is a homomorphism Fp→Fp, and by Corollary 4.5.6 (b) there is only one such map, the identity. That is the whole proof of the first part below.

Theorem 4.6.3 (Fermat’s Little Theorem)

Let p be a prime.

  • (a) ap=a for every a∈Fp.
  • (b) ap−1=1 for every non-zero a∈Fp; so a−1=ap−2.
  • (c) For every a∈Z, p∣ap−a; and if p∤a, then p∣ap−1−1.

Proof.

  • (a) charFp=p (Example (The characteristics of the standard fields)), so Fr:Fp→Fp is a homomorphism by Theorem 4.6.2 (a). By Corollary 4.5.6 (b), the only homomorphism Fp→Fp is the identity. Hence ap=Fr(a)=a for every a∈Fp.

  • (b) Let a≠0. Since p≥2, p−1∈N and a⋅ap−1=ap−1a=ap=a=a⋅1, by (F6), the power recursion and (a). Canceling a≠0 (Theorem 4.1.1 (b)) gives ap−1=1. Likewise p−2∈N and a⋅ap−2=ap−1=1, so a−1=ap−2 by uniqueness of inverses (Theorem 4.1.1 (c)).

  • (c) Write [a] for the class of a∈Z in Fp=Z/pZ. Since [a][b]=[ab] (Theorem 2.3.1 (b)), induction on n gives [a]n=[an] for every n∈N: [a]0=[1]=[a0], and [a]n+1=[a]n[a]=[an][a]=[an+1]. By (a), [ap]=[a]p=[a], so p∣ap−a (Theorem 2.3.1 (a), for the ideal pZ). If p∤a, then [a]≠[0] (Theorem 2.3.1 (d)), so [ap−1]=[a]p−1=[1] by (b), and p∣ap−1−1. This proves the theorem.

Primality is needed in (c). For the modulus 4 and a=2, 24−2=14 is not a multiple of 4 (in Z/4Z this is ([1]+[1])4=[0]≠[2], from the warning above), and although 4∤2, 23−1=7 is not a multiple of 4 either.

Part (b) gives a second way to invert in Fp, besides the Euclidean algorithm of Chapter 2 (Theorem 2.1.4): a−1=ap−2. It also reduces large exponents: for non-zero a, only the remainder of the exponent on division by p−1 matters, since aq(p−1)+r=(ap−1)qar=ar. Exercise C2 below gives a second proof of (a), by induction, and Chapter 6 gives another proof of (b), from a product of all the non-zero elements.

Example (Powers and inverses in prime fields)
  • (i) Compute 3100 in F7.
  • (ii) Compute 2100 in F101.
  • (iii) Find the inverse of 7 in F31 twice: by Theorem 4.6.3 (b), and by the Euclidean algorithm.
  • (iv) What is the Frobenius map of Fp?

Solution.

  • (i) 7 is prime (the small-primes remark of Section 2.2) and 3≠0 in F7, so 36=1 by Theorem 4.6.3 (b). Since 100=16⋅6+4, the power laws give 3100=(36)1634=1⋅81, and 81=11⋅7+4. So 3100=4 in F7.

  • (ii) 101 is prime: by the remark after Lemma 2.2.4 it suffices that no d with 2≤d and d⋅d≤101, that is 2≤d≤10, divides 101, and the remainders of 101 on division by 2,3,…,10 are 1,2,1,1,5,3,5,2,1. Since 2≠0 in F101, Theorem 4.6.3 (b) gives 2100=2101−1=1. No multiplication was needed.

  • (iii) 31 is prime by the same test (d=2,3,4,5 leave remainders 1,1,3,1). By Fermat: since 7≠0 in F31, Theorem 4.6.3 (b) gives 7−1=729. Square repeatedly in F31: 72=49=18, 74=182=324=14, 78=142=196=10, 716=102=100=7. With 29=16+8+4+1, 729=71678747=7⋅10⋅14⋅7=70⋅98=8⋅5=40=9. By Euclid: 31=4⋅7+3 and 7=2⋅3+1, so 1=7−2⋅3=7−2(31−4⋅7)=9⋅7−2⋅31, and 7−1=9 by Theorem 2.4.1. Both routes give 9. Check: 7⋅9=63=2⋅31+1. For small p the Euclidean algorithm is shorter; Fermat’s route needs no back-substitution, only squaring.

  • (iv) The identity, by Theorem 4.6.3 (a): Fr(a)=ap=a for every a∈Fp.

Quick check. Compute 26 in F7 and 310 in F11, with and without Theorem 4.6.3.

Solution. Both are 1. Without it: 26=64=9⋅7+1; and 35=243=22⋅11+1, so 310=(35)2=1. With it: 7 and 11 are prime, 2≠0 in F7 and 3≠0 in F11, and the exponents are 7−1 and 11−1.

4.6.4. Exercises

A. Check your understanding

Exercise (A1)

These parts are about Theorem 4.6.2 and its proof.

  • (a) Where in the proof of (a) is it used that p is prime, and why does the theorem not need “p prime” as a separate hypothesis?
  • (b) List (5k) for 0≤k≤5 and (6k) for 0≤k≤6. Which are divisible by 5, and which by 6?
  • (c) Why is Fr injective? Does the proof use that F is finite?
  • (d) State the idea of the proof of (a) in two sentences.

Solution.

  • (a) In Lemma 4.6.1, through Euclid’s lemma: p∣k(pk) gives p∣(pk) only because gcd(p,k)=1, which needs p prime. A positive characteristic is always prime (Theorem 4.5.3), so “charF=p>0” already includes it.

  • (b) Row 5: 1,5,10,10,5,1; the four middle ones are divisible by 5, the end ones are not. Row 6: 1,6,15,20,15,6,1; only the two 6’s are divisible by 6, and 15, 20 are not. This is why (x+y)6≠x6+y6 in a ring of characteristic 6 such as Z/6Z.

  • (c) Every homomorphism of fields is injective (Proposition 4.4.1 (c)): Fr(a)=0 only for a=0. The proof of injectivity does not use finiteness; finiteness is used only for surjectivity in (c).

  • (d) Expand (x+y)p by the binomial theorem; every middle coefficient (pk) is a multiple of p. In characteristic p, p⋅1=0, so every middle term vanishes and only xp+yp remains.

B. Practice

Exercise (B1)

Compute 538 in F13, and find the inverse of 5 in F13 by Theorem 4.6.3.

Solution. 13 is prime (no d with 2≤d≤3 divides it, and 4⋅4>13; the remark after Lemma 2.2.4), and 5≠0 in F13. By Theorem 4.6.3 (b), 512=1. Since 38=3⋅12+2, 538=(512)352=25=12 in F13. For the inverse, 5−1=511. Now 52=12=−1, so 510=(52)5=(−1)5=−1 and 511=−5=8. Check: 5⋅8=40=3⋅13+1. Hence 538=12 and 5−1=8.

Exercise (B2)

Let F be a field of characteristic p>0.

  • (a) Show that (x+y)p2=xp2+yp2 for all x,y∈F.
  • (b) Show that (∑i=1mxi)p=∑i=1mxip for all m∈N and x1,…,xm∈F.

Solution.

  • (a) Fr∘Fr is a homomorphism, as a composite of homomorphisms (Proposition 4.4.1 (e)), and (Fr∘Fr)(x)=(xp)p=xp2 by the power law (xm)n=xmn. Applying its additivity to x+y gives the claim.

  • (b) Induction on m. For m=0 both sides are 0: the empty sum is 0, and 0p=0p−1⋅0=0 as p≥1. If the claim holds for m, split off the last term and use Theorem 4.6.2 (a): (∑i=1m+1xi)p=(∑i=1mxi+xm+1)p=(∑i=1mxi)p+xm+1p=∑i=1m+1xip.

Exercise (B3)

Let p be a prime. Show that the solutions x∈Fp of xp−1=1 are exactly the non-zero elements, and that every a∈Fp satisfies ap−a=0.

Solution. Every non-zero a satisfies ap−1=1 by Theorem 4.6.3 (b). The element 0 does not: since p−1≥1, 0p−1=0p−2⋅0=0≠1. So the solutions are exactly the non-zero elements. And ap−a=a−a=0 for every a by Theorem 4.6.3 (a).

C. Going deeper

Exercise (C1: Exit check: the Frobenius identity)

Let F be a field of characteristic p>0. Using Theorem 1.2.3 and Lemma 4.6.1, prove that Fr:F→F, x↦xp, is an injective homomorphism.

Solution. Sums. By Theorem 1.2.3, (x+y)p=∑k=0p(pk)⋅(xkyp−k). For 0<k<p, (pk)⋅(xkyp−k)=((pk)⋅1)(xkyp−k) by Lemma 4.5.1 (c). By Lemma 4.6.1, p∣(pk), and since charF=p, (pk)⋅1=0 (Proposition 4.5.2 (a)); so the term is 0 (Theorem 4.1.1 (d)). The terms k=0 and k=p are 1⋅yp=yp and 1⋅xp=xp, since (p0)=(pp)=1 and x0=y0=1. A sum whose terms vanish except at two places is the sum of those two terms (Lemma 1.1.3 (a), (d)), so (x+y)p=xp+yp.

Products and one. (xy)p=xpyp by the power law (xy)n=xnyn, and 1p=1. So Fr is a homomorphism (Definition 4.4.1).

Injective. Every homomorphism of fields is injective (Proposition 4.4.1 (c)).

Marking scheme. (10 points)

  • 2: the binomial expansion written with integer multiples (pk)⋅(xkyp−k).
  • 2: each middle term reduced to a multiple that vanishes, with the rule named (for example ((pk)⋅1)(xkyp−k) by (m⋅1)a=m⋅a, or (pk)⋅z=q⋅(p⋅z) where (pk)=qp).
  • 2: that multiple is 0 from p∣(pk) and charF=p, with both reasons named.
  • 1: the end terms yp and xp.
  • 1: (xy)p=xpyp and 1p=1.
  • 2: injectivity, by Proposition 4.4.1 (c) or by any correct direct argument.

Second route for injectivity: xp=yp⇒(x−y)p=0⇒x=y earns the 2 points, 1 for (x−y)p=xp−yp with its reason (Proposition 4.4.1 (a), or (−y)p=−yp for every prime p, the even one included), and 1 for x−y=0 because a field has no zero divisors.

Fatal errors (0 for the step): “(pk)=0” as an integer; using (x+y)p=xp+yp in its own proof.

Exercise (C2: Fermat by induction)

Let p be a prime. Give another proof of Theorem 4.6.3 (a) and of the first claim of Theorem 4.6.3 (c), without Corollary 4.5.6. In (a) use only Theorem 4.6.2 (a) (with charFp=p, Example (The characteristics of the standard fields)) and Theorem 2.3.3 (b), (d); in (b) you may also use Theorem 2.3.1.

  • (a) prove by induction on r∈N that (r⋅1)p=r⋅1 in Fp, and deduce ap=a for every a∈Fp;
  • (b) deduce that p∣ap−a for every integer a.

Solution.

  • (a) For r=0: (0⋅1)p=0p=0p−1⋅0=0=0⋅1, as p≥1. If (r⋅1)p=r⋅1, then by Theorem 4.6.2 (a) (charFp=p, Example (The characteristics of the standard fields)), ((r+1)⋅1)p=(r⋅1+1)p=(r⋅1)p+1p=r⋅1+1=(r+1)⋅1. Every element of Fp is [r] for some r∈{0,…,p−1} (Theorem 2.3.3 (b)), and [r]=r⋅[1] (part (d) there). So ap=a for every a∈Fp.

  • (b) Let a∈Z. Then [a]∈Fp, so [a]p=[a] by (a). By induction on n, [a]n=[an], using [a][b]=[ab] (Theorem 2.3.1 (b)), as in the proof of Theorem 4.6.3 (c). So [ap]=[a], and p∣ap−a (Theorem 2.3.1 (a), for the ideal pZ). (This proves only what Theorem 4.6.3 already gives; it is practice with the Frobenius identity, and nothing cites it.)

Exercise (C3: Roots of order p)

Let F be a finite field of characteristic p. Show that for every a∈F the equation xp=a has exactly one solution x∈F. Deduce that in Fp, the only solution of xp=a is x=a.

Solution. By Corollary 4.5.7 (a), p is a prime, so p>0, and by Theorem 4.6.2 (c), Fr is a bijection F→F. Surjectivity gives a solution of Fr(x)=a, and injectivity says there is at most one. In Fp, x=a is a solution by Theorem 4.6.3 (a), ap=a, so it is the only one. The uniqueness half needs only that Fr is injective, so it holds in every field of characteristic p>0 (Theorem 4.6.2 (a)); existence used the finiteness of F.

R. Review

Exercise (R1)

Find all z∈C with z2=−3+4i, and explain why there are exactly two.

Solution. By the square-root formula of Proposition 3.4.1, with a=−3, b=4: r=|−3+4i|=5 (since 9+16=25), (r+a)/2=1, (r−a)/2=4, and b>0, so w=1+2i. Check: (1+2i)2=1+4i+4i2=−3+4i. By Corollary 4.1.2 in the field C (Example (The Fields Q, R and C)), z2=w2 if and only if z=w or z=−w. So the solutions are 1+2i and −1−2i. They are two, not one: w=−w would give 2w=0, hence w=0, since 2≠0 in C (charC=0, Example (The characteristics of the standard fields), with Proposition 4.5.2 (b)).

Exercise (R2)

Show that 7 has no square root in Q(2).

Solution. Suppose (a+b2)2=7 with a,b∈Q. Expanding, (a2+2b2)+2ab2=7+02, so by unique representation (@prp-cof-sqrt2-field-archimedean (a)), 2ab=0 and a2+2b2=7. Since 2≠0 in Q (charQ=0, Example (The characteristics of the standard fields), with Proposition 4.5.2 (b)), Theorem 4.1.1 (f) applied twice (to 2⋅(ab)=0, then to ab=0) gives a=0 or b=0. If b=0, then a2=7. If a=0, then 2b2=7, so (2b)2=14. Both are excluded by the claim stated with @prp-cof-sqrt2-field-incomplete: no natural number n with k2<n<(k+1)2 for some k∈N is the square of a rational; take (n,k)=(7,2), as 4<7<9, and (n,k)=(14,3), as 9<14<16. So 7 has no square root in Q(2). This is the method by which Section 4.3 showed the same for 3 (@prp-cof-sqrt2-field-incomplete).

Exercise (R3)

Show that no relation < makes Q(i) (Example (Rational and Integer Complex Numbers)) an ordered field, and none makes the four-element field F of Exercise C1 of Section 4.2 an ordered field.

Solution. F. In F, 1+1=(1+1)+(0+0)α=0, by the definition of the sum, with coefficients in F2. So 2⋅1=0 and charF≠0, while every ordered field has characteristic 0 (Example (The characteristics of the standard fields)). This is the method of Theorem 2.3.3 (e) and Number Systems: From N to R, Example (A field with two elements that cannot be ordered): in an ordered field n⋅1>0 for n≥1 (Number Systems: From N to R, Proposition 2.4.3 (h)), while here 2⋅1=0.

Q(i). This is the method of Proposition 3.4.3; the proposition itself does not apply, since an order on the subfield Q(i) need not extend to C. Suppose < made Q(i) an ordered field. Then i≠0 gives i2>0, and 1≠0 gives 1>0 (Number Systems: From N to R, Proposition 2.4.3 (e)). But i2=−1 (Proposition 3.1.1; the operations of Q(i) are those of C), and 1>0 gives −1<0 (Number Systems: From N to R, Proposition 2.4.3 (a)). So 0<−1<0, and 0<0 by transitivity, which is impossible for the strict part of an order. The characteristic does not help here, since charQ(i)=0 (Example (The characteristics of the standard fields)): the obstruction for Q(i) is a square, not a multiple of 1.

Exercise (R4)

Find all homomorphisms Q(2)→R.

Solution. There are exactly two: the inclusion a+b2↦a+b2, and a+b2↦a−b2.

Every homomorphism is one of them. Let σ:Q(2)→R be a homomorphism. The inclusions Q→Q(2) and Q→R are homomorphisms (Example (Conjugation and Other Automorphisms) (ii); Q is a subfield of both), so they are ιQ(2) and ιR by the uniqueness clause of Theorem 4.5.5 (b) (both fields have characteristic 0, Example (The characteristics of the standard fields)). By Corollary 4.5.6 (a), σ∘ιQ(2)=ιR: σ(q)=q for every q∈Q. Then σ(2)2=σ((2)2)=σ(2)=2=(2)2, so σ(2)=2 or σ(2)=−2 by Corollary 4.1.2 in R. Hence σ(a+b2)=σ(a)+σ(b)σ(2)=a±b2.

Both occur. The inclusion is a homomorphism (Example (Conjugation and Other Automorphisms) (ii)), and so is conjugation a+b2↦a−b2 of Q(2) followed by the inclusion (Example (Conjugation and Other Automorphisms) (iii) and Proposition 4.4.1 (e)). They differ at 2, since 2>0>−2.

The tool, and the look-alikes. The tool is rigidity on the prime subfield (Corollary 4.5.6) followed by “push the equation x2=2 through σ”. The uniqueness theorem for complete ordered fields of Number Systems: From N to R, Chapter 6 (Number Systems: From N to R, Theorem 6.3.4) does not apply: it concerns maps of a complete ordered field to itself, and Q(2) is not complete. Nor does “a homomorphism into an ordered field preserves order”: the second homomorphism sends 2>0 to −2<0.