Undergraduate Texts in Undergraduate Texts in Mathematics

Series Editors:

Sheldon Axler San Francisco State University, San Francisco, CA, USA

Kenneth Ribet University of California, Berkeley, CA, USA

Advisory Board:

Colin Adams, Williams College David A. Cox, Amherst College Pamela Gorkin, Bucknell University Roger E. Howe, Yale University Michael Orrison, Harvey Mudd College Jill Pipher, Brown University Fadil Santosa, University of Minnesota

Undergraduate Texts in Mathematics are generally aimed at third- and fourth- year undergraduate mathematics students at North American universities. These texts strive to provide students and teachers with new perspectives and novel approaches. The books include motivation that guides the reader to an apprecia- tion of interrelations among different aspects of the subject. They feature examples that illustrate key concepts as well as exercises that strengthen understanding.

More information about this series at http://www.springer.com/series/666 David A. Cox • John Little • Donal O’Shea

Ideals, Varieties, and Algorithms

An Introduction to Computational and Commutative Algebra

Fourth Edition

123 David A. Cox John Little Department of Mathematics Department of Mathematics Amherst College and Computer Science Amherst, MA, USA College of the Holy Cross Worcester, MA, USA Donal O’Shea President’s Office New College of Florida Sarasota, FL, USA

ISSN 0172-6056 ISSN 2197-5604 (electronic) Undergraduate Texts in Mathematics ISBN 978-3-319-16720-6 ISBN 978-3-319-16721-3 (eBook) DOI 10.1007/978-3-319-16721-3

Library of Congress Control Number: 2015934444

Mathematics Subject Classification (2010): 14-01, 13-01, 13Pxx

Springer Cham Heidelberg New York Dordrecht London © Springer International Publishing Switzerland 1998, 2005, 2007, 2015, corrected publication 2018 This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made.

Printed on acid-free paper

Springer International Publishing AG Switzerland is part of Springer Science+Business Media (www. springer.com) To Elaine, for her love and support. D.A.C.

To the memory of my parents. J.B.L.

To Mary and my children. D.O’S.

Preface

We wrote this book to introduce undergraduates to some interesting ideas in algebraic geometry and commutative algebra. For a long time, these topics involved a lot of abstract mathematics and were only taught at the graduate level. Their com- putational aspects, dormant since the nineteenth century, re-emerged in the 1960s with Buchberger’s work on algorithms for manipulating systems of polynomial equations. The development of computers fast enough to run these algorithms has made it possible to investigate complicated examples that would be impossible to do by hand, and has changed the practice of much research in algebraic geometry and commutative algebra. This has also enhanced the importance of the subject for com- puter scientists and engineers, who now regularly use these techniques in a whole range of problems. It is our belief that the growing importance of these computational techniques warrants their introduction into the undergraduate (and graduate) mathematics cur- riculum. Many undergraduates enjoy the concrete, almost nineteenth century, flavor that a computational emphasis brings to the subject. At the same time, one can do some substantial mathematics, including the Hilbert Basis Theorem, Elimination Theory, and the Nullstellensatz.

Prerequisites

The mathematical prerequisites of the book are modest: students should have had a course in linear algebra and a course where they learned how to do proofs. Examples of the latter sort of course include discrete math and abstract algebra. It is important to note that abstract algebra is not a prerequisite. On the other hand, if all of the students have had abstract algebra, then certain parts of the course will go much more quickly. The book assumes that the students will have access to a computer algebra sys- tem. Appendix C describes the features of MapleTM, Mathematica, Sage, and other computer algebra systems that are most relevant to the text. We do not assume any prior experience with computer science. However, many of the algorithms in the

vii viii Preface book are described in pseudocode, which may be unfamiliar to students with no background in programming. Appendix B contains a careful description of the pseu- docode that we use in the text.

How to Use the Book

In writing the book, we tried to structure the material so that the book could be used in a variety of courses, and at a variety of different levels. For instance, the book could serve as a basis of a second course in undergraduate abstract algebra, but we think that it just as easily could provide a credible alternative to the first course. Although the book is aimed primarily at undergraduates, it could also be used in various graduate courses, with some supplements. In particular, beginning graduate courses in algebraic geometry or computational algebra may find the text useful. We hope, of course, that mathematicians and colleagues in other disciplines will enjoy reading the book as much as we enjoyed writing it. The first four chapters form the core of the book. It should be possible to cover them in a 14-week semester, and there may be some time left over at the end to explore other parts of the text. The following chart explains the logical dependence of the chapters:

1

2 §9

§5 3 §6

§1 4 6 §7

8 5 7 §7

9

10 Preface ix

The table of contents describes what is covered in each chapter. As the chart in- dicates, there are a variety of ways to proceed after covering the first four chapters. The three solid arcs and one dashed arc in the chart correspond to special dependen- cies that will be explained below. Also, a two-semester course could be designed that covers the entire book. For instructors interested in having their students do an independent project, we have included a list of possible topics in Appendix D.

Features of the New Edition

This fourth edition incorporates several substantial changes. In some cases, topics have been reorganized and/or augmented using results of recent work. Here is a summary of the major changes to the original nine chapters of the book: • Chapter 2: We now define standard representations (implicit in earlier editions) and lcm representations (new to this edition). Theorem 6 from §9 plays an im- portant role in the book, as indicated by the solid arcs in the dependence chart on the previous page. • Chapter 3: We now give two proofs of the Extension Theorem (Theorem 3 in §1). The resultant proof from earlier editions now appears in §6, and a new Gröbner basis proof inspired by SCHAUENBURG (2007) is presented in §5. This makes it possible for instructors to omit resultants entirely if they choose. However, resul- tants are used in the proof of Bezout’s Theorem in Chapter 8, §7, as indicated by the dashed arc in the dependence chart. • Chapter 4: There are several important changes: – In §1 we present a Gröbner basis proof of the Weak Nullstellensatz using ideas from GLEBSKY (2012). – In §4 we now cover saturations I : J∞ in addition to ideal quotients I : J. – In §7 we use Gröbner bases to prove the Closure Theorem (Theorem 3 in Chapter 3, §2) following SCHAUENBURG (2007). • Chapter 5: We have added a new §6 on Noether normalization and relative finite- ness. Unlike the previous topics, the proofs involved in this case are quite classi- cal. But having this material to draw on provides another illuminating viewpoint in the study of the dimension of a variety in Chapter 9. • Chapter 6: The discussion of the behavior of Gröbner bases under specialization in §3 has been supplemented by a brief presentation of the recently developed concept of a Gröbner cover from MONTES and WIBMER (2010). We would like to thank Antonio Montes for the Gröbner cover calculation reported in §3. In the biggest single change, we have added a new Chapter 10 presenting some of the progress of the past 25 years in methods for computing Gröbner bases (i.e., since the improved Buchberger algorithm discussed in Chapter 2, §10). We present Traverso’s Hilbert driven Buchberger algorithm for homogeneous ideals, Faugère’s F4 algorithm, and a brief introduction to the signature-based family of algorithms including Faugère’s F5. These new algorithmic approaches make use of several in- teresting ideas from previous chapters and lead the reader toward some of the next steps in commutative algebra (modules, syzygies, etc.). We chose to include this x Preface topic in part because it illustrates so clearly the close marriage between theory and practice in this part of mathematics. Since software for the computations discussed in our text has also undergone ma- jor changes since 1992, Appendix C has been completely rewritten. We now discuss Maple, Mathematica, Sage, CoCoA, Macaulay2, and Singular in some detail and list several other systems that can be used in courses based on our text. Appendix D has also been substantially updated with new ideas for student projects. Some of the wide range of applications developed since our first edition can be seen from the new topics there. Finally, the bibliography has been updated and expanded to reflect some of the continuous and rapid development of our subjects.

Acknowledgments

When we began writing the first edition of Ideals, Varieties, and Algorithms in 1989, major funding was provided by the New England Consortium for Undergraduate Science Education (and its parent organization, the Pew Charitable Trusts). This project would have been impossible without their support. Various aspects of our work were also aided by grants from IBM and the Sloan Foundation, the Alexan- der von Humboldt Foundation, the Department of Education’s FIPSE program, the Howard Hughes Foundation, and the National Science Foundation. We are grateful to all of these organizations for their help. We also wish to thank colleagues and students at Amherst College, George Ma- son University, College of the Holy Cross, Institute of Technology, Mount Holyoke College, Smith College, and the University of Massachusetts who participated in courses based on early versions of the manuscript. Their feedback improved the book considerably. We want to give special thanks to David Bayer and Monique Lejeune-Jalabert, whose thesis BAYER (1982) and notes LEJEUNE-JALABERT (1985) first acquainted us with this wonderful subject. We are also grateful to Bernd Sturmfels, whose book STURMFELS (2008) was the inspiration for Chapter 7, and , whose book KIRWAN (1992) convinced us to include Bezout’s Theorem in Chapter 8. We would also like to thank Steven Kleiman, Michael Singer, and A. H. M. Levelt for important contributions to the second and third editions of the book. We are extremely grateful to the many, many individuals (too numerous to list here) who reported typographical errors and gave us feedback on the earlier editions. Thank you all! Corrections, comments, and suggestions for improvement are welcome!

Amherst, MA, USA David Cox Worcester, MA, USA John Little Sarasota, FL, USA Donal O’Shea January 2015 Contents

Preface ...... vii

Notation for Sets and Functions ...... xv

Chapter 1. Geometry, Algebra, and Algorithms ...... 1 §1. Polynomials and Affine Space ...... 1 §2. AffineVarieties...... 5 §3. ParametrizationsofAffineVarieties...... 14 §4. Ideals ...... 29 §5. Polynomials of One Variable ...... 37

Chapter 2. Gröbner Bases ...... 49 §1. Introduction ...... 49 §2. Orderings on the Monomials in k[x1,...,xn] ...... 54 §3. A Division Algorithm in k[x1,...,xn] ...... 61 §4. Monomial Ideals and Dickson’s Lemma...... 70 §5. The Hilbert Basis Theorem and Gröbner Bases ...... 76 §6. Properties of Gröbner Bases ...... 83 §7. Buchberger’s Algorithm ...... 90 §8. First Applications of Gröbner Bases ...... 97 §9. Refinements of the Buchberger Criterion ...... 104 §10. Improvements on Buchberger’s Algorithm ...... 109

Chapter 3. Elimination Theory ...... 121 §1. The Elimination and Extension Theorems ...... 121 §2. TheGeometryofElimination ...... 129 §3. Implicitization...... 133 §4. Singular Points and Envelopes ...... 143 §5. Gröbner Bases and the Extension Theorem ...... 155 §6. Resultants and the Extension Theorem ...... 161

xi xii Contents

Chapter 4. The Algebra–Geometry Dictionary ...... 175 §1. Hilbert’sNullstellensatz...... 175 §2. Radical Ideals and the Ideal–Variety Correspondence...... 181 §3. Sums, Products, and Intersections of Ideals ...... 189 §4. Zariski Closures, Ideal Quotients, and Saturations ...... 199 §5. Irreducible Varieties and Prime Ideals...... 206 §6. Decomposition of a Variety into Irreducibles ...... 212 §7. Proof of the Closure Theorem ...... 219 §8. Primary Decomposition of Ideals ...... 228 §9. Summary...... 232

Chapter 5. Polynomial and Rational Functions on a Variety ...... 233 §1. Polynomial Mappings ...... 233 §2. Quotients of Polynomial Rings ...... 240 §3. Algorithmic Computations in k[x1,...,xn]/I ...... 248 §4. TheCoordinateRingofanAffineVariety...... 257 §5. Rational Functions on a Variety ...... 268 §6. Relative Finiteness and Noether Normalization ...... 277

Chapter 6. Robotics and Automatic Geometric Theorem Proving ...... 291 §1. Geometric Description of Robots ...... 291 §2. TheForwardKinematicProblem ...... 297 §3. The Inverse Kinematic Problem and Motion Planning ...... 304 §4. Automatic Geometric Theorem Proving ...... 319 §5. Wu’sMethod...... 335

Chapter 7. Invariant Theory of Finite Groups ...... 345 §1. Symmetric Polynomials ...... 345 §2. Finite Matrix Groups and Rings of Invariants ...... 355 §3. Generators for the Ring of Invariants ...... 364 §4. Relations Among Generators and the Geometry of Orbits ...... 373

Chapter 8. Projective Algebraic Geometry ...... 385 §1. TheProjectivePlane...... 385 §2. Projective Space and Projective Varieties ...... 396 §3. The Projective Algebra–Geometry Dictionary ...... 406 §4. TheProjectiveClosureofanAffineVariety...... 415 §5. Projective Elimination Theory ...... 422 §6. The Geometry of Quadric Hypersurfaces ...... 436 §7. Bezout’s Theorem ...... 451

Chapter 9. The Dimension of a Variety ...... 469 §1. The Variety of a Monomial Ideal ...... 469 §2. The Complement of a Monomial Ideal ...... 473 §3. The Hilbert Function and the Dimension of a Variety ...... 486 §4. Elementary Properties of Dimension...... 498 Contents xiii

§5. Dimension and Algebraic Independence ...... 506 §6. Dimension and Nonsingularity ...... 515 §7. The Tangent Cone ...... 525

Chapter 10. Additional Gröbner Basis Algorithms ...... 539 §1. Preliminaries...... 539 §2. Hilbert Driven Buchberger Algorithms ...... 550 §3. The F4 Algorithm...... 567 §4. Signature-based Algorithms and F5 ...... 576

Correction to: Ideals, Varieties, and Algorithms...... E1

Appendix A. Some Concepts from Algebra ...... 593 §1. FieldsandRings...... 593 §2. UniqueFactorization...... 594 §3. Groups ...... 595 §4. Determinants ...... 596

Appendix B. Pseudocode ...... 599 §1. Inputs, Outputs, Variables, and Constants...... 600 §2. AssignmentStatements...... 600 §3. Looping Structures ...... 600 §4. Branching Structures ...... 602 §5. OutputStatements...... 602

Appendix C. Computer Algebra Systems ...... 603 §1. General Purpose Systems: Maple, Mathematica, Sage ...... 604 §2. Special Purpose Programs: CoCoA, Macaulay2, Singular ...... 611 §3. Other Systems and Packages ...... 617

Appendix D. Independent Projects ...... 619 §1. General Comments ...... 619 §2. Suggested Projects ...... 620

References ...... 627

Index ...... 635

Notation for Sets and Functions

In this book, a set is a collection of mathematical objects. We say that x is an element of A, written x ∈ A, when x is one of objects in A. Then x ∈/ A means that x is not an element of A. Commonly used sets are:

Z = {...,−2, −1, 0, 1, 2,...}, the set of integers,

Z≥0 = {0, 1, 2,...}, the set of nonnegative integers, Q = the set of rational numbers (fractions), R = the set of real numbers, C = the set of complex numbers.

Sets will often be specified by listing the elements in the set, such as A = {0, 1, 2}, or by set-builder notation, such as

[0, 1]={x ∈ R | 0 ≤ x ≤ 1}.

The empty set is the set with no elements, denoted ∅. We write

A ⊆ B when every element of A is also an element of B; we say that A is contained in B and A is a subset of B. When in addition A = B, we write

A  B and say that A is a proper subset of B. Basic operations on sets are

A ∪ B = {x | x ∈ A or x ∈ B}, the union of A and B, A ∩ B = {x | x ∈ A and x ∈ B}, the intersection of A and B, A \ B = {x | x ∈ A and x ∈/ B}, the difference of A and B, A × B = {(x, y) | x ∈ A and y ∈ B}, the cartesian product of A and B.

xv xvi Notation for Sets and Functions

We say that f is a function from A to B, written

f : A −→ B, when for every x ∈ A, there is a unique f (x) ∈ B. We sometimes write the function f as x −→ f (x). Given any set A, an important function is the identity function

idA : A −→ A defined by x → x for all x ∈ A. Given functions f : A → B and g : B → C, their composition g ◦ f : A −→ C is defined by x → g(f (x)) for x ∈ A.

A function f : A → B is one-to-one if f (x)=f (y) implies x = y whenever x, y ∈ A. A function f : A → B is onto if for all y ∈ B, there is x ∈ A with f (x)=y.Iff is one-to-one and onto, then f has an inverse function

f −1 : B −→ A defined by f −1(y)=x when f (x)=y. The inverse function satisfies

−1 −1 f ◦ f = idA and f ◦ f = idB.

The original version of this book was revised. A correction to this book is available at https://doi.org/10.1007/978-3-319-16721-3_11