COUNTING POINTS ON VARIETIES OVER FINITE FIELDS

Similar documents
LECTURE NOTES IN CRYPTOGRAPHY

RINGS: SUMMARY OF MATERIAL

Course 311: Michaelmas Term 2005 Part III: Topics in Commutative Algebra

Factorization in Polynomial Rings

NOTES ON FINITE FIELDS

A connection between number theory and linear algebra

Finite Fields. Sophie Huczynska. Semester 2, Academic Year

Contents. 4 Arithmetic and Unique Factorization in Integral Domains. 4.1 Euclidean Domains and Principal Ideal Domains

φ(xy) = (xy) n = x n y n = φ(x)φ(y)

0 Sets and Induction. Sets

2 ALGEBRA II. Contents

AN INTRODUCTION TO THE THEORY OF FIELD EXTENSIONS

Chapter 3. Rings. The basic commutative rings in mathematics are the integers Z, the. Examples

Math 120 HW 9 Solutions

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

Finite Fields. Sophie Huczynska (with changes by Max Neunhöffer) Semester 2, Academic Year 2012/13

SPRING 2006 PRELIMINARY EXAMINATION SOLUTIONS

Algebra Exam Fall Alexander J. Wertheim Last Updated: October 26, Groups Problem Problem Problem 3...

1 Rings 1 RINGS 1. Theorem 1.1 (Substitution Principle). Let ϕ : R R be a ring homomorphism

ϕ : Z F : ϕ(t) = t 1 =

MATH 3030, Abstract Algebra Winter 2012 Toby Kenney Sample Midterm Examination Model Solutions

MATH 361: NUMBER THEORY TENTH LECTURE

Honors Algebra 4, MATH 371 Winter 2010 Assignment 3 Due Friday, February 5 at 08:35

Algebraic Cryptography Exam 2 Review

Group Theory. 1. Show that Φ maps a conjugacy class of G into a conjugacy class of G.

Supplement. Dr. Bob s Modern Algebra Glossary Based on Fraleigh s A First Course on Abstract Algebra, 7th Edition, Sections 0 through IV.

Theorem 5.3. Let E/F, E = F (u), be a simple field extension. Then u is algebraic if and only if E/F is finite. In this case, [E : F ] = deg f u.

Public-key Cryptography: Theory and Practice

Solutions of exercise sheet 8

Rings and Fields Theorems

9. Finite fields. 1. Uniqueness

CHAPTER I. Rings. Definition A ring R is a set with two binary operations, addition + and

be any ring homomorphism and let s S be any element of S. Then there is a unique ring homomorphism

Math Introduction to Modern Algebra

Homework 10 M 373K by Mark Lindberg (mal4549)

(Rgs) Rings Math 683L (Summer 2003)

GEOMETRIC CONSTRUCTIONS AND ALGEBRAIC FIELD EXTENSIONS

Introduction to finite fields

Polynomial Rings. i=0. i=0. n+m. i=0. k=0

Algebraic structures I

2. Intersection Multiplicities

ADVANCED COMMUTATIVE ALGEBRA: PROBLEM SETS

Roots of Unity, Cyclotomic Polynomials and Applications

Moreover this binary operation satisfies the following properties

Congruences and Residue Class Rings

Finite Fields and Error-Correcting Codes

Math 2070BC Term 2 Weeks 1 13 Lecture Notes

5 Group theory. 5.1 Binary operations

Factorization in Integral Domains II

Math 121 Homework 3 Solutions

SUMMARY OF GROUPS AND RINGS GROUPS AND RINGS III Week 1 Lecture 1 Tuesday 3 March.

CDM. Finite Fields. Klaus Sutner Carnegie Mellon University. Fall 2018

MATH 326: RINGS AND MODULES STEFAN GILLE

Lecture Notes Math 371: Algebra (Fall 2006) by Nathanael Leedom Ackerman

Part II. Number Theory. Year

2a 2 4ac), provided there is an element r in our

(a + b)c = ac + bc and a(b + c) = ab + ac.

Polynomials, Ideals, and Gröbner Bases

GALOIS THEORY. Contents

Chapter 8. P-adic numbers. 8.1 Absolute values

Math 121 Homework 5: Notes on Selected Problems

SUMMARY ALGEBRA I LOUIS-PHILIPPE THIBAULT

Local properties of plane algebraic curves

MATH 431 PART 2: POLYNOMIAL RINGS AND FACTORIZATION

Rings. Chapter 1. Definition 1.2. A commutative ring R is a ring in which multiplication is commutative. That is, ab = ba for all a, b R.

Institutionen för matematik, KTH.

Math 547, Exam 1 Information.

ERRATA. Abstract Algebra, Third Edition by D. Dummit and R. Foote (most recently revised on February 14, 2018)

Linear Algebra (part 1) : Vector Spaces (by Evan Dummit, 2017, v. 1.07) 1.1 The Formal Denition of a Vector Space

Solutions to odd-numbered exercises Peter J. Cameron, Introduction to Algebra, Chapter 3

ABSTRACT ALGEBRA MODULUS SPRING 2006 by Jutta Hausen, University of Houston

FILTERED RINGS AND MODULES. GRADINGS AND COMPLETIONS.

1 Basic Combinatorics

CYCLOTOMIC POLYNOMIALS

12. Hilbert Polynomials and Bézout s Theorem

CSIR - Algebra Problems

ABSTRACT ALGEBRA 2 SOLUTIONS TO THE PRACTICE EXAM AND HOMEWORK

Outline. MSRI-UP 2009 Coding Theory Seminar, Week 2. The definition. Link to polynomials

2 Lecture 2: Logical statements and proof by contradiction Lecture 10: More on Permutations, Group Homomorphisms 31

CYCLOTOMIC POLYNOMIALS


ALGEBRA II: RINGS AND MODULES OVER LITTLE RINGS.

Projective Varieties. Chapter Projective Space and Algebraic Sets

Math 429/581 (Advanced) Group Theory. Summary of Definitions, Examples, and Theorems by Stefan Gille

D-MATH Algebra II FS18 Prof. Marc Burger. Solution 26. Cyclotomic extensions.

Vector Space Basics. 1 Abstract Vector Spaces. 1. (commutativity of vector addition) u + v = v + u. 2. (associativity of vector addition)

Algebraic Number Theory

Module MA3411: Abstract Algebra Galois Theory Michaelmas Term 2013

Honors Algebra 4, MATH 371 Winter 2010 Assignment 4 Due Wednesday, February 17 at 08:35

Homework 8 Solutions to Selected Problems

Algebra Review. Instructor: Laszlo Babai Notes by Vincent Lucarelli and the instructor. June 15, 2001

The Weil bounds. 1 The Statement

1 Absolute values and discrete valuations

Rings. EE 387, Notes 7, Handout #10

Coding Theory and Applications. Solved Exercises and Problems of Cyclic Codes. Enes Pasalic University of Primorska Koper, 2013

Math Introduction to Modern Algebra

D-MATH Algebra I HS18 Prof. Rahul Pandharipande. Solution 6. Unique Factorization Domains

THROUGH THE FIELDS AND FAR AWAY

Section III.6. Factorization in Polynomial Rings

2 (17) Find non-trivial left and right ideals of the ring of 22 matrices over R. Show that there are no nontrivial two sided ideals. (18) State and pr

Transcription:

COUNTING POINTS ON VARIETIES OVER FINITE FIELDS OLOF BERGVALL 1. Abstract algebra In this section we briey recall the basic concepts and results from abstract algebra. 1.1. Groups. Denition 1.1. Let S be a set. A binary operation on S is a function : S S S. The binary operation is called commutative if (a, b) = (b, a) for all a, b S, associative if (a, (b, c)) = ( (a, b), c) for all a, b, c S. We usually write a b or even ab instead of (a, b). Example 1.1. The following are examples of binary operations: (a) Addition + on the set of the integers Z. (b) Multiplication on the set of rational numbers Q. (c) Matrix multiplication on the set of n n-matrices with real entries, M n,n (R) Denition 1.2. A group is a pair (G, ) where G is a nonempty set and is a binary operation on G such that is associative, there is an element e G such that e g = g e = g for all g G, for each g G there is a h G such that g h = h g = e. The element e is called the identity element of G. The element h is called the inverse of g and is usually written g 1. We shall often simply write G instead of (G, ). If is commutative we say that G is commutative or abelian. If G is nite as a set we call G a nite group and say that it has nite order or simply that it is nite. As for sets, we write G to denote the number of elements in G. Example 1.2. Blank row (a) The integers Z form a group under addition +. This group is commutative. (b) Let S n denote the set of bijections from the set {1, 2,..., n} to itself. The set S n becomes a group under composition of functions. The group S n is called the symmetric group. It is not commutative for n 3. (c) The integers do not form a group under subtraction since subtraction is not associative. Proposition 1.3 (Basic properties of groups). Let G be a group. (1) The identity element of G is unique. (2) The inverse of an element g G is unique. 1

2 OLOF BERGVALL (3) If g, h G, then (gh) 1 = h 1 g 1. (4) If g G, then (g 1 ) 1 = g. (5) Let g, h G. Then the equations gx = h, and yg = h, have unique solutions x, y G. (6) Let a, b, c G. If ab = ac or then b = c. Similarly, if ba = ca then b = c. Proof. The proof can be found in any textbook on abstract algebra or could be seen as an instructive exercise. Denition 1.4. Let G be a group, g be an element of G and let n Z. Dene the n'th power of g as g n = e if n = 0, g n = g g g if n > 0, }{{} n times g n = (g 1 ) n if n < 0. It is not hard to see that groups satisfy the following laws of exponents g m g n = g m+n, and (g m ) n = g mn. It is worth stressing that (gh) n g n h n in general. However, this holds as soon as gh = hg. If G is a group whose operation is written additively (such as Z under addition) then one typically writes nx instead of x n and the laws of exponents become mx + nx = (m + n)x and m(nx) = (mn)x. Denition 1.5. Let G be group with binary operation and let H be a subset of G. If H is also a group under the binary operation (restricted to H), then H is called a subgroup of G. Example 1.3. Blank row (a) Let G = Z and let H be the multiples of the integer n. Then H is a subgroup of G. (b) Let G be the group of nonzero complex numbers under multiplication and let H be the subset of complex numbers z such that z = 1. Then H is a subgroup of G. Proposition 1.6. Let G be a group and let H be a subset of G. subgroup if and only if e H, if h 1, h 2 H then h 1 h 2 H, and if h H, then h 1 H. Then H is a We leave the proof as an easy exercise. The subsets {e} and G are thus subgroups of G. The subgroup {e} is called the trivial subgroup and a subgroup which is not equal to G is called a proper subgroup. Theorem 1.7 (Lagrange's theorem). Let G be a nite group. (a) If H is a subgroup of G, then H divides G. (b) If g G, then g G = e.

COUNTING POINTS ON VARIETIES OVER FINITE FIELDS 3 Example 1.4. Let G = Z/6Z be the set of integers modulo 6 under addition. We have G = 6 so the only possible sizes of subgroups of G are 1, 2, 3 and 6. Indeed, the subsets of G are all the subgroups. H 1 = {0}, H 2 = {0, 3}, H 3 = {0, 2, 4}, H 4 = {0, 1, 2, 3, 4, 5} = G, Denition 1.8. Let (G, ) and (H, ) be two groups and let φ : G H be a function. We call φ a homomorphism if φ(a b) = φ(a) φ(b) for all a, b G. If φ is bijective we say that φ is an isomorphism. Then φ 1 is also a homomorphism. If there is an isomorphism between G and H we say that they are isomorphic and write G = H. It is often convenient to think about two isomorphic groups as dierent incarnations of the same group. Example 1.5. Blank row (a) Let G = Z/3Z and let H = Z/15Z. Dene φ : G H by φ(0) = 0, φ(1) = 5 and φ(2) = 10. Then one can easily check that φ is a homomorphism. (b) Let G = Z/ Z under addition and let H = {1, e 2πi/3, e 4πi/3 } under multiplication. Dene φ : G H by φ(0) = 1, φ(1) = e 2πi/3 and φ(2) = e 4πi/3. Then one can check that φ is an isomorphism. The set of elements in H that are images of elements in G under φ is called the image of φ and is denoted im(φ). We have that im(φ) is a subgroup of H. If im(φ) = H we say that φ is surjective. Let e H be the identity element of H. The set of elements of G that are mapped to e H is called the kernel of φ and is denoted ker(φ). The set ker(φ) is a subgroup of G. If ker(φ) = {e G } we say that φ is injective. Every subgroup is the image of some homomorphism but every subgroup is not the kernel of a homomorphism. A subgroup which can be realized as a kernel of a homomorphism is called a normal subgroup. Proposition 1.9. A subgroup N G is normal if and only if g 1 Ng N for all g G. Thus, if G is abelian then every subgroup is normal. Let N be a normal subgroup of G. Then there is a group H and a homomorphism φ : G H such that N = ker(φ) and im(φ) = H. We call the group H the quotient of G by N and write H = G/N. Example 1.6. Let G = Z and let N = 5Z be the subgroup of multiples of 5. Then the quotient G/N is the integers modulo 5, Z/5Z. Before leaving the world of groups we remark that we have taken a bit of an unusual path in order to avoid discussing cosets. Therefore, the existence of quotient groups is not clear at this point (although they do exist). More thorough treatments usually dene quotient groups via cosets which makes the existence obvious but they then need to state the following as a theorem (which is a triviality from our perspective).

4 OLOF BERGVALL Theorem 1.10 (The rst isomorphism theorem of groups). Let φ : G H be a homomorphism of groups. Then 1.2. Rings. im(φ) = G/ker(φ). Denition 1.11. A ring R is a set together with two binary operations, addition + and multiplication, such that (R, +) is an abelian group, the binary operation is associative, there is an element 1 R such that 1 r = r 1 = r for all r R, multiplication distributes over addition, i.e. a (b + c) = a b + a c, and (a + b) c = a c + b c, for all a, b, c R. If multiplication is commutative we say that R is commutative. The identity element of (R, +) is called the additive identity and is often denoted 0. Similarly, 1 is called the multiplicative identity. An element s R such that r s = s r = 1 is called a multiplicative inverse of r. The set of elements of R which have multiplicative inverses is denoted R. The set R is a group under multiplication. The elements of R is often called units. From now on we shall exclusively consider commutative rings. Therefore, we shall drop the adjective commutative and simply write ring to mean commutative ring (although most of what follows holds in general). Example 1.7. (a) The integers Z form a ring under ordinary addition and multiplication. (b) The set R[x] of polynomials in one variable with real coecients form a ring under addition and multiplication of polynomials. Denition 1.12. Let R be a ring. A subset S of R which is a ring under the operations of addition and multiplication restricted to S is called a subring. Denition 1.13. Let R and S be two rings. A function φ : R S is called a homomorphism of rings if φ(a + b) = φ(a) + φ(b), φ(ab) = φ(a)φ(b), for all a, b R. If φ is bijective we call φ an isomorphism. Then φ 1 exists and is a homomorphism. We dene the image of φ im(φ) = {s S r R, φ(r) = s} S, and the kernel of φ ker(φ) = {r R φ(r) = 0} R. We have that im(φ) is a subring of S but ker(φ) is not a subring of R. Denition 1.14. An ideal I of a ring R is a subgroup of the additive group of R such that ra I for all a I and all r R. An ideal I R such that I R is called a proper ideal.

COUNTING POINTS ON VARIETIES OVER FINITE FIELDS 5 We have that ker(φ) is an ideal of R and every ideal is the kernel of some homomorphism. If R and S are rings and φ : R S is a homomorphism of rings such that I = ker(φ) and im(φ) = S, then S is called the quotient of R by I and we write S = R/I. The following types of ideals are especially important: A proper ideal P R such that if a product ab P, then a P or b P is called a prime ideal. A proper ideal M R such that M I for any proper ideal I R is called a maximal ideal. All maximal ideals are prime but not vice versa. If S R is a subset and I R is the smallest ideal containing S, then I is called the ideal generated by S. If S = {s 1, s 2,...} we write I = (s 1, s 2,...). If I is generated by a single element r we call I a principal ideal. We also have a list of especially important types of rings: A ring R such that the zero ideal (0) is prime is called an integral domain. A ring R such that the zero ideal (0) is maximal is called a eld. A ring R such that every ideal I is principal is called a principal ideal domain. Thus, an integral domain is a ring such that if ab = 0, then either a = 0 or b = 0. A F is a ring with 1 0 such that F = F \ {0}, i.e. such that each nonzero element is invertible. Example 1.8. (a) The integers Z do not form a eld under ordinary addition and multiplication since Z = { 1, 1}. (b) The set of rational numbers Q form a eld under ordinary addition and multiplication and so does the set of real numbers R as well as the set of complex numbers C. (c) The set of remainders of integers modulo a prime number p form a eld under addition addition and multiplication of remainders. This eld is denoted F p. It is nite and contains p elements. 1.3. Unique factorization. Let R be an integral domain. Let r be an element of R which is neither zero nor a unit. If any factorization r = x y requires either x or y to be a unit we call r irreducible. Two irreducible elements r and s are associated if there is a unit u R such that r = u s. Denition 1.15. Let R be an integral domain. Suppose that any element r of R can be expressed as a product r = u p 1 p 2 p n, of a unit u and irreducible elements p 1,..., p n uniquely in the sense that if r = v q 1 q 2 q m, is another factorization of r into a unit v and irreducible elements q 1,..., q m then there is a bijection φ : {1,..., n} {1,..., m} such that p i is associated to q φ(i). Then R is called a unique factorization domain (UFD). Example 1.9. (a) The ring of integers Z is a unique factorization domain. The irreducible elements are the prime numbers. (b) Let F be a eld and let F [x] denote the ring of polynomials in the variable x with coecients in F. Then F [x] is a unique factorization domain. The irreducible elements are the irreducible polynomials.

6 OLOF BERGVALL Proposition 1.16. Let R be a ring. (a) If P is a prime ideal of R, then R/P is an integral domain. (b) If M is a maximal ideal of R, then R/M is a eld.

1.4. Exercises. COUNTING POINTS ON VARIETIES OVER FINITE FIELDS 7 1.4.1. Determine all ideals of the following rings. Which of these are maximal or prime? (a) Q. (b) Z/18Z. (c) Z/25Z. 1.4.2. Is the eld R isomorphic to the eld C? 1.4.3. Let p and q be two distinct prime numbers. Is the eld Q( p) isomorphic to the eld Q( q)? 1.4.4. Prove that if R is a ring and a, b R, then (a) ( 1)a = a, (b) ( a)( b) = ab. 1.4.5. Find all ring homomorphisms (a) from Z/6Z to Z/15Z. (b) from Z/7Z to Z/17Z. 1.4.6. Consider the ring S = Z[i] of Gaussian integers consisting of polynomials in the complex number i with integer coecients. Find a ring R, a prime ideal P R and an isomorphism φ : R S. Conclude that S is an integral domain. 1.4.7. Prove Proposition 1.16. 1.4.8. Let R be a ring and let r R be such that r n = 0 for some nonnegative integer n. Prove that r + 1 is a unit. 1.4.9. Let k be a eld and let k[x] denote the ring of polynomials in the variable x with coecients in k. Let a k. Show that the set is an ideal in k[x]. 1.4.10. Let R be a ring. S = {f(x) k[x] f(a) = 0}, (a) Let S 1 and S 2 be two subrings of R. Show that S 1 S 2 also is a subring of R. (b) Let I 1 and I 2 be two ideals of R. Show that I 1 I 2 also is an ideal of R. (c) Generalize (a) and (b) to arbitrary collections of subrings and ideals. (d) Is the corresponding statements true if we replace intersection by union? 1.5. Sage problem. 1.5.1. Create a Sage-program that takes as input a prime number p and computes all monic irreducible polynomials of degree 2 over Z/pZ.

8 OLOF BERGVALL 1.5.2. Create a Sage-program that takes as input a prime number p and creates a eld with p 2 elements (do not use the GF-package!). If you have used Sage before, the programming should present little diculty. If you are new to Sage, you will nd some useful snippets below. As usual in programming, Google is a very useful tool. sage : p = 2 sage : R = ZZ sage : R I n t e g e r Ring sage : I = p*r sage : I P r i n c i p a l i d e a l ( 2 ) o f I n t e g e r Ring sage : S = R. q u o t i e n t ( I ) sage : L = S. l i s t ( ) sage : L [ 0, 1 ] #A s hort program w ritten in a f i l e c a l l e d t e s t. sage. def f a c (n ) : out = 1 f o r i in range (n ) : out = out *( i +1) return out #Note that Sage uses zero indexing and t h e r e f o r e range (n ) = [ 0, 1,..., n 1]. #Also note that Sage i s based on Python and t h e r e f o r e i n d e n t a t i o n i s #not only o f a e s t h e t i c a l importance. sage : load (" t e s t. sage ") sage : f a c ( 3 ) 6

COUNTING POINTS ON VARIETIES OVER FINITE FIELDS 9 2. Finite fields Let F be a nite eld and let F = q. Then F = q 1 so it follows from Theorem 1.7 that a q 1 = 1 for all a F. We thus see that a q = a for all a F. Theorem 2.1. The factorization holds in F [x]. x q x = a F(x a), Proof. We saw above that a q a = 0 for all a F so each element of F is a zero of the left hand side. It is also clear that each element of F is a zero of the right hand side. The degree of the left hand side is q and so is the degree of the right hand side since F = q so the result follows. Corollary 2.2. Let K be a eld which contains F as a subeld and let a K. Then a F if and only if a q a = 0. Lemma 2.3. Let f(x) be a polynomial with coecients in F of degree n. Then f has at most n roots. Proof. Use induction on n. Corollary 2.4. Let f(x) be a polynomial with coecients in F of degree d. If f(x) divides x q x, then f(x) has d distinct roots. Proof. Suppose that f(x) g(x) = x q x. Then g(x) has degree q d. By Lemma 2.3, g(x) has at most q d roots. Suppose that f(x) has fewer than d roots. Then f(x) g(x) = x q x would have fewer than (q d) + d = q roots. But x q x has q distinct roots by Theorem 2.1. Recall that a group G is called cyclic if there is an element g G such that each element h in G can be expressed as h = g n for some n Z. This g is called a generator of G. We also recall that Euler's totient function φ(n) counts the number of posive integers that are relatively prime to n. Finally, we recall the Möbius inversion formula which states that if g(n) is dened by g(n) = d n f(d), then f(n) = d n ( n ) µ (d) g, d where µ is the Möbius function, dened by 1 if n is squarefree and has an even number of prime factors, µ(n) = 1 if n is squarefree and has an odd number of prime factors, 0 otherwise. In particular, since we have φ(d) = n, d n φ(n) = d n µ(d) n d.

10 OLOF BERGVALL Theorem 2.5. The multiplicative group F is cyclic. Proof. Suppose that d divides q 1. Then x d 1 divides x q 1 1 and by Corollary 2.4 we have that x d 1 has d distinct roots. If x d = 1 and y d = 1, then (x 1 ) d = 1 and (xy) d = 1 so the set of elements of order d in F form a subgroup H d. By the above we have that H d = d. Let f(r) be the number of elements in F of order r. Then f(r) = d, r d and by the Möbius inversion formula we have f(d) = r d µ(r) d r = φ(d). It follows that f(q 1) = φ(q 1) 1 so there is at least one element x F of order q 1. We choose this x as our generator. Let α F and consider the equation x n = α. By Theorem 2.5 there is a generator g F so we may write α = g a and x = g y for some integers a and y. The equation x n = α thus becomes g ny = g a which has a solution if and only if the congruence ny a mod q 1, has a solution. This congruence has a solution if and only if d = gcd(n, q 1) divides a, and then it has precisely d solutions. We have thus proven the following lemma. Lemma 2.6. Let F be a eld with q elements and let α F. The equation x n = α has precisely d = gcd(n, q 1) solutions if α d = 1 and no solutions otherwise. We now have some understanding of the multiplicative group of F and we therefore turn to the additive group. Lemma 2.7. Let F be a nite eld. The integer multiples of the identity in F form a subeld isomorphic to Z/pZ where p is a prime number. Proof. Consider the map ϕ : Z F, dened by ϕ(n) = 1 + 1 + 1. The map ϕ is a homomorphism of rings and its }{{} n times image is a subring of F. In particular, im(ϕ) = Z/ker(ϕ) is an integral domain so ker(ϕ) is a prime ideal of Z and is thus of the form pz for some prime number p. The number p is called the characteristic of F. We identify im(ϕ) with Z/pZ and view F as a vector space over Z/pZ. Let n be the dimension of F as a Z/pZ vector space and let x 1,..., x n be a basis. Then any element x F can be expressed uniquely as x = a 1 x 1 + + a n x n, for some a 1,..., a n Z/pZ. In particular, we see that F = q = p n. We write this down as a proposition.

COUNTING POINTS ON VARIETIES OVER FINITE FIELDS 11 Proposition 2.8. The number of elements in a nite eld is a power of a prime number. Lemma 2.9. Let F be a eld of characteristic p. Then for all a, b F. (a + b) p = a p + b p, Proof. We use the binomial theorem to expand the left hand side as p ( ) p (a + b) p = a p k b k. k k=0 However, if 1 k p 1, then ( p k) is divisible by p and px = 0 for all x F. Thus, the only nonzero terms in the above sum is a p (for k = 0) and b k (for k = p). Proposition 2.10 (Freshman's dream). Let F be a eld of characteristic p and let n be a positive integer. Then for all a, b F. (a + b) pn = a pn + b pn, Proof. By Lemma 2.9 we have (a+b) p = a p +b p. We reach our claim by repeatedly raising both sides of this expression to the p'th power. Lemma 2.11. Let F be a nite eld with p n elements and let F be a subeld. Then F = p d where d divides n. Proof. We know that the characteristic of F is some prime number p. We also know that px = 0 for all x F since p is the characteristic of F. Thus, p divides p. But both p and p are prime numbers so we must have p = p. Thus, F = p d for some positive integer d. The eld F is a vector space over F. Let x 1,..., x m be a basis. Thus, F has ( p d ) m = p dm elements. We now see that dm = n so d divides n as required. Theorem 2.12. Let F be a nite eld with p n elements. The subelds of F are in one to one correspondence with the divisors of n. Proof. By Lemma 2.11 there are no subelds of F of any order but p d for some divisor d of n. Let d be a divisor of n and dene F d = {a F a pd = a}. We shall show that F d is a eld. Let a, b F d. By Proposition 2.10 we have Thus, a + b F d. We also have (a + b) pd = a pd + b pd = a + b. (ab) pd = a pd b pd = ab, so ab F d. Finally, we have ( a 1 ) p d = (a pd) 1 = a 1 so a 1 F d. We conclude that F d is a eld.

12 OLOF BERGVALL We now want to show that F d has p d elements. The elements of F d are the roots of the polynomial x pd x. Let q = p n, r = p d and m = q/r. We have x q x x r x = (xr ) m 1 + (x r ) m 2 + + x r + 1, so x pd x divides x pn x. By Corollary 2.4 we have that x pd x has precisely p d roots, i.e. F d = p d. Suppose that F is subeld with p d elements. By Corollary 2.2 we have that the elements of F are precisely those elements a F that satisfy a pd a = 0, i.e. F = F d. We shall now prove the existence of nite elds of order p n for each positive number n. In order to do this we shall need a couple of lemmas. Lemma 2.13. Let k be a eld and let f(x) be an irreducible polynomial in k[x]. Then, there is a eld K containing k and an element α such that f(α) = 0. Proof. The ideal I = (f(x)) is a maximal ideal in k[x] so the quotient ring K = k[x]/(f(x)) is a eld. Let φ : k[x] K be the homomorphism which maps an element g(x) k[x] to its coset modulo f(x). Since k is a eld, its only ideals are the zero ideal and k itself. Thus, the kernel of the restriction of φ to k must either be the zero ideal or the whole eld k. Let a be a nonzero element of k. If φ(a) = 0 then a (f(x)). But a is a unit and cannot be an element of a proper ideal. Thus, φ(a) 0. We conclude that the kernel of φ restricted to k is the zero ideal so K contains an isomorphic copy of k. We identify k with φ(k). Let α be the coset of x in K. Then f(α) = f(φ(x)) = φ(f(x)) = 0. Lemma 2.14. Let k be a eld, let f(x) be an irreducible polynomial in k[x] and let K be a eld containing k and an element α such that f(α) = 0. Suppose that g(x) k[x] is such that g(α) = 0. Then f(x) divides g(x). Proof. Suppose that f(x) does not divide g(x). Since f(x) is irreducible, it follows that the greatest common divisor of f(x) and g(x) is 1 so there are polynomials r(x) and s(x) such that r(x)f(x) + s(x)g(x) = 1. If we substitue x for α above we get 0 = 1 which is a contradiction. Denition 2.15. Let k be a eld, let f(x) be an irreducible polynomial in k[x] and let K be a eld containing k and an element α such that f(α) = 0. The subeld of K generated by k and α will be denoted k(α). Let k[α] denote the ring of polynomials in α with coecients in k. Lemma 2.16. We have k(α) = k[α]. Proof. Clearly k[α] k(α). Let g(α) k[α]. If g(α) 0, then f(x) does not divide g(x) by Lemma 2.14 and there are thus elements r(x) and s(x) of k[x] such that r(x)f(x) + s(x)g(x) = 1. Thus, s(α)g(α) = 1 so g(α) 1 k[α]. If γ k(α) then γ = g(α)/h(α) for some g(α), h(α) k[α]. But we have 1/h(α) k[α] so γ k[α] and it follows that k(α) k[α].

COUNTING POINTS ON VARIETIES OVER FINITE FIELDS 13 Lemma 2.17. Let k be a eld and let f(x) be an irreducible polynomial of degree n in k[x] and let α be a root of f(x). The elements 1, α,..., α n 1 form a basis for k(α) as a vector space over k. Proof. By Lemma 2.16 we have k(α) = k[α] and since f(α) = 0 we have that 1, α,..., α n 1 span k[α]. Suppose that a 0 + a 1 α + a n 1 α n 1 = 0, where a i k. Dene g(x) = a 0 + a 1 x + + a n 1 x n 1. Then g(α) = 0 so by Lemma 2.14 we must have that f(x) divides g(x). On the other hand, we have that the degree of g(x) is strictly smaller than the degree of f(x) so the only possibility is that g(x) = 0. In other words, we have a 0 = a 1 =... = a n 1 = 0 so the elements 1, α,..., α n 1 are linearly independent over k. Thus, if we want to nd a nite eld with p n element, it is enough to nd an irreducible polynomial of degree n with coecients in Z/pZ. Consider the polynomial f(x) = x pn x. Assume that g(x) 2 divides f(x), i.e. that f(x) = g(x) 2 h(x). We can formally dierentiate and obtain f (x) = p n x pn 1 1 = 1 = 2g (x)g(x)h(x) + g(x) 2 h (x), which shows that g(x) divides 1. Thus, if g(x) 2 divides f(x) we have that g(x) is a constant. Assume that f(x) = g(x)h(x) where g(x) is irreducible of degree d and let K = Z/pZ(α) where α is a root of g(x). We then have α pn = α. Let γ = a 0 + a 1 α + a d 1 α d 1 be an element of K. By Proposition 2.10 we have γ pn = a pn 0 + (a 1α) pn + (a d 1 α d 1 ) pn = a 0 + a 1 α + a d 1 α d 1 = γ, so every element γ of K satises γ pn γ = 0. Hence, x pd x divides f(x) = x pn x. We leave as an excercise to show that this can only happen if d divides n. Now assume that g(x) is irreducible of degree d where d divides n and let K = Z/pZ(α) where α is a root of g(x). Since α pd = α and d divides n it follows from Proposition 2.10 that f(α) = 0. Lemma 2.14 now gives that g(x) divides f(x). Thus, every irreducible polynomial of a degree dividing n divides f(x). The term of a polynomial of highest degree is called the leading term and its coecient is called the leading coecient. If the leading coecient is 1 the polynomial is called monic. Let S d be the set of all monic, irreducible polynomials of degree d with coecients in Z/pZ and let P d (x) = g(x) S d g(x). We can now summarize what we did in the preceeding discussion in the following way. Lemma 2.18. x pn x = d n P d (x).

14 OLOF BERGVALL Dene the function N(d) by N(d) = S d. If we equate the degrees of both sides of the identity in Lemma 2.18 we obtain p n = d n d N(d). We apply the Möbius inversion formula to obtain n N(n) = d n µ (d) p n/d. Thus, n N(n) is a sum of distinct powers of p with coecients 1 and 1. In particular, n N(n) cannot be zero so N(n) is not zero. Thus, there is at least one irreducible polynomial of degree n with coecients in Z/pZ. We have thus proven the following. Theorem 2.19. Let p be a prime number and let n be a positive integer. Then there exists a eld with p n elements.

2.1. Exercises. COUNTING POINTS ON VARIETIES OVER FINITE FIELDS 15 2.1.1. Let F be a nite eld of characteristic p with q elements. (a) Show that if p = 2, then every element of F is a square. (b) Show that if p 2, then the set of nonzero squares in F form a subgroup of F with exactly (q 1)/2 elements. (Hint: consider the function x x 2 ). 2.1.2. Let F q be the eld with q elements, let α F q and let n be a positive integer such that q 1 mod n. (a) Show that the equation x n = α either has n solutions or no solutions. (b) Show that the set of elements α F q such that the equation x n = α has solutions form a subgroup of F with (q 1)/n elements. (c) Show that the equation x n = α has n solutions in F q n for each α F. 2.1.3. Suppose that α F q and suppose x 2 = α has no solution in F q. Show that x 2 = α has no solution in F q 3. 2.1.4. Let F be a eld with q elements of odd characteristic and let f(x, y, z) F (X, Y, Z) be a homogeneous polynomial of degree 2 such that the three partial derivatives f/ x, f/ y and f/ z do not vanish simultaneously (such polynomials are called nonsingular). Show that the equation f(x, y, z) = 0 has q 2 solutions in F. 2.1.5. Find all monic, irreducible polynomials of degree 4 in Z/2Z[x]. 2.1.6. Let p be a prime number, let F be a eld with q n elements and let α F. Dene f(x) = (x α)(x α p ) (x α pn 1 ). Show that f(x) Z/pZ[x]. Deduce that α + α p + + α pn 1 Z/pZ and αα p α pn 1 Z/pZ. 2.1.7. Let p be a prime number, let F be a eld with q n elements and let α F. Dene tr(α) = α + α p + + α pn 1. (a) Show that tr(α + β) = tr(α) + tr(β) (i.e. that tr is a homomorphism from the additive group of F to Z/pZ). (b) Show that if a Z/pZ, then tr(aα) = atr(α). (c) Show that there is an element α F such that tr(α) 0. 2.1.8. Let p and q be two distinct, odd prime numbers. Prove that the number of monic irreducible polynomials of degree q in Z/pZ[x] is equal to (p q p)/q. 2.1.9. Let F = Z/5Z. Compute the addition and multiplication tables of F. 2.1.10. Let K = Z/3Z and let F = K[x]/(f(x)) where f(x) = x 2 + x + 2. (a) Write down the elements F. (b) Compute the addition and multiplication tables of F. 2.1.11. (Hard exercise). Let k be a eld and let S be the set of all monic irreducible polynomials in k[x]. For each f S, introduce a new variable y f and consider the ring A = k[y f ] f S (i.e. the polynomial ring with coecients in k with one variable for each irreducible polynomial in k[x]). Let I be the ideal generated by all polynomials f(y f ) for all f S. Show that I is a proper ideal of A.

16 OLOF BERGVALL 2.1.12. (Hard exercise). (Continuation of 2.1.11) Let M be a maximal ideal of A and let k 1 = A/M. Now k 1 is a eld containing k where each polynomial f(x) with coecients in k has a root. We dene elds k n inductively by repeating the above procedure with k n 1 in place of k and dene K = k i. i=1 (a) Show that K is a eld. (b) Let k be the subset of all elements α in K such that there is a polynomial f k[x] such that f(α) = 0. Show that k is a eld. (c) Show that if we use coecients in k, then every element in k[x] can be written as a product of linear factors. 2.2. Sage problem. The method to create a nite eld in the previous Sage problem is not very good from a programming viewpoint. It is much better to use Sage's built in functions for nite elds - the GF package. Play around a bit with the GF package and make heavy use of the help function. When you feel comfortable, write a program that takes as input a nite eld F and a polynomial f in two variables x and y and returns the number of solutions to the equation f(x, y) = 0 over F. You will get started with the following two commands: sage : F25 = GF(25," a ") sage : help ( F25 )

COUNTING POINTS ON VARIETIES OVER FINITE FIELDS 17 3. Introduction to varieties over finite fields In this section we shall begin our study of varieties over nite elds. Our varieties will be objects inside some bigger objects. Our rst task will therefore be to dene these bigger objects. 3.1. Ane and projective space. Denition 3.1. Let F be a eld. The set is called ane n-space over F. A n F = {(a 1, a 2,..., a n ) a i F }, Thus, A n F can be thought of as the vector space F n but we shall not care much about the vector space structure. The point (0, 0,..., 0) A n F is called the origin. Denition 3.2. Let F be a nite eld and let X = F n+1 \ {(0,..., 0)}. Dene an equivalence relation on X by saying that v w precisely if there is a λ F such that w = λv. We dene projective n-space P n F over F to be the set of equivalence classes of X under. The equivalence classes are called points of P n F and the equivalence class of (a 0, a 1,..., a n ) is denoted [a 0, a 1,..., a n ]. A nonzero vector v F n+1 denes a line passing through the origin. Another nonzero vector w denes the same line if and only if w is a nonzero multiple of v. Thus, P n F can be considered to be the set of lines passing through the origin in F n+1. The goal of this course is to count points over nite elds so we shall attempt this for A n F and Pn F when F is a nite eld. Ane n-space is simply the set of n-tuples (a 1,..., a n ) where a i F. Since F = q and we have n coordinates, we see that A n F = q n. We now consider P n F. Notice that X = F n+1 \ {(0,..., 0)} = A n+1 \ {(0,..., 0)}. Since A n+1 F has q n+1 points we see that X has q n+1 1 points. Since there is q 1 elements in F we see that each equivalence class in X has q 1 points. We thus have P n F = qn+1 1 = q n + q n 1 + + q + 1. q 1 We thus see that P n F has more points than An f. In fact, Pn F has as many points as all ane spaces of dimension less than or equal to n put together: P n F = A n F + A n 1 F + + A 1 F + A 0 F. Since we are dealing with nite sets, it is thus not very surprising that there is a bijection between P n F and the disjoint union A n F A n 1 F A 1 F A 0 F. However, there is also a bijection when F is innite. It can be described inductively as follows. Let H 0 P n F be dened as Dene H 0 = {[a 0, a 1,..., a n ] P n F a 0 = 0}. φ : P n F \ H 0 A n F

18 OLOF BERGVALL by and by φ([a 0, a 1,..., a n ]) = (a 1 /a 0,..., a n /a 0 ), π : H 0 P n 1 F, π([0, a 1,..., a n ]) = [a 1,..., a n ]. Then both φ and π are bijections. To see that φ is a bijection, note that φ([a 0, a 1..., a n ]) = φ([b 0, b 1..., b n ]) if and only if a i /a 0 = b i /b 0 for i = 1,..., n. Thus, b i = b0 a 0 a i for i = 1,..., n so if we set λ = b0 a 0 we have (b 0, b 1,..., b n ) = λ(a 0, a 1,..., a n ), so that [b 0, b 1,..., b n ] = [a 0, a 1,..., a n ]. We leave the proof of the bijectivity of π as an exercise. We thus have P n F = A n F P n 1 F. The set H 0 above is often referred to as the hyperplane at innity. 3.2. Ane and projective varieties. Before continuing, let us review a few denitions regarding polynomials. Let F be a eld and let F [x 1, x 2,..., x n ] be the ring of polynomials in n variables over F. A polynomial of the form m = x i1 1 xin n is called a monomial. The degree deg r (m) in the variable x r is i r and its degree deg(m) is the sum i 1 + + i n. A general polynomial f F [x 1,..., x n ] can be written as a F -linear combination of monomials f = c i1,...,i n x i1 1 x in n. i 1,...,i n The degree in x r of f, deg r (f) is the maximum degree in x r of a monomial occurring in f. The degree of f, deg(f), is the maximum degree of a monomial occurring in f. If all monomials in f have the same degree d, we say that f is homogeneous of degree d. We have Example 3.1. Let Then We have deg(g) = 3. homogeneous. deg r (f g) = deg r (f) + deg r (g), deg(f g) = deg(f) + deg(g). f(x 1, x 2, x 3, x 4 ) = x 4 1 + x 4 2 + x 4 3 x 2 4, g(x 1, x 2 ) = x 2 2 x 3 1 + 1, h(x 0, x 1, x 2 ) = x 0 x 2 2 x 3 1 + x 3 0. deg 1 (f) = deg 2 (f) = deg 3 (f) = 4, deg 4 (f) = 2. The polynomial h is homogeneous while f and g are not Let f F [x 1,..., x n ] and let (a 1,..., a n ) A n F. Dene f(a 1,..., a n ) = c i1,...,i n a i1 1 a in i 1,...,i n n.

COUNTING POINTS ON VARIETIES OVER FINITE FIELDS 19 Clearly, f(a 1,..., a n ) F so f denes a function from A n F to F by sending (a 1,..., a n ) to f(a 1,..., a n ). We say that (a 1,..., a n ) is a zero of f if f(a 1,..., a n ) = 0. Denition 3.3. Let f F [x 1,..., x n ]. Dene the ane hypersurface H f A n F as H f = {(a 1,..., a n ) A n F f(a 1,..., a n ) = 0}. Example 3.2. Blank row (a) Let f(x 1, x 2 ) = x 2 2 x 3 1 x 1 Z/5Z[x 1, x 2 ]. The squares in Z/5Z are 0,1 and 4. We have 0 3 +0 = 0, 1 3 +1 = 2, 2 3 +2 = 0, 3 3 +3 = 0 and 4 3 +4 = 3. Thus H f = {(0, 0), (2, 0), (3, 0)} A 2 Z/5Z. (b) Let F be a eld with q elements and let f(x 1 ) = x q 1 x 1 F [x 1 ]. Since a q a = 0 for all a F we see that f(a) = 0 for all a F. Thus H f = A 1 F. (c) Let F be a eld with q elements and let f(x 1 ) = x q 1 x 1 + 1 F [x 1 ]. Since a q a = 0 for all a F we see that f(a) = 1 for all a F. Thus H f = A 1 F. Let f F [x 0, x 1,..., x n ] be a nonzero homogeneous polynomial of degree d and let [a 0, a 1,..., a n ] P n F. If (b 0, b 1,..., b n ) = λ(a 0, a 1,..., a n ) for some λ F, then f(b 0, b 1,..., b n ) = λ d f(a 0, a 1,..., a n ). Thus, we cannot use f to dene a function from P n F to F as we did for An F since the value would depend of our choice of representative for [a 0, a 1,..., a n ]. However, whether f is zero or not does not depend on the choice. We may thus dene the zeros of f in P n F in an analogous way. Denition 3.4. Let f F [x 0, x 1,..., x n ] be homogeneous. Dene the projective hypersurface H f P n F as H f = {[a 1,..., a n ] P n F f(a 0 a 1,..., a n ) = 0}. Example 3.3. Let f(x 0, x 1, x 2 ) = x 0 x 2 2 x 3 1 x 2 0x 1 Z/5Z[x 0, x 1, x 2 ]. If [a 0, a 1,..., a n ] P n F then either a 0 = 0 or a 0 1. If a 0 0 we may choose a representative such that a 0 = 1 and we then have a problem equivalent with the one investigated in (a) in our previous example. If a 0 = 0 our equation becomes a 3 1 = 0 which has solution a 1 = 0. We thus have H f = {[1, 0, 0], [1, 2, 0], [1, 3, 0], [0, 0, 1]} P 2 Z/5Z. We thus get one new solution compared with Example 3.2 (a). We shall now generalize the denitions of ane and projective hypersurfaces. Denition 3.5. Let F be a eld and let f 1,..., f r F [x 1,..., x n ]. Dene V f1,...,f r = {(a 1,..., a n ) A n F f i (a 1,..., a n ) = 0, i = 1..., r}. Then V f1,...,f r is called an ane algebraic set. If the ideal (f 1,..., f r ) is prime we call V f1,...,f r and ane variety. There is an analogous denition of projective varieties.

20 OLOF BERGVALL Denition 3.6. Let F be a eld and let f 1,..., f r F [x 0, x 1,..., x n ] be homogeneous polynomials. Dene V f1,...,f r = {(a 0, a 1,..., a n ) P n F f i (a 0, a 1,..., a n ) = 0, i = 1..., r}. Then V f1,...,f r is called a projective algebraic set. If the ideal (f 1,..., f r ) is prime we call V f1,...,f r an projective variety. Example 3.4. In this example, we want to compute the number of lines in P n F where F is a eld with q elements. A line in P n F is a hypersurface H f for some f = a 0 x 0 + a 1 x 1 + a 2 x 2 of degree 1. A polynomial g = b 0 x 0 +b 1 x 1 +b 2 x 2 denes the same line as f precisely if b i = λa i, i = 0, 1, 2, for some λ F. Thus, we may identify the set of lines with the set of polynomials of degree 1 modulo the equivalence f g if g = λf for some λ F. Let S be the set of lines in P 2 F. Dene a function φ : S P2 F by a 0 x 0 + a 1 x 1 + a 2 x 2 [a 0, a 1, a 2 ]. The function φ is a bijection so S = P 2 F = q2 + q + 1. 3.3. Homogenization and dehomogenization. Projective varieties may seem more complicated but they actually behave more nicely than their ane counterparts. It is therefore desirable to nd a way to construct a projective variety from an ane one in the hope that computations are simpler in the projective setting. Denition 3.7. Let F be a eld and let f F [x 1,..., x n ] be a polynomial of degree d. The homogenization of f is the polynomial f F [x0, x 1,..., x n ] dened by ( f(x 0, x 1,..., x n ) = x d x1 0f,..., x ) n. x 0 x 0 One may show that f is a homogeneous polynomial of degree d. If V f1,...,f r is an ane variety, then V f1,..., f r is a projective variety called the projective closure of V f1,...,f r. We can also go the other way. Denition 3.8. Let F be a eld and let f F [x 0, x 1,..., x n ] be a homogeneous polynomial. The polynomial f F [x1,..., x n ] dened by is called the dehomogenization of f. f(x 1,..., x n ) = f(1, x 1,..., x n ), The dehomogenization of a homogeneous polynomial f can have degree smaller than d but at least we have that ḡ = g (but not necessarily f = f). Example 3.5. Let f(x 1, x 2 ) = x 2 1 + x 2 2 1. Then ( ) x f(x 0, x 1, x 2 ) = x 2 2 1 0 x 2 + x2 2 0 x 2 1 = x 2 1 + x 2 2 x 2 0. 0 Let p be an odd prime number. One can show that V f has p 1 points over Z/pZ if p 1 mod 4 and p + 1 points if p 3 mod 4. The variety V f, on the other hand, always has p + 1 points.

COUNTING POINTS ON VARIETIES OVER FINITE FIELDS 21 Example 3.6. Let F a nite eld with q elements where q is odd. Consider the curve C A 2 F dened by H(x, y) = ax 2 + bxy + cy 2 + dx + ey + f = 0, where a, b, c, d, e, f F and such that C is nonsingular (i.e. both H x not vanish simultaneously). If a = 0, then we can solve for x as y = cy2 + ey + f, by + d H and y does and since by + d is not all for all values of y we see that C has at least one point. Now assume that a 0 and c 0. We may then divide the equation by a and get an equivalent equation x 2 + b xy + c y 2 + d x + e y + f = 0, where b = b/a and so on. If we complete the square we see that if we make the substitution X = (x + b y + d ) 2 2 we get a new equation of the form X 2 + c y 2 + d X + e y + f = 0, i.e. an equation without a mixed term. Using a similar trick we can get rid of the term d X to obtain an equation of the form X 2 + c Y 2 + e Y + f = 0. Thus, we want to solve an equation of the form X 2 = g(y ) where g has degree 1 or 2. If the degree of g is one, g has a root r and (0, r) is then a point. If g has degree 2, then g takes (q + 1)/2 dierent values. Call the set of values V F. The set S F of squares in F contains q 1 2 + 1 = q+1 2 elements. Thus, if V and S are disjoint, then V S = q + 1 2 + q + 1 2 = q + 1 > F = q. This is clearly impossible so S and V has at least one common element g(r) = s 2. Then (s, r) is a point of C. We conclude that C has at least one point. Call this point P. The same in fact holds also if the characteristic is 2 but the above argument fails since we divide by 2. Example 3.7. Let F be a nite eld with q elements. Let C P 2 F be a smooth conic, i.e. a curve dened by a smooth, homogeneous polynomial of degree 2. By the above example we have that C has at least one point P. There are q + 1 lines through P. Let L be a line given by ax + by + cz = 0. We can now consider C L by considering f(x, y, (ax + by)/c) = 0. This is a quadratic equation which has two homogeneous solutions if we count multiplicities. There is precisely one choice of L where the equation has one solution with multiplicity 2 - this gives the point P twice (this line is the tangent to C at P ). For the q remaining choices of L we have two distinct solutions - the point P and another one Q.

22 OLOF BERGVALL We conclude that a smooth conic has at least q+1 points. We leave as an exercise to show that C cannot have more than q + 1 points. Hence, a smooth conic has exactly q + 1 points.

3.4. Exercises. COUNTING POINTS ON VARIETIES OVER FINITE FIELDS 23 3.4.1. Let f(x 0, x 1, x 2 ) = x 3 0 + x 3 1 x 3 2 Z/3Z[x 0, x 1, x 2 ]. Find the number of points on V f. 3.4.2. Let f(x 0, x 1, x 2 ) = x 3 0x 1 + x 3 1x 2 + x 0 x 3 2 Z/5Z[x 0, x 1, x 2 ]. Find the number of points on V f. 3.4.3. Let F be a nite eld with q elements and let f 1 = x 1, f 2 = x 2 and f 3 = x 3. Let X = A 3 F \ 3 i=1 V f i. Compute the number of points of X for at least four dierent values of q. Guess a general formula and compute one more value to check if it seems to hold. 3.4.4. Let F be a nite eld and let f = a 0 x 0 + a 1 x 1 + + a n x n be a polynomial of degree 1. Show that V f P n F has the same number of elements as Pn 1 F. 3.4.5. Let F be a nite eld and let GL n (F ) denote the set of n n-matrices with coecients in F. (a) Show that GL n (F ) is the complement of an ane hypersurface in A n F of degree n. (b) Determine the number of points of GL n (F ). 3.4.6. Let f(x 0, x 1, x 0 ) be a polynomial of degree d. Then C = V f P n F is called a curve. Let h(x 0, x 1, x 2 ) = a 0 x 0 + a 1 x 1 + a 2 x 2. Then L = V h is called a line. Suppose that L C. Show that C L d. 3.4.7. Let F be a eld of characteristic p and let f F [x 0, x 1,..., x n ] be homogeneous of degree d < p. One may dene the partial derivatives of f formally (i.e. requiring them to satisfy the usual formulas rather than using the limit process which does not make sense over an arbitrary eld). Show the following identity due to Euler: n f x i = df. x i i=0 (Hint: begin with the case where f is a monomial). What can go wrong if d p? Can you give conditions on f so that the above result still holds? 3.4.8. A singular point of V f is a point which is a zero for all the partial derivatives of f. Show that if F and f satisfy the same assumptions as in the previous exercise and all partial derivatives of f vanish at a = [a 0, a 1,..., a n ], then a V f. 3.4.9. A variety without singular points is called smooth. Show that if F is a eld of characteristic p and if d and p are coprime, then the variety given by is smooth. a 0 x d + a 1 x d 1 + + a n x d n, 3.4.10. Show that the origin is a singular point on the ane curve given by the equation y 2 = x 3. 3.5. Write a program that takes as input a homogeneous polynomial f(x 0, x 1, x 2 ) and a nite eld F and returns the number

24 OLOF BERGVALL 4. Advanced topics 4.1. The sieve principle. The sieve principle, or the principle of inclusion and exclusion, is not really advanced but really useful. The idea is best described by an example. Example 4.1. Let A, B and C be three nite sets. If we want to compute A B C, then A + B + C is a rst approximation (and is the correct answer if the sets are disjoint). However, if x A B then we have counted x twice and we thus have to take it away. In the same manner we have counted the points of A C and B C twice. We should thus take away the number of elements of these intersections and we then get closer to the correct answer. But the elements of A B C was rst counted three times and then taken away three times and should thus be added back. We conclude that A B C = A + B + C A B A C B C + A B C. The sieve principle is simply this process of counting the number of elements in a union of sets by adding and subtracting the number of elements of intersections. We shall now apply the sieve principle to count the number of points of an open subset of a variety. Example 4.2. Let F be a nite eld with q elements. Let X denote the set of ordered quadruples (p 1, p 2, p 3, p 4 ) of points in P 2 F such that no three of the points lie on a line. We want to compute the number X(F ) of points of X over F. Let Y denote the complement of X, i.e. the set of ordered quadruples (p 1, p 2, p 3, p 4 ) of points in P 2 F such that at least three points lie on a line. Then the number of points of X is the number of quadruples of points in P 2 F (without any condition) minus the number of points of Y. We can decompose Y as a union Y = Y 1,2,3 Y 1,2,4 Y 1,3,4 Y 2,3,4, where Y i,j,k denotes the subset of Y where p i, p j and p k lie on a line. To construct and element of Y i,j,k, we rst choose a line L in P 2 F and we have seen that there are q 2 + q + 1 choices. The line L is isomorphic to P 1 F and thus contains q + 1 points so there are (q + 1) 3 ways to choose three (not necessarily distinct) points p i, p j and p k on L. Finally, we choose the nal point anywhere in P 2 F in q2 + q + 1 ways. We thus see that Y i,j,k = (q 2 + q + 1) (q + 1) 3 (q 2 + q + 1). It is easy to see that Y i,j,k Y t,u,v = Y 1,2,3,4 if {i, j, k} = {t, u, v}. To compute Y 1,2,3,4 we proceed as above, but in the last step we only have q + 1 choices. We may now compute Y via the sieve principle Y = Y i,j,k Y i,j,k Y t,u,v i,j,k {i,j,k} ={t,u,v} + Y i,j,k Y t,u,v Y a,b,c Y 1,2,3 Y 1,2,4 Y 1,3,4, Y 2,3,4 = = (4q 2 + q + 1)(q 2 + q + 1)(q + 1) 3. The total number of (not necessarily distinct) quadruples of points in P 2 F is simply (q 2 + q + 1) 4. Hence X = (q 2 + q + 1) 4 (4q 2 + q + 1)(q 2 + q + 1)(q + 1) 3.

COUNTING POINTS ON VARIETIES OVER FINITE FIELDS 25 4.2. The zeta function of a variety. Let X be a variety over the nite eld F q. Then X is also a variety over F q m for all positive integers m. Let N m (X) denote the number of points of X over F q m. We can collect all these numbers N m (X) into a generating function (if you do not know what a generating function is, it is not very important). However, it turns out that it is convenient to normalize as N m (X)/m and exponentiate. Denition 4.1. The zeta function of X is the power series ( ) N m (X) Z X (t) = exp m tm. m=1 Example 4.3. Let F be a eld with q elements. Recall that A n F = qn and that We conclude that log(1 + t) = ( 1) m+1 tm m. m=1 ( ) q Z A n(t) nm t m = exp = m m=1 = exp ( log(1 q n t)) = = 1 1 q n t. Suppose that X can be decomposed as a disjoint union Y U. Then clearly N m (X) = N m (Y ) + N m (U). Thus ( ) N m (X) Z X (t) = exp m tm = m=1 ( ) N m (Y ) + N m (U) = exp t m = m m=1 ( ) ( N m (Y ) = exp m N m (U) tm exp m m=1 = Z Y (t) Z U (t). m=1 tm ) = Thus, if X = Y U, then Z X (t) = Z Y (t) Z U (t). Example 4.4. Recall that P n = A n A n 1 A 1 A 0. Using the multiplicative behaviour of zeta functions we have Z P n(t) = Z A n(t) Z A n 1(t) Z A 1(t) Z A 0(t) = = 1 1 q m t 1 1 q m 1 t 1 1 qt 1 1 t.

26 OLOF BERGVALL 4.3. The Weil conjectures. In 1949, the french mathematician André Weil proposed a set of highly inuential conjectures which describe the zeta function of a smooth and projective variety. Today, they have all been proven through work of Bernhard Dwork, Alexander Grothendieck and perhaps most notably Pierre Deligne. Theorem 4.2 (The Weil conjectures). Let X be a smooth and projective variety of dimension n. Then (Rationality) Z X (t) is a rational function in t. More precisely Z X (t) = P 1(t) P 3 (t) P 2n 1 (t), P 0 (t) P 2 (t) P 2n (t) where P 0 (t) = 1 t, P 2n (t) = 1 q n t and if 1 i 2n 1 we may factor P i (t) as P i (t) = (1 α i,j t), j where α i,j C. (Functional equation) Z X (t) satises the functional equation Z X (1/q n t) = ±q ne/2 t E Z X (t), where E is the Euler characteristic of X. (Riemann hypothesis) We have α i,j = q i/2 for i = 1,..., 2n 1 and for all j (this implies that the zeros of P i (t) all have real part i/2). (Betti numbers) The degree of P i (t) equals the i'th Betti number of X.

4.4. Exercises. COUNTING POINTS ON VARIETIES OVER FINITE FIELDS 27 4.4.1. A conic is a smooth curve C P 2 F q of degree 2. Let C be a conic and compute Z C (t). 4.4.2. Let H i P 3 F q be the hypersurface dened by x i = 0, i = 0, 1, 2. Dene X = P 3 F q \ ( H0 H 1 H 2 ). Compute the number of points on X over F q. 4.4.3. Let X be as in the previous exercise. Compute Z X (t). 4.4.4. Let X be the quasi-ane variety dened in Example 4.2. Compute Z X (t). 4.4.5. Verify the Weil conjectures for P 1 (or at least the parts where you understand all the words in the statement). 4.4.6. Let C P 2 F q be a smooth projective curve of degree d. It is known that the rst Betti number of C is equal to (d 1)(d 2). Let N C (F q ) denote the number of F q -points of C. Use the Weil conjectures to prove that N C (F q ) (q + 1) (d 1)(d 2) q. (This inequality is a special case of the Hasse-Weil bound). 4.4.7. Can you use the previous Exercise to give a condition on the size of q in terms of d which guarantees that C has at least one F q -point? 4.4.8. Let C be a smooth projective plane curve of degree 3. Let N C (F q ) denote the number of F q -points of C. Show that Z C (t) = 1 + (N C(F q ) q 1)t + qt 2 (1 t)(1 qt) 4.4.9. Let F be a nite eld with q elements where q is odd. Count the number of smooth conics in P 2 F. 4.5. Sage problem. Before doing this problem, solve Exercises 4.4.2 and 4.4.3 by hand. Let H i P n F q be the coordinate hyperplane by the equation x i = 0 and dene n X n = P n F q \ H i. The number of F q -points of X n is a monic polynomial in q of degree n. (a) Write a program that takes as input a positive integer n and a nite eld F q and computes the number of F q -points of n. (b) Since you know that f n (q) := X n (F q ) is a monic polynomial of degree n in q, you can compute f n (q) for n values of q and interpolate to determine f n (q). Do this for a few small values of n. (c) Write a new program that takes as input an integer n and returns the zeta function of X n. i=0