0% found this document useful (0 votes)
7 views225 pages

Metric Algebraic Geometry

This book grew out of the lecture notes we developed for the Oberwolfach Seminar on Metric Algebraic Geometry.

Uploaded by

mohamed khriss
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views225 pages

Metric Algebraic Geometry

This book grew out of the lecture notes we developed for the Oberwolfach Seminar on Metric Algebraic Geometry.

Uploaded by

mohamed khriss
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 225

Oberwolfach Seminars

53

Metric
Algebraic
Geometry
Paul Breiding
Kathlén Kohn
Bernd Sturmfels
Oberwolfach Seminars
Volume 53

The workshops organized by the Mathematisches Forschungsinstitut Oberwolfach are


intended to introduce students and young mathematicians to current fields of research.
By means of these well-organized seminars, also scientists from other fields will be
introduced to new mathematical ideas. The publication of these workshops in the series
Oberwolfach Seminars (formerly DMV seminar) makes the material available to an even
larger audience.
Paul Breiding • Kathlén Kohn • Bernd Sturmfels

Metric Algebraic Geometry


Paul Breiding Kathlén Kohn
Universität Osnabrück KTH Royal Institute of Technology
Osnabrück, Germany Stockholm, Sweden

Bernd Sturmfels
Max Planck Institute
for Mathematics in the Sciences
Leipzig, Germany

ISSN 1661-237X ISSN 2296-5041 (electronic)


Oberwolfach Seminars
ISBN 978-3-031-51461-6 ISBN 978-3-031-51462-3 (eBook)
https://doi.org/10.1007/978-3-031-51462-3

Mathematics Subject Classification (2020): 13P25, 14Q30, 53Z50, 62R01, 90C23

This work was supported by Max-Planck-Institut für Mathematik in den Naturwissenschaften and MPDL.
© The Editor(s) (if applicable) and The Author(s) 2024. This book is an open access publication.
Open Access This book is licensed under the terms of the Creative Commons Attribution 4.0 International
License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and
reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this book are included in the book’s Creative Commons license,
unless indicated otherwise in a credit line to the material. If material is not included in the book’s Creative
Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use,
you will need to obtain permission directly from the copyright holder.
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, expressed or implied, with respect to the material contained herein or for any errors or omissions
that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps
and institutional affiliations.

This book is published under the imprint Birkhäuser, www.birkhauser-science.com by the registered company
Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland

Paper in this product is recyclable.


To Andrea, Jonas, Hyungsook, and our families.


Preface

This book grew out of the lecture notes we developed for the Oberwolfach Seminar on
Metric Algebraic Geometry. An Oberwolfach Seminar is essentially a summer school for
PhD students and postdocs. Ours was held in the week of May 29 to June 2, 2023. Each
of the three lecturers presented five of the 15 chapters. The lectures were supplemented by
intense working sessions and inspiring evening discussions.
While developing our material for the school, we were motivated by the following
thought. In the early 19th century, there was no difference between algebraic geometry and
differential geometry. The two were part of the same subject. Geometers studied natural
properties of curves and surfaces in 3-space, such as curvature, singularities, and defining
equations. In the 20th century, the threads diverged. The standard curriculum now offers
algebraic geometry and differential geometry in rather disconnected courses.
In the present days, geometry plays an important role for data science, and this requires
us to rethink the schism bemoaned above. Many applied problems center around metric
questions, such as optimization with respect to distances. These require tools from different
areas in geometry, algebra and analysis.
To offer a path towards integration, we propose a circle of ideas which we call metric
algebraic geometry. This term is a neologism which joins the names metric geometry and
algebraic geometry. It first appeared in the title of Madeleine Weinstein’s PhD dissertation
(UC Berkeley 2021). Building on classical foundations, the field embarks towards a new
paradigm that combines concepts from algebraic geometry and differential geometry, with
the goal of developing practical tools for the 21st century.
Many problems in the sciences lead to polynomial equations over the real numbers. The
solution sets are real algebraic varieties. Understanding distances, volumes and angles – in
short, understanding metric properties – of those varieties is important for modeling and
analyzing data. Other metric problems in optimization and statistics involve, for instance,
minimizing the Euclidean distance from a variety to a given data point. Furthermore, in
topological data analysis, computing the homology of a submanifold depends on curvature
and on bottlenecks. Related metric questions arise in machine learning, in the geometry of
computer vision, in learning varieties from data, and in the study of Voronoi cells.
This book addresses a wide audience of researchers and students, who will find it useful
for seminars or self-study. It can serve as the text for a one-semester course at the graduate

vii
viii Preface

level. The key prerequisite is a solid foundation in undergraduate mathematics, especially in


algebra and geometry. Course work in statistics, computer science, and numerical analysis,
as well as experience with mathematical software, are helpful as well.
We hope that you enjoy this book. It will invite you to develop your own perspective,
and to share it.

Osnabrück Paul Breiding


Stockholm Kathlén Kohn
Leipzig Bernd Sturmfels
November 2023
About the Authors

Paul Breiding is a professor for mathematical


methods in data science at the University of Os-
nabrück. He is also an Emmy-Noether Research
Group Leader and a member of the Academy
of Sciences and Literature Mainz. In 2021 he
received the Early Career Prize of the SIAM
Activity Group on Algebraic Geometry. Paul’s
interests lie in numerical and random algebraic
geometry.
Kathlén Kohn is a tenure-track assistant profes-
sor at KTH in Stockholm. Her research inves-
tigates the underlying geometry in computer-
vision, machine-learning and statistical prob-
lems, using algebraic methods. For her research
in computer vision, Kathlén received the Best
Student Paper Award at the International Con-
ference on Computer Vision (ICCV) in 2019
and the Swedish L’Oréal-Unesco For Women in
Science prize in 2023.
After many years at UC Berkeley, Bernd
Sturmfels now serves as a director at the Max-
Planck Institute for Mathematics in the Sciences
in Leipzig, Germany, where he leads the Nonlin-
ear Algebra group. He has published 10 books
and 300 articles, and he has mentored over
60 doctoral students and countless postdocs.
Bernd’s interests range from algebraic geome-
try and combinatorics to statistics, optimization
and theoretical physics.

ix
Acknowledgements

The authors of this book wholeheartedly thank the following 21 enthusiastic and hard-
working participants of the Oberwolfach Seminar on Metric Algebraic Geometry, held in
the week of May 29 to June 2, 2023. Their feedback, both during the Seminar and thereafter,
was tremendously important for the development of this book. Without their input this work
would not have been possible:
Patience Ablett, Yueqi Cao, Nick Dewaele, Mirte van der Eyden, Luca Fiorindo, Sofia
Garzon Mora, Sarah-Tanja Hess, Emil Horobet, Nidhi Kaihnsa, Elzbieta Polak, Hamid
Rahkooy, Bernhard Reinke, Andrea Rosana, Felix Rydell, Pierpaola Santarsiero, Victoria
Schleis, Svala Sverrisdóttir, Ettore Teixeira Turatti, Máté László Telek, Angelica Marcela
Torres Bustos, and Beihui Yuan.
In addition to the participants from Oberwolfach, we obtained feedback from many
others. We are very grateful to the following 26 mathematicians for sending us “bug
reports” on draft versions of this book:
Viktoriia Borovik, Shelby Cox, Karel Devriendt, Sarah Eggleston, Hannah Friedman,
Lukas Gustafsson, Marvin Hahn, Leonie Kayser, Yelena Mandelshtam, Orlando Marigliano,
Stefano Mereta, Dmitrii Pavlov, Rosa Preiß, Kemal Rose, Anna-Laura Sattelberger, Elima
Shehu, Luca Sodomaco, Monroe Stephenson, Francesca Tombari, Raluca Vlad, Ada
Wang, Madeleine Weinstein, Maximilian Wiesmann, Daniel Windisch, Elias Wirth, and
Maksym Zubkov.
We thank Chiara Meroni for her important contribution to Chapter 14. The material on
SDP hierarchies in Section 14.3 is due to Chiara.
Finally, we are extraordinarily grateful to Thomas Endler for creating the figures in this
book. Many thanks also to Madeline Brandt for providing us a draft of Figure 8.1.

xi
Contents

1 Historical Snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Polars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Foci . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 Envelopes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2 Critical Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.1 Euclidean Distance Degree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2 Low-Rank Matrix Approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.3 Invitation to Polar Degrees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

3 Computations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.1 Gröbner Bases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.2 The Parameter Continuation Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.3 Polynomial Homotopy Continuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

4 Polar Degrees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.1 Polar Varieties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.2 Projective Duality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.3 Chern Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

5 Wasserstein Distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.1 Polyhedral Norms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.2 Optimal Transport and Independence Models . . . . . . . . . . . . . . . . . . . . . . . . 58
5.3 Wasserstein meets Segre–Veronese . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

6 Curvature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.1 Plane Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.2 Algebraic Varieties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
6.3 Volumes of Tubular Neighborhoods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

7 Reach and Offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81


7.1 Medial Axis and Bottlenecks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
7.2 Offset Hypersurfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
7.3 Offset Discriminant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

xiii
xiv Contents

8 Voronoi Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
8.1 Voronoi Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
8.2 Algebraic Boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
8.3 Degree Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
8.4 Voronoi meets Eckart–Young . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

9 Condition Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105


9.1 Errors in Numerical Computations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
9.2 Matrix Inversion and Eckart–Young . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
9.3 Condition Number Theorems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
9.4 Distance to the Discriminant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

10 Machine Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123


10.1 Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
10.2 Convolutional Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
10.3 Learning Varieties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

11 Maximum Likelihood . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137


11.1 Kullback–Leibler Divergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
11.2 Maximum Likelihood Degree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
11.3 Scattering Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
11.4 Gaussian Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

12 Tensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
12.1 Tensors and their Rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
12.2 Eigenvectors and Singular Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
12.3 Volumes of Rank-One Varieties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

13 Computer Vision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163


13.1 Multiview Varieties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
13.2 Grassmann Tensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
13.3 3D Reconstruction from Unknown Cameras . . . . . . . . . . . . . . . . . . . . . . . . . 171

14 Volumes of Semialgebraic Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175


14.1 Calculus and Beyond . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
14.2 D-Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
14.3 SDP Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

15 Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
15.1 Homology from Finite Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
15.2 Sampling with Density Guarantees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
15.3 Markov Chains on Varieties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
15.4 Chow goes to Monte Carlo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Chapter 1
Historical Snapshot

Throughout this book, we will encounter the interplay of metric concepts with algebraic
objects. In classical texts such as Salmon’s book [156], metric properties of algebraic
varieties were essential. This includes the curvature of algebraic curves and computing
their arc lengths and circumscribed areas using integral calculus. Conversely, many curves
of interest were defined in terms of distances or angular conditions. This chapter provides
an introduction to this classical approach to algebraic curves.
The chapters that follow develop a modern view on metric algebraic geometry. This
involves algebraic structures in distance minimization (in Chapter 2), optimal transport (in
Chapter 5), machine learning (in Chapter 10), and computer vision (in Chapter 13). We
will often use the word model when talking about an algebraic variety because in these
settings algebraic varieties serve as abstract mathematical models for data. In particular, we
pose the variety hypothesis: information in data can be described by polynomial equations.
Our starting point is typically a real algebraic variety 𝑋 in real affine space R𝑛 . To
utilize methods from algebraic geometry, we pass to the Zariski closure of 𝑋 in complex
affine space C𝑛 , or in complex projective space P𝑛 . In most cases, to avoid heavy notation,
we use the same symbol for both 𝑋 and its (projective or affine) complexification. The
metric in metric algebraic geometry enters in the form of a notion of distance. The default
is the distance induced by the standard Euclidean structure on R𝑛 . Over the real numbers,
we use the Euclidean inner product. For p, q ∈ R𝑛 , this inner product is defined as
𝑛
∑︁
⟨p, q⟩ := p⊤ q = 𝑝𝑖 𝑞𝑖 .
𝑖=1
√︁
This induces the Euclidean norm, which is defined by ∥p∥ := ⟨p, p⟩. The Euclidean
distance function 𝑑 (p, q) := ∥p − q∥ turns R𝑛 into a metric space. The usual metric in the
complex space C𝑛 is given by the Hermitian inner product ⟨p, q⟩C = p∗ q.
However, complex conjugation is not an algebraic operation, and we avoid using it.
Instead, throughout this book we consider the algebraic extension of the Euclidean inner
product and write ⟨p, q⟩ = p⊤ q also when p, q ∈ C𝑛 are complex vectors. This yields a
non-degenerate bilinear form on C𝑛 , which we use to identify C𝑛 with its dual space. In

© The Author(s) 2024 1


P. Breiding et al., Metric Algebraic Geometry, Oberwolfach Seminars 53,
https://doi.org/10.1007/978-3-031-51462-3_1
2 1 Historical Snapshot

this manner, we can consider an algebraic variety and its dual within the same ambient
space. We emphasize that, over the complex numbers, the bilinear form ⟨·, ·⟩ is not positive
definite, and hence does not induce a metric. For instance, we have ⟨(1, 𝑖), (1, 𝑖)⟩ = 0.
Nevertheless, using the algebraic extension of the Euclidean inner product, we will be able
to study metric problems in R𝑛 using methods from complex algebraic geometry. In some
chapters, we will use other metrics, but this will be spelled out explicitly. For instance,
in Chapter 5 we care about distance functions induced by norms whose unit balls are
polytopes. However, the standard choice of metric is the Euclidean metric above.
With these 20th-century basics out of the way, we shall now step into the 19th century.

1.1 Polars

Our first historical snapshot concerns polars of algebraic curves in the plane. This will lead
us to metric definitions of special families of curves.
For a fixed line 𝐿 in the real plane R2 with a distinguished point o ∈ 𝐿, we can choose
a positive and a negative direction and define a signed Euclidean distance on 𝐿. More
concretely, we fix a unit vector v through o, such that v spans 𝐿. We define

op := 𝜆 ∈ R, where p = o + 𝜆v ∈ 𝐿.

In particular, this definition depends on the line 𝐿, the reference point o, and the chosen
direction given by the vector v. The unsigned distance is the Euclidean distance

|op| = ∥o − p∥.

According to Salmon [156, §56], the following theorem was first proven by Roger Cotes
(1682–1716) in his Harmonia Mensurarum. It is valid both over R and over C.

Theorem 1.1 (Cotes [51]) Fix a point o in the plane and an algebraic curve 𝐶 of degree 𝑑.
Consider any line 𝐿 through the point o that intersects the curve 𝐶 in 𝑑 distinct points
r1 , . . . , r𝑑 . We denote by p 𝐿 the point on 𝐿 whose signed distance to o satisfies
𝑑 1 1 1
= + + ··· + . (1.1)
op 𝐿 or1 or2 or𝑑
Then, the following subset of the plane is a straight line:
Ø
𝐾 := { p 𝐿 | p 𝐿 satisfies Equation (1.1) } .
𝐿 is a line through o

Salmon called 𝐾 the polar line of the curve 𝐶 and the point o. Note that our definition
of the polar line made use of the Euclidean metric.

Example 1.2 (𝑑 = 2) Consider a conic 𝐶 and a point o outside of 𝐶. Then the polar line is
spanned by the two points on 𝐶 whose tangent line contains o; see Figure 1.1. ⋄
1.1 Polars 3

o r1 pL r2
v

Fig. 1.1: A conic and its polar line (blue) with respect to the point o.

The relation (1.1) means that the signed distance from o to p 𝐿 is the harmonic mean of
the signed distances from o to the intersection points r𝑖 . We rewrite this as
𝑑  
∑︁ 1 1
− = 0. (1.2)
𝑖=1
op 𝐿 or𝑖

Suppose now that the point o lies on the line at infinity. Then the point p 𝐿 becomes the
average of the points r1 , r2 , . . . , r𝑑 . This is proved in the following corollary.

Corollary 1.3 Let 𝐶 be a plane curve of degree 𝑑 and L a pencil of parallel lines. Let p 𝐿
be the average of all (complex) intersection points of the curve 𝐶 with some line 𝐿 in L:
𝑑
1 ∑︁
p 𝐿 := r𝑖 , where 𝐿 ∩ 𝐶 = {r1 , r2 , . . . , r𝑑 }. (1.3)
𝑑 𝑖=1

Then the set of all points p 𝐿 , as 𝐿 ranges over L, forms a straight line in the plane.

Proof We start by fixing a line 𝐿 ∈ L. We bring the two fractions in Equation (1.2) to
a common denominator, we use that or𝑖 − op 𝐿 = or𝑖 + p 𝐿 o = p 𝐿 r𝑖 , and we multiply the
result by op 𝐿 . In this way, we see that (1.2) is equivalent to
𝑑
∑︁ p 𝐿 r𝑖
= 0. (1.4)
𝑖=1
or𝑖

In the latter calculation, we kept the same choice of direction on the line 𝐿, but we changed
the reference point from o to p 𝐿 . To investigate what happens in the limit when o goes to
infinity, we fix a point o0 on the line 𝐿 such that 𝜆𝑖 := o0 r𝑖 > 0. Let v be the vector defining
the line 𝐿 and its direction. We can express the points on 𝐿 using 𝑡 ∈ R as

o𝑡 := o0 − 𝑡v.
4 1 Historical Snapshot

For every fixed 𝑡 ≥ 0, we have o𝑡 r𝑖 = 𝑡 + 𝜆𝑖 and we write p 𝐿,𝑡 for the point p 𝐿 that
satisfies (1.4) for o𝑡 . Multiplying (1.4) with 𝑡, we obtain
𝑑
∑︁ 𝑡
· p 𝐿,𝑡 r𝑖 = 0.
𝑖=1
𝑡 + 𝜆𝑖
Í𝑑
In the limit 𝑡 → ∞, the point p 𝐿,𝑡 converges to a point p 𝐿 . We conclude that 𝑖=1 p 𝐿 r𝑖 = 0.
In words, the point p 𝐿 is the average of the points r1 , r2 , . . . , r𝑑 . For o at infinity, (1.1)
describes the average point p 𝐿 in (1.3), and Theorem 1.1 specializes to Corollary 1.3. □
Salmon attributes Corollary 1.3 to Newton, who called the resulting straight line the
diameter of the curve 𝐶 corresponding to the parallel-lines pencil L [156, §51]. We point
out that Cotes and Newton knew each other. In fact, Cotes edited the second edition of
Newton’s Principia before its publication.
Corollary 1.3 is important in contemporary applied mathematics. It has been extended
to higher-dimensional varieties and is known as the trace test in numerical algebraic
geometry [161, Chapter 15.5].

Remark 1.4 Here is another delightful theorem on distances of a point to intersection points
between a curve and lines. It was first given by Newton in his Enumeratio Linearum Tertii
Ordinis: For a plane curve 𝐶 of degree 𝑑, a point o in the plane, and two distinct lines
passing through o, consider the ratio

or1 · or2 · · · or𝑑


, (1.5)
os1 · os2 · · · os𝑑
where r1 , r2 , . . . , r𝑑 and s1 , s2 , . . . , s𝑑 are the intersection points of the two lines with 𝐶. The
ratio (1.5) is invariant under translating the point o and the two intersecting lines [156, §46].

In [156, §57], Salmon extends the construction of polar lines to polar curves of higher
order. Using notation as in Theorem 1.1, he shows that the locus of points p 𝐿 satisfying
∑︁  1 1

1 1

− − = 0
1≤𝑖< 𝑗 ≤𝑑
op 𝐿 or𝑖 op 𝐿 or 𝑗

instead of (1.1) is a conic, called the polar conic of the curve 𝐶 and the point o. If o is at
infinity, the polar conic is also referred to as the diametral conic. More generally, the locus
of points p 𝐿 satisfying
∑︁  1 1

1 1
 
1 1

− − ··· − = 0
𝑖 <...<𝑖
op 𝐿 or𝑖1 op 𝐿 or𝑖2 op 𝐿 or𝑖𝑘
1 𝑘

is the polar curve of order 𝑘 associated with the curve 𝐶 and the point o [156, §58]. If o
is at infinity, that polar curve is called the curvilinear diameter of order 𝑘. In conclusion,
the 17th-century definition of polar curves has a metric origin. Measuring distances plays
a crucial role in what we have seen so far.
1.2 Foci 5

In the 20th-century algebraic geometry literature, on which our Chapter 4 on polar


varieties will rest, the definition of polar curves makes no reference to any metric. Namely,
polar curves are characterized without involving distances, as follows.
The defining equation of the curve 𝐶 in homogeneous coordinates equals 𝑓 (𝑥, 𝑦, 𝑧) = 0,
where 𝑓 has degree 𝑑 := deg 𝐶. For o = (𝑎 : 𝑏 : 𝑐), we define the differential operator

𝜕 𝜕 𝜕
Δo := 𝑎 +𝑏 +𝑐 . (1.6)
𝜕𝑥 𝜕𝑦 𝜕𝑧

Then Δo𝑑−𝑘 𝑓 is a homogeneous polynomial of degree 𝑘 in 𝑥, 𝑦, 𝑧. This is the defining


equation of the polar curve to 𝐶 of order 𝑘. This was proved by Salmon in [156, §63].
By exploiting symmetry in Taylor series, Salmon also shows the following beautiful
duality between polar curves that “may be written at pleasure” [156, §63]. Denoting by p
the point with homogeneous coordinates p = (𝑥 : 𝑦 : 𝑧), Salmon’s result states:
1 1 𝑘
Δ𝑑−𝑘 𝑓 (𝑥, 𝑦, 𝑧) = Δ 𝑓 (𝑎, 𝑏, 𝑐).
(𝑑 − 𝑘)! o 𝑘! p
In particular, the polar curve of order 𝑘 that is associated with the degree 𝑑 curve 𝐶 and
the point o is the locus of all points p such that the polar curve of order 𝑑 − 𝑘 associated
with 𝐶 and p passes through o.

1.2 Foci

“. . . we believe that it will be found that every point which has any special relation to any
curve will be found either to be a singular point of the curve, or a focus of it”
(George Salmon [156, §125])
An ellipse is the set of points in R2 whose sum of distances to two fixed points is constant.
The two points are the foci of the ellipse. In 1832, Plücker generalized the definition of
foci to arbitrary plane curves, in the manner described below. Consider a circle in the
plane. If we embed the affine plane into the projective plane P2 by sending (𝑥, 𝑦) ∈ C2 to
(𝑥 : 𝑦 : 1), then every circle passes through the two circular points at infinity (1 : 𝑖 : 0)
and (1 : −𝑖 : 0). In fact, passing through both circular points characterizes circles.

Lemma 1.5 An irreducible quadratic curve is a circle if and only if it passes through the
two circular points at infinity.

Proof Let 𝑓 (𝑥, 𝑦, 𝑧) = (𝑥 − 𝑎𝑧) 2 + (𝑦 − 𝑏𝑧) 2 − 𝑟 2 𝑧 2 be the polynomial defining a circle.


Then, 𝑓 (1 : ±𝑖 : 0) = 12 + (±𝑖) 2 = 0. This shows one direction. For the other direction, let
𝑓 = 𝑎 1 𝑥 2 + 𝑎 2 𝑥𝑦 + 𝑎 3 𝑦 2 + 𝑎 4 𝑥𝑧 + 𝑎 5 𝑦𝑧 + 𝑎 6 𝑧2 be an arbitrary real quadric. If 𝑓 passes through
the circular points, then 0 = 𝑓 (1 : 𝑖 : 0) = 𝑎 1 +𝑎 2𝑖−𝑎 3 and 0 = 𝑓 (1 : −𝑖 : 0) = 𝑎 1 −𝑎 2𝑖−𝑎 3 .
This implies 𝑎 1 = 𝑎 3 and 𝑎 2 = 0. Hence, 𝑓 is a circle in the affine plane {𝑧 = 1}. □
The following definition goes back to Plücker [147].
6 1 Historical Snapshot

Definition 1.6 Consider a plane curve 𝐶. A point f in the plane is a focus of the curve 𝐶 if
both lines spanned by the point f and the circular points at infinity are tangent to 𝐶.

a a
-a -c c a

-b

Fig. 1.2: The real foci of an ellipse with width √2𝑎 and height 2𝑏 (𝑎 ≥ 𝑏) and its axes aligned with the
𝑥-axis and 𝑦-axis of the real affine plane are (± 𝑎2 − 𝑏2 , 0).

Example 1.7 We determine the foci (in the sense of Plücker’s Definition 1.6) of an ellipse.
Since the condition that a line in P2 passes through the point (1 : ±𝑖 : 0) is invariant under
translations and rotations of the real affine plane {𝑧 ≠ 0} ⊆ P2 , we may translate and rotate
the ellipse such that its two defining foci (whose sum of distances is constant along the
ellipse) become (𝑐, 0) and (−𝑐, 0) in the real affine plane (with 𝑐 ≥ 0). Now the ellipse is
the locus of points (𝑥, 𝑦) that satisfy, for some constant 𝑎 > 0, the equation
√︃ √︃
(𝑥 − 𝑐) 2 + 𝑦 2 + (𝑥 + 𝑐) 2 + 𝑦 2 = 2𝑎.

From this, we see that the two points (±𝑎, 0) lie on the ellipse. Moreover, the ellipse
intersects the 𝑦-axis at (0, ±𝑏) such that 𝑏 2 = 𝑎 2 − 𝑐2 ; see Figure 1.2. Hence, the width and
height of the ellipse are 2𝑎 and 2𝑏, respectively, (with 𝑎 ≥ 𝑏 > 0) and its defining equation
can be written as
𝑥2 𝑦2
+ = 1.
𝑎2 𝑏2
If the ellipse is not a circle (i.e., 𝑎 > 𝑏), then it has two tangent lines that pass through
the circular point at infinity (1 : 𝑖 : 0), namely the tangent lines at p+ := (𝑎 2 : 𝑖𝑏 2 : 𝑐)
and p− := (−𝑎 2 : −𝑖𝑏 2 : 𝑐). The tangent lines at the complex conjugate points p̄+ and p̄−
contain the other circular point (1 : −𝑖 : 0). The foci à la Plücker are the four points
of intersection of the two tangent lines through (1 : 𝑖 : 0) with the two tangent lines
through (1 : −𝑖 : 0). Since the tangent lines at p± and p̄± are complex conjugates, they
meet at a real point, namely (±𝑐 : 0 : 1). This shows that the real foci we used to define
the ellipse are indeed foci in the sense of Plücker’s Definition 1.6. The other two foci are
obtained by intersecting the tangent line at p± with the tangent line at p̄∓ . They are the
imaginary points (0 : ∓𝑖𝑐 : 1).
1.2 Foci 7

If the ellipse is a circle (i.e., 𝑎 = 𝑏), then it passes through the two circular points at
infinity. The tangent lines at those points are the only ones that pass through the circular
points at infinity. They are given by 𝑥 ± 𝑖𝑦 = 0 and intersect at the origin (0 : 0 : 1). Thus,
in this case, the four foci coincide, and they all lie at the center of the circle. ♦

In general, the number of foci of an algebraic plane curve depends on its class, that is
the degree of its dual curve. The dual projective plane is the set of lines in the original
projective plane P2 . The dual curve 𝐶 ∨ of a plane curve 𝐶 ⊂ P2 is the Zariski closure in
the dual projective plane of the set of tangent lines 𝑇x 𝐶 at regular points x of 𝐶. Hence, the
degree of the dual curve 𝐶 ∨ (equivalently, the class of 𝐶) is the number of tangent lines
to 𝐶 that pass through a generic point in the plane P2 . Using the usual Euclidean inner
product ⟨·, ·⟩, we can view the dual curve as a curve in P2 . More specifically, the dual is

𝐶 ∨ = { y | there is a regular point x ∈ 𝐶 with ⟨y, v⟩ = 0 for all v ∈ 𝑇x 𝐶} ⊂ P2 . (1.7)

This means that 𝐶 ∨ is the Zariski closure of the set of points representing normal lines
to 𝐶. Here, orthogonality is measured by ⟨·, ·⟩. If 𝐶 is defined by the polynomial 𝑓 and we
have a point x ∈ 𝐶, then the normal line of 𝐶 at x is spanned by the gradient
⊤
∇ 𝑓 (x) = 𝜕 𝑓 /𝜕𝑥1 (x), 𝜕 𝑓 /𝜕𝑥2 (x) .

Consequently,
𝐶 ∨ = {∇ 𝑓 (x) | x is a regular point of 𝐶}.
Suppose now that the curve 𝐶 has class 𝑚. Then, through each of the two circular
points at infinity, there are 𝑚 tangent lines to the curve 𝐶. There are 𝑚 2 intersection points
of these two sets of 𝑚 lines. Furthermore, if the curve 𝐶 is real then the intersection
points of conjugate pairs of tangent lines are also real. This leads to the following result;
see [156, §125]. The case 𝑚 = 2 was featured in Example 1.7.

Proposition 1.8 A curve 𝐶 of class 𝑚 has 𝑚 2 complex foci (counted with multiplicity).
When the curve 𝐶 is real, exactly 𝑚 foci are real.

In the remainder of this section, we shall examine the foci for additional classes of curves.
There are several constructions that generalize ellipses in an obvious way. For instance, an
𝑛-ellipse is the locus of points in a plane whose sum of distances to 𝑛 fixed points in the
plane is constant. The class of 𝑛-ellipses was studied by Tschirnhaus in 1686 [168] and
Maxwell in 1846 [129]. As we defined them, 𝑛-ellipses are not algebraic, but semialgebraic.
In fact, they are boundaries of planar spectrahedra [137].
In what follows, we focus on an alternative generalization. Instead of considering the
sum of distances to foci, we consider a weighted sum or product. This leads us to Cartesian
ovals and Cassini ovals, respectively. The Cartesian oval is named after Descartes who
first studied them in his 1637 La Géométrie for their application to optics. This curve is the
locus of points in a plane whose weighted sum of distances to two fixed points is constant,
i.e., it is the locus of points p that satisfy the metric condition

∥p − f1 ∥ + 𝑠∥p − f2 ∥ = 𝑟,
8 1 Historical Snapshot

4 4

2 2

0 0

-2 -2

-4 -4
-2 0 2 4 6 -2 0 2 4 6

Fig. 1.3: Cartesian ovals with defining foci f1 = (0, 0) , f2 = (1, 0) and weight 𝑠 = 2 are described by the
equation (−3( 𝑥 2 + 𝑦 2 ) + 8𝑥 + 𝑟 2 − 4) 2 − 4𝑟 2 ( 𝑥 2 + 𝑦 2 ) = 0. The left picture shows the Cartesian oval for
𝑟 = 3 and the right picture shows it for 𝑟 = 2. The foci are the red points. In both cases, the focus at (4/3, 0)
has order three. In the right picture, the focus at (0, 0) has order two. This gives six real foci in total.

where f1 and f2 are fixed points in the plane and 𝑠, 𝑟 are fixed constants. The Cartesian oval
satisfies an equation of degree four. Hence the Zariski closure of the Cartesian oval is a
quartic curve. The real part of this quartic curve consists of two nested ovals; see Figure 1.3.
Of the four equations

∥p − f1 ∥ ± 𝑠∥p − f2 ∥ = ±𝑟, (1.8)

exactly two have real solutions and those describe the ovals. Salmon shows that a quartic
curve is a Cartesian oval if and only if it has cusps at the two circular points at infinity;
see [156, §129]. By Plücker’s formula [156, §72], it follows that the class of such a quartic
is six (except in degenerate cases). Salmon determines the six real foci of Cartesian oval
quartic curves [156, §129] (see also Basset [13, §273]): Three of them form a triple focus
which is located at the intersection of the cusps’ tangent lines. The remaining three foci lie
on a straight line. Two of them are the points f1 and f2 that define the curve in (1.8). It was
already observed by Chasles in [45, Note XXI] that any two of the three single foci can be
used to define the Cartesian oval by an equation of the form (1.8). If two of the three single
foci come together, the Cartesian oval degenerates to a Limaçon of Pascal; see Figure 1.3.
Salmon further observes another interesting metric property of foci: whenever a line meets
a Cartesian oval in four points, the sum of the four distances from any of the three single
foci is constant [156, §218].
A Cassini oval (named after Cassini who studied them in 1693 [40]) is the locus of points
in a plane whose product of distances to two fixed points f1 and f2 is a fixed constant 𝑟.
Hence the Cassini oval is an algebraic curve defined by the real quartic polynomial

∥p − f1 ∥ 2 · ∥p − f2 ∥ 2 = 𝑟 2 .
1.3 Envelopes 9

2 2 2

1 1 1

0 0 0

-1 -1 -1

-2 -2 -2
-4 -2 0 2 4 -4 -2 0 2 4 -4 -2 0 2 4

Fig. 1.4: The Cassini ovals in Equation (1.9) with defining foci f1 = (−2, 0) and f2 = (2, 0). All foci are
shown in red. The pictures display the cases 𝑟 = 3 (left), 𝑟 = 4 (middle) and 𝑟 = 5 (right). The outer foci
on the 𝑥-axis all have multiplicity 3. The middle focus in the second picture has multiplicity 2.

The circular points at infinity are double points on each Cassini oval. Since these are
typically the only singularities, the class of a Cassini oval is eight in general [156, §219].
Basset [13, §247] explains that the two pairs of complex conjugate tangent lines at the
two nodes intersect at f1 and f2 , respectively. Hence, those points are foci in the sense of
Plücker’s Definition 1.6. Moreover, Basset shows that each of them is a triple focus (the
reason being that the nodal tangents are stationary). To describe the remaining two real
foci, we translate and rotate (as in Example 1.7) such that f1 = (𝑐, 0) and f2 = (−𝑐, 0).
Then, the Cassini oval is defined by the quartic equation

(𝑥 − 𝑐) 2 + 𝑦 2 (𝑥 + 𝑐) 2 + 𝑦 2 = 𝑟 2 .
 
(1.9)

If 𝑟 < 𝑐2 , then the real locus consists of two ovals. Otherwise, the real locus is connected,
where the degenerate case 𝑟 = 𝑐2 is the lemniscate of Bernoulli; see Figure √ 1.4. In the case
of two ovals, the remaining two real foci also lie on the 𝑥-axis; they are (± 𝑐1 𝑐4 − 𝑟 2 , 0). If

𝑟 > 𝑐2 , the two foci are (0, ± 𝑐1 𝑟 2 − 𝑐4 ) and lie on the 𝑦-axis. In the degenerate case 𝑟 = 𝑐2 ,
they become a double focus at the origin.
In conclusion, the foci of a plane curve are landmark points of a metric origin. Starting
from these foci, one obtains interesting classical curves, like Cassini ovals and Cartesian
ovals. These curves are gems in the repertoire of metric algebraic geometry.

1.3 Envelopes

Given a one-dimensional algebraic family of lines in the plane, its envelope is a curve such
that each of the given lines is tangent to the curve. We can view the family of lines as an
algebraic curve L in the dual projective plane. The envelope is the dual curve L ∨ , which
now lives in the primal projective plane. This is a first instance of the biduality, which we
shall see more generally in Equation (2.15) and Theorem 4.11.

Example 1.9 The diameters of a plane curve 𝐶 form a one-dimensional family of lines.
Indeed, there is one such diameter for each point on the line at infinity; cf. Corollary 1.3.
For a cubic curve 𝐶, the envelope of that family is the locus consisting of the centers
10 1 Historical Snapshot

-2

-4
-2 0 2 4 6

Fig. 1.5: The cubic curve 𝑥 3 + 𝑦 3 + 5𝑥 2 − 2𝑥 𝑦 + 𝑥 − 1 = 0 (blue) and the envelope 9𝑥 𝑦 + 15𝑦 − 1 = 0 (red)
of its diameters. The diameter (green) and diametral conic (yellow) are associated with the point (2 : 1 : 0)
at infinity. Their equations are given in Example 1.9.

of the diametral conics of 𝐶 [156, §160]. For instance, for the cubic curve defined by
𝑥 3 + 𝑦 3 + 5𝑥 2 − 2𝑥𝑦 + 𝑥 − 1 = 0, the diameter associated with the point (𝑎 : 𝑏 : 0) is the line

3𝑎 2 𝑥 + 3𝑏 2 𝑦 + 5𝑎 2 − 2𝑎𝑏 = 0.

The family of all diameters is the curve L defined by 25𝑥 2 − 4𝑥𝑦 − 30𝑥 + 9 = 0. Its dual
curve L ∨ , that is the envelope of the diameters, is 9𝑥𝑦 + 15𝑦 − 1 = 0. The diametral conic
associated with (𝑎 : 𝑏 : 0) is given by the equation
2
(5𝑎 − 𝑏) 2 𝑎 2

5𝑎 − 𝑏  𝑎 2
3𝑎 𝑥 + + 3𝑏 𝑦 − +𝑎− − = 0.
3𝑎 3𝑏 3𝑎 3𝑏

Its center ( −5𝑎+𝑏 𝑎


3𝑎 , 3𝑏 ) lies on the envelope. In fact, the tangent line of the envelope at that
point is the diameter associated with (𝑎 : 𝑏 : 0); see Figure 1.5. ♦

Evolutes and caustics are instances of envelopes defined by metric properties. The
evolute of a plane curve 𝐶 is the envelope of its normals (i.e., the lines orthogonal to
its tangent lines). Equivalently, the evolute is the locus of the centers of curvature (see
Proposition 6.2). The study of evolutes goes back to Apollonius (ca. 200 BC); see [172].
A recent study of evolutes can be found in [146]. The degree of the evolute of a
general smooth curve of degree 𝑑 is 3𝑑 (𝑑 − 1) (see Corollary 6.9). The class of this
evolute equals 𝑑 2 , by [156, §116]. Moreover, the evolute of the general degree 𝑑 curve has
𝑑 2
2 (3𝑑 − 5) (3𝑑 − 𝑑 − 6) double points, 3𝑑 (2𝑑 − 3) cusps, and it has no other singularities.
The evolute of the Cartesian oval in Figure 1.3 is illustrated in Figure 1.6. Its equation is
1.3 Envelopes 11

-2

-4
-2 0 2 4 6 8

Fig. 1.6: The Cartesian oval from Figure 1.3 (left) together with its evolute.

102036672𝑥 10 𝑦 2 + 433655856𝑥 8 𝑦 4 + 833407380𝑥 6 𝑦 6 + 917059401𝑥 4 𝑦 8


+ 558336726𝑥 2 𝑦 10 + 143065521𝑦 12 − 884317824𝑥 9 𝑦 2 − 3106029888𝑥 7 𝑦 4
− 4898885832𝑥 5 𝑦 6 − 4008450240𝑥 3 𝑦 8 − 1331276472𝑥 𝑦 10 + 3251316672𝑥 8 𝑦 2
+ 9515584512𝑥 6 𝑦 4 + 12088352844𝑥 4 𝑦 6 + 6432939486𝑥 2 𝑦 8 + 620191890𝑦 10
− 40310784𝑥 9 − 6758774784𝑥 7 𝑦 2 − 16647933888𝑥 5 𝑦 4 − 15962551632𝑥 3 𝑦 6
− 4237194240𝑥 𝑦 8 + 342641664𝑥 8 + 9145229184𝑥 6 𝑦 2 + 18728830368𝑥 4 𝑦 4
+ 11743648812𝑥 2 𝑦 6 + 961612425𝑦 8 − 1239556608𝑥 7 − 9234062208𝑥 5 𝑦 2
− 14497919136𝑥 3 𝑦 4 − 4640798304𝑥 𝑦 6 + 2495722752𝑥 6 + 8064660672𝑥 4 𝑦 2
+ 8003654064𝑥 2 𝑦 4 + 835700656𝑦 6 − 3071831040𝑥 5 − 6288399360𝑥 3 𝑦 2
− 2974296960𝑥 𝑦 4 + 2390342400𝑥 4 + 3772699200𝑥 2 𝑦 2 + 540271200𝑦 4
− 1173312000𝑥 3 − 1396800000𝑥 𝑦 2 + 349920000𝑥 2 + 228000000𝑦 2
− 57600000𝑥 + 4000000 = 0.

We will see in Proposition 6.5 that the finite cusps of the evolute correspond to the points
of critical curvature of the curve 𝐶. Salmon computes the length of an arc of the evolute
as “the difference of the radii of curvature at its extremities” [156, §115]. The converse
operation to computing the evolute is finding an involute; that is, for a given plane curve 𝐶,
find a curve whose evolute is 𝐶. Involutes of an algebraic curve are typically not unique
and they might not be algebraic. For instance, the involute of a circle is a transcendental
curve [156, §235]. The nonuniqueness of involutes can be seen from the offset curves in
Section 7.2. Any two offset curves of a given curve have the same evolute. Finally, we note
that the foci of a plane curve are also foci of its evolute and its involutes [156, §127].
We conclude with caustics of plane curves. These come in two flavors. Let us imagine
that a fixed point r in the plane emits light. The light rays are reflected at each point of
a given plane curve 𝐶. The caustic by reflection is the envelope of the family of reflected
rays. Similarly, the caustic by refraction is the envelope of the family of refracted rays. At
a point p of the given curve 𝐶, the refracted ray is defined as follows: If ∢1 is the angle
12 1 Historical Snapshot

Fig. 1.7: Caustics by reflection (left) and refraction (right) of a circle with light source at infinity.

that the light ray from the radiant point r to p makes with the normal of 𝐶 at p and ∢2 is
sin ∢1
the angle between the refracted ray and the same normal, then the ratio sin ∢2 is a constant
independent of p, called refraction constant. Figure 1.7 shows both caustics for a circle
where the radiant point is at infinity. Those curves can be commonly observed in real life,
e.g., when the sun shines on a round glass.

Example 1.10 Caustics by refraction of circles are evolutes of Cartesian ovals. This result
is due to Quetelet [156, §124]. For instance, the evolute of the Cartesian oval in Figures 1.3
(left) and 1.6 is the caustic by refraction of the circle with radius 23 which is centered at the
triple focus ( 43 , 0). Here, the radiant point is f1 = (0, 0) and the refraction constant is 23 . ⋄

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International
License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and
reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter’s Creative Commons
license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s
Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the
permitted use, you will need to obtain permission directly from the copyright holder.
Chapter 2
Critical Equations

We consider a model 𝑋 that is given as the zero set in R𝑛 of a collection { 𝑓1 , . . . , 𝑓 𝑘 } of


polynomials in 𝑛 unknowns 𝑥1 , . . . , 𝑥 𝑛 . Thus, 𝑋 is a real algebraic variety. In algebraic
geometry, it is preferable to work with the complex algebraic variety defined by the same
polynomials. This is the Zariski closure, and we will use the same symbol: 𝑋 ⊂ C𝑛 . We
assume that 𝑋 is irreducible, that 𝐼 𝑋 = ⟨ 𝑓1 , . . . , 𝑓 𝑘 ⟩ is its prime ideal, and that the set of
nonsingular real points is Zariski dense in 𝑋. The 𝑘 × 𝑛 Jacobian matrix J = (𝜕 𝑓𝑖 /𝜕𝑥 𝑗 )
has rank at most 𝑐 at any point x ∈ 𝑋, where 𝑐 = codim(𝑋). The point x is nonsingular on
𝑋 if the rank is exactly 𝑐. The variety 𝑋 is called smooth if all its points are nonsingular.
Elaborations on these hypotheses are found in many textbooks, including [133, Chapter 2].
The following optimization problem arises in many applications, and we shall revisit it
again and again throughout this book. Given a data point u ∈ R𝑛 \𝑋, compute the distance
to the model 𝑋. Thus, we seek a point x∗ in 𝑋 that is closest to u. The answer depends on the
chosen metric. We focus on least-squares problems, where the metric is a Euclidean metric.
Furthermore, we assume that the optimal point x∗ is smooth on 𝑋. One can compute x∗ by
solving the critical equations. In optimization, these are known as first-order conditions or
KKT equations, and they arise from introducing Lagrange multipliers. We seek to compute
all complex solutions to the critical equations. The set of these critical points is typically
finite, and it includes all local maxima, all local minima, and all saddle points.

2.1 Euclidean Distance Degree

We begin by discussing the Euclidean distance (ED) problem, which is as follows:


𝑛
∑︁
minimize ∥x − u∥ 2 = (𝑥𝑖 − 𝑢 𝑖 ) 2 subject to x = (𝑥1 , . . . , 𝑥 𝑛 ) ∈ 𝑋. (2.1)
𝑖=1

This optimization problem is defined over the real locus of 𝑋. We study it by the strategy
that we announced above: we first derive the critical equations for (2.1), and then study

© The Author(s) 2024 13


P. Breiding et al., Metric Algebraic Geometry, Oberwolfach Seminars 53,
https://doi.org/10.1007/978-3-031-51462-3_2
14 2 Critical Equations

them over the complex variety 𝑋. Thus, we interpret the optimization problem (2.1) as a
problem of solving polynomial equations over C.
The augmented Jacobian matrix A J is the (𝑘 + 1) × 𝑛 matrix which is obtained by
placing the row vector (𝑥1 − 𝑢 1 , . . . , 𝑥 𝑛 − 𝑢 𝑛 ) atop the Jacobian matrix J . We form the
ideal generated by the (𝑐 + 1) × (𝑐 + 1) minors of A J , we add the ideal of the model 𝐼 𝑋 ,
and we then saturate that sum by the ideal of 𝑐 × 𝑐 minors of J . See [60, Equation (2.1)].
The result is the critical ideal C𝑋,u of the model 𝑋 with respect to the data point u.

Example 2.1 (Plane curves) Let 𝑋 be the plane curve defined by a polynomial 𝑓 (𝑥1 , 𝑥2 ).
We wish to compute the Euclidean distance from 𝑋 to a given point u = (𝑢 1 , 𝑢 2 ) ∈ R2 . To
this end, we form the augmented Jacobian matrix. This matrix is square of size 2 × 2:
 
𝑥1 − 𝑢1 𝑥2 − 𝑢2
AJ = . (2.2)
𝜕 𝑓 /𝜕𝑥1 𝜕 𝑓 /𝜕𝑥 2

We get the critical ideal from 𝑓 and the determinant of A J by performing a saturation step:

C𝑋,u = ⟨ 𝑓 , det(A J ) ⟩ : ⟨ 𝜕 𝑓 /𝜕𝑥1 , 𝜕 𝑓 /𝜕𝑥 2 ⟩ ∞ . (2.3)

The ideal C𝑋,u lives in R[𝑥 1 , 𝑥2 ]. See [52, Section 4.4] for saturation and other ideal
operations. Frequently, the coefficients of 𝑓 and the coordinates of u are rational numbers,
and we can perform the computation purely symbolically in Q[𝑥1 , 𝑥2 ]. The saturation step
in (2.3) removes points that are singular on the curve 𝑋 = 𝑉 ( 𝑓 ). If 𝑋 is smooth then
saturation is unnecessary, and we simply have C𝑋,u = ⟨ 𝑓 , det(A J ) ⟩. On the other hand,
if 𝑋 has singular points, then we must saturate. For a concrete example take the cardioid

𝑓 = (𝑥12 + 𝑥 22 + 𝑥2 ) 2 − (𝑥12 + 𝑥22 ), (2.4)

and fix a random point u = (𝑢 1 , 𝑢 2 ). The ideal ⟨ 𝑓 , det(A J ) ⟩ is the intersection of C𝑋,u
and an ⟨𝑥1 , 𝑥2 ⟩-primary ideal of multiplicity 3. The critical ideal C𝑋,u has three distinct
complex zeros. We can express their coordinates in radicals in the given numbers 𝑢 1 , 𝑢 2 .
The following code computes the degree of the critical ideal C𝑋,u of the cardioid 𝑋 for
the data point u = (2, 1). The code is written for the software Macaulay2 [73].
R = QQ[x1, x2];
u1 = 2; u2 = 1;
f = (x1^2 + x2^2 + x2)^2 - (x1^2 + x2^2);
AJ = matrix {{x1- u1, x2 - u2}, {diff(x1, f), diff(x2, f)}};
I = ideal {f, det AJ};
C = saturate(I, ideal {diff(x1, f), diff(x2, f)});
degree C

Saturation of ideals is discussed in Chapter 3. See (3.1) for the definition of saturation. ⋄

The variety 𝑉 (C𝑋,u ) is the set of complex critical points for the ED problem (2.1). For
a random data point u, this variety is a finite subset of C𝑛 , and it contains the optimal
solution x∗ , provided the latter is attained at a smooth point of 𝑋. It was proved in [60] that
the number of critical points, i.e. the cardinality of the variety 𝑉 (C𝑋,u ), is independent of
u, provided we assume that the data point u is sufficiently general. See also Example 3.20.
2.1 Euclidean Distance Degree 15

Definition 2.2 The Euclidean distance degree (ED degree) of the variety 𝑋 is the number
of complex points in the variety 𝑉 (C𝑋,u ), for generic data points u. We write this as

EDdegree(𝑋) := # 𝑉 (C𝑋,u ).

In Example 2.1 we examined a quartic curve whose ED degree equals 3. The ED degree of
a variety 𝑋 measures the difficulty of solving the ED problem (2.1) using exact algebraic
methods. The ED degree is an important complexity measure in metric algebraic geometry.
Example 2.3 (Space curves) Fix 𝑛 = 3 and let 𝑋 be the curve in R3 defined by two general
polynomials 𝑓1 and 𝑓2 of degrees 𝑑1 and 𝑑2 in three unknowns 𝑥1 , 𝑥2 , 𝑥3 . The augmented
Jacobian matrix has format 3 × 3, and we compute it as follows:
 𝑥1 − 𝑢1 𝑥2 − 𝑢2 𝑥3 − 𝑢 3 

AJ = 𝜕 𝑓1 /𝜕𝑥 1 𝜕 𝑓1 /𝜕𝑥2 𝜕 𝑓1 /𝜕𝑥3  . (2.5)

𝜕 𝑓2 /𝜕𝑥1 𝜕 𝑓2 /𝜕𝑥2 𝜕 𝑓2 /𝜕𝑥3 

Fix a general data vector u ∈ R3 . Then the critical ideal equals C𝑋,u = 𝑓1 , 𝑓2 , det(A J ) .
Hence, the set of critical points is the intersection of three surfaces. These surfaces have
degrees 𝑑1 , 𝑑2 and 𝑑1 + 𝑑2 − 1. By Bézout’s Theorem [133, Theorem 2.16], the expected
number of complex solutions to the critical equations is the product of these degrees.
Hence, the ED degree of the curve 𝑋 equals 𝑑1 𝑑2 (𝑑1 + 𝑑2 − 1).
The same formula can be derived from a formula for general curves in terms of algebraic
geometry data. Let 𝑋 be a general smooth curve of degree 𝑑 and genus 𝑔 in any ambient
space R𝑛 . By [60, Corollary 5.9], we have EDdegree(𝑋) = 3𝑑 + 2𝑔 − 2. Our curve in
3-space has degree 𝑑 = 𝑑1 𝑑2 and genus 𝑔 = 𝑑12 𝑑2 /2 + 𝑑1 𝑑22 /2 − 2𝑑1 𝑑2 + 1. We conclude that

EDdegree(𝑋) = 3𝑑 + 2𝑔 − 2 = 𝑑1 𝑑2 (𝑑1 + 𝑑2 − 1).

This formula also covers the case of plane curves (cf. Example 2.1). Namely, if we set 𝑑1 = 𝑑
and 𝑑2 = 1 then we see that a general plane curve 𝑋 of degree 𝑑 has EDdegree(𝑋) = 𝑑 2 .
In particular, a general plane quartic has ED degree 16. However, that number can drop a
lot for curves that are special. For the cardioid in (2.4) the ED degree drops from 16 to 3.⋄
Here is a general upper bound on the ED degree in terms of the given polynomials.
Proposition 2.4 Let 𝑋 be a variety of codimension 𝑐 in R𝑛 whose ideal 𝐼 𝑋 is generated by
polynomials 𝑓1 , 𝑓2 , . . . , 𝑓𝑐 , . . . , 𝑓 𝑘 of degrees 𝑑1 ≥ 𝑑2 ≥ · · · ≥ 𝑑 𝑐 ≥ · · · ≥ 𝑑 𝑘 . Then
∑︁
EDdegree(𝑋) ≤ 𝑑1 𝑑2 · · · 𝑑 𝑐 · (𝑑1 − 1) 𝑖1 (𝑑2 − 1) 𝑖2 · · · (𝑑 𝑐 − 1) 𝑖𝑐 . (2.6)
𝑖1 +𝑖2 +···+𝑖𝑐 ≤𝑛−𝑐

Equality holds when 𝑋 is a generic complete intersection of codimension 𝑐 (hence 𝑐 = 𝑘).


Proof This appears in [60, Proposition 2.6]. We can derive it as follows. Bézout’s Theorem
ensures that the degree of the variety 𝑋 is at most 𝑑1 𝑑2 · · · 𝑑 𝑐 . The entries in the 𝑖th row
of the matrix A J are polynomials of degrees 𝑑𝑖−1 − 1. The degree of the variety of
(𝑐 + 1) × (𝑐 + 1) minors of A J is at most the sum in (2.6). This follows from the
16 2 Critical Equations

Giambelli–Thom–Porteous formula, which expresses the degree of a determinantal variety


in terms of symmetric functions. The intersection of that determinantal variety with 𝑋 is
our set of critical points. The cardinality of that set is at most the product of the two degrees.
Generically, that intersection is a complete intersection and equality holds in (2.6). □
Formulas and bounds for the ED degree are important when studying exact solutions
to the optimization problem (2.1). The paradigm is to compute all complex critical points,
by either symbolic or numerical methods (cf. Chapter 3), and to then extract one’s favorite
real solutions among these. This reveals all local minima in (2.1). The ED degree is an
upper bound on the number of real critical points, but this bound is generally not tight.

Fig. 2.1: ED problems on the Trott curve: configurations of eight (left) or ten (right) critical real points.
Data points are yellow, local minimal are green, and local maxima are red. The coordinates of the critical
points are computed by solving the critical equations in (2.8).

Example 2.5 Consider the case 𝑛 = 2, 𝑐 = 1, 𝑑1 = 4 in Proposition 2.4, where 𝑋 is a generic


quartic curve in the plane R2 . The number of complex critical points is EDdegree(𝑋) = 16.
But, they cannot be all real. For an illustration, consider the Trott curve 𝑋 = 𝑉 ( 𝑓 ), given by

𝑓 = 144(𝑥14 + 𝑥24 ) − 225(𝑥 12 + 𝑥22 ) + 350𝑥12 𝑥22 + 81. (2.7)

This curve is shown in Figure 2.1. Given data u = (𝑢 1 , 𝑢 2 ) in R2 , the critical equations are

𝜕𝑓 𝜕𝑓
(𝑥1 − 𝑢 1 ) − (𝑥 2 − 𝑢 2 ) = 0 = 𝑓. (2.8)
𝜕𝑥2 𝜕𝑥1
Assuming u to be a general point, these two quartic equations have 16 distinct complex
solutions, and these are all critical points in 𝑋. Since the Trott curve is smooth, the saturation
step in (2.3) is not needed when computing the ideal C𝑋,u .
The ED degree 16 is an upper bound for the number of real critical points of the
optimization problem (2.1) on the Trott curve 𝑋 for any data point u. The actual number of
real critical points depends heavily on the specific location of u. For data u near the origin,
2.1 Euclidean Distance Degree 17

eight of the 16 points in 𝑉 (C𝑋,u ) are real. For u = 87 , 100


1

, which is inside the rightmost
oval, there are 10 real critical points. The two scenarios are shown in Figure 2.1. Local
1
minima are green, while local maxima are red. Finally, consider u = (2, 100 ), which lies to
the right of the rightmost oval. Here, the number of real critical points is 12. ⋄
In general, our task is to compute the complex zeros of the critical ideal 𝐶𝑋,u . Algorithms
for this computation can be either symbolic or numerical. Symbolic methods usually rest
on the construction of a Gröbner basis, to be followed by a floating point computation
to extract the solutions. In recent years, numerical methods have become popular. These
are based on homotopy continuation. We explain how homotopy continuation works in
Chapter 3. That chapter will be devoted to computations.
Example 2.6 Let us revisit the cardioid from Example 2.1. For u = (2, 1) we compute the
three critical points using the Julia [20] software HomotopyContinuation.jl [31].
using HomotopyContinuation, LinearAlgebra
@var x1 x2
u1 = 2; u2 = 1;
f = (x1^2 + x2^2 + x2)^2 - (x1^2 + x2^2);
AJ = [[x1 - u1; x2 - u2] differentiate(f, [x1; x2])];
solve([f; det(AJ)]) ⋄
We next illustrate current capabilities.
Example 2.7 Suppose 𝑋 is defined by 𝑐 = 𝑘 = 3 random polynomials in 𝑛 = 7 variables,
of degrees 𝑑1 , 𝑑2 , 𝑑3 . The table below lists the ED degree in each case, and the times used
by HomotopyContinuation.jl to compute and certify all critical points in C7 .

𝑑1 𝑑2 𝑑3 322 332 333 422 432 433 442 443


EDdegree 1188 3618 9477 4176 10152 23220 23392 49872
Solve (sec) 3.849 21.06 61.51 31.51 103.5 280.0 351.5 859.3
Certify (sec) 0.390 1.549 4.653 2.762 7.591 17.16 21.65 50.07

These ED degrees can be checked with Proposition 2.4. In our computation, the critical
ideal 𝐶𝑋,u represents a system of 10 equations in 10 variables. In addition to the three
equations 𝑓1 = 𝑓2 = 𝑓3 = 0 in the 7 variables 𝑥1 , . . . , 𝑥 7 , we take the seven equations

(1, 𝑦 1 , 𝑦 2 , 𝑦 3 ) · A J = 0.

In these equations, 𝑦 1 , 𝑦 2 , 𝑦 3 are new variables. The three additional equations ensure
 that
the 4 × 7 matrix A J has rank ≤ 3. This formulation avoids the listing of all 74 = 35
maximal minors. It is the preferred representation of determinantal varieties in the setting
of numerical algebraic geometry.
The timings above refer to computing all complex solutions to the system of 10 equa-
tions in 10 variables. They include the certification step, as described in [30], which
proves correctness and completeness. These computations were performed with the soft-
ware HomotopyContinuation.jl [31] on a 16 GB MacBook Pro with an Intel Core i7
processor working at 2.6 GHz. They suggest that our critical equations can be solved fast
and reliably, with proof of correctness, when the ED degree is less than 50000. ⋄
18 2 Critical Equations

We now introduce an alternative version of the ED degree by using a different metric.


We fix a weight vector Λ = (𝜆1 , . . . , 𝜆 𝑛 ) ∈ R𝑛 whose entries are positive real numbers.
The weighted Euclidean metric is
𝑛
∑︁
||x|| 2Λ := 𝜆𝑖 x2𝑖 .
𝑖=1

If Λ is the all-one vector, then we obtain the usual Euclidean metric. For arbitrary Λ, we
consider the analogue of the optimization problem (2.1):
𝑛
∑︁
2
minimize ∥x − u∥ Λ = 𝜆𝑖 (𝑥𝑖 − 𝑢 𝑖 ) 2 subject to x = (𝑥1 , . . . , 𝑥 𝑛 ) ∈ 𝑋. (2.9)
𝑖=1

Let u ∈ R𝑛 . We obtain the Λ-augmented Jacobian matrix A J Λ ∈ R (𝑘+1)×𝑛 by placing


the row vector (𝜆1 (𝑥1 − 𝑢 1 ), . . . , 𝜆 𝑛 (𝑥 𝑛 − 𝑢 𝑛 )) atop the Jacobian matrix J . The critical
ideal of the optimization problem (2.9) is then C𝑋,u Λ = 𝐼 : 𝐽 ∞ , where 𝐼 is generated by the

(𝑐 + 1) × (𝑐 + 1) minors of A J Λ together with the generators of 𝐼 𝑋 , and 𝐽 is the ideal


of 𝑐 × 𝑐 minors of J . This leads to the following definition.

Definition 2.8 Let 𝑋 ⊂ R𝑛 be a real variety, let Λ = (𝜆1 , . . . , 𝜆 𝑛 ) have positive entries, and
let u ∈ R𝑛 be a general point. The Λ-weighted Euclidean distance degree of the variety 𝑋
is the number of points in the variety 𝑉 (C𝑋,uΛ ). For general weights Λ, this number is

independent of Λ, and we call it the generic Euclidean distance degree of 𝑋, denoted


Λ
EDdegreegen (𝑋) := #𝑉 (C𝑋,u ).

We will discuss the generic ED degree for a class of matrix problems in the next section.

2.2 Low-Rank Matrix Approximation

A specific instance of the ED problem (2.1) arises when considering varieties of matrices
of low rank that are constrained to have a special structure. Sometimes these matrices are
flattenings of tensors. This version of the problem was studied in the article [142], which
focuses on Hankel matrices, Sylvester matrices and generic subspaces of matrices, and
which uses a weighted version of the Euclidean metric. In this section, we offer a brief
introduction to this special case of our general ED problem. Our point of departure is the
following low-rank approximation problem for rectangular matrices:
𝑚 ∑︁
∑︁ 𝑛
minimize || 𝐴 − 𝑈 || 2 = (𝑎 𝑖 𝑗 − 𝑢 𝑖 𝑗 ) 2 subject to rank( 𝐴) ≤ 𝑟. (2.10)
𝑖=1 𝑗=1

In this problem, we are given a real data matrix 𝑈 = (𝑢 𝑖 𝑗 ) of format 𝑚 × 𝑛, where 𝑚 ≤ 𝑛,


and we wish to find a real matrix 𝐴 = (𝑎 𝑖 𝑗 ) of rank at most 𝑟 that is closest to 𝑈. The
2.2 Low-Rank Matrix Approximation 19

Euclidean norm on the space of matrices is sometimes called the Frobenius norm. We can
write this as ∥ 𝐴∥ 2 = Trace( 𝐴⊤ 𝐴). Indeed, if a1 , . . . , a𝑛 denote the columns of 𝐴, then the
diagonal entries of 𝐴⊤ 𝐴 are ⟨a𝑖 , a𝑖 ⟩ for 𝑖 = 1, . . . , 𝑛. This implies
𝑛
∑︁ 𝑛 ∑︁
∑︁ 𝑚
Trace( 𝐴⊤ 𝐴) = ⟨a𝑖 , a𝑖 ⟩ = 𝑎 𝑖2𝑗 = ∥ 𝐴∥ 2 .
𝑖=1 𝑖=1 𝑗=1

The solution to (2.10) is given by the singular value decomposition

𝑈 = 𝑇1 · diag(𝜎1 , 𝜎2 , . . . , 𝜎𝑚 ) · 𝑇2 .

Here 𝑇1 and 𝑇2 are orthogonal matrices, and the real numbers in the diagonal matrix satisfy
𝜎1 ≥ 𝜎2 ≥ · · · ≥ 𝜎𝑚 ≥ 0. These are the singular values of 𝑈. The following well-known
theorem from numerical linear algebra concerns the variety of 𝑚 × 𝑛 matrices of rank ≤ 𝑟.

Theorem 2.9 (Eckart–Young) The closest matrix of rank ≤ 𝑟 to the given matrix 𝑈 equals

𝑈 ∗ = 𝑇1 · diag(𝜎1 , . . . , 𝜎𝑟 , 0, . . . , 0) · 𝑇2 . (2.11)

It is the unique local minimum for generic 𝑈. All complex critical points are real. They are
found by substituting zeros for 𝑚−𝑟 entries of diag(𝜎1 , . . . , 𝜎𝑚 ). Thus, EDdegree(𝑋) = 𝑚
𝑟 .

We present a complete proof of the Eckart–Young Theorem in Section 9.2.


In structured low-rank approximation, we are given a linear subspace L ⊂ R𝑚×𝑛 , and
a data matrix 𝑈 ∈ L, and we wish to solve the following restricted optimization problem:
𝑚 ∑︁
∑︁ 𝑛
minimize || 𝐴 − 𝑈 || 2 = (𝑎 𝑖 𝑗 − 𝑢 𝑖 𝑗 ) 2 subject to 𝐴 ∈ L and rank( 𝐴) ≤ 𝑟. (2.12)
𝑖=1 𝑗=1

A best-case scenario would be the following: if 𝑈 lies in L then so does the SVD solution 𝑈 ∗
in (2.11). This happens for some linear subspaces L, including symmetric and circulant
matrices. However, most subspaces L of R𝑚×𝑛 do not enjoy this property, and finding the
global optimum in (2.12) can be quite difficult. Our discussion follows the article [142],
which studies this optimization problem for both generic and special subspaces L.
We consider structured low-rank approximation using a weighted Euclidean metric. Our
primary task is to compute the number of complex critical points of (2.12). Thus, we seek
to find the Euclidean distance degree (ED degree) of the determinantal variety

L ≤𝑟 := 𝐴 ∈ L | rank( 𝐴) ≤ 𝑟 ⊂ R𝑚×𝑛 .

We use a Λ-weighted Euclidean distance coming from the ambient matrix space R𝑚×𝑛 . We
write EDdegreeΛ (L ≤𝑟 ) for the Λ-weighted Euclidean distance degree of the variety L ≤𝑟
(see Definition 2.8). The importance of the weights Λ is highlighted in [60, Example 3.2],
for the seemingly harmless situation when L is the space of all symmetric matrices in R𝑛×𝑛 .
Of special interest are the usual Euclidean distance degree, denoted by EDdegree(L ≤𝑟 ),
when Λ = 1 is the all-one matrix, and the generic ED degree EDdegreegen (L ≤𝑟 ), when
20 2 Critical Equations

the weight matrix Λ is generic. The generic ED degree is given by a formula that rests
on intersection theory. See [60, Theorem 7.7] and Theorem 2.13 below. Indeed, choosing
the weights 𝜆𝑖 𝑗 to be generic ensures that the projective closure of L ≤𝑟 has transversal
Í𝑚 Í
intersection with the isotropic quadric { 𝐴 ∈ P𝑚𝑛−1 | 𝑖=1 𝑛 2
𝑗=1 𝜆 𝑖 𝑗 𝑎 𝑖 𝑗 = 0 }.
We next present illustrations for the concepts above. These can also serve as examples
for Theorem 2.13 below, as seen by the Macaulay2 [73] calculation in Example 2.22.

Example 2.10 Let 𝑚 = 𝑛 = 3 and L ⊂ R3×3 the 5-dimensional space of Hankel matrices:

𝑎 0 𝑎 1 𝑎 2  𝑢 0 𝑢 1 𝑢 2  𝜆0 𝜆1 𝜆2 
     
𝐴 = 𝑎 1 𝑎 2 𝑎 3  ,
 𝑈 = 𝑢 1 𝑢 2 𝑢 3  ,
  and Λ = 𝜆1 𝜆2 𝜆3  .

𝑎 2 𝑎 3 𝑎 4  𝑢 2 𝑢 3 𝑢 4 
𝜆2 𝜆3 𝜆4 
 
   
Our goal is to solve the following constrained optimization problem for 𝑟 = 1 and 𝑟 = 2:

minimize 𝜆0 (𝑎 0 − 𝑢 0 ) 2 + 2𝜆1 (𝑎 1 − 𝑢 1 ) 2 + 3𝜆 2 (𝑎 2 − 𝑢 2 ) 2 + 2𝜆3 (𝑎 3 − 𝑢 3 ) 2 + 𝜆4 (𝑎 4 − 𝑢 4 ) 2


subject to rank( 𝐴) ≤ 𝑟.

This can be rephrased as an unconstrained optimization problem. For instance, for rank
𝑟 = 1, we get a one-to-one parametrization of L ≤1 by setting 𝑎 𝑖 = 𝑠𝑡 𝑖 for 𝑖 = 0, 1, 2, 3, 4.
Our optimization problem is then as follows:

minimize 𝜆0 (𝑠 − 𝑢 0 ) 2 + 2𝜆1 (𝑠𝑡 − 𝑢 1 ) 2 + 3𝜆2 (𝑠𝑡 2 − 𝑢 2 ) 2 + 2𝜆3 (𝑠𝑡 3 − 𝑢 3 ) 2 + 𝜆4 (𝑠𝑡 4 − 𝑢 4 ) 2 .

The ED degree is the number of critical points in this unconstrained minimization problem,
where we require 𝑡 ≠ 0. We consider this problem for three weight matrices:
1 1 1
 1 1/2 1/3
  1 2 2
   
1 = 1 1 1 , Ω = 1/2 1/3 1/2 ,
 Θ = 2 2 2 .
1 1 1
  1/3 1/2 1  2 2 1
   
Here Ω gives the usual Euclidean metric when L is identified with R5 . The last weight
matrix Θ arises from identifying L with the space of symmetric 2 × 2 × 2 × 2-tensors; see
Chapter 12 for a study of metrics in the space of tensors. We compute

EDdegree1 (L ≤1 ) = 6, EDdegreeΩ (L ≤1 ) = 10, EDdegreeΘ (L ≤1 ) = 4,


EDdegree1 (L ≤2 ) = 9, EDdegreeΩ (L ≤2 ) = 13, EDdegreeΘ (L ≤2 ) = 7.

In both cases, Ω exhibits the generic behavior, so we have

EDdegreegen (L ≤𝑟 ) = EDdegreeΩ (L ≤𝑟 ).

See [142, Sections 3 and 4] for larger Hankel matrices and formulas for their ED degrees.⋄

Remark 2.11 The distance given by the above weight matrix Θ yields the Bombieri–Weyl
distance. This plays an important role in our study of condition numbers in Chapter 9.
2.2 Low-Rank Matrix Approximation 21

Example 2.12 Let 𝑚 = 𝑛 = 3, 𝑟 = 1 and L = R3×3 . Thus, we consider the weighted rank-
one approximation problem for 3 × 3-matrices. We know that EDdegreegen (L ≤1 ) = 39;
see [60, Example 7.10]. We take a circulant data matrix and a circulant weight matrix:
−59 11 59  9 6 1
   
𝑈 =  11 59 −59  and Λ = 6 1 9 .
 59 −59 11 
1 9 6
 
 
This instance has 39 complex critical points. Of these, 19 are real, and 7 are local minima:

 0.0826 2.7921 −1.5452  −52.2007 28.8890−1.5452 −52.2007 2.7921 94.3235


     
 2.7921 94.3235−52.2007 ,  2.7921 −1.5452 0.0826 ,  28.8890−1.5452−52.2007 ,
     
−1.5452−52.2007 28.8890  94.3235−52.2007 2.7921  −1.5452 0.0826 2.7921 
     

−29.8794 36.2165−27.2599 −48.1160 36.2165 39.6968 −29.8794−32.7508 39.6968


     
−32.7508 39.6968−29.8794 ,  36.2165−27.2599−29.8794 ,  36.2165 39.6968−48.1160 ,
     
 39.6968−48.1160 36.2165  39.6968−29.8794−32.7508 −27.2599−29.8794 36.2165
     
" #
−25.375 −25.375 −25.375
−25.375 −25.375 −25.375 .
−25.375 −25.375 −25.375
The first three are the global minima in our ED distance problem. The last matrix is the
local minimum where the objective function has the largest value: note that each entry
equals −203/8. The entries of the first six matrices are algebraic numbers of degree 10
over Q. For instance, the two upper left entries 0.0826 and −48.1160 are among the four
real roots of the irreducible polynomial

164466028468224𝑥 10 + 27858648335954688𝑥 9 + 1602205386689376672𝑥 8


+ 7285836260028875412𝑥 7 − 2198728936046680414272𝑥 6
− 14854532690380098143152𝑥 5 + 2688673091228371095762316𝑥 4
+ 44612094455115888622678587𝑥 3 − 41350080445712457319337106𝑥 2
+ 27039129499043116889674775𝑥 − 1977632463563766878765625.

Here, the critical ideal in Q[𝑥11 , 𝑥12 , . . . , 𝑥 33 ] is not prime. A computation in Macaulay2
reveals that it is the intersection of six maximal ideals. The degrees of these maximal ideals
over Q are 1, 2, 6, 10, 10, 10. The sum of these numbers equals 39 = EDdegreegen (L ≤1 ).⋄

Explicit formulas are derived in [142, Section 3] for EDdegreegen (L ≤𝑟 ) when L is a


generic subspace of R𝑚×𝑛 . This covers the four cases that arise by pairing affine subspaces
or linear subspaces with either unit weights or generic weights. One important feature of
determinantal varieties is that they are not complete intersections. This fact implies that
their ED degrees are much smaller than suggested by the upper bound in Proposition 2.4.
22 2 Critical Equations

2.3 Invitation to Polar Degrees

We have introduced the ED degree of an algebraic variety 𝑋 as a complexity measure for


the ED problem in (2.1). The number 39 in the previous example served as an illustration
on how the ED degree controls the number of critical points. But a deeper understanding
is needed. In this section, we develop the algebro-geometric roots of the ED degree, which
will then yield more advanced algorithms for finding it. Here is a key result for this:
Theorem 2.13 If the given variety 𝑋 meets both the hyperplane at infinity and the isotropic
quadric transversally, then EDdegree(𝑋) equals the sum of the polar degrees of the pro-
jective closure of 𝑋.
This theorem appears in [60, Proposition 6.10]. The hypothesis of the theorem is satisfied
for all varieties 𝑋 in R𝑛 after a general linear change of coordinates. This implies the
following result for EDdegreegen (𝑋), which is the quantity introduced in Definition 2.8.
Corollary 2.14 The generic ED degree of a variety is the sum of the polar degrees of its
projective closure.
We shall explain all the terms used in Theorem 2.13. First of all, the projective closure of
our affine real variety 𝑋 ⊂ C𝑛 is its Zariski closure in complex projective space P𝑛 , which
we also denote by 𝑋. Algebraically, P𝑛 is obtained from C𝑛 by adding one homogenizing
coordinate 𝑥 0 . We identify the affine space C𝑛 with the open subset {x ∈ P𝑛 | 𝑥0 ≠ 0}.
Its set complement {x ∈ P𝑛 | 𝑥0 = 0} ≃ P𝑛−1 is the hyperplane at infinity inside P𝑛 .
Í𝑛 2
The hypersurface {x ∈ P𝑛−1 | 𝑖=1 𝑥𝑖 = 0} is called the isotropic quadric. It lives in the
hyperplane at infinity and it has no real points. The hypothesis in Theorem 2.13 means that
the intersection of 𝑋 with these two loci is reduced and has the expected dimension.
If we are given a real projective variety 𝑋 in P𝑛 from the start, then we also consider
the ED problem for its affine cone in R𝑛+1 . For this problem, the data vector has 𝑛 + 1
coordinates, say u = (𝑢 0 , 𝑢 1 , . . . , 𝑢 𝑛 ). The augmented Jacobian A J is now redefined so
as to respect the fact that all polynomials are homogeneous. The general formula for this
matrix and the homogeneous critical ideal appear in [60, Equation (2.7)].
For a curve 𝑋 ⊂ P2 with defining polynomial 𝑓 (𝑥0 , 𝑥1 , 𝑥2 ), we use the 3 × 3 matrix

 𝑢0 𝑢1 𝑢 2 

A J =  𝑥0
 𝑥1 𝑥2  .
𝜕 𝑓 /𝜕𝑥0 𝜕 𝑓 /𝜕𝑥 1 𝜕 𝑓 /𝜕𝑥2 
 
The homogeneous critical ideal in R[𝑥0 , 𝑥1 , 𝑥2 ] is computed as follows:
∞
C𝑋,u = 𝑓 , det(A J ) : ⟨𝜕 𝑓 /𝜕𝑥0 , 𝜕 𝑓 /𝜕𝑥1 , 𝜕 𝑓 /𝜕𝑥2 ⟩ · (𝑥 12 + 𝑥22 ) . (2.13)

The critical points are given by the variety 𝑉 (C𝑋,u ) in the complex projective plane P2 .
The cardinality of this variety equals EDdegree(𝑋). The factor (𝑥 12 + 𝑥22 ) in the saturation
step (2.13) is the isotropic quadric. It is needed whenever the hypothesis of Theorem
2.13 is not satisfied. Namely, it removes any extraneous component that may arise from
non-transversal intersection of the projective curve 𝑋 with the isotropic quadric.
2.3 Invitation to Polar Degrees 23

Example 2.15 (Cardioid) We consider the homogeneous version of the cardioid that was
studied in Example 2.1. This is the curve 𝑋 = 𝑉 ( 𝑓 ) in P2 defined by

𝑓 = (𝑥12 + 𝑥22 + 𝑥 0 𝑥2 ) 2 − 𝑥02 (𝑥12 + 𝑥22 ). (2.14)

This curve has three singular points, namely that at the origin 𝑉 (𝑥 1 , 𝑥2 ) in the affine plane
C2 = {𝑥0 ≠ 0} and the two points in the isotropic quadric 𝑉 (𝑥12 + 𝑥22 ) in P1 = {𝑥0 = 0}.
The homogeneous critical ideal C𝑋,u is generated by three cubics, and it defines seven
points in P2 . Hence the projective cardioid 𝑋 has EDdegree(𝑋) = 7. This is also the ED
degree of the affine cardioid in (2.4) but only after a linear change of coordinates. We note
that even a modest change of coordinates can have a dramatic impact on the ED degree.
For instance, if we replace 𝑥1 by 2𝑥1 in (2.4) then the ED degree jumps from 3 to 7. ⋄
We next define the polar degrees of a projective variety 𝑋 ⊂ P𝑛 . Other definitions and
many more details are given in Chapter 4. Recall that points in the dual projective space
(P𝑛 ) ∗ represent hyperplanes in the primal space P𝑛 . The Euclidean bilinear form ⟨·, ·⟩ is
non-degenerate. Therefore, we can use it to identify P𝑛 and its dual space. To be precise,
the point h ∈ P𝑛 represents the hyperplane { x ∈ P𝑛 | ⟨h, x⟩ = ℎ0 𝑥0 + · · · + ℎ 𝑛 𝑥 𝑛 = 0 }.
Definition 2.16 The conormal variety 𝑁 𝑋 ⊂ P𝑛 × P𝑛 is the Zariski closure of the set of all
pairs (x, h) of points in P𝑛 × P𝑛 such that x is a nonsingular point of 𝑋 and h represents a
hyperplane that is tangent to 𝑋 at x.
It is known that the conormal variety 𝑁 𝑋 has dimension 𝑛 − 1, and if 𝑋 is irreducible then
so is 𝑁 𝑋 . The image of 𝑁 𝑋 under projection onto the second factor is the dual variety 𝑋 ∨ ;
see Section 4.2. If 𝑋 is a curve in the plane P2 , then this yields the definition of dual curve
from (1.7). The role of x and h in the definition of the conormal variety can be swapped.
Theorem 4.11 from Chapter 4 implies that the following biduality relations hold:

𝑁 𝑋 = 𝑁 𝑋∨ and (𝑋 ∨ ) ∨ = 𝑋. (2.15)

The conormal variety is an object of algebraic geometry that offers the theoretical founda-
tions for various aspects of duality in optimization, including primal-dual algorithms.
Example 2.17 For a plane curve 𝑋 = 𝑉 ( 𝑓 ) in P2 , the conormal variety 𝑁 𝑋 is a curve
in P2 × P2 . Its ideal is derived from the ideal that is generated by 𝑓 and the 2 × 2 minors of
 
ℎ0 ℎ1 ℎ2
.
𝜕 𝑓 /𝜕𝑥0 𝜕 𝑓 /𝜕𝑥 1 𝜕 𝑓 /𝜕𝑥2

By saturation, as in (2.13), we remove singularities and points on the isotropic quadric.


The result is the bihomogeneous prime ideal in R[𝑥0 , 𝑥1 , 𝑥2 , ℎ0 , ℎ1 , ℎ2 ] which defines 𝑁 𝑋 .
The equation of the dual curve 𝑋 ∨ is obtained from this ideal by eliminating 𝑥0 , 𝑥1 , 𝑥2 .
For instance, if 𝑋 is the homogeneous cardioid in (2.14) then its dual 𝑋 ∨ is the cubic
curve defined by 16ℎ30 − 27ℎ0 ℎ12 − 24ℎ20 ℎ2 − 15ℎ0 ℎ22 − 2ℎ23 . The ideal of the conormal
curve 𝑁 𝑋 has ten minimal generators. In addition to the above generators of bidegrees
(4, 0) and (0, 3), we find the quadric 𝑥0 ℎ0 + 𝑥1 ℎ1 + 𝑥2 ℎ2 of bidegree (1, 1), three cubics of
bidegree (2, 1) like 𝑥12 ℎ1 − 3𝑥 22 ℎ1 − 𝑥0 𝑥 1 ℎ2 + 4𝑥1 𝑥2 ℎ2 , and four cubics of bidegree (1, 2).⋄
24 2 Critical Equations

We now finally come to the polar degrees. The product of two projective spaces P𝑛 ×P𝑛
serves as the ambient space for our primal-dual approach to the ED problem. We first
consider its cohomology ring:

𝐻 ∗ (P𝑛 ×P𝑛, Z) = Z[𝑠, 𝑡]/⟨𝑠 𝑛+1 , 𝑡 𝑛+1 ⟩.

The class of the conormal variety 𝑁 𝑋 in this cohomology ring is a binary form of degree
𝑛 + 1 = codim(𝑁 𝑋 ) whose coefficients are nonnegative integers:

[𝑁 𝑋 ] = 𝛿1 (𝑋)𝑠 𝑛 𝑡 + 𝛿2 (𝑋)𝑠 𝑛−1 𝑡 2 + 𝛿3 (𝑋)𝑠 𝑛−2 𝑡 3 + · · · + 𝛿 𝑛 (𝑋)𝑠𝑡 𝑛 . (2.16)

In Macaulay2 one uses the command multidegree to compute this binary form.

Definition 2.18 The coefficients 𝛿𝑖 (𝑋) in (2.16) are called the polar degrees of 𝑋.

Remark 2.19 The polar degrees satisfy 𝛿𝑖 (𝑋) = #(𝑁 𝑋 ∩ (𝐿 × 𝐿 ′)), where 𝐿 ⊂ P𝑛 and
𝐿 ′ ⊂ P𝑛 are general linear subspaces of dimensions 𝑛 + 1 −𝑖 and 𝑖 respectively. We will see
this in Chapter 4. This geometric interpretation implies that 𝛿𝑖 (𝑋) = 0 for 𝑖 < codim(𝑋 ∨ )
and for 𝑖 > dim(𝑋) + 1. Moreover, the first and last polar degree are the classical degrees:
(
degree(𝑋) for 𝑖 = dim(𝑋) + 1,
𝛿𝑖 (𝑋) = (2.17)

degree(𝑋 ) for 𝑖 = codim(𝑋 ∨ ).

Example 2.20 Let 𝑋 ⊂ P2 be the cardioid in (2.14). The ideal of the curve 𝑁 𝑋 ⊂ P2 × P2
was derived in Example 2.17. From this ideal we compute the cohomology class

[𝑁 𝑋 ] = degree(𝑋 ∨ ) · 𝑠2 𝑡 + degree(𝑋) · 𝑠𝑡 2 = 3 · 𝑠2 𝑡 + 4 · 𝑠𝑡 2 .

Thus the polar degrees of the cardioid are 3 and 4. Their sum 7 is the ED degree. ⋄

Example 2.21 Let 𝑋 be a general surface of degree 𝑑 in P3 . Its dual 𝑋 ∨ is a surface of


degree 𝑑 (𝑑 − 1) 2 in (P3 ) ∗ . The conormal variety 𝑁 𝑋 is a surface in P3 × (P3 ) ∗ , with class

[𝑁 𝑋 ] = 𝑑 (𝑑 − 1) 2 𝑠3 𝑡 + 𝑑 (𝑑 − 1) 𝑠2 𝑡 2 + 𝑑 𝑠𝑡 3 .

The sum of the three polar degrees is EDdegree(𝑋) = 𝑑 3 − 𝑑 2 + 𝑑; see Proposition 2.4. ⋄

Theorem 2.13 allows us to compute the ED degree for many interesting varieties,
e.g. using Chern classes [60, Theorem 5.8]. This is relevant for many applications, including
those in machine learning, our topic in Chapter 10. Frequently, these applications involve
low-rank approximation of matrices and tensors with special structure [33, 142].
2
Example 2.22 (Determinantal varieties) Let 𝑋 = 𝑋𝑟 ⊂ P𝑚 −1 be the projective variety
of 𝑚 × 𝑚 matrices 𝑥 = (𝑥𝑖 𝑗 ) of rank ≤ 𝑟. We claim that its conormal variety 𝑁 𝑋 is cut out
by matrix equations (here, the product symbol · denotes the multiplication of matrices):
2 2
𝑁 𝑋 = (x, h) ∈ P𝑚 −1 × P𝑚 −1 | rank(x) ≤ 𝑟, rank(h) ≤ 𝑚 − 𝑟, x · h = 0 and h · x = 0 .

2.3 Invitation to Polar Degrees 25

This follows from Lemma 9.12 in Chapter 9. In particular, among determinantal varieties
the duality relation (𝑋𝑟 ) ∨ = 𝑋𝑚−𝑟 holds. We now type the above formula for 𝑁 𝑋 into
Macaulay2 [73], for 𝑟 = 1 and 𝑚 = 3. With this, we compute the polar degrees as follows:
QQ[x11,x12,x13,x21,x22,x23,x31,x32,x33,
h11,h12,h13,h21,h22,h23,h31,h32,h33,
Degrees=> {{1,0},{1,0},{1,0},{1,0},{1,0},{1,0},{1,0},{1,0},{1,0},
{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1}}];
x = matrix {{x11,x12,x13},{x21,x22,x23},{x31,x32,x33}};
h = matrix {{h11,h12,h13},{h21,h22,h23},{h31,h32,h33}};
I = minors(2,x) + minors(3,h) + minors(1,x*h) + minors(1,h*x);
isPrime(I), codim(I), degree I
multidegree(I)

The code starts with the bigraded coordinate ring of P8 × P8 . It verifies that 𝑁 𝑋 has
codimension 9 and that I is its prime ideal. The last command computes the polar degrees:

[𝑁 𝑋 ] = 3𝑠8 𝑡 + 6𝑠7 𝑡 2 + 12𝑠6 𝑡 3 + 12𝑠5 𝑡 4 + 6𝑠4 𝑡 5 . (2.18)

At this point, the reader may verify (2.17). Using Corollary 2.14, we conclude

EDdegreegen (𝑋1 ) = 3 + 6 + 12 + 12 + 6 = 39.

Indeed, after changing coordinates, the EDdegree for 3×3-matrices of rank 1 equals 39. We
saw this in Example 2.12, where 39 critical points were found by numerical computation.⋄
The primal-dual set-up of conormal varieties allows for a very elegant formulation of
the critical equations for the ED problem (2.1). This will be presented in the next theorem.
We now assume that 𝑋 is an irreducible variety defined by homogeneous polynomials in
𝑛 variables. We view 𝑋 as an affine cone in C𝑛 . Its dual 𝑌 = 𝑋 ∨ is the affine cone over
the dual of the projective variety given by 𝑋. Thus 𝑌 is also an affine cone in C𝑛 . In this
setting, the conormal variety 𝑁 𝑋 is viewed as an affine variety of dimension 𝑛 in C2𝑛 . The
homogeneous ideals of these cones are precisely the ideals we discussed above.
Theorem 2.23 The ED problems for 𝑋 and 𝑌 coincide: EDdegree(𝑋) = EDdegree(𝑌 ).
Given a general data point u ∈ R𝑛 , the critical equations for this ED problem are:

(x, h) ∈ 𝑁 𝑋 and x + h = u. (2.19)

Proof See [60, Theorem 5.2]. □


It is instructive to verify Theorem 2.23 for the low-rank variety in Example 2.22. For
any data matrix u of size 𝑚 × 𝑚, the sum in (2.19) is a special decomposition of u, namely
as a matrix x of rank 𝑟 plus a matrix h of rank 𝑚 − 𝑟. By the Eckart–Young Theorem 2.9,
this arises from zeroing out complementary singular values 𝜎𝑖 in the two matrices x and h.
In general, there is no free lunch, even with a simple formulation like (2.19). The
difficulty lies in computing the ideal of the conormal variety 𝑁 𝑋 . However, this should be
thought of as a preprocessing step, to be carried out only once per model 𝑋. If an efficient
presentation of 𝑁 𝑋 is available, then our task is to solve the system x + h = u of 𝑛 linear
equations in the 2𝑛 coordinates on 𝑁 𝑋 , now viewed as an 𝑛-dimensional affine variety.
26 2 Critical Equations

The discussion in this section was restricted to the Euclidean norm. But, we can measure
distances in R𝑛 with any other norm || · ||. Our optimization problem (2.1) extends naturally:

minimize ||x − u|| subject to x ∈ 𝑋. (2.20)

The unit ball 𝐵 = {x ∈ R𝑛 | ||x|| ≤ 1} in the chosen norm is a centrally symmetric convex
body. Conversely, every centrally symmetric convex body 𝐵 in R𝑛 defines a norm, and we
can paraphrase the previous optimization problem as follows:

minimize 𝜆 subject to 𝜆 ≥ 0 and (u + 𝜆𝐵) ∩ 𝑋 ≠ ∅.

We will meet minimization problems for unit balls that are polyhedra in Chapter 5.
If the boundary of the unit ball 𝐵 is smooth and algebraic then we can express the critical
equations for the corresponding norm as a polynomial system. This is derived as before,
but we now replace the first row of the augmented Jacobian matrix A J with the gradient
vector of the map R𝑛 → R, x ↦→ ||x − u|| 2 . In conclusion, this chapter was dedicated to
computing the minimal distance from a data point to a given variety for the Euclidean norm.
The algebraic machinery we developed can be applied to much more general scenarios.
For instance, Kubjas, Kuznetsova and Sodomaco [114] study this topic for p-norms.

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International
License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and
reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter’s Creative Commons
license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s
Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the
permitted use, you will need to obtain permission directly from the copyright holder.
Chapter 3
Computations

In this chapter, we study two computational approaches to solve a system of polynomial


equations. A system of 𝑚 polynomial equations in 𝑛 variables can be written in the form

𝑓1 (x)
𝐹 (x) := ­­ ... ®® = 0,
© ª

« 𝑓𝑚 (x) ¬
where
𝑓1 , . . . , 𝑓𝑚 ∈ C[x] := C[𝑥 1 , . . . , 𝑥 𝑛 ].
If 𝑛 = 𝑚, we call 𝐹 (x) a square system. If 𝑛 > 𝑚, then we call 𝐹 (x) underdetermined. If
𝑛 < 𝑚, we call 𝐹 (x) overdetermined. Here, we will mostly focus on square systems.

Example 3.1 The previous chapter considered constrained optimization problems of the
form minx∈R𝑛 :𝑔 (x)=0 𝑓 (x), where 𝑓 and 𝑔 are polynomials in 𝑛 variables x = (𝑥 1 , . . . , 𝑥 𝑛 ).
To solve this problem, one can compute the solutions of the critical equations

𝜕𝑓 𝜕𝑔 𝜕𝑓 𝜕𝑔
𝑔(x) = (x) + 𝜆 · (x) = · · · = (x) + 𝜆 · (x) = 0.
𝜕𝑥1 𝜕𝑥1 𝜕𝑥 𝑛 𝜕𝑥 𝑛
This is a square system in the 𝑛 + 1 variables (x, 𝜆), where 𝜆 is a Lagrange multiplier. ⋄

Solving the system 𝐹 (x) = 0 means that we compute all points z = (𝑧1 , . . . , 𝑧 𝑛 ) ∈ C𝑛
such that 𝐹 (z) = 0. The first step is to find an appropriate data structure to represent a so-
lution. In fact, 𝐹 (z) = 0 is already implicitly represented by its equation. Some information
can be read off from this representation. For instance, if 𝐹 has rational coefficients and we
know that 𝐹 (z) = 0 has only finitely many complex solutions, then each coordinate 𝑧 𝑖 of z
is an algebraic number. On the other hand, further information, like whether or not there is
a real solution z ∈ R𝑛 , is not directly accessible from this implicit representation.
Our aim in this chapter is to introduce two data structures for representing solutions of
systems of polynomial equations: the first is Gröbner bases and the second is approximate
zeros. Readers who are familiar with these concepts can skip ahead to the next chapter.

© The Author(s) 2024 27


P. Breiding et al., Metric Algebraic Geometry, Oberwolfach Seminars 53,
https://doi.org/10.1007/978-3-031-51462-3_3
28 3 Computations

Remark 3.2 In Chapter 2 we formulated critical equations for optimization problems like
the ED problem (2.1). In this chapter, we present methods for solving these equations.
The field of polynomial optimization rests on an alternative approach, namely one employs
relaxations based on moments and sums of squares, and these are solved using semidefinite
programming. We refer to the book [143] for an introduction to polynomial optimization.

3.1 Gröbner Bases

We use the notation x 𝛼 := 𝑥1𝛼1 · · · 𝑥 𝑛𝛼𝑛 for the monomial defined by the exponent vector
𝛼 = (𝛼1 , . . . , 𝛼𝑛 ) ∈ N𝑛 . We can identify monomials with their exponent vectors. A
monomial order > on C[x] is then defined by a total order > on N𝑛 that satisfies (1) if 𝛼 > 𝛽,
then 𝛼 + 𝛾 > 𝛽 + 𝛾 for every 𝛾 ∈ N𝑛 and (2) every non-empty subset of N𝑛 has a smallest
element under > (see, e.g., [52, Chapter 2 §2, Definition 1]).

Example 3.3 The Lex (Lexicographic) order on the set of monomials in 𝑛 variables is
defined by setting 𝛼 > 𝛽 if 𝛼 𝑗 − 𝛽 𝑗 > 0 for 𝛼, 𝛽 ∈ N𝑛 , where 𝑗 := min{𝑖 | 𝛼𝑖 ≠ 𝛽𝑖 } is the
first index where 𝛼 and 𝛽 are not equal. For instance, 𝑥12 𝑥2 > 𝑥1 𝑥2 𝑥33 . Intuitively speaking,
the Lex order views a polynomial 𝑓 ∈ C[x] as a polynomial in 𝑥1 with coefficients that are
polynomials in 𝑥2 , which has coefficients that are polynomials in 𝑥 3 , and so on. ⋄

A monomial order induces the notion of leading term. Let 𝑓 = 𝑐 𝛼 x 𝛼 + 𝑐 𝛽 x𝛽 + · · · + 𝑐 𝛾 x𝛾 ,


where 𝛼 > 𝛽 > · · · > 𝛾 and 𝑐 𝛼 ≠ 0. Then, the leading term of 𝑓 is LT( 𝑓 ) := 𝑐 𝛼 x 𝛼 . The
leading term ideal of an ideal 𝐼 in C[x] is defined as

LT(𝐼) := ⟨{LT( 𝑓 ) | 𝑓 ∈ 𝐼\{0}}⟩ .

Definition 3.4 (Gröbner basis) Fix an ideal 𝐼 ⊂ C[x] and a monomial order >. A finite
subset {𝑔1 , . . . , 𝑔𝑠 } ⊂ 𝐼 is a Gröbner basis for 𝐼 with respect to > if its leading terms
generate the leading term ideal:

⟨LT(𝑔1 ), . . . , LT(𝑔𝑠 )⟩ = LT(𝐼).

If 𝐺 is a Gröbner basis for an ideal 𝐼, then 𝐺 generates 𝐼; i.e., 𝐼 = ⟨𝐺⟩. This justifies the
name “basis”, here chosen to mean “generating set”. (See [52, Chapter 2 §5, Corollary 6].)
Our next example is identical to that in [52, Chapter 2 §8, Example 2]. It illustrates how
Gröbner bases can be used to solve systems of polynomial equations.
Example 3.5 Consider the following system of three equations in three variables:

𝑥 2 + 𝑦2 + 𝑧2 − 1
𝐹 (𝑥, 𝑦, 𝑧) = ­ 𝑥 + 𝑧2 − 𝑦 ® = 0.
© 2 ª

« 𝑥−𝑧 ¬

We compute a Gröbner basis of the ideal 𝐼 = ⟨𝑥 2 + 𝑦 2 + 𝑧2 − 1, 𝑥 2 + 𝑧2 − 𝑦, 𝑥 − 𝑧⟩ with


respect to the Lex order with 𝑥 > 𝑦 > 𝑧 using Macaulay2 [73]. The code is as follows:
3.1 Gröbner Bases 29

R = QQ[x, y, z, MonomialOrder => Lex];


f = x^2 + y^2 + z^2 - 1;
g = x^2 + z^2 - y;
h = x - z;
I = ideal {f, g, h};
G = gb I;
gens G
This computes the Gröbner basis 𝐺 = {𝑥 − 𝑧, 𝑦 − 2𝑧 2 , 4𝑧 4 + 2𝑧 2 − 1}. Since 𝐼 = ⟨𝐺⟩, we can
solve 𝐹 (𝑥, 𝑦, 𝑧) = 0 by solving the equations given by 𝐺. Notice that the third polynomial
in 𝐺 only depends on 𝑧, the second only on 𝑦 and 𝑧, and the first only on 𝑥 and 𝑧. Thus,
solving 𝐹 (𝑥, 𝑦, 𝑧) = 0 reduces to solving three univariate equations. This gives the four
solutions (𝑎, 2𝑎 2 , 𝑎), where 𝑎 is one of the four roots of 4𝑧4 + 2𝑧2 − 1. ⋄
The reason why using the Lex order in Example 3.5 works well is the Elimination
Theorem. To state this, consider any ideal 𝐼 ⊂ C[x]. For every 0 ≤ 𝑗 < 𝑛, the intersection
𝐼 𝑗 := 𝐼 ∩ C[𝑥 𝑗+1 , . . . , 𝑥 𝑛 ] is an ideal in a polynomial subring. It consists of those polyno-
mials in 𝐼 that only contain the variables 𝑥 𝑗+1 , . . . , 𝑥 𝑛 . We call 𝐼 𝑗 the 𝑗-th elimination ideal
of 𝐼. For a proof of the next theorem see [52, Chapter 3, §1, Theorem 1].
Theorem 3.6 (The Elimination Theorem) Let 𝐼 ⊂ C[x] be an ideal and let 𝐺 be a Gröb-
ner basis for 𝐼 with respect to the Lex order with 𝑥1 > · · · > 𝑥 𝑛 . Then 𝐺 ∩ C[𝑥 𝑗+1 , . . . , 𝑥 𝑛 ]
is a Gröbner basis of the 𝑗-th elimination ideal of 𝐼.
For us, the most important consequence of the Elimination Theorem is that, if a system
of polynomial equations 𝐹 (x) = ( 𝑓1 (x), . . . , 𝑓𝑚 (x)) = 0 has finitely many solutions, then
the 𝑗-th elimination ideal will not be empty for 0 ≤ 𝑗 < 𝑛. Consequently, we can solve
𝐹 (x) = 0 by computing a Gröbner basis for the Lex order and then sequentially solv-
ing univariate equations. We can compute zeros of univariate polynomials
Í𝑑−1 by computing
eigenvalues 𝜆 of the associated companion matrix. If 𝑓 (𝑥) = 𝑥 𝑑 + 𝑖=0 𝑐 𝑖 𝑥 𝑖 is a univariate
polynomial, we have 𝑓 (𝜆) = 0 if and only if 𝜆 is an eigenvalue of the companion matrix
0
 ··· 0 −𝑐 0 
1 ··· 0 −𝑐 1 
∈ C𝑑×𝑑 .

 .. .. ... ... 
.
 . 
0
 ··· 1 −𝑐 𝑑−1 

Sometimes we are not interested in the solutions of 𝐹 (x) = 0 per se, but only in the
number of solutions. Gröbner bases naturally carry this information: Suppose 𝐼 ⊂ C[x] is
an ideal and > is a monomial order. Recall that a monomial x 𝛼 ∉ LT(𝐼) is called a standard
monomial of 𝐼 relative to >. The next result shows how to get the number of solutions
of 𝐹 (x) = 0 from a Gröbner basis; see [164, Proposition 2.1].
Proposition 3.7 Let 𝐼 ⊂ C[x] be an ideal, > a monomial order, and B the set of standard
monomials of 𝐼 relative to >. Then, B is finite if and only if 𝑉 (𝐼) is finite, and #B equals
the number of points in 𝑉 (𝐼) counting multiplicities.

Example 3.8 In Example 3.5, there are four standard monomials, namely, 1, 𝑧, 𝑧 2 and 𝑧3 .
That is why the system 𝐹 (𝑥, 𝑦, 𝑧) = 0 has four solutions. We can view Proposition 3.7
as an 𝑛-dimensional version of the Fundamental Theorem of Algebra, which says that a
univariate polynomial of degree 𝑑 has 𝑑 zeros. ⋄
30 3 Computations

We have now understood how to solve systems of polynomials with finitely many
zeros using Gröbner bases. What about systems whose variety has positive dimensional
components? In that case, the 𝑛-th elimination ideal is necessarily the zero ideal. To cope
with that case, one can remove positive dimensional components using ideal saturation.
Let 𝐼, 𝐽 ⊂ C[x] be two ideals. The saturation of 𝐼 by 𝐽 is the ideal

𝐼 : 𝐽 ∞ := { 𝑓 ∈ C[x] | there is ℓ > 0 with 𝑓 · 𝑔ℓ ∈ 𝐼 for all 𝑔 ∈ 𝐽}. (3.1)

Saturation is the ideal analogue of removing components on the level of varieties. We have

𝑉 (𝐼 : 𝐽 ∞ ) = 𝑉 (𝐼) \ 𝑉 (𝐽); (3.2)

see [52, Chapter 4 §4, Corollary 11].


Recall that a solution to a square system 𝐹 (x) = ( 𝑓1 (x), . . . , 𝑓𝑛 (x)) = 0 is called regular
𝜕 𝑓𝑖 
if the Jacobian determinant det 𝜕𝑥 𝑗 1≤𝑖, 𝑗 ≤𝑛
does not vanish at that solution. There can
only be finitely many regular zeros of a square system of polynomial equations, and a
finite set of points is Zariski closed. Consequently, if we saturate 𝐼 = ⟨ 𝑓1 , . . . , 𝑓𝑛 ⟩ by the
𝜕 𝑓𝑖 
ideal 𝐽 = det 𝜕𝑥 𝑗
, then we can use the strategy from above to solve 𝐹 (x) = 0.

Example 3.9 Consider the following system of two polynomials in two variables

(𝑥 − 1) · (𝑥 − 2) · (𝑥 2 + 𝑦 2 − 1)
 
𝐹 (𝑥, 𝑦) = = 0.
(𝑦 − 1) · (𝑦 − 3) · (𝑥 2 + 𝑦 2 − 1)

This system has four regular solutions, namely (1, 1), (1, 3), (2, 1), (2, 3). In addition, the
system has the circle 𝑥 2 + 𝑦 2 − 1 as a positive dimensional component. We use Macaulay2
[73] to saturate the ideal generated by 𝐹. This is done as follows:
R = QQ[x, y, MonomialOrder => Lex];
f = (x-1) * (x-2) * (x^2+y^2-1);
g = (y-1) * (y-3) * (x^2+y^2-1);
I = ideal {f, g};
Jac = matrix{{diff(x, f), diff(x, g)}, {diff(y, f), diff(y, g)}};
J = ideal det(Jac);
K = saturate(I,J)

This code returns the ideal 𝐾 = ⟨𝑦 2 − 4𝑦 + 3, 𝑥 2 − 3𝑥 + 2⟩. The two generators form a
Gröbner basis for 𝐾, with leading terms 𝑦 2 and 𝑥 2 . ⋄
Next, we present two propositions related to elimination and saturation of ideals with
parameters, and one lemma on Gröbner bases of parametric ideals. For this, let x =
(𝑥1 , . . . , 𝑥 𝑛 ) and p = ( 𝑝 1 , . . . , 𝑝 𝑘 ) be two sets of variables, and

C[x, p] := C[𝑥 1 , . . . , 𝑥 𝑛 , 𝑝 1 , . . . , 𝑝 𝑘 ].

We regard the coordinates 𝑝 𝑖 of p as parameters. For a fixed parameter vector q ∈ C 𝑘 , we


consider the surjective ring homomorphism

𝜙q : C[x, p] → C[x], 𝑓 (x; p) ↦→ 𝑓 (x; q). (3.3)


3.1 Gröbner Bases 31

Proposition 3.10 Consider an ideal 𝐼 ⊂ C[x, p] and let 𝐺 = {𝑔1 , . . . , 𝑔𝑠 } be a Gröbner


basis for 𝐼 relative to the Lex order 𝑥1 > · · · > 𝑥 𝑛 > 𝑝 1 > · · · > 𝑝 𝑘 . For 1 ≤ 𝑖 ≤ 𝑠 with
𝑔𝑖 ∉ C[p], write 𝑔𝑖 in the form 𝑔𝑖 = 𝑐 𝑖 (p)x 𝛼𝑖 + ℎ𝑖 , where all terms of ℎ𝑖 are strictly smaller
than x 𝛼𝑖 in Lex order. Let q ∈ 𝑉 (𝐼 ∩ C[p]) ⊆ C 𝑘 such that 𝑐 𝑖 (q) ≠ 0 for all 𝑔𝑖 ∉ C[p].
Then, the following set is a Gröbner basis for the ideal 𝜙q (𝐼) ⊂ C[x]:

𝜙q (𝐺) = {𝜙q (𝑔𝑖 ) | 𝑔𝑖 ∉ C[p]}.

Proof See, e.g., [52, Chapter 4 §7, Theorem 2]. □

Example 3.11 (Cardioid revisited) As an illustration, fix 𝑛 = 𝑘 = 2 and let 𝐼 be the


ideal generated by the cubic (2.4) and the determinant of (2.2), with 𝑢 1 , 𝑢 2 replaced by
𝑝 1 , 𝑝 2 . The lexicographic Gröbner basis 𝐺 for this ideal has 15 elements. The 15 leading
coefficients 𝑐 𝑖 (p) are quite complicated. Three of them are
(4 𝑝12 + 4 𝑝22 + 4 𝑝2 + 1) 2 ,
32 𝑝22 𝑟 (3 𝑝2 + 1) (3 𝑝2 + 2) 3 (2 𝑝2 + 1) 3 (4 𝑝22 + 5 𝑝2 + 2) 3 (1 + 𝑝2 ) 5 ,
𝑝1 𝑝22 𝑟 (8 𝑝14 + 8 𝑝12 𝑝22 − 10 𝑝12 𝑝2 − 18 𝑝23 − 7 𝑝12 − 21 𝑝22 − 8 𝑝2 − 1) ( 𝑝1 + 𝑝2 + 1) 3 ( 𝑝1 − 𝑝2 − 1) 3 ,

where 𝑟 = 4𝑝 2 + 3. Suppose that we replace the unknowns 𝑝 1 , 𝑝 2 by any complex numbers


𝑞 1 , 𝑞 2 such that 𝑐 𝑖 (𝑞 1 , 𝑞 2 ) ≠ 0 for all 𝑖. Then the specialization 𝜙q (𝐺) remains a Gröbner
basis with the same leading terms. In particular, the number of zeros (𝑥1 , 𝑥2 ), which is six
when counted with multiplicities, is independent of the choice of parameters 𝑞 1 , 𝑞 2 . ⋄

In many applications, polynomial systems come with a non-degeneracy constraint. These


are usually expressed in the form of a polynomial inequation ℎ ≠ 0. We now show how to
incorporate such a constraint when solving a polynomial system.

Proposition 3.12 Let 𝐼 ⊂ C[x, p] be an ideal and let 𝐽 = ⟨ℎ⟩ be a principal ideal in the
same polynomial ring. Let 𝑢 be an additional variable and 𝐾 := ⟨1 − 𝑢 · ℎ⟩. Then,

𝐼 : 𝐽 ∞ = (𝐼 + 𝐾) ∩ C[x, p].

If 𝐺 is a Gröbner basis of 𝐼 +𝐾 relative to the Lex order 𝑢 > 𝑥1 > · · · > 𝑥 𝑛 > 𝑝 1 > · · · > 𝑝 𝑘 ,
then 𝐺 ∩ C[x, p] is a Gröbner basis of the saturation ideal 𝐼 : 𝐽 ∞ .

Proof See e.g. [52, Chapter 4 §4, Theorem 14]. □

Example 3.13 Fix 𝐼 from Example 3.11. We take 𝐾 = ⟨1 − 𝑢 · ℎ⟩ where ℎ = 𝑥1 𝑥2 , since


the cardioid (2.4) is singular at the origin. The Gröbner basis 𝐺 has 27 elements, but
with friendlier leading coefficients: 𝑝 1 𝑝 25 ( 𝑝 1 + 𝑝 2 + 1) ( 𝑝 1 − 𝑝 2 − 1), 𝑝 25 ( 𝑝 2 + 1) 2 , 𝑝 1 𝑝 32 ,
𝑝 22 (9𝑝 41 + 𝑝 42 + 2𝑝 23 − 9𝑝 12 + 𝑝 22 ), 𝑝 22 ( 𝑝 2 + 1), . . . Nonvanishing of these coefficients ensures
that the system has 3 complex solutions, with multiplicities. ⋄

We now apply the technique above to identifying a discriminant Δ for a polynomial


system that has parameters. The following result is proved in [23].
32 3 Computations

Lemma 3.14 Let 𝐼 ⊂ C[x, p] be an ideal and 𝐽 = ⟨ℎ⟩ ⊂ C[x, p] be a principal ideal such
that (𝐼 : 𝐽 ∞ ) ∩ C[p] = {0}. Let {𝑔1 , . . . , 𝑔𝑠 } be a Gröbner basis of 𝐼 : 𝐽 ∞ with respect to
the Lex order 𝑥1 > · · · > 𝑥 𝑛 > 𝑝 1 > · · · > 𝑝 𝑘 . There is a proper subvariety Δ ⊊ C 𝑘 such
that, for all q ∉ Δ, the set {𝜙q (𝑔1 ), . . . , 𝜙q (𝑔𝑠 )} is a Gröbner basis for 𝜙q (𝐼) : 𝜙q (𝐽) ∞ and
none of the leading terms of 𝑔1 , . . . , 𝑔𝑠 vanish when evaluated at q. In particular, we have

𝜙q (𝐼 : 𝐽 ∞ ) = 𝜙q (𝐼) : 𝜙q (𝐽) ∞ for all q ∉ Δ.

Proof Let 𝑢 be an additional variable. As in Proposition 3.12, we consider the ideal


𝐾 := ⟨1 − 𝑢 · ℎ⟩. Then, we have 𝐼 : 𝐽 ∞ = (𝐼 + 𝐾) ∩ C[x, p]. Using our hypothesis
that (𝐼 : 𝐽 ∞ ) ∩ C[p] = {0}, we conclude

𝑉 ((𝐼 + 𝐾) ∩ C[p]) = C 𝑘 . (3.4)

We may therefore apply Proposition 3.10 to 𝐼 + 𝐾 without any restrictions on q. As


in Proposition 3.12, we augment the Lex order by letting 𝑢 be the largest variable. Let
𝐺 := {𝑔1 , . . . , 𝑔𝑟 } be a Gröbner basis of 𝐼 + 𝐾 relative to this order. By (3.4), we have
that 𝑔1 , . . . , 𝑔𝑟 ∉ C[p]. We write each 𝑔𝑖 in the form 𝑔𝑖 = 𝑐 𝑖 (p)𝑢 𝛽 x 𝛼𝑖 + ℎ𝑖 , where all terms
of ℎ𝑖 are strictly smaller than 𝑢 𝛽 x 𝛼𝑖 , and define the hypersurface

Δ := {q ∈ C 𝑘 | 𝑐 1 (q) · · · 𝑐𝑟 (q) = 0}. (3.5)

Now let q ∈ C 𝑘 \Δ. By Proposition 3.10, the set 𝜙q (𝐺) = {𝜙q (𝑔1 ), . . . , 𝜙q (𝑔𝑟 )} is a
Gröbner basis for the ideal

𝜙q (𝐼 + 𝐾) = 𝜙q (𝐼) + 𝜙q (𝐾) = 𝜙q (𝐼) + (1 − 𝑢 · 𝜙q (ℎ)).

Without loss of generality, suppose the first 𝑠 ≤ 𝑟 elements in 𝐺 do not depend on the
variable 𝑢. We define 𝐺 := {𝑔1 , . . . , 𝑔𝑠 } = 𝐺 ∩ C[x, p]. It follows from Proposition 3.12
that 𝐺 is a Gröbner basis of 𝐼 : 𝐽 ∞ . Because q ∉ Δ, none of the leading terms in 𝐺 when
evaluated at q vanish. Consequently, we have 𝜙q (𝐺) ∩ C[x] = 𝜙q (𝐺) ∩ C[x]. Therefore,
𝜙q (𝐺) = {𝜙q (𝑔1 ), . . . , 𝜙q (𝑔𝑠 )} is a Gröbner basis of 𝜙q (𝐼) : 𝜙q (𝐽) ∞ , by Proposition 3.12.□
We refer to Δ as the discriminant of the pair (𝐼, ℎ). Equation (3.5) leads to the following:

Corollary 3.15 Fix ideals 𝐼 = ⟨ 𝑓1 , . . . , 𝑓𝑛 ⟩ ⊂ C[x, p] and 𝐽 = ⟨ℎ⟩ ⊂ C[x, p]. The discrim-
inant Δ in Lemma 3.14 is found by computing a Lex Gröbner basis 𝐺 for 𝐼 + ⟨1 − 𝑢 · ℎ⟩,
where 𝑢 > 𝑥 1 > · · · > 𝑥 𝑛 > 𝑝 1 > · · · > 𝑝 𝑘 . Namely, Δ is the product of the leading
coefficients 𝑐 𝑖 (p) in 𝐺.

Example 3.16 (Hyperdeterminant) Let 𝑘 = 8, 𝑛 = 2 and consider a general pair of


bilinear equations. Their ideal is 𝐼 = ⟨ 𝑓1 , 𝑓2 ⟩, where

𝑓1 = 𝑝 1 𝑥 1 𝑥 2 + 𝑝 2 𝑥 1 + 𝑝 3 𝑥 2 + 𝑝 4 and 𝑓2 = 𝑝 5 𝑥 1 𝑥 2 + 𝑝 6 𝑥 1 + 𝑝 7 𝑥 2 + 𝑝 8 .

Our non-degeneracy constraint is ℎ = 𝜕 𝑓1 /𝜕𝑥1 · 𝜕 𝑓2 /𝜕𝑥2 − 𝜕 𝑓1 /𝜕𝑥 2 · 𝜕 𝑓2 /𝜕𝑥1 . This is the


Jacobian determinant of 𝑓1 and 𝑓2 . The Gröbner basis 𝐺 in Corollary 3.15 has 11 elements.
3.2 The Parameter Continuation Theorem 33

The most interesting Gröbner basis element has leading coefficient

𝑐(p) = 𝑝 12 𝑝 28 − 2𝑝 1 𝑝 2 𝑝 7 𝑝 8 − 2𝑝 1 𝑝 3 𝑝 6 𝑝 8 − 2𝑝 1 𝑝 4 𝑝 5 𝑝 8 + 4𝑝 1 𝑝 4 𝑝 6 𝑝 7 + 𝑝 22 𝑝 72
+ 4𝑝 2 𝑝 3 𝑝 5 𝑝 8 − 2𝑝 2 𝑝 3 𝑝 6 𝑝 7 − 2𝑝 2 𝑝 4 𝑝 5 𝑝 7 + 𝑝 23 𝑝 26 − 2𝑝 3 𝑝 4 𝑝 5 𝑝 6 + 𝑝 42 𝑝 52 .

This coefficient is the main factor in our discriminant Δ. This quartic is the hyperdeterminant
of the 2 × 2 × 2 tensor with entries 𝑝 1 , 𝑝 2 , . . . , 𝑝 8 . ⋄

3.2 The Parameter Continuation Theorem

The theorem to be proved in this section states that a square system of polynomial equations
with parameters has a well-defined degree. This degree is the number of complex solutions
for generic parameter choices. This result is the Parameter Continuation Theorem, due
to Morgan and Sommese [135]. We shall present a proof that rests on the results on
Gröbner bases in the previous section. For this, we consider again the polynomial ring
C[x, p] = C[𝑥1 , . . . , 𝑥 𝑛 , 𝑝 1 , . . . , 𝑝 𝑘 ]. We interpret x as variables and p as parameters.

Definition 3.17 Let 𝑓1 (x; p), . . . , 𝑓𝑛 (x; p) ∈ C[x, p]. We consider the image of the map

𝑓1 (x; p0 )
C 𝑘 ↦→ C[x] 𝑛 ,
©
p0 ↦→ 𝐹 (x; p0 ) = ­­ . ª
.. ®.
®

« 𝑓𝑛 (x; p0 ) ¬

This image is denoted F = {𝐹 (x; p) | p ∈ C 𝑘 }. Note that this is a family of square


polynomial systems of size 𝑛. In other words, the family F consists of 𝑛 polynomials in 𝑛
variables that depend polynomially on 𝑘 parameters.

In Examples 3.11, 3.13 and 3.16, we studied families of polynomial systems in 𝑛 = 2


variables, where the number 𝑘 of parameters was 2, 2 and 8, respectively. The degrees of
these families are 6, 3 and 2. These degrees count the numbers of complex zeros for generic
parameters p, which satisfy 𝑐 𝑖 (p) ≠ 0 for all 𝑖.
We now fix a family F depending on 𝑘 parameters p = ( 𝑝 1 , . . . , 𝑝 𝑘 ). Let z ∈ C𝑛 be a
zero of 𝐹 (x; p) = ( 𝑓1 (x; p), . . . , 𝑓𝑛 (x; p)) ∈ F , for some specific parameters p ∈ C 𝑘 . We
𝜕 𝑓𝑖 
say that z is a regular zero if the Jacobian determinant det 𝜕𝑥 𝑗 1≤𝑖, 𝑗 ≤𝑛
does not vanish at
the point z. The next theorem is the main result of this section. It shows that, for almost all
parameters p, the number of regular solutions is the same.

Theorem 3.18 (The Parameter Continuation Theorem) Let F be a family of polynomial


systems that consists of systems of 𝑛 polynomials in 𝑛 variables depending on 𝑘 parameters.
For p ∈ C 𝑘 , denote by 𝑁 (p) the number of regular zeros of 𝐹 (x; p), and 𝑁 := supp∈C𝑘 𝑁 (p).
Then, 𝑁 < ∞, and there exists a proper algebraic subvariety Δ ⊊ C 𝑘 , called discriminant
of the system F , such that 𝑁 (p) = 𝑁 for all p ∉ Δ.
34 3 Computations

Proof We recall the proof from [23]. Another proof can also be found in the textbook [161].
Suppose F = {𝐹 (x; p) | p ∈ C 𝑘 }, where 𝐹 (x; p) = ( 𝑓1 (x; p), . . . , 𝑓𝑛 (x; p)) ∈ F . Let
𝜕 𝑓𝑖 
𝐼 = ⟨ 𝑓1 , . . . , 𝑓 𝑛 ⟩ and 𝐽 := ⟨det 𝜕𝑥 𝑗 ⟩.

If 𝑁 = 0, then no system in F has regular zeros. In this case, the statement is true. We
now assume 𝑁 > 0. By (3.2), the variety 𝑉 (𝐼 : 𝐽 ∞ ) consists of all pairs (x, q) ∈ C𝑛 × C 𝑘
such that x is a regular zero of 𝐹 (x; q). Since 𝑁 > 0, we therefore have 𝑉 (𝐼 : 𝐽 ∞ ) ≠ ∅.
Let (x, q) ∈ 𝑉 (𝐼 : 𝐽 ∞ ). The Implicit Function Theorem ensures that there is a Euclidean
open neighborhood 𝑈 of q such that 𝐹 (x; q) has regular zeros for all q ∈ 𝑈. Consequently,

(𝐼 : 𝐽 ∞ ) ∩ C[p] = {0},

so we can apply Lemma 3.14 in our situation.


Set 𝐼q = 𝜙q (𝐼) and 𝐽q = 𝜙q (𝐽). Let 𝐺 = {𝑔1 , . . . , 𝑔𝑠 } be a Gröbner basis of 𝐼 : 𝐽 ∞ for
the Lex order 𝑥1 > · · · > 𝑥 𝑛 > 𝑝 1 > · · · > 𝑝 𝑘 . By Lemma 3.14, there is a proper algebraic
subvariety Δ ⊊ C 𝑘 such that 𝜙q (𝐺) = {𝜙q (𝑔1 ), . . . , 𝜙q (𝑔𝑠 )} is a Gröbner basis for 𝐼q : 𝐽q∞
and none of the leading terms of 𝑔1 , . . . , 𝑔𝑠 vanish when evaluated at q. This implies that
the leading monomials of 𝐼q : 𝐽q∞ are constant on C 𝑘 \ Δ.
We consider the set of standard monomials, i.e. monomials not in the lexicographic
initial ideal. We denote this set by

Bq := standard monomials of 𝐼q : 𝐽q∞ .




We have shown that Bq is constant on C 𝑘 \Δ. On the other hand, by (3.2) and since finite
sets of points are Zariski closed, we have 𝑉 (𝐼 : 𝐽 ∞ ) = 𝑉 (𝐼)\𝑉 (𝐽). Proposition 3.7 and
the fact that regular zeros have multiplicity one imply that the following holds for all
parameters q that are not in the discriminant Δ: 𝑁 (q) = # Bq . This shows that 𝑁 (q) is
constant on C 𝑘 \Δ. The Implicit Function Theorem implies that, for all q ∈ C 𝑘 , there exists a
Euclidean neighborhood 𝑈 of q such that 𝑁 (q) ≤ 𝑁 (q′) for all q′ ∈ 𝑈. Since Δ is a proper
subvariety of C 𝑘 and thus lower-dimensional, we have 𝑁 = 𝑁 (q) < ∞ for q ∈ C 𝑘 \Δ. □
We can use the algorithm in Corollary 3.15 to compute the discriminant. However, this
does not necessarily yield the smallest hypersurface with the properties in Theorem 3.18.
Nevertheless, the algorithm in Corollary 3.15 also returns the discriminant when
𝐹 (x; p) = 0 has nonregular solutions for all parameters p. Resultant-based methods for
computing the discriminant would fail in such cases because the resultant will be constant
and equal to zero. Here is a simple example to illustrate this phenomenon.

Example 3.19 We slightly modify the system from Example 3.9 and consider

(𝑥 − 1) · (𝑥 − 2) · (𝑥 2 + 𝑦 2 − 1)
 
𝐹 (𝑥, 𝑦; 𝑎) = = 0,
(𝑦 − 1) · (𝑦 − 𝑎) · (𝑥 2 + 𝑦 2 − 1)

where 𝑎 ∈ C is a parameter. If 𝑎 ∉ {0, 1, ± −3}, then we have 𝑁 = 4 regular solutions.
3.3 Polynomial Homotopy Continuation 35

Let us compute the discriminant of the polynomial system 𝐹 (𝑥, 𝑦; 𝑎) using the algorithm
in Corollary 3.15. We use the Macaulay2 code from [23]:
R = QQ[u, x, y, a, MonomialOrder => Lex];
f = (x-1) * (x-2) * (x^2+y^2-1);
g = (y-1) * (y-a) * (x^2+y^2-1);
I = ideal {f, g};
Jac = matrix{{diff(x, f), diff(x, g)}, {diff(y, f), diff(y, g)}};
K = ideal {1 - u * det(Jac)};
G = gens gb (I+K);
E = (entries(G))#0;
P = QQ[a][u, x, y, MonomialOrder => Lex];
result = apply(E, t -> leadCoefficient(sub(t, P)));
factor(product result)

The result is the polynomial 3538944 · 𝑎 4 · (𝑎 − 1) 4 · (𝑎 2 + 3) 2 . ⋄

Example 3.20 The critical equations for the ED problem in (2.1) have parameters u. In
many situations, the critical equations form a square system, and Theorem 3.18 applies.
The degree 𝑁 is the Euclidean distance degree. For instance, in Example 2.3, we have
a square system in 𝑛 = 3 variables with 𝑘 = 3 parameters, and the ED degree equals
𝑁 = 𝑑1 𝑑2 (𝑑1 + 𝑑2 + 1). What is the discriminant Δ in this case? ⋄

Example 3.21 (Tact invariant) We consider two general quadratic equations in 𝑛 = 2


variables. Each equation has six coefficients, so there are 𝑘 = 12 parameters in total:
R = QQ[x,y,a20,a11,a02,a10,a01,a00,b20,b11,b02,b10,b01,b00];
f = a20*x^2 + a11*x*y + a02 * y^2 + a01*x + a10*y + a00;
g = b20*x^2 + b11*x*y + b02 * y^2 + b01*x + b10*y + b00;

For general parameters q, the set of lexicographic standard monomials is 𝐵q = {1, 𝑦, 𝑦 2 , 𝑦 3 }.


Therefore, the number of solutions to our equations is 𝑁 = 4. The main factor in the
discriminant Δ is a polynomial in the 12 coefficients that is known as the tact invariant.
This polynomial can be computed with the following Macaulay2 code:
I = ideal(f, g, diff(x,f)*diff(y,g) - diff(y,f)*diff(x,g));
tact = eliminate({x,y}, I)

The tact invariant has degree 12 and is the sum of 3210 monomials. See also [156, §96]. ⋄

3.3 Polynomial Homotopy Continuation

In Section 3.1, we have seen how to use Gröbner bases to reduce solving 𝐹 (x) = 0 to
the problem of sequentially computing zeros of univariate polynomials. Another approach
is polynomial homotopy continuation (PHC). This is a numerical method for computing
the regular zeros of a square system of polynomial equations. The textbook of Sommese
and Wampler [161] provides a detailed introduction to the theory of polynomial homotopy
continuation. We also refer to the overview article [15]. This subject area is known as
numerical algebraic geometry, and the present section offers a lightning introduction.
36 3 Computations

The goal in polynomial homotopy continuation is to compute approximate zeros. The


following definition goes back to Smale (see [21, §8, Definition 1]). It rests on Newton’s
method from numerical analysis.
Definition 3.22 (Approximate Zeros) Let 𝐹 (x) be a square system of polynomial equa-
tions in 𝑛 variables, and write 𝐽𝐹 (x) for its (square) Jacobian matrix. A point z ∈ C𝑛 is
called an approximate zero of 𝐹 if the sequence of Newton iterates

z 𝑘+1 := z 𝑘 − 𝐽𝐹 (z 𝑘 ) −1 𝐹 (z 𝑘 )

starting at z0 := z converges to a zero of 𝐹.


An approximate zero z of a polynomial system 𝐹 is in a precise sense close to an actual
zero x. Applying the Newton operator to z, we can get as close to x as we want. We can
approximate x to any desired accuracy.
Let 𝐹 (x) = 0 be the system of polynomial equations that we want to solve. The idea in
homotopy continuation is to find a family F and parameters p, q ∈ C 𝑘 with the properties
that 𝐹 (x) = 𝐹 (x; p) and 𝐺 (x) := 𝐹 (x; q) is a system whose solutions are known or can
be computed by other means. For a piecewise smooth path 𝛾(𝑡) in C 𝑘 with 𝛾(1) = q and
𝛾(0) = p, we define the parameter homotopy

𝐻 (x, 𝑡) := 𝐹 (x; 𝛾(𝑡)),

and we track the solutions of 𝐹 (x; q) = 0 to 𝐹 (x; p) along the homotopy 𝐻. This tracking
involves an ordinary differential equation (ODE). Namely, we use numerical algorithms to
solve the ODE initial value problem
 
d dx d
𝐻 (x, 𝑡) + 𝐻 (x, 𝑡) = 0, x(1) = z. (3.6)
dx d𝑡 d𝑡

Here the initial value z is a zero of 𝐺 (x). In this setting, 𝐺 (x) = 𝐹 (x; q) is called start
system and 𝐹 (x) = 𝐹 (x; p) is called target system. The output of the numerical solver is
then an approximate zero of 𝐹 (x). In implementations, one often uses piecewise linear
paths, such as that described below.
d

Remark 3.23 The left factor dx 𝐻 (x, 𝑡) in (3.6) is the 𝑛 × 𝑛 Jacobian matrix. Throughout
the tracking process, it is essential that this matrix is invertible. This means geometrically
that our path must stay away from the discriminant Δ of the polynomial system. This is
possible because Δ is a proper subvariety of the parameter space C 𝑘 . The dimension of Δ
over the real numbers R is an even number that is less than the real dimension 2𝑘 of the
ambient space R2𝑘 = C 𝑘 . This ensures that the space C 𝑘 \Δ is connected.
There are several software packages for solving polynomial systems that are based on ho-
motopy continuation. In this book we use the software HomotopyContinuation.jl [31].
Example 3.24 We solve the system of polynomial equations from Example 3.5. Recall that
those equations are 𝑥 2 + 𝑦 2 + 𝑧2 − 1 = 𝑥 2 + 𝑧2 − 𝑦 = 𝑥 − 𝑧 = 0.
3.3 Polynomial Homotopy Continuation 37

The following are commands in the programming language Julia [20] on which the
package HomotopyContinuation.jl is based:
using HomotopyContinuation
@var x y z;
f = x^2 + y^2 + z^2 - 1;
g = x^2 + z^2 - y;
h = x - z;
F = System([f; g; h], variables = [x; y; z]);
solve(F)

This code returns the four solutions (here displayed with only the 4 most significant digits):
√ √ √ 
0.556 + 0.0 −1 , 0.618 − 0.0 −1 , 0.556 + 0.0 −1 ,
√ √ √ 
− 0.0 − 0.899 −1 , −1.618 + 0.0 −1 , −0.0 − 0.899 −1 ,
√ √ √ 
− 0.556 − 0.0 −1 , 0.618 + 0.0 −1 , −0.556 + 0.0 −1 ,
√ √ √ 
0.0 + 0.899 −1 , −1.618 + 0.0 −1 , −0.0 + 0.899 −1 .

These are numerical approximations of the solutions found in Example 3.5. ⋄

Remark 3.25 The capabilities of HomotopyContinuation.jl were on display in Example


2.7: we solved the critical equations for the ED problem on some complete intersections.

Remark 3.26 Numerical computations are not exact computations and therefore can pro-
duce errors. This is hence also true for polynomial homotopy continuation (PHC). It
is possible, though, to certify the output of PHC. Certification means that we obtain a
computer proof that we have indeed computed an approximate zero. There are various
certification methods. Current implementations are [30, 83, 122].

The next proposition explains why polynomial homotopy continuation works and when
the initial value problem from (3.6) is well-posed. Its proof relies crucially on the Parameter
Continuation Theorem (Theorem 3.18), and on the connectedness result in Remark 3.23.

Proposition 3.27 Let F be a family of polynomial systems with 𝑘 parameters. Let 𝑁 ≥ 2


and Δ be as in Theorem 3.18. Given q ∈ C 𝑘 \Δ and p ∈ C 𝑘 , for almost all choices of
pmid ∈ C 𝑘 , the piecewise linear path
(
(2𝑡 − 1)q + 2(1 − 𝑡)pmid if 12 ≤ 𝑡 ≤ 1,
𝛾(𝑡) =
2𝑡pmid + (1 − 2𝑡)p if 0 < 𝑡 ≤ 21 ,

satisfies:
(a) 𝛾((0, 1]) ∩ Δ = ∅.
(b) The homotopy 𝐻 (x, 𝑡) := 𝐹 (x; 𝛾(𝑡)) defines 𝑁 smooth curves x(𝑡) with the property
that 𝐻 (x(𝑡), 𝑡) = 0 for 0 < 𝑡 ≤ 1. These curves are called solution paths.
(c) As 𝑡 → 0, the limits of the solution paths include all regular solutions of 𝐹 (x; p) = 0.
(d) If moreover 𝛾(0) ∉ Δ, then every solution path x(𝑡) converges for 𝑡 → 0 to a regular
zero of 𝐹 (x; p).
38 3 Computations

Proof Since 𝑁 ≥ 2, the discriminant Δ ⊊ C 𝑘 is a proper complex subvariety. Therefore, Δ


is of complex codimension at least 1, hence of real codimension at least 2. This was a recap
of Remark 3.23. It implies that, for general parameters pmid ∈ C 𝑘 , the path 𝛾(𝑡) does not
intersect Δ for 𝑡 ∈ (0, 1]. This proves the first item.
Since q = 𝛾(1) ∉ Δ, the Implicit Function Theorem ensures that there exists a Euclidean
neighborhood U0 ⊂ C 𝑘 of q and a smooth solution map 𝑠0 : U0 → C𝑛 such that
𝐹 (𝑠0 (p), p) = 0 for all p ∈ U0 . Let

𝑡 0 := min 𝑡 ∈ [0, 1] 𝛾(𝑡) ∈ U0 ,

where U0 is the Euclidean closure of U0 . If 𝑡 0 > 0, then 𝛾(𝑡 0 ) ∉ Δ and we can repeat the
construction for the new start system 𝐹 (x; 𝛾(𝑡 0 )). Eventually, we obtain an open cover
Ø
(0, 1] = U𝑖 ,
𝑖 ∈I

for some index set I, together with smooth solution maps 𝑠𝑖 : U𝑖 → C𝑛 . Taking a partition
of unity (𝜌𝑖 (𝑡))𝑖 ∈I relative to this cover (see [121, Chapter 2]), we set
∑︁
x(𝑡) := 𝜌𝑖 (𝑡) · (𝑠𝑖 ◦ 𝛾) (𝑡), 𝑡 ∈ (0, 1].
𝑖 ∈I

The path x(𝑡) is smooth and it satisfies 𝐻 (x(𝑡), 𝑡) = 0. Furthermore, as 𝑡 → 0, the solution
path x(𝑡) either converges to a point z or it diverges as ∥x𝑖 (𝑡) ∥ → ∞. In the first situation,
by continuity, z is a zero of 𝐹 (x, 𝛾(0)) = 𝐹 (x, p), which is not necessarily regular.
By Theorem 3.18, the system 𝐹 (x; q) has 𝑁 regular zeros. The construction above yields
𝑁 solution paths x1 (𝑡), . . . , x 𝑁 (𝑡). Smoothness implies that x𝑖 (𝑡) ≠ x 𝑗 (𝑡) for 𝑖 ≠ 𝑗 and all
𝑡 ∈ (0, 1]. This proves the second item. Furthermore, for every regular zero of 𝐹 (x; q),
we also find a (local) solution map, which connects to exactly one of the smooth paths
x1 (𝑡), . . . , x 𝑁 (𝑡). This implies the third and fourth items. □
Corollary 3.28 A general system 𝐹 (x) = ( 𝑓1 (x), . . . , 𝑓𝑛 (x)) of 𝑛 polynomials in 𝑛 variables
with 𝑑𝑖 = deg 𝑓𝑖 has
𝑁 = 𝑑1 · · · 𝑑 𝑛
isolated zeros in C𝑛 . (The number 𝑑1 · · · 𝑑 𝑛 is called the Bézout number of 𝐹.)
Proof We consider the family FBézout of polynomial systems 𝐹 (x) = ( 𝑓1 (x), . . . , 𝑓𝑛 (x))
with 𝑑𝑖 = deg 𝑓𝑖 . The parameters are the coefficients of the polynomials 𝑓1 , . . . , 𝑓𝑛 . Here,
we can use the start system
𝑥 𝑑1 − 1
© 1 . ª
𝐺 (x) = ­­ .. ®.
®
𝑑𝑛
« 𝑥𝑛 − 1 ¬
This system has 𝑑1 · · · 𝑑 𝑛 distinct complex zeros, namely (𝜉1𝑘1 , . . . , 𝜉 𝑛𝑘𝑛 ), where 𝜉𝑖 :=
√ 
exp 2𝜋 −1 /𝑑𝑖 is the 𝑑𝑖 -th root of unity and 𝑘 𝑖 ranges from 1 to 𝑑𝑖 . One calls 𝐺 (𝑥)
the total degree start system. All its zeros are regular, and it has no zeros at infinity.
3.3 Polynomial Homotopy Continuation 39

Together with Proposition 3.27 this implies that the system 𝐺 (x) has the maximal number
𝑁 = 𝑑1 · · · 𝑑 𝑛 of regular zeros in FBézout . □

Remark 3.29 Corollary 3.28 only states that the number of solutions equals 𝑑1 · · · 𝑑 𝑛 for
systems outside the discriminant. The full version of Bézout’s theorem also applies to
systems 𝐹 ∈ Δ, where it states that the number of zeros counted with multiplicities is
𝑑1 · · · 𝑑 𝑛 . Corollary 3.28 does not prove this full version.

Corollary 3.28 implies that one can use the total degree start system for homotopy
continuation in the family of systems of polynomials with fixed degree pattern.
Example 3.30 The system 𝐹 (𝑥, 𝑦, 𝑧) = (𝑥 2 +𝑦 2 +𝑧2 −1, 𝑥 2 +𝑧2 −𝑦, 𝑥 −𝑧) from Example 3.24
consists of three polynomials of degrees 𝑑1 = 2, 𝑑2 = 2 and 𝑑3 = 1. The number of zeros
of 𝐹 is the Bézout number 𝑁 = 𝑑1 · 𝑑2 · 𝑑3 = 4. In HomotopyContinuation.jl [31], we
can use the total degree start system by setting the following flag:
solve(F; start_system = :total_degree)

The default option in HomotopyContinuation.jl is the polyhedral homotopy. Here the


start system is constructed from Newton polytopes, and it respects the mixed volume. ⋄
We now introduce sparse systems, their mixed volume, and the polyhedral homotopy.
Í
Example 3.31 Let 𝐴 ⊂ N𝑛 be a finite set and denote F𝐴 := { 𝛼∈ 𝐴 𝑐 𝛼 x 𝛼 | 𝑐 𝛼 ∈ C}.
An element in F𝐴 is called a sparse polynomial, since only the monomials with exponent
vector in 𝐴 appear. For finite subsets 𝐴1 , . . . , 𝐴𝑛 ⊂ N𝑛 , we consider the family

Fsparse := F𝐴1 × · · · × F𝐴𝑛 .

The parameters in this family are the coefficients of the 𝑛 sparse polynomials of a system in
Fsparse . For 1 ≤ 𝑖 ≤ 𝑛, let 𝑃𝑖 be the convex hull of 𝐴𝑖 . The polytope 𝑃𝑖 is the Newton polytope
of the sparse polynomials in F𝐴𝑖 . We write MV(𝑃1 , . . . , 𝑃𝑛 ) for the mixed volume of these 𝑛
polytopes. The BKK Theorem [19] asserts that a general 𝐹 ∈ Fsparse has MV(𝑃1 , . . . , 𝑃𝑛 )
many zeros in the torus (C∗ ) 𝑛 . Assuming that such an 𝐹 only has zeros with non-zero
entries, the maximal number of regular zeros in Fsparse therefore is

𝑁 = MV(𝑃1 , . . . , 𝑃𝑛 ).

If the supports 𝐴𝑖 are all the same, then there is only one Newton polytope. Let us denote
it by 𝑃 := 𝑃1 = · · · = 𝑃𝑛 . In this situation, which occurs frequently in practice, the mixed
volume MV(𝑃, . . . , 𝑃) equals 𝑛! times the volume of 𝑃. This product is a nonnegative
integer, and it is referred to as the normalized volume of 𝑃. Thus the BKK bound for
unmixed square systems is the normalized volume of the Newton polytope. ⋄

Remark 3.32 The article [98] introduced a combinatorial algorithm for computing an ex-
plicit start system for Fsparse , called polyhedral start system. See also [15, Section 3]. The
use of the polyhedral start system is the default option in HomotopyContinuation.jl.
40 3 Computations

We close this chapter with a brief discussion for two quadratic equations in two variables.
The general system appeared in Example 3.21, where we computed the tact invariant,
which serves as the discriminant. The nonvanishing of the tact invariant ensures that
the two equations have four distinct complex solutions. Suppose we begin with the total
degree start system 𝑥12 = 𝑥22 = 1, which has four solutions (±1, ±1). The homotopy in
Proposition 3.27 is guaranteed to find the four solutions of the system we wish to solve.
By contrast, suppose now that our two equations are sparse, and the system has the form
 
𝑎 + 𝑏𝑥 + 𝑐𝑦 + 𝑑𝑥𝑦
𝐹 (𝑥, 𝑦) = ∈ Fsparse .
𝛼 + 𝛽𝑥 + 𝛾𝑦 + 𝛿𝑥𝑦

Here p = (𝑎, 𝑏, 𝑐, 𝑑, 𝛼, 𝛽, 𝛾, 𝛿) ∈ C8 is a vector of parameters. Both polynomials in 𝐹 (𝑥, 𝑦)


have the same Newton polytope 𝑃, namely the unit square. The normalized volume of the
unit square equals MV(𝑃) = 2. Therefore, the BKK Theorem tells us that 𝐹 (𝑥, 𝑦) = 0 has
𝑁 = 2 solutions for general parameters p ∈ C8 .
The total degree start system 𝑥12 = 𝑥22 = 1 is not appropriate for the sparse family 𝐹 (𝑥, 𝑦)
because it has too many solutions. Two of the start solutions (±1, ±1) lead to paths that di-
verge when running the homotopy. Instead, a polyhedral start system [98] has precisely two
solutions. A polyhedral start system is obtained by dividing the square 𝑃 into two triangles,
each of normalized area 1. The two zeros of 𝐹 (𝑥, 𝑦) are distinct when the discriminant does
not vanish at p. The discriminant of the system 𝐹 (𝑥, 𝑦) is the hyperdeterminant of format
2 × 2 × 2, which we saw in Example 3.16. In other words, the role of the tact invariant for
two dense quadrics is now played by our hyperdeterminant. Hyperdeterminants of larger
tensors, and the spectral theory of tensors, will be featured in Chapter 12.

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International
License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and
reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter’s Creative Commons
license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s
Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the
permitted use, you will need to obtain permission directly from the copyright holder.
Chapter 4
Polar Degrees

The notion of polar degrees is fundamental for assessing the algebraic complexity of
polynomial optimization problems of a metric origin. We already recognized this point for
Euclidean distance optimization in Section 2.3, and we will see it again in Theorem 5.5 for
polyhedral norms, with focus on the Wasserstein metric from optimal transport theory. The
punchline is that polar degrees govern linear programming over real algebraic varieties.
This chapter offers a self-contained introduction to polar degrees, at a more leisurely
pace, and with an emphasis on geometric intuition. We compare three definitions: in terms
of non-transversal intersections, Schubert varieties and the Gauss map, and conormal
varieties. The latter was used in Definition 2.16. We discuss the behavior of polar degrees
under projective duality, and we explain how polar degrees are related to Chern classes.
Throughout this chapter, we work over an algebraically closed field of characteristic zero.

4.1 Polar Varieties

Our starting point is a geometric definition of polar degrees, as the degrees of polar
varieties. Recall from Definition 2.18 that we introduced the polar degrees 𝛿 𝑗 (𝑋) of a
projective variety 𝑋 as the multidegrees of the conormal variety of 𝑋. Polar varieties offer
an alternative realization. We will prove in Theorem 4.16 below that both multidegrees of
the conormal variety and degrees of polar varieties yield the same definition. Until then,
we use the symbol 𝜇𝑖 (𝑋) to denote the 𝑖-th polar degree that comes from polar varieties.
To illustrate the concept of polar varieties, we examine the case of surfaces in 3-space.

Example 4.1 Imagine that you look at an algebraic surface 𝑋 ⊂ P3 from a point v ∈ P3 . If
you want to sketch the surface from your point of view, then you would draw its contour
curve 𝑃(𝑋, v). This is illustrated in Figure 4.1. The contour curve consists of all points p
on the surface 𝑋 such that the line spanned by p and v is tangent to 𝑋 at p. The first polar
degree 𝜇1 (𝑋) is the degree of the contour curve on 𝑋 for a generic point v.
Suppose that 𝑋 is defined by a general homogeneous polynomial 𝑓 (𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 ) of
degree 𝑑, and the viewpoint is v = (𝑣0 : 𝑣1 : 𝑣2 : 𝑣3 ). To compute the contour curve, we

© The Author(s) 2024 41


P. Breiding et al., Metric Algebraic Geometry, Oberwolfach Seminars 53,
https://doi.org/10.1007/978-3-031-51462-3_4
42 4 Polar Degrees

Fig. 4.1: The polar variety 𝑃 (𝑋, v) is the contour curve when the ellipsoid 𝑋 is viewed from the point v.

consider the directional derivative 𝜕v 𝑓 = 3𝑖=0 𝑣𝑖 𝜕𝑓 /𝜕𝑥𝑖 , which is a polynomial of degree


Í
𝑑 − 1. The contour curve 𝑃(𝑋, v) is the variety in P3 that is defined by 𝑓 and 𝜕v 𝑓 . So, by
Bézout’s Theorem, the degree of this curve is typically 𝜇1 (𝑋) = 𝑑 (𝑑 − 1).
Now, we change the setting slightly and imagine that our viewing of the surface 𝑋 is
not centered at a point but at a line 𝑉 ⊂ P3 . This time our contour set 𝑃(𝑋, 𝑉) consists of
all points p on the surface 𝑋 such that the plane spanned by p and the line 𝑉 is tangent
at p; see Figure 4.2. For a generic line 𝑉, the contour set 𝑃(𝑋, 𝑉) is finite. The cardinality
of 𝑃(𝑋, 𝑉) is the second polar degree 𝜇2 (𝑋). The finite variety 𝑃(𝑋, 𝑉) is now defined by
𝑓 = 𝜕v 𝑓 = 𝜕w 𝑓 = 0, where v and w are two distinct points on the line 𝑉. Using Bézout’s
Theorem again, we find that 𝜇2 (𝑋) = 𝑑 (𝑑 − 1) 2 for a general surface 𝑋 of degree 𝑑. ⋄

Fig. 4.2: The contour set consists of two points when the ellipsoid 𝑋 is viewed from the line 𝑉.

The contour sets described in the example above are known as polar varieties. To define
polar varieties in general, we need to fix some conventions and notations. For instance,
the dimension of the empty set is considered to be −1. Given two projective subspaces 𝑉
4.1 Polar Varieties 43

and 𝑊 in P𝑛 , their projective span (equivalently, their join) is denoted by 𝑉 + 𝑊 ⊆ P𝑛 . If


the two subspaces 𝑉 and 𝑊 are disjoint in projective space then we have

dim(𝑉 + 𝑊) = dim(𝑉) + dim(𝑊) + 1.

Consider any projective variety 𝑋 ⊆ P𝑛 , with homogeneous ideal 𝐼 (𝑋) in C[𝑥0 , . . . , 𝑥 𝑛 ].


We write Reg(𝑋) for the regular locus of 𝑋. We recall that a projective subspace 𝑊 ⊆ P𝑛
is said to intersect 𝑋 non-transversely at p ∈ Reg(𝑋) if p ∈ 𝑊 and dim(𝑊 + 𝑇p 𝑋) < 𝑛,
where 𝑇p 𝑋 denotes the embedded tangent space of 𝑋 at p. For instance, if 𝑋 is a smooth
curve in P3 , then every line that intersects it does so non-transversely, while the tangent
planes of 𝑋 are the only planes that meet 𝑋 non-transversely.
Definition 4.2 The polar variety of a variety 𝑋 ⊆ P𝑛 with respect to a subspace 𝑉 ⊆ P𝑛 is

𝑃(𝑋, 𝑉) := { p ∈ Reg(𝑋)\𝑉 | 𝑉 + p intersects 𝑋 at p non-transversely}.

Let 𝑖 ∈ {0, 1, . . . , dim 𝑋 }. If 𝑉 is generic with dim 𝑉 = codim 𝑋 − 2 + 𝑖, then the degree of
𝑃(𝑋, 𝑉) is independent of 𝑉, and we can define

𝜇𝑖 (𝑋) := deg(𝑃(𝑋, 𝑉)).

The integer 𝜇𝑖 (𝑋) is called the 𝑖-th polar degree of 𝑋.


Example 4.3 A surface 𝑋 ⊂ P3 has three polar degrees. For 𝑖 = 0, 1, 2, the generic
subspace 𝑉 in Definition 4.2 is empty, a point, or a line, respectively. We saw the latter two
cases in Example 4.1. For the case 𝑖 = 0, we observe that 𝑃(𝑋, ∅) = 𝑋. So, the 0-th polar
degree 𝜇0 (𝑋) is the degree of the surface 𝑋. ⋄
Example 4.4 The identity 𝜇0 (𝑋) = deg(𝑋) holds in general. If 𝑖 = 0, then the dimension
of the generic subspace 𝑉 in Definition 4.2 is codim 𝑋 − 2. Hence, for every p ∈ Reg(𝑋),
 
dim (𝑉 + p) + 𝑇p 𝑋 = dim 𝑉 + 𝑇p 𝑋
= dim 𝑉 + dim 𝑋 − dim(𝑉 ∩ 𝑇p 𝑋)
≤ (codim 𝑋 − 2) + dim 𝑋 + 1
= 𝑛 − 1.

This means that 𝑉 + p intersects 𝑋 at p non-transversely. We conclude that the polar variety
for 𝑖 = 0 is the variety itself. In symbols, we have 𝑃(𝑋, 𝑉) = 𝑋, and so 𝜇0 (𝑋) = deg(𝑋).⋄
Example 4.5 The polar varieties of a plane curve 𝑋 are 𝑃(𝑋, ∅) = 𝑋 and 𝑃(𝑋, v) for a
point v. The latter is the finite set of points on 𝑋 whose tangent line passes through v. Those
points are contained in the vanishing locus of Δv 𝑓 , where 𝑓 is the defining polynomial of
the curve 𝑋 and Δv is the differential operator in (1.6). Hence, the polar variety 𝑃(𝑋, v)
is contained in the intersection of 𝑋 with its polar curve of order deg(𝑋) − 1 as defined
in Section 1.1. For a smooth curve 𝑋 of degree 𝑑, that containment is an equality, and so
𝜇1 (𝑋) = |𝑃(𝑋, v)| = 𝑑 (𝑑 − 1) by Bézout’s Theorem. ⋄
We will now give a second definition of polar varieties in terms of the Gauss map and
Schubert varieties. As before, we fix a projective subspace 𝑉 ⊆ P𝑛 . We observe that 𝑉 + p
44 4 Polar Degrees

intersects 𝑋 at p ∈ Reg(𝑋) non-transversely (i.e., 𝑛 > dim((𝑉 + p) + 𝑇p 𝑋)) if and only if

dim(𝑉 ∩ 𝑇p 𝑋) > dim 𝑉 − codim 𝑋. (4.1)

Since dim 𝑉 − codim 𝑋 is the expected dimension of the intersection of the two projective
subspaces 𝑉 and 𝑇p 𝑋, condition (4.1) means that the tangent space 𝑇p 𝑋 meets 𝑉 in an
unexpectedly large dimension.
The subspaces that meet 𝑉 unexpectedly form special instances of Schubert varieties:

Σ𝑚 (𝑉) := {𝑇 ∈ Gr(𝑚, P𝑛 ) | dim(𝑉 ∩ 𝑇) > dim 𝑉 − 𝑛 + 𝑚} . (4.2)

Here Gr(𝑚, P𝑛 ) is the Grassmannian of 𝑚-dimensional projective subspaces in P𝑛 . This is


a smooth projective variety of dimension (𝑚 + 1) (𝑛 − 𝑚), embedded in P ( 𝑚+1) −1 via the
𝑛+1

Plücker embedding; see [133, Chapter 5]. For instance, if 𝑚 = 1 and 𝑛 = 3, we get the
Grassmannian of lines in P3 . As a projective variety, the Grassmannian Gr(1, P3 ) consists
of all points x = (𝑥01 : 𝑥02 : 𝑥03 : 𝑥12 : 𝑥13 : 𝑥23 ) in the 5-dimensional ambient space P5
that satisfy the quadratic Plücker relation 𝑥 01 𝑥 23 − 𝑥 02 𝑥13 + 𝑥03 𝑥 12 = 0. Such a point x
represents the line spanned by points p and q in P3 if 𝑥 𝑖 𝑗 = 𝑝 𝑖 𝑞 𝑗 − 𝑝 𝑗 𝑞 𝑖 for 0 ≤ 𝑖 < 𝑗 ≤ 3.
Every variety 𝑋 of dimension 𝑚 in P𝑛 comes with a natural map to the Grassmannian:

𝛾 𝑋 : 𝑋 d Gr(𝑚, P𝑛 ), p ↦→ 𝑇p 𝑋.

This is the Gauss map. It takes each regular point p on 𝑋 to its tangent space 𝑇p 𝑋. If 𝑋
is given by polynomial equations, then we compute 𝛾 𝑋 by mapping p to the kernel of the
Jacobian of the equations at p. If 𝑋 is given by a parametrization, then we can represent
the Gauss map 𝛾 𝑋 by taking derivatives in the parametrization.
Example 4.6 (Twisted cubic curve) Let 𝑋 be the curve in P3 with the parametrization

𝜈 : P1 → P3 , (𝑠 : 𝑡) ↦→ (𝑠3 : 𝑠2 𝑡 : 𝑠𝑡 2 : 𝑡 3 ).

The tangent space of 𝑋 at the point p = 𝜈((𝑠 : 𝑡)) is the line in P3 spanned by the rows of
the Jacobian matrix  2
3𝑠 2𝑠𝑡 𝑡 2 0

.
0 𝑠2 2𝑠𝑡 3𝑡 2
The Plücker coordinates of the tangent line 𝛾 𝑋 (p) are the 2 × 2 minors of this 2 × 4 matrix.
After dividing the minors by 3, we obtain

𝑥01 = 𝑠4 , 𝑥02 = 2𝑠3 𝑡, 𝑥03 = 3𝑠2 𝑡 2 , 𝑥12 = 𝑠2 𝑡 2 , 𝑥13 = 2𝑠𝑡 3 , 𝑥23 = 𝑡 4 . (4.3)

This shows that the image of the Gauss map of the twisted cubic curve 𝑋 is a rational
normal curve of degree four in the Grassmannian of lines Gr(1, P3 ) ⊂ P5 . ⋄
We now turn to the Schubert varieties Σ𝑚 (𝑉). These varieties are cut out by linear
equations in Plücker coordinates.
Example 4.7 (𝑚 = 1, 𝑛 = 3) We consider three types of Schubert varieties of lines. If 𝑉 is
a point in P3 , then Σ1 (𝑉) = Gr(1, P3 ). If 𝑉 is a plane in P3 , then Σ1 (𝑉) is the surface of
4.2 Projective Duality 45

all lines in that plane. Finally, suppose that 𝑉 is a line in P3 , with Plücker coordinates 𝑣𝑖 𝑗 .
Then Σ1 (𝑉) is defined by the linear equation

𝑣01 𝑥23 − 𝑣02 𝑥13 + 𝑣03 𝑥 12 + 𝑣12 𝑥03 − 𝑣13 𝑥02 + 𝑣23 𝑥 01 = 0. (4.4)

This Schubert variety is a threefold. It consists of all lines that intersect the given line 𝑉. ⋄
We now come to our punchline, which is the second definition of polar varieties.
Proposition 4.8 Fix a variety 𝑋 of dimension 𝑚 in P𝑛 . For any subspace 𝑉 of P𝑛 , the polar
variety 𝑃(𝑋, 𝑉) is the pullback of the Schubert variety Σ𝑚 (𝑉) under the Gauss map, i.e.

−1 (Σ (𝑉)).
𝑃(𝑋, 𝑉) = 𝛾 𝑋 𝑚

Proof The condition (4.1) is equivalent to 𝑇p 𝑋 ∈ Σ𝑚 (𝑉). □


Example 4.9 (Twisted cubic curve) In Example 4.7, if 𝑉 is a point in P3 ,
then we have
−1 −1
3

𝑃(𝑋, 𝑉) = 𝛾 𝑋 Gr(1, P ) = 𝑋. For a line 𝑉, we compute 𝑃(𝑋, 𝑉) = 𝛾 𝑋 (Σ1 (𝑉)) by
substituting (4.3) into (4.4). The result is a binary quartic in (𝑠, 𝑡). This quartic has four
zeros in P1 . Their image under the map 𝜈 is the polar variety 𝑃(𝑋, 𝑉). Thus 𝑃(𝑋, 𝑉)
consists of four points. The polar degrees of our curve 𝑋 are 𝜇0 (𝑋) = 3 and 𝜇1 (𝑋) = 4. ⋄
Corollary 4.10 An inclusion of projective linear subspaces gives a reverse inclusion of
polar varieties. To be precise, for any fixed variety 𝑋 in P𝑛 and subspaces 𝑉 ⊂ 𝑉 ′, we
have 𝑃(𝑋, 𝑉 ′) ⊂ 𝑃(𝑋, 𝑉).
Proof Use Proposition 4.8 and the inclusion Σ𝑚 (𝑉 ′) ⊂ Σ𝑚 (𝑉) of Schubert varieties. □

4.2 Projective Duality

Duality is a fundamental concept in many fields of mathematics, including convexity,


optimization, and algebraic geometry. Primal-dual approaches in polynomial optimization
can be understood via the duality theory of projective algebraic geometry. We saw this in
Chapter 2, in the context of polynomial optimization, where the conormal variety plays a
key role for computing the ED degree in Theorem 2.13.
This section offers a second point of entry, by offering a self-contained introduction to
duality theory of projective varieties, presented in a friendlier and more geometric way than
in Section 2.3. There is a one-to-one correspondence between hyperplanes 𝐻 in P𝑛 and
points 𝐻 ∨ in the dual projective space (P𝑛 ) ∗ . We recall from our discussion in Section 2.3
that the dual variety 𝑋 ∨ of a projective variety 𝑋 ⊆ P𝑛 is the projection of the conormal
variety 𝑁 𝑋 to the second factor. It parametrizes all tangent hyperplanes:

𝑋 ∨ :=

𝐻 ∨ ∈ (P𝑛 ) ∗ | ∃ p ∈ Reg(𝑋) : 𝑇p 𝑋 ⊆ 𝐻 .

This generalizes the dual of a plane curve in (1.7). In Chapter 2 we used the Euclidean
inner product to identify projective space with its dual space. Here, we defined the dual
46 4 Polar Degrees

variety without this identification. The following result is found in Section I.1.3 of the book
by Gel’fand, Kapranov and Zelevinsky [71].
Theorem 4.11 (Biduality) Fix a projective variety 𝑋 ⊆ P𝑛 , and let p ∈ Reg(𝑋) and
𝐻 ∨ ∈ Reg(𝑋 ∨ ). The hyperplane 𝐻 is tangent to the variety 𝑋 at the point p if and only if
the hyperplane p∨ is tangent to the dual variety 𝑋 ∨ at the point 𝐻 ∨ . In particular, we have

(𝑋 ∨ ) ∨ = 𝑋.

Example 4.12 If 𝑋 is a projective subspace of P𝑛 , given as the row space of a matrix,


then its dual 𝑋 ∨ is the subspace of (P𝑛 ) ∗ given by the kernel of that matrix, so dim 𝑋 ∨ =
𝑛 − 1 − dim 𝑋. Note that (P𝑛 ) ∨ = ∅. ⋄
Example 4.13 (Twisted cubic curve) Let 𝑛 = 3 and fix coordinates p = ( 𝑝 0 : 𝑝 1 : 𝑝 2 : 𝑝 3 )
on P3 and 𝐻 = (ℎ0 : ℎ1 : ℎ2 : ℎ3 ) on (P3 ) ∗ . The twisted cubic curve 𝑋 in Example 4.6 is
defined by the prime ideal

⟨ 𝑝 0 𝑝 2 − 𝑝 12 , 𝑝 0 𝑝 3 − 𝑝 1 𝑝 2 , 𝑝 1 𝑝 3 − 𝑝 22 ⟩.

Its dual variety 𝑋 ∨ is a quartic surface in (P3 ) ∗ . The equation of 𝑋 ∨ is the discriminant of
a binary cubic:
27ℎ20 ℎ23 − 18ℎ0 ℎ1 ℎ2 ℎ3 + 4ℎ0 ℎ23 + 4ℎ13 ℎ3 − ℎ21 ℎ22 . (4.5)
Metric geometry of discriminants will become important in Chapter 9. At this point, our
readers are encouraged to check computationally that (𝑋 ∨ ) ∨ = 𝑋. ⋄
Example 4.14 Fix a surface 𝑋 ⊂ P3 . Figure 4.2 illustrates the polar variety 𝑃(𝑋, 𝑉) for
a generic line 𝑉. The tangent planes through 𝑉 correspond in (P3 ) ∗ to points on the dual
variety 𝑋 ∨ that lie on the line 𝑉 ∨ ; see Figure 4.3. Hence, if 𝑋 ∨ is a surface as well, then
its degree is the second polar degree of 𝑋, i.e., 𝜇2 (𝑋) = deg(𝑋 ∨ ). Otherwise, if the dual
variety 𝑋 ∨ is a curve, then the line 𝑉 ∨ misses it and 𝜇2 (𝑋) = 0. This happens, for instance,
when 𝑋 is the quartic surface (4.5), now rewritten in primal coordinates p.

tangent
xv
x

vv

planes

Fig. 4.3: A pair of dual surfaces 𝑋 and 𝑋 ∨ in projective 3-space satisfies 𝜇2 (𝑋) = deg(𝑋 ∨ ).

Figure 4.1 shows the polar curve 𝑃(𝑋, v) of a surface 𝑋 ⊂ P3 for a generic point v. This
consists of all points p on 𝑋 whose tangent plane contains v. We find 𝜇1 (𝑋) = deg(𝑃(𝑋, v))
4.2 Projective Duality 47

by intersecting the curve with a generic plane 𝐻. Hence, the first polar degree 𝜇1 (𝑋) counts
all regular points p ∈ 𝑋 such that

p ∈ 𝐻 and v ∈ 𝑇p 𝑋. (4.6)

These tangent planes correspond to points q := (𝑇p 𝑋) ∨ on the dual variety 𝑋 ∨ . Using the
biduality in Theorem 4.11, we have 𝑇q 𝑋 ∨ = p∨ if the dual variety 𝑋 ∨ is a surface. In that
case, the conjunction in (4.6) is equivalent to

𝐻 ∨ ∈ 𝑇q 𝑋 ∨ and q ∈ v∨ . (4.7)

H Vv

p2
Hv
q1
v

q2
p1

Fig. 4.4: The identity 𝜇1 (𝑋) = 𝜇1 (𝑋 ∨ ) holds for pairs of dual surfaces in projective 3-space.

Comparing (4.7) with (4.6), we see that the point-plane pair (𝐻 ∨ , v∨ ) imposes the same
conditions on points q ∈ 𝑋 ∨ as the point-plane pair (v, 𝐻) imposes on points p ∈ 𝑋;
see Figure 4.4. By the genericity of (v, 𝐻), we conclude that 𝜇1 (𝑋) = 𝜇1 (𝑋 ∨ ) if 𝑋 ∨ is a
surface. If 𝑋 ∨ is a curve, then 𝑇q 𝑋 ∨ ⊊ p∨ and so the only condition imposed by (4.6) on the
points q ∈ 𝑋 ∨ is that they must lie in v∨ . Here, 𝜇1 (𝑋) = |𝑋 ∨ ∩ v∨ | = deg(𝑋 ∨ ) = 𝜇0 (𝑋 ∨ ).
Finally, if 𝑋 ∨ is a point (i.e., 𝑋 is a plane), then 𝜇1 (𝑋) = 0. ⋄

The observed relations between the polar degrees of a variety and its dual are true
in great generality. The sequence of polar degrees of a projective variety 𝑋 equals the
sequence of polar degrees of its dual variety 𝑋 ∨ in reversed order. As seen in Example 4.4,
the first non-zero entry is deg(𝑋), and its last non-zero entry is the degree of the dual 𝑋 ∨ .
We summarize these key properties of polar degrees:

Theorem 4.15 Let 𝑋 be an irreducible projective variety, and

𝛼(𝑋) := dim 𝑋 − codim 𝑋 ∨ + 1.

The following hold for the polar degrees of 𝑋:


(a) 𝜇𝑖 (𝑋) > 0 ⇔ 0 ≤ 𝑖 ≤ 𝛼(𝑋).
(b) 𝜇0 (𝑋) = deg 𝑋.
(c) 𝜇 𝛼(𝑋) (𝑋) = deg 𝑋 ∨ .
(d) 𝜇𝑖 (𝑋) = 𝜇 𝛼(𝑋)−𝑖 (𝑋 ∨ ).
48 4 Polar Degrees

The ideas discussed in Example 4.14 can be turned into formal proofs for almost all
assertions in Theorem 4.15. The direction “⇐” in (a) is a bit tricky. For details, we refer to
the article by Holme [91]. Another proof strategy is to first establish the relation of the polar
degrees with the conormal variety 𝑁 𝑋 (see Definition 2.16). Recall from Definition 2.18
that we have defined the polar degrees of 𝑋 to be the multidegrees of 𝑁 𝑋 . More precisely,
for generic projective subspaces 𝐿 1 and 𝐿 2 , we have

𝛿 𝑗 (𝑋) := |𝑁 𝑋 ∩ (𝐿 1 × 𝐿 2 )|, where dim 𝐿 1 = 𝑛 + 1 − 𝑗 and dim 𝐿 2 = 𝑗 .

We saw in Section 2.3 that the multidegree is the cohomology class of the conormal variety.
Theorem 4.16 The multidegree agrees with the polar degrees. To be precise, we have
𝛿 𝑗 (𝑋) = 𝜇𝑖 (𝑋), where 𝑖 := dim 𝑋 + 1 − 𝑗.
This theorem and the biduality relation 𝑁 𝑋 = 𝑁 𝑋∨ in (2.15) imply Theorem 4.15 (d).
Using Example 4.4, they also imply (b) and (c) in Theorem 4.15. The direction “⇒” in
Theorem 4.15 (a) can also be deduced directly from the definition of the 𝛿 𝑗 (𝑋).
Example 4.17 We see from Figure 4.4 and conditions (4.6) and (4.7) that the first polar
degree of a surface 𝑋 in P3 equals 𝜇1 (𝑋) = |𝑁 𝑋 ∩ (𝐻 ×𝑉 ∨ )| = 𝛿2 (𝑋). Hence Theorem 4.16
holds for surfaces 𝑋 in P3 . ⋄
Proof (of Theorem 4.16) We present the main ideas of the proof. For complete proofs, we
refer to [106, Proposition 3 on page 187] or [70, Lemma 2.23 on page 169].
First, we remark that the formulation of the conormal variety in Chapter 2 used the
Euclidean inner product to identify projective space with its dual. In this chapter, we do
not use the Euclidean structure. Instead, we formulate the relevant notions using abstract
duality. The conormal variety is

𝑁𝑋 = (p, 𝐻 ∨ ) ∈ P𝑛 × (P𝑛 ) ∗ | p ∈ Reg(𝑋), 𝑇p 𝑋 ⊆ 𝐻 .

The projection of the conormal variety 𝑁 𝑋 onto the first factor P𝑛 is the variety 𝑋 we
started with. The projection onto the second factor (P𝑛 ) ∗ is the dual variety 𝑋 ∨ .
We compute the multidegrees of 𝑁 𝑋 . Let 𝐿 1 ⊆ P𝑛 and 𝐿 2 ⊆ (P𝑛 ) ∗ be generic subspaces
of dimensions 𝑛 + 1 − 𝑗 and 𝑗, respectively. Set 𝑉 := 𝐿 2∨ . Note that the subspace 𝑉 has the
correct dimension for the computation of the 𝑖-th polar degree, where 𝑖 = dim 𝑋 +1− 𝑗. This
follows from dim 𝑉 = 𝑛 − 𝑗 − 1 = codim 𝑋 − 2 + 𝑖. We now consider a generic point (p, 𝐻 ∨ )
in the intersection 𝑁 𝑋 ∩ (P𝑛 × 𝐿 2 ). Then p is regular point of 𝑋. Both its tangent space 𝑇p 𝑋
and 𝑉 = 𝐿 2∨ are contained in the hyperplane 𝐻. In particular, we have dim(𝑉 + 𝑇p 𝑋) < 𝑛.
Hence p is in the polar variety 𝑃(𝑋, 𝑉). In fact, the projection 𝑁 𝑋 ∩ (P𝑛 × 𝐿 2 ) → 𝑃(𝑋, 𝑉)
onto the first factor is birational. Hence,

𝜇𝑖 (𝑋) = deg(𝑃(𝑋, 𝑉)) = |𝑃(𝑋, 𝑉) ∩ 𝐿 1 | = |𝑁 𝑋 ∩ (𝐿 1 × 𝐿 2 )| = 𝛿 𝑗 (𝑋),

which yields the stated formula. □


Many varieties in applications are defined by rank constraints on matrices or tensors.
Determinantal varieties and Segre–Veronese varieties will make an appearance in several
subsequent chapters. It is thus worthwhile to examine their polar varieties and polar degrees.
4.3 Chern Classes 49

Example 4.18 (A Segre variety) We revisit Example 2.22, where an explicit multidegree
was computed. Let 𝑋 be the variety of 3 × 3 matrices of rank 1. This is a 4-dimensional
smooth subvariety of P8 . As an abstract variety, we have 𝑋 = P2 × P2 . The prime ideal of 𝑋
is generated by the nine 2 × 2 minors of the 3 × 3 matrix. The prime ideal of the conormal
variety 𝑁 𝑋 is the ideal I defined in the Macaulay2 fragment in Example 2.22.
In light of Theorem 4.16, the polar degrees of the Segre variety 𝑋 are

𝜇0 (𝑋) = 6, 𝜇1 (𝑋) = 12, 𝜇2 (𝑋) = 12, 𝜇3 (𝑋) = 6, 𝜇4 (𝑋) = 3.

Here 𝛼(𝑋) = 4. The dual variety 𝑋 ∨ is a cubic hypersurface in P8 . Its defining poly-
nomial is the 3 × 3-determinant. This was called minors(3,h) in Example 2.22. By
Theorem 4.15 (d), we have

𝜇0 (𝑋 ∨ ) = 3, 𝜇1 (𝑋 ∨ ) = 6, 𝜇2 (𝑋 ∨ ) = 12, 𝜇3 (𝑋 ∨ ) = 12, 𝜇4 (𝑋 ∨ ) = 6.

Can you describe the polar varieties 𝑃(𝑋, 𝑉) and 𝑃(𝑋 ∨ , 𝑉) in the language of linear
algebra? Which matrices do they contain for a given linear subspace 𝑉 of the matrix space
R3×3 ? How about symmetric 3 × 3 matrices? ⋄

4.3 Chern Classes

In what follows we take a look at a concept that is ubiquitous in differential geometry,


algebraic geometry, and algebraic topology. These three fields are now conspiring to furnish
mathematical foundations for data science. It is thus natural for our book to devote one
section to an important theoretical topic in their intersection.
Chern classes are topological invariants associated with vector bundles on smooth
manifolds or varieties. If 𝑋 is a smooth and irreducible projective variety, then the polar
degrees 𝜇𝑖 (𝑋) can be computed from the Chern classes of 𝑋. The formulas will be presented
in Theorem 4.20. In light of Theorems 2.13 and 5.5, we can obtain formulas, in terms of
Chern classes, for both ED degrees and Wasserstein degrees.
To a vector bundle E of rank 𝑟 on a variety 𝑋, we associate the Chern classes
𝑐 0 (E), . . . , 𝑐𝑟 (E). Formally, these are elements in the Chow ring of 𝑋. Chern classes
are understood more easily when the vector bundle E is globally generated. Assuming that
this holds for E, we choose general global sections 𝜎1 , . . . , 𝜎 𝑗 : 𝑋 → E. These 𝑗 global
sections determine the following subvariety of the given variety 𝑋:

𝐷 (𝜎1 , . . . , 𝜎 𝑗 ) := 𝑥 ∈ 𝑋 | 𝜎1 (𝑥), . . . , 𝜎 𝑗 (𝑥) are linearly dependent . (4.8)

Experts refer to (4.8) as a degeneracy locus of the vector bundle E. In concrete scenarios,
𝐷 (𝜎1 , . . . , 𝜎 𝑗 ) is the determinantal variety given by the maximal minors of a certain 𝑟 × 𝑗
matrix with linear entries. We are interested in the class of this variety in the Chow ring.

Definition 4.19 The Chern class 𝑐𝑟+1− 𝑗 (E) is the class of (4.8) in the Chow ring of 𝑋.
50 4 Polar Degrees

For the purpose of this section, it is not necessary for the reader to master the definition
of the Chow ring. It suffices for us to understand the degree of 𝑐𝑟+1− 𝑗 (E). This degree is a
number, not a class. It is defined as the degree of the degeneracy locus 𝐷 (𝜎1 , . . . , 𝜎 𝑗 ) as
a projective variety, for general sections 𝜎𝑖 of E. For instance, the degree of the top Chern
class 𝑐𝑟 (E) is the degree of the vanishing locus of a single general global section.
There are some calculation rules that allow us to compute Chern classes of a vector
bundle of interest in terms of simpler vector bundles. Most notable is the Whitney sum
formula [69, Theorem 3.2]. This applies when we have a short exact sequence of vector
bundles 0 → E ′ → E → E ′′ → 0. It states that
∑︁
𝑐 𝑘 (E) = 𝑐 𝑖 (E ′) 𝑐 𝑗 (E ′′).
𝑖+ 𝑗=𝑘

Every smooth, irreducible variety 𝑋 has a distinguished vector bundle, namely the tan-
gent bundle T 𝑋. The Chern class 𝑐 𝑘 (𝑋) of 𝑋 is an abbreviation for the Chern class 𝑐 𝑘 (T 𝑋).
Theorem 4.20 ([91, Equation (3)]) Let 𝑋 be a smooth, irreducible projective variety, and
let 𝑚 := dim 𝑋. Then,
𝑖  
∑︁
𝑘 𝑚−𝑘 +1
𝜇𝑖 (𝑋) = (−1) deg(𝑐 𝑘 (𝑋)). (4.9)
𝑘=0
𝑚 −𝑖+1

This formula can be inverted to write degrees of Chern classes in terms of polar degrees:
𝑘  
∑︁ 𝑚 −𝑖+1
deg(𝑐 𝑘 (𝑋)) = (−1) 𝑖 𝜇𝑖 (𝑋). (4.10)
𝑖=0
𝑚−𝑘 +1

Remark 4.21 Both formulas also hold for singular varieties, after replacing the classical
Chern classes with Chern–Mather classes. That result is due to Piene [145].
An important difference between polar degrees and Chern classes is the following: Polar
degrees are projective invariants of the embedded variety 𝑋 ⊆ P𝑛 . This holds also more
generally for the polar classes, i.e., the rational equivalence classes (in the Chow ring of 𝑋)
of the polar varieties. Chern classes are even intrinsic invariants of the variety 𝑋, i.e., they
do not depend on the embedding of 𝑋 in projective space.
Example 4.22 Here are some basic facts about the Chern classes of a smooth variety 𝑋.
(a) We see from (4.10) that deg(𝑐 0 (𝑋)) = 𝜇0 (𝑋) = deg 𝑋.
(b) The degree of the top Chern class of 𝑋 equals its topological Euler characteristic:

deg(𝑐 𝑚 (𝑋)) = 𝜒(𝑋), 𝑚 = dim 𝑋.

(c) If 𝑋 is a curve of genus 𝑔(𝑋), then deg(𝑐 1 (𝑋)) = 𝜒(𝑋) = 2 − 2𝑔(𝑋) is independent
of the embedding, while we see from (4.9) that

𝜇1 (𝑋) = 2 deg 𝑋 − deg(𝑐 1 (𝑋)) = 2(deg 𝑋 + 𝑔(𝑋) − 1), (4.11)

which does depend on the embedding of 𝑋. ⋄


4.3 Chern Classes 51

Example 4.23 If 𝑋 ⊂ P𝑛 is a rational curve, then 𝜇1 (𝑋) = 2 deg 𝑋 − 2 by (4.11). We can


check this by examining the various cases:
• If 𝑋 is a line, then its dual variety 𝑋 ∨ is never a hypersurface, and so 𝜇1 (𝑋) = 0.
• If 𝑋 is a conic (i.e., deg 𝑋 = 2) then 𝑋 ∨ is a (cone over a) conic, and so we have
that 𝜇1 (𝑋) = deg 𝑋 ∨ = 2.
• If 𝑋 is a twisted cubic (i.e., deg 𝑋 = 3), then 𝑋 ∨ is (a cone over) the discriminant in
(4.5). Therefore, 𝜇1 (𝑋) = deg 𝑋 ∨ is the degree of that discriminant, which is 4. See
Example 4.13.
• If 𝑋 is a rational normal curve of degree 𝑑, then its dual variety is (a cone over) the
discriminant of a binary form of degree 𝑑. Its degree is 𝜇1 (𝑋) = deg 𝑋 ∨ = 2𝑑 − 2. ⋄

We close with the expression for the ED degree in terms of Chern classes.

Corollary 4.24 Let 𝑋 be a smooth variety of dimension 𝑚 in P𝑛 which satisfies the hy-
potheses in Theorem 2.13. These always hold after a general linear change of coordinates.
We have
𝑚
∑︁
EDdegree(𝑋) = (−1) 𝑖 (2𝑚+1−𝑖 − 1) deg(𝑐 𝑖 (𝑋)).
𝑖=0

Proof Equation (2.19) in Theorem 2.23 shows that the ED degree is the degree of the
conormal variety 𝑁 𝑋 . By Theorem 4.16, this is the sum of the multidegrees, and hence the
sum of the polar degrees. See Theorem 2.13. We now simply take the sum of the alternating
sums in (4.9) for 𝑖 = 0, 1, . . . , 𝑚. □
As an application, we now compute the generic ED degree of the Veronese variety.

Example 4.25 Let 𝑛 = 𝑚+𝑑𝑑 − 1 and let 𝑋 ⊂ P𝑛 be the 𝑑-th Veronese embedding of P𝑚 .
The generic ED degree of 𝑋 from Definition 2.8 satisfies

(2𝑑 − 1) 𝑚+1 − (𝑑 − 1) 𝑚+1


EDdegreegen (𝑋) = . (4.12)
𝑑
This is precisely the ED degree of the image of 𝑋 under a generic linear change of
coordinates in P𝑛 . Corollary 4.24 is a formula for the generic ED degree.
We shall now derive (4.12) from Corollary 4.24. Our argument will be taken from the
proof of [60, Proposition 7.10]. The 𝑖th Chern class of the underlying projective space P𝑚
𝑚+1 𝑖
is 𝑐 𝑖 (P ) = 𝑖 ℎ where ℎ is the hyperplane class in P𝑚 . Since 𝑋 is the image under
𝑚

the 𝑑th Veronese embedding of P𝑚 , its hyperplane class is 𝑑ℎ. The degree of its Chern class
𝑐 𝑖 (𝑋) is the integral of (𝑑ℎ) 𝑚−𝑖 𝑐 𝑖 (P𝑚 ) over P𝑚 . Since ℎ 𝑚−𝑖 ℎ𝑖 = ℎ 𝑚 = 1, the numerical
 𝑚−𝑖
value of this formal integral (in the Chow ring of P𝑚 ) equals deg(𝑐 𝑖 (𝑋)) = 𝑚+1 𝑖 𝑑 .
We plug this into Corollary 4.24. After some algebraic manipulations, we arrive at (4.12).
For 𝑚 = 1 the formula (4.12) evaluates to 𝑑 + (2𝑑 − 2) = 𝜇0 (𝑋) + 𝜇1 (𝑋), as desired. ⋄

In conclusion, Chern classes provide a conceptual framework for the degrees of opti-
mization problems in metric algebraic geometry. This chapter offered a geometric intro-
duction. Example 4.25 is a nice illustration of how Chern classes are used in practice.
52 4 Polar Degrees

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International
License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and
reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter’s Creative Commons
license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s
Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the
permitted use, you will need to obtain permission directly from the copyright holder.
Chapter 5
Wasserstein Distance

A fundamental problem in metric algebraic geometry is distance minimization. We seek a


point in a variety 𝑋 in R𝑛 that is closest to a given data point u ∈ R𝑛 . Thus, we wish to

minimize ||x − u|| subject to x ∈ 𝑋. (5.1)

In Chapter 2 we studied this problem for the Euclidean distance on R𝑛 . We here examine
(5.1) for the case when the distance is given by a polyhedral norm. We note that the
minimum in (5.1) is always attained because 𝑋 is non-empty and closed. Hence, there
exists at least one optimal solution. If that solution is unique then we denote it by x∗ . In
Sections 5.2 and 5.3 we focus on a special class of polyhedral norms that arise from optimal
transport theory. The corresponding distance is known as Wasserstein distance.

5.1 Polyhedral Norms

A norm || · || on the real vector space R𝑛 is a polyhedral norm if its unit ball is polyhedral:

𝐵 = {x ∈ R𝑛 | ||x|| ≤ 1}.

More precisely, 𝐵 is a centrally symmetric convex polytope. Conversely, every centrally


symmetric convex polytope 𝐵 in R𝑛 defines a polyhedral norm on R𝑛 . Using the unit ball,
we can paraphrase the optimization problem (5.1) as follows:

minimize 𝜆 subject to 𝜆 ≥ 0 and (u + 𝜆𝐵) ∩ 𝑋 ≠ ∅. (5.2)

Example 5.1 The unit ball 𝐵 ⊂ R𝑛 of the ∞-norm ||x|| ∞ = max1≤𝑖 ≤𝑛 |𝑥 𝑖 | is the regular
cube [−1, +1] 𝑛 . The unit ball of the dual norm ||x|| 1 := |𝑥1 | + · · · + |𝑥 𝑛 | is the convex
polytope conv{±e1 , ±e2 , . . . , ±e𝑛 } ⊂ R𝑛 . The latter polytope is called the crosspolytope.
It generalizes the octahedron from 𝑛 = 3 to 𝑛 ≥ 4. ⋄

© The Author(s) 2024 53


P. Breiding et al., Metric Algebraic Geometry, Oberwolfach Seminars 53,
https://doi.org/10.1007/978-3-031-51462-3_5
54 5 Wasserstein Distance

Polyhedral norms are very important in optimal transport theory, where one uses a Wasser-
stein norm on the space of probability distributions. Polytopes arise for distributions on
finite state spaces. This will be our main application, to be developed later in this chapter.
We begin our discussion with a general polyhedral norm; that is, we allow the unit ball 𝐵
to be an arbitrary 𝑛-dimensional centrally symmetric polytope in R𝑛 . As before, we use the
Euclidean inner product ⟨·, ·⟩. Recall that a subset 𝐹 of the polytope 𝐵 is called a face if
there exists a vector v ∈ R𝑛 \{0} such that

𝐹 = { x ∈ 𝐵 | ⟨x, v⟩ ≥ ⟨y, v⟩ for all y ∈ 𝐵 .

One says that the face 𝐹 maximizes the linear functional ℓ(x) := ⟨x, v⟩. The vector v is
a normal vector of 𝐹. The boundary of 𝐵 consists of faces whose dimensions range from
0 to 𝑛 − 1. Faces of maximal dimension are called facets. The set of all faces, ordered
by inclusion, is a partially ordered set, called the face poset of 𝐵. For an introduction to
polytopes see Ziegler’s book [182]. An important combinatorial invariant is the 𝑓 -vector.
Definition 5.2 Let 𝐵 ⊂ R𝑛 be a polytope. The 𝑓 -vector of 𝐵 is 𝑓 (𝐵) = ( 𝑓0 , 𝑓1 , . . . , 𝑓𝑛−1 ),
where 𝑓𝑖 denotes the number of 𝑖-dimensional faces of 𝐵, for 0 ≤ 𝑖 ≤ 𝑛 − 1.
The dual of the unit ball 𝐵 is also a centrally symmetric polytope, namely it is the set

𝐵∗ = v ∈ R𝑛 | ⟨x, v⟩ ≤ 1 for all x ∈ 𝐵 .




The norm || · || ∗ defined by the dual polytope 𝐵∗ is dual to the norm || · || given by 𝐵. The
𝑓 -vector of 𝐵∗ is the reverse of the 𝑓 -vector of 𝐵. More precisely, we have

𝑓𝑖 (𝐵∗ ) = 𝑓𝑛−1−𝑖 (𝐵) for 𝑖 = 0, 1, . . . , 𝑛 − 1.

Example 5.3 Fix the unit cube 𝐵 = [−1, 1] 𝑛 . Its dual is the crosspolytope

𝐵∗ = conv{±e1 , ±e2 , . . . , ±e𝑛 } ⊂ R𝑛 .

Here e 𝑗 is the 𝑗th standard basis vector. The number of 𝑖-dimensional faces of the cube is
𝑓𝑖 (𝐵) = 𝑛𝑖 · 2𝑛−𝑖 . Consequently, its 𝑓 -vector is 𝑓 (𝐵) = (2𝑛 , 2𝑛−1 𝑛, . . . , 2𝑛) ∈ R𝑛 .
The 3-dimensional crosspolytope is the octahedron. The cube 𝐵 has 8 vertices, 12 edges
and 6 facets. By duality, the octahedron 𝐵∗ has 6 vertices, 12 edges, and 8 facets.

𝐵 𝐵∗

Their 𝑓 -vectors are 𝑓 (𝐵) = (8, 12, 6) and 𝑓 (𝐵∗ ) = (6, 12, 8). These numbers govern the
combinatorial structure of the associated polyhedral norms || · || ∞ and || · || 1 on R3 . ⋄
We now turn to the optimization problem given in (5.1) or (5.2). To derive the critical
equations, we shall use a combinatorial stratification of the problem by the face poset of
the polytope 𝐵. The next lemma associates a unique face 𝐹 of 𝐵 to the optimal point x∗ .
5.1 Polyhedral Norms 55

We write 𝐿 𝐹 for the linear span of the face 𝐹 in R𝑛 . If 𝐹 has dimension 𝑗 < 𝑛, then
𝐿 𝐹 has dimension 𝑗 + 1, because the origin lies in the interior of 𝐵. For instance, if 𝐹 is a
vertex, then 𝐿 𝐹 is the line through 𝐹 and the origin. If 𝐹 is a facet, then 𝐿 𝐹 = R𝑛 .
Lemma 5.4 Suppose that 𝑋 is in general position. Given u ∈ R𝑛 , let x∗ be an optimal
solution in (5.2) and let 𝜆∗ be the optimal value. Then x∗ is unique, and the point 𝜆1∗ (x∗ − u)
lies in the relative interior of a unique face 𝐹 of the polytope 𝐵. Let ℓ𝐹 be a linear
functional whose maximum over 𝐵 is attained on 𝐹. Then, the optimal point x∗ in (5.1) can
be recovered as the unique solution of the optimization problem

Minimize ℓ𝐹 (x) subject to x ∈ (u + 𝐿 𝐹 ) ∩ 𝑋. (5.3)

Proof We defined 𝜆∗ to be the optimal value of (5.2). By construction, it is also the optimal
value of (5.3). The general position hypothesis ensures that the affine space u+ 𝐿 𝐹 intersects
the real variety 𝑋 transversally, and x∗ is a smooth point of that intersection. The genericity
assumption ensures that (u + 𝜆∗ 𝐵) ∩ 𝑋 = {x∗ } is a singleton. Hence, the optimal point x∗
is unique, and it is also the minimizer of the linear functional ℓ𝐹 on the variety (u+ 𝐿 𝐹 ) ∩ 𝑋.
By our hypothesis, this linear function is generic relative to the variety, so the number of
critical points is finite and the function values are distinct. □
Lemma 5.4 motivates the following strategy for the distance minimization problem (5.1):
For each of the finitely many faces 𝐹 of 𝐵, solve the linear program (5.3) over 𝑋, and de-
termine the distance from u to 𝑋 from this finite amount of data. This splits into three
subtasks: Combinatorial Preprocessing, Numerical Optimization, and (optionally) Alge-
braic Postprocessing. We give a high-level description of these steps in Algorithms 1–3.

Algorithm 1: Combinatorial Preprocessing


Output: A description of all faces 𝐹 of the unit ball 𝐵.
1 Depending on how 𝐵 is presented, apply appropriate tools from computational geometry to
compute all its faces.
2 For each face 𝐹, fix a linear functional ℓ𝐹 that is maximized on 𝐹, and let 𝐿𝐹 be the linear span of
the vertices of 𝐹.
3 return the list of pairs (ℓ𝐹 , 𝐿𝐹 ), one for each face of 𝐵.

The complexity of computing the distance to a model 𝑋 in the polyhedral norm has two
components, seen clearly in (5.4). One is the combinatorial complexity of the unit ball 𝐵,
which is encoded in the 𝑓 -vector 𝑓 (𝐵). This complexity affects Algorithm 1. Admittedly,
we did not specify any details for the computation of the face lattice of 𝐵. Instead, we refer
the reader to the vast literature on algorithms in polyhedral geometry.
The second component in the complexity of our problem (5.1) is the algebraic complexity
of solving the linear optimization problem (5.3). It governs Algorithm 2. For an illustration
see Figure 5.1 and the discussion in Examples 5.7 and 5.8.
We now determine the algebraic degree of the optimization problem (5.3) when 𝐹 is
a face of codimension 𝑖. To this end, we replace the affine variety 𝑋 ⊂ R𝑛 and the affine
space 𝐿 = u + 𝐿 𝐹 in R𝑛 by their respective closures in complex projective space P𝑛 . We
56 5 Wasserstein Distance

Algorithm 2: Numerical Optimization


Input: Model 𝑋 and a point u ∈ R𝑛 ; complete output from Algorithm 1.
Output: The optimal solution x∗ of (5.1) along with its corresponding face 𝐺.
1 for each face 𝐹 of the unit ball 𝐵 do
2 Solve the optimization problem (5.3).
3 Store the optimal solution x and a basis for the linear subspace 𝐿𝐹 of R𝑛 .
4 end
5 Among all candidate solutions, identify the solution x∗ for which the distance to 𝑋 to the given
data point u is smallest. Record its face 𝐺.
6 return the optimal solution x∗ , its associated linear space 𝐿𝐺 , and the face normal ℓ𝐺 .

Algorithm 3: Algebraic Postprocessing


Input: The optimal solution (x∗ , 𝐺) to (5.1) in the form found by Algorithm 2.
Output: The maximal ideal in the polynomial ring Q[𝑥1 , . . . , 𝑥𝑛 ] which has the zero x∗ .
1 Use Lagrange multipliers to give polynomial equations that characterize the critical points of the
linear function ℓ𝐺 on the subvariety (u + 𝐿𝐺 ) ∩ 𝑋 in the affine space R𝑛 .
2 Eliminate all variables representing Lagrange multipliers from the ideal in the previous step. This
ideal lives in Q[𝑥1 , . . . , 𝑥𝑛 ].
3 if the ideal in step 4 is maximal then
4 Call the ideal 𝑀.
5 else
6 Remove extraneous primary components to get the maximal ideal 𝑀 of x∗ .
7 end
8 Determine the degree of x∗ , which is the dimension of Q[𝑥1 , . . . , 𝑥𝑛 ]/𝑀 over Q.
9 return the generators for the maximal ideal 𝑀 along with the degree.

retain the same symbols 𝑋 and 𝐿 for the respective projective varieties. The following
result formulates the algebraic degree of the linear program (5.3) in terms of the polar
degrees that we have introduced in Definition 2.18 and again in Chapter 4.
Theorem 5.5 Let 𝐿 ⊂ R𝑛 be a general affine-linear space of codimension 𝑖 − 1 and ℓ be a
general linear form. The number of critical points of ℓ on 𝐿 ∩ 𝑋 is the polar degree 𝛿𝑖 (𝑋).
Proof This result appears in [44, Theorem 5.1]. The number of critical points of a general
linear form on the intersection 𝐿 ∩ 𝑋 in R𝑛 is the degree of the dual variety (𝐿 ∩ 𝑋) ∨ . That
degree coincides with the polar degree 𝛿𝑖 (𝑋). □
Theorem 5.5 offers a direct interpretation of each polar degree 𝛿𝑖 (𝑋) in terms of optimiza-
tion on 𝑋. This interpretation can be used as a definition of polar degrees. Some readers
might prefer this over the definitions given in Chapter 4.
Corollary 5.6 If the variety 𝑋 is in general position, then the total number of critical points
of the optimization problem (5.1) arises from the 𝑓 -vector of 𝐵 and the polar degrees of 𝑋.
That number equals

𝛿 𝑛 (𝑋) · 𝑓0 (𝐵) + 𝛿 𝑛−1 (𝑋) · 𝑓1 (𝐵) + · · · + 𝛿1 (𝑋) · 𝑓𝑛−1 (𝐵). (5.4)

Proof The total number of critical points is 𝛼0 · 𝑓0 (𝐵) + · · · + 𝛼𝑛−1 · 𝑓𝑛−1 (𝐵), where 𝛼 𝑗 is
the number of critical points of (5.3) for a face of dimension 𝑗. Fix a face 𝐹 of dimension 𝑗.
5.1 Polyhedral Norms 57

Fig. 5.1: The green sphere is the given variety 𝑋. The data point u is white. We solve the problem (5.1) for
the norm | | · | | ∞ . Balls in this norm are cubes. The contact point x∗ is marked with a cross. The optimal
face 𝐹 is a facet, vertex, or edge.

The affine linear space 𝐿 := u + 𝐿 𝐹 has codimension 𝑛 − 𝑗 − 1 in R𝑛 . Since 𝑋 is assumed to


be in general position, 𝐿 is general relative to 𝑋 and there exists a general linear functional
ℓ that attains its maximum over 𝐵 at 𝐹. Therefore, we can apply Theorem 5.5, and we find
that the number of critical points of (5.3) is 𝛼 𝑗 = 𝛿 𝑛− 𝑗 (𝑋). □
We have learned in Chapter 2 that the polar degrees 𝛿𝑖 (𝑋) of a variety 𝑋 determine its
ED degree and hence the algebraic complexity of Euclidean distance minimization for 𝑋.
Corollary 5.6 highlights that this applies not just to the Euclidean distance, but also to the
analogous problem for polyhedral norms. The two extreme cases in Theorem 5.5 are 𝑖 = 1
and 𝑖 = 𝑛. Touching at a vertex (𝑖 = 𝑛) can only happen when 𝑋 is a hypersurface, and here
𝛿 𝑛 (𝑋) = degree(𝑋). Touching at a facet (𝑖 = 1) can happen for varieties of any dimension,
as long as the dual variety 𝑋 ∨ is a hypersurface. Here, we have 𝛿1 (𝑋) = degree(𝑋 ∨ ).
Example 5.7 (Touching at a facet) Suppose that the face 𝐹 is a facet of the unit ball 𝐵.
Then 𝐿 𝐹 = R𝑛 , and ℓ𝐹 is an outer normal vector to that facet, which is unique up to scaling.
Here, the optimization problem (5.3) asks for the minimum of ℓ𝐹 over 𝑋. This situation
corresponds to the left diagram in Figure 5.1. ⋄
Example 5.8 (Touching at a vertex) Suppose 𝐹 is a vertex of the unit ball 𝐵. This case
arises when 𝑋 is a hypersurface. It corresponds to the middle diagram in Figure 5.1. Here,
the affine space u + 𝐿 𝐹 is the line that connects u and x∗ . That line intersects 𝑋 in a finite
set of cardinality degree(𝑋). The optimum x∗ is the real point in that finite set at which the
value of the linear form ℓ is minimal. ⋄
Next, we work out Lemma 5.4 and Theorem 5.5 when 𝑋 is a general surface in R3 .
Example 5.9 Consider the problem in (5.1) and (5.2) for a general surface 𝑋 of degree 𝑑
in R3 . The optimal face 𝐹 of the unit ball 𝐵 depends on the location of the data point u. The
58 5 Wasserstein Distance

algebraic degree of the solution x∗ is 𝛿3 (𝑋) = 𝑑 if dim(𝐹) = 0, it is 𝛿2 (𝑋) = 𝑑 (𝑑 − 1)


if dim(𝐹) = 1, and it is 𝛿1 (𝑋) = 𝑑 (𝑑 − 1) 2 if dim(𝐹) = 2. Here x∗ is the unique point in
(u + 𝜆∗ 𝐵) ∩ 𝑋, where 𝜆∗ is the optimal value in (5.2).
Figure 5.1 visualizes these three cases for 𝑑 = 2 and || · || ∞ . The variety 𝑋 is the green
sphere, which is a surface of degree 𝑑 = 2. The unit ball for the norm || · || ∞ is the cube
𝐵 = [−1, 1] 3 . The picture shows the smallest 𝜆∗ such that u + 𝜆∗ 𝐵 touches the sphere 𝑋.
The cross marks the point of contact. This is the point x∗ in 𝑋 which is closest in ∞-norm
to the white point u in the center of the cube. The point of contact is either on a facet, or
on an edge, or it is a vertex. The algebraic degree of x∗ is two in all three cases, i.e. we can
write the solution x∗ in terms of the data u by solving the quadratic formula. If the green
surface 𝑋 were a cubic surface (𝑑 = 3) then these polar degrees would be 3, 6 and 12. ⋄

Our geometric discussion can be translated into piecewise-algebraic formulas for the
optimal point x∗ and the optimal value 𝜆∗ . This rests on the algebraic postprocessing in
Algorithm 3. It is carried out explicitly for a statistical scenario in Theorem 5.14. In that
scenario, 𝑋 is also a quadratic surface in 3-space, just like the green ball in Figure 5.1.

5.2 Optimal Transport and Independence Models

We now come to the title of this chapter, namely the Wasserstein distance to a variety 𝑋.
For us, 𝑋 will be an independence model in a probability simplex, given by matrices or
tensors of low rank (see Chapter 12). We measure distances using Wasserstein metrics on
that simplex. This is a class of polyhedral norms of importance in optimal transport theory.
We now present the relevant definitions. A probability distribution on the finite set
[𝑛] = {1, 2, . . . , 𝑛} is a point 𝝂 in the (𝑛 − 1)-dimensional probability simplex

Δ𝑛−1 := (𝜈1 , . . . , 𝜈𝑛 ) ∈ R𝑛≥0 | 𝜈1 + · · · + 𝜈𝑛 = 1 .

We shall turn this simplex into a metric space, by means of the Wasserstein distance. To
define this notion, we first turn the finite state space [𝑛] into a finite metric space. The
metric on [𝑛] is given by fixing a symmetric 𝑛 × 𝑛 matrix 𝑑 = (𝑑𝑖 𝑗 ) with nonnegative
entries. These entries satisfy 𝑑𝑖𝑖 = 0 and 𝑑𝑖𝑘 ≤ 𝑑𝑖 𝑗 + 𝑑 𝑗 𝑘 for all 𝑖, 𝑗, 𝑘.

Definition 5.10 Given two probability distributions 𝝁, 𝝂 ∈ Δ𝑛−1 , we consider the following
linear programming problem, where z = (𝑧 1 , . . . , 𝑧 𝑛 ) is the decision variable:
𝑛
∑︁
Maximize (𝜇𝑖 − 𝜈𝑖 ) 𝑧𝑖 subject to |𝑧𝑖 − 𝑧 𝑗 | ≤ 𝑑𝑖 𝑗 for all 1 ≤ 𝑖 < 𝑗 ≤ 𝑛. (5.5)
𝑖=1

The optimal value of (5.5), denoted 𝑊𝑑 ( 𝝁, 𝝂), is the Wasserstein distance between 𝝁 and 𝝂.

The optimal solution z∗ to problem (5.5) is known as the optimal discriminator for the
two probability distributions 𝝁 and 𝝂. It satisfies 𝑊𝑑 ( 𝝁, 𝝂) = ⟨𝝁 − 𝝂, z∗ ⟩, where ⟨ · , · ⟩ is
the Euclidean inner product on R𝑛 . The coordinates 𝑧 𝑖∗ of the optimal discriminator z∗ are
5.2 Optimal Transport and Independence Models 59

the weights on the state space [𝑛] that best tell 𝝁 and 𝝂 apart. The linear program (5.5) is
the Kantorovich dual of the optimal transport problem. The feasible region of the linear
program (5.5) is unbounded because it is invariant under translation by

1 = (1, 1, . . . , 1) ∈ R𝑛 .

It is compact after taking the quotient modulo the line R1. This motivates the following.

Definition 5.11 The Lipschitz polytope of the finite metric space ( [𝑛], 𝑑) equals

𝑃 𝑑 = z ∈ R𝑛 /R1 | |𝑧 𝑖 − 𝑧 𝑗 | ≤ 𝑑𝑖 𝑗 for all 1 ≤ 𝑖 < 𝑗 ≤ 𝑛 . (5.6)

Note that dim(𝑃 𝑑 ) ≤ 𝑛 − 1. Lipschitz polytopes arise prominently in tropical geometry


(see [133, Chapter 7]), where they are called polytropes. A polytrope is a subset of R𝑛 /R1
that is convex both classically and tropically. The dual polytope 𝑃∗𝑑 lies in the hyperplane
perpendicular to the line R1. We call 𝑃∗𝑑 a root polytope because its vertices are, up to
scaling, the elements e𝑖 − e 𝑗 in the root system of Lie type 𝐴𝑛−1 . The root polytope equals

𝑃∗𝑑 = x ∈ R𝑛 | max𝑧 ∈𝑃𝑑 ⟨x, z⟩ ≤ 1



(5.7)
= conv 𝑑1𝑖 𝑗 (e𝑖 − e 𝑗 ) | 1 ≤ 𝑖, 𝑗 ≤ 𝑛 .


This is a centrally symmetric polytope since the metric 𝑑 satisfies 𝑑𝑖 𝑗 = 𝑑 𝑗𝑖 .

Proposition 5.12 The Wasserstein metric 𝑊𝑑 on the probability simplex Δ𝑛−1 is equal to
the polyhedral norm whose unit ball is the root polytope 𝑃∗𝑑 . Hence, all results in Section 5.1
apply to Wasserstein metrics.

Proof Fix the polyhedral norm with unit ball 𝑃∗𝑑 . The distance between 𝝁 and 𝝂 in this
norm is the smallest real number 𝜆 such that 𝝁 ∈ 𝝂 + 𝜆 𝑃∗𝑑 , or, equivalently, 𝜆1 ( 𝝁 − 𝝂) ∈ 𝑃∗𝑑 .
By definition of the dual polytope, this minimal 𝜆 is the maximum inner product ⟨𝝁 − 𝝂, z⟩
over all points z in the dual (𝑃∗𝑑 ) ∗ of the unit ball. But this dual is precisely the Lipschitz
polytope because the biduality (𝑃∗𝑑 ) ∗ = 𝑃 𝑑 holds for polytopes. Hence the distance between
𝝁 and 𝝂 is equal to 𝑊𝑑 ( 𝝁, 𝝂), which is the optimal value in (5.5). □

Example 5.13 Let 𝑛 = 4 and fix the finite metric from the graph distance on the 4-cycle
0 1 1 2 

1 0 2 1 
𝑑 =  . (5.8)
1 2 0 1 
2 1 1 0 

The induced metric on the tetrahedron Δ3 is given by the Lipschitz polytope

𝑃 𝑑 = (𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ) ∈ R4 /R1 | |𝑥1 − 𝑥 2 | ≤ 1, |𝑥1 − 𝑥3 | ≤ 1, |𝑥2 − 𝑥4 | ≤ 1, |𝑥3 − 𝑥4 | ≤ 1




= conv ± (1, 0, 0, −1), ±( 21 , − 12 , − 12 , 12 ), ±(0, 1, −1, 0) .



60 5 Wasserstein Distance

Note that this 3-dimensional polytope is an octahedron. Therefore, its dual is a cube:

𝑃∗𝑑 = (𝑦 1 , 𝑦 2 , 𝑦 3 , 𝑦 4 ) ∈ (R1) ⊥ | |𝑦 1 − 𝑦 4 | ≤ 1, |𝑦 2 − 𝑦 3 | ≤ 1, |𝑦 2 + 𝑦 3 | ≤ 1



= conv ±(1, −1, 0, 0), ±(1, 0, −1, 0), ±(0, 1, 0, −1), ±(0, 0, 1, −1) .

This is the unit ball for the Wasserstein metric on the tetrahedron Δ3 that is induced by 𝑑.
Figure 5.1 illustrates the distance from a point to a surface with respect to this metric. ⋄

We wish to compute the Wasserstein distance from a given probability distribution 𝝁 to


a fixed discrete statistical model. We now denote this model by

M ⊂ Δ𝑛−1 .

This is the scenario studied in [43, 44]. The remainder of this chapter is based on the
presentation in these two articles. As is customary in algebraic statistics [167], we assume
that M is defined by polynomials in the unknowns 𝝂 = (𝜈1 , . . . , 𝜈𝑛 ). Thus

M = 𝑋 ∩ Δ𝑛−1

for some algebraic variety 𝑋 in R𝑛 . Our task is to solve the following optimization problem:

𝑊𝑑 ( 𝝁, M) := min 𝑊𝑑 ( 𝝁, 𝝂) = min max ⟨𝝁 − 𝝂, x⟩. (5.9)


𝝂 ∈M 𝝂 ∈M x∈𝑃𝑑

Computing this quantity means solving a non-convex optimization problem. Our aim is to
study this problem and propose solution strategies, using methods from geometry, algebra
and combinatorics. We summarized these in Algorithms 1–3. Similar strategies for the
Euclidean metric and the Kullback–Leibler divergence are found in Chapters 2 and 11.
We conclude this section with a detailed case study for the tetrahedron Δ3 whose points
are joint probability distributions of two binary random variables. The 2-bit independence
model M ⊂ Δ3 consists of all nonnegative 2 × 2 matrices of rank one whose entries sum
to one. This model has the parametric representation
   
𝜈1 𝜈2 𝑝𝑞 𝑝(1 − 𝑞)
= , ( 𝑝, 𝑞) ∈ [0, 1] 2 . (5.10)
𝜈3 𝜈4 (1−𝑝)𝑞 (1−𝑝) (1−𝑞)

Thus, M is the surface in the tetrahedron Δ3 defined by the equation 𝜈1 𝜈4 = 𝜈2 𝜈3 . The


next theorem gives the optimal value function and the solution function for this indepen-
dence model. We use the Wasserstein metric 𝑊𝑑 from Example 5.13. For the proof of
Theorem 5.14 and a simpler example we refer to the paper [43] by Çelik, Jamneshan,
Montúfar, Sturmfels and Venturello.
Theorem 5.14 involves a distinction into eight cases. This division of Δ3 is shown in
Figure 5.2. Each of the last four cases breaks into two subcases, since the numerator in the
formulas is the absolute value of 𝜇1 𝜇4 − 𝜇2 𝜇3 . The sign of this 2 × 2 determinant matters for
the pieces of our piecewise algebraic function. Thus, the tetrahedron Δ3 is divided into 12
regions. On each region the optimal value map 𝝁 ↦→ 𝑊𝑑 ( 𝝁, M) is one algebraic function.
5.3 Wasserstein meets Segre–Veronese 61

Theorem 5.14 The Wasserstein distance from a distribution 𝝁 ∈ Δ3 to the model M equals

 2√ 𝜇1 (1 − √ 𝜇1 ) − 𝜇2 − 𝜇3 ,
 if 𝜇1 ≥ 𝜇4 ,

𝜇1 ≥ 𝜇1 + 𝜇2 ,

𝜇1 ≥ 𝜇1 + 𝜇3 ,

 √
 2 𝜇 (1 − √ 𝜇 ) − 𝜇 − 𝜇 ,

if 𝜇2 ≥ 𝜇3 ,

𝜇2 ≥ 𝜇1 + 𝜇2 ,

𝜇2 ≥ 𝜇2 + 𝜇4 ,

 2 2 1 4
 √ √ √ √




 2 𝜇 3 (1 − 𝜇3 ) − 𝜇1 − 𝜇 4, if 𝜇3 ≥ 𝜇2 , 𝜇3 ≥ 𝜇1 + 𝜇3 , 𝜇3 ≥ 𝜇3 + 𝜇4 ,
√ √ √ √


 2 𝜇4 (1 − 𝜇4 ) − 𝜇2 − 𝜇3 , if 𝜇4 ≥ 𝜇1 , 𝜇4 ≥ 𝜇2 + 𝜇4 , 𝜇4 ≥ 𝜇3 + 𝜇4 ,



𝑊𝑑 (𝝁, M) = √ √
 |𝜇1 𝜇4 − 𝜇2 𝜇3 |/( 𝜇1 + 𝜇2 ) , if 𝜇1 ≥ 𝜇4 , 𝜇2 ≥ 𝜇3 , 𝜇1 +𝜇2 ≥ 𝜇1 , 𝜇1 +𝜇2 ≥ 𝜇2 ,


√ √


 |𝜇1 𝜇4 − 𝜇2 𝜇3 |/( 𝜇1 + 𝜇3 ) ,

 if 𝜇1 ≥ 𝜇4 , 𝜇3 ≥ 𝜇2 , 𝜇1 +𝜇3 ≥ 𝜇1 , 𝜇1 +𝜇3 ≥ 𝜇3 ,


 √ √
|𝜇1 𝜇4 − 𝜇2 𝜇3 |/( 𝜇2 + 𝜇4 ) , if 𝜇4 ≥ 𝜇1 , 𝜇2 ≥ 𝜇3 , 𝜇2 +𝜇4 ≥ 𝜇4 , 𝜇2 +𝜇4 ≥



 𝜇2 ,

 √ √
 |𝜇1 𝜇4 − 𝜇2 𝜇3 |/( 𝜇3 + 𝜇4 ) , if 𝜇4 ≥ 𝜇1 , 𝜇3 ≥ 𝜇2 , 𝜇3 +𝜇4 ≥ 𝜇4 , 𝜇3 +𝜇4 ≥
 𝜇3 .

The solution function Δ3 → M, 𝝁 ↦→ 𝝂 ∗ ( 𝝁) is given (with the same case distinction) by


√ √ √ 


 𝜇1 , 𝜇1 − 𝜇1 , 𝜇1 − 𝜇1 , −2 𝜇1 + 𝜇1 + 1 ,

 √ √ √ 


 𝜇2 − 𝜇2 , 𝜇2 , −2 𝜇2 + 𝜇2 + 1 , 𝜇2 − 𝜇2 ,
√ √ √


 


 𝜇3 − 𝜇3 , −2 𝜇3 + 𝜇3 + 1 , 𝜇3 , 𝜇3 − 𝜇3 ,
√ √ √

 
−2 𝜇4 + 𝜇4 + 1 , 𝜇4 − 𝜇4 , 𝜇4 − 𝜇4 , 𝜇4 ,




𝝂 ∗ (𝝁) = 


 𝜇1 , 𝜇2 , 𝜇1 ( 𝜇3 +𝜇4 )/( 𝜇1 +𝜇2 ) , 𝜇2 ( 𝜇3 +𝜇4 )/( 𝜇1 +𝜇2 ) ,

 
𝜇1 , 𝜇1 ( 𝜇2 +𝜇4 )/( 𝜇1 +𝜇3 ) , 𝜇3 , 𝜇3 ( 𝜇2 +𝜇4 )/( 𝜇1 +𝜇3 ) ,





 
𝜇2 ( 𝜇1 +𝜇3 )/( 𝜇2 +𝜇4 ) , 𝜇2 , 𝜇4 ( 𝜇1 +𝜇3 )/( 𝜇2 +𝜇4 ) , 𝜇4 ,





 

 𝜇3 ( 𝜇1 +𝜇2 )/( 𝜇3 +𝜇4 ) , 𝜇4 ( 𝜇1 +𝜇2 )/( 𝜇3 +𝜇4 ) , 𝜇3 , 𝜇4 .
The boundaries separating the various cases are given by the surfaces
√ √
{𝜇 ∈ Δ3 | 𝜇1 − 𝜇4 = 0, 𝜇1 + 𝜇2 ≥ 𝜇1 , 𝜇1 + 𝜇3 ≥ 𝜇1 }
√ √
and {𝜇 ∈ Δ3 | 𝜇2 − 𝜇3 = 0, 𝜇1 + 𝜇2 ≥ 𝜇2 , 𝜇2 + 𝜇4 ≥ 𝜇2 }.

5.3 Wasserstein meets Segre–Veronese

At the end of the previous section, we studied the Wasserstein distance from a probability
distribution 𝝁 in the three-dimensional probability simplex to the variety of 2 × 2 matrices
of rank one. We now turn to the general case. Let M be an arbitrary smooth variety in
Δ𝑛−1 ⊂ R𝑛 . For the moment, we do not specify a statistical model M; later in this section,
it will be an independence model. Furthermore, let 𝑑 = (𝑑𝑖 𝑗 ) ∈ R𝑛×𝑛 induce a metric on
the finite state space [𝑛]. Here are three examples of metrics ([𝑛], 𝑑):
• The discrete metric on any finite set [𝑛] where 𝑑𝑖 𝑗 = 1 for distinct 𝑖, 𝑗.
• The 𝐿 0 -metric on the Cartesian product [𝑚 1 ] × · · · × [𝑚 𝑘 ] where 𝑑𝑖 𝑗 = #{𝑙 | 𝑖𝑙 ≠ 𝑗𝑙 }.
Here 𝑖 = (𝑖 1 , . . . , 𝑖 𝑘 ) and 𝑗 = ( 𝑗1 , . . . , 𝑗 𝑘 ) are elements in that Cartesian product.
• The 𝐿 1 -metric on the Cartesian product [𝑚 1 ] × · · · × [𝑚 𝑘 ] where 𝑑𝑖 𝑗 = 𝑙=1
Í𝑘
|𝑖𝑙 − 𝑗𝑙 |.
62 5 Wasserstein Distance

Fig. 5.2: The optimal value function of Theorem 5.14 subdivides the tetrahedron (left). The red surface
consists of four pieces that, together with the blue surface, separate the eight cases in Theorem 5.14. Four
convex regions are enclosed between the red surfaces and the edges they meet. These regions represent the
first four cases in Theorem 5.14. The remaining four regions are each bounded by two red and two blue
pieces, and correspond to the last four cases. Each of these four regions is further split in two by the model.
We do not depict this in our visualization. The two sides are determined by the sign of the determinant
𝜇1 𝜇4 − 𝜇2 𝜇3 . The two blue surfaces (right) specify the points 𝝁 ∈ Δ3 with more than one optimal solution.

For the last two metrics, the number of states of the relevant independence models is
𝑛 = 𝑚 1 · · · 𝑚 𝑘 . All three metrics above are graph metrics. This means that there exists an
undirected simple graph 𝐺 with vertex set [𝑛] such that 𝑑𝑖 𝑗 is the length of the shortest path
from 𝑖 to 𝑗 in 𝐺. The corresponding Wasserstein balls are called symmetric edge polytopes.
The combinatorics of these polytopes is investigated in [44, Section 4].
For any 𝝁 ∈ Δ𝑛−1 , we now seek the Wasserstein distance 𝑊𝑑 ( 𝝁, M) to the model
M. Recall from Proposition 5.12 that the unit ball of the Wasserstein metric is the root
polytope 𝑃∗𝑑 = conv 𝑑1𝑖 𝑗 (e𝑖 − e 𝑗 ) | 1 ≤ 𝑖, 𝑗 ≤ 𝑛 . As before, for computing 𝑊𝑑 ( 𝝁, M)


we iterate through the faces of the unit ball 𝐵 = 𝑃∗𝑑 , and we solve the optimization problem
in Lemma 5.4. That is, for a fixed face 𝐹 of the polytope 𝐵 we solve:

Minimize ℓ𝐹 = ℓ𝐹 (𝝂) subject to 𝝂 ∈ ( 𝝁 + 𝐿 𝐹 ) ∩ M, (5.11)

where ℓ𝐹 is any linear functional on R𝑛 that attains its maximum over 𝐵 at 𝐹.


Let F be the set of pairs (𝑖, 𝑗) such that the point 𝑑1𝑖 𝑗 (e𝑖 − e 𝑗 ) is a vertex of 𝐵 and it lies
in 𝐹. The linear space spanned by the face 𝐹 is

𝐿𝐹 = (𝑖, 𝑗) ∈ F 𝜆 𝑖 𝑗 (e𝑖 − e 𝑗 ) | 𝜆 𝑖 𝑗 ∈ R .

With this notation, the decision variables for (5.11) are the multipliers 𝜆𝑖 𝑗 for (𝑖, 𝑗) ∈ F .
The algebraic complexity of this problem is given by the polar degree (Theorem 5.5).
The combinatorial complexity is governed by the facial structure of the Wasserstein ball
𝐵 = 𝑃∗𝑑 . They are combined in Corollary 5.6.
5.3 Wasserstein meets Segre–Veronese 63

We now work this out for the case when M ⊂ Δ𝑛−1 is an independence model for
discrete random variables, given by tensors of rank one. We denote by (𝑚)𝑟 a multinomial
distribution with 𝑚 possible outcomes and 𝑟 trials, which can be interpreted as an unordered
set of 𝑟 identically distributed random variables on [𝑚] = {1, 2, ..., 𝑚}. The subscript 𝑟 is
omitted if 𝑟 = 1. For integers 𝑚 1 , . . . , 𝑚 𝑘 and 𝑟 1 , . . . , 𝑟 𝑘 we consider the model M whose
elements are given by 𝑘 independent multinomial distributions (𝑚 1 )𝑟1 , . . . , (𝑚 𝑘 )𝑟𝑘 . We
denote this independence model by

M = ((𝑚 1 )𝑟1 , . . . , (𝑚 𝑘 )𝑟𝑘 ).

The number of states of the model M equals


𝑘  
Ö 𝑚𝑖 + 𝑟𝑖 − 1
𝑛= .
𝑖=1
𝑟𝑖

Example 5.15 The variety M = (22 , 2) is the independence model for three binary random
variables where the first two are identically distributed. This model has 𝑛 = 6 states. Note
that M is the image of the map from the square [0, 1] 2 into the simplex Δ5 given by

( 𝑝, 𝑞) ↦→ 𝑝 2 𝑞, 2𝑝(1 − 𝑝)𝑞, (1 − 𝑝) 2 𝑞, 𝑝 2 (1 − 𝑞), 2𝑝(1 − 𝑝) (1 − 𝑞), (1 − 𝑝) 2 (1 − 𝑞) .




Our parameterization lists the 𝑛 = 6 states in the order 00, 10, 20, 01, 11, 21. These are the
vertices of the associated graph 𝐺, which is the product of a 3-chain and a 2-chain. ⋄
Example 5.16 The following four models are used for the case studies in [44, Section 6]:
the 3-bit model (2, 2, 2) with the 𝐿 0 -metric on [2] 3 , the model (3, 3) for two ternary
variables with the 𝐿 1 -metric on [3] 2 , the model (26 ) for six identically distributed binary
variables with the discrete metric on [7], and the model (22 , 2) in Example 5.15 with the
𝐿 1 -metric on [3] × [2]. In Table 5.1, we report the 𝑓 -vectors of the Wasserstein balls for
each of these models, thus hinting at combinatorial complexity. ⋄
M 𝑛 dim( M) Metric 𝑑 𝑓 -vector of the (𝑛−1)-polytope 𝑃𝑑∗
(2, 2, 2) 8 3 𝐿0 = 𝐿1 (24, 192, 652, 1062, 848, 306, 38)
(3, 3) 9 4 𝐿1 (24, 216, 960, 2298, 3048, 2172, 736, 82)
(26 ) 7 1 discrete (42, 210, 490, 630, 434, 126)
(22 , 2) 6 2 𝐿1 (14, 60, 102, 72, 18)

Table 5.1: 𝑓 -vectors of the Wasserstein balls for the four models in Example 5.16.

As is customary in algebraic statistics, we replace the independence model introduced


above, which is a semialgebraic set inside a simplex, by its complex Zariski closure in a pro-
jective space. This allows us to compute the algebraic degrees of our optimization problem.
Independence models correspond in algebraic geometry to Segre–Veronese varieties. The
Segre–Veronese variety M = ((𝑚 1 )𝑟1 , . . . , (𝑚 𝑘 )𝑟𝑘 ) is the embedding of P𝑚1 −1 ×· · ·×P𝑚𝑘 −1
in the projective space of partially symmetric tensors, P 𝑆𝑟1 (R𝑚1 ) ⊗ · · · ⊗ 𝑆𝑟𝑘 (R𝑚𝑘 ) .
64 5 Wasserstein Distance
Î𝑘 𝑚𝑖 +𝑟𝑖 −1
That projective space equals P𝑛−1 where 𝑛 = 𝑖=1 𝑟𝑖 . By definition, the Segre–
Veronese variety M is the set of all tensors of rank one inside this projective space. The
dimension of M is m := 𝑚 1 + · · · + 𝑚 𝑘 − 𝑘. Tensors of rank one are discussed in more
detail in Chapter 12. See Section 12.3 for their volumes.
Example 5.17 Let 𝑘 = 2. The Segre–Veronese variety M = (22 , 2) is an embedding
of P1 × P1 into P5 . This is a toric surface of degree four. Its points are rank one tensors of
format 2 × 2 × 2 which are symmetric in the first two indices. This model appears in the
last row of Table 5.3. ⋄
The computation of the Chern classes of the Segre–Veronese variety M first appeared in
the doctoral dissertation of Luca Sodomaco [160, Chapter 5]. We obtain the polar degrees
using the formula that connects Chern classes with polar degrees in Theorem 4.20. We
here state the result of this computation, which was published in [113, Proposition 6.11].
Theorem 5.18 With the notation above, the polar degrees of the Segre–Veronese variety
are given by the following formula:
m−
∑︁𝑗   𝑘 𝑚ℓ  𝑚ℓ −1−𝛼ℓ
m+1−𝑖
𝑖
∑︁ Ö 𝛼ℓ 𝑟 ℓ
𝛿 𝑗+1 (M) = (−1) (m − 𝑖)! , (5.12)
𝑖=0
𝑗 +1 𝛼∈A ℓ=1
(𝑚 ℓ − 1 − 𝛼ℓ )!

where A = {𝛼 ∈ N 𝑘 | 𝛼1 + · · · + 𝛼 𝑘 = 𝑖 and 𝛼𝑖 ≤ 𝑚 𝑖 − 1 for 𝑖 = 1, . . . , 𝑘 }.


We next examine this formula for various special cases, starting with the binary case.
Corollary 5.19 Let M be the 𝑘-bit independence model (this is the case 𝑟 1 = · · · = 𝑟 𝑘 = 1
and 𝑚 1 = · · · = 𝑚 𝑘 = 2). The formula (5.12) specializes to
𝑘− 𝑗    
∑︁
𝑖 𝑘 +1−𝑖 𝑘 𝑖
𝛿 𝑗+1 (M) = (−1) (𝑘 − 𝑖)! 2. (5.13)
𝑖=0
𝑗 +1 𝑖

In algebraic geometry language, our model M is the Segre embedding of (P1 ) 𝑘 into
P2 −1 .
𝑘
This is the toric variety associated with the 𝑘-dimensional unit cube. Its degree is
the normalized volume of that cube, which is 𝑘!. The dual variety M ∨ is a hypersurface of
degree 𝛿1 , known as the hyperdeterminant of format 2 𝑘 . For instance, for 𝑘 = 3, this hyper-
surface in P7 is the 2 × 2 × 2-hyperdeterminant. This hyperdeterminant is a homogeneous
polynomial of degree four in eight unknowns. We computed it in Example 3.16. The polar
degrees for the 𝑘-bit independence model in (5.13) are shown for 𝑘 ≤ 7 in Table 5.2.
We now briefly discuss the independence models (𝑚 1 , 𝑚 2 ) for two random variables.
These are the classical determinantal varieties of 𝑚 1 × 𝑚 2 matrices of rank one. Here,
𝑛 = 𝑚 1 𝑚 2 and m = 𝑚 1 + 𝑚 2 − 2.
Corollary 5.20 The Segre variety M = P𝑚1 −1 × P𝑚2 −1 in P𝑛−1 has the polar degrees
𝑚1 +𝑚2 −2− 𝑗  
∑︁ 𝑚1 + 𝑚2 − 1 − 𝑖
𝛿 𝑗+1 (M) = (−1) 𝑖 (𝑚 1 + 𝑚 2 − 2 − 𝑖)! 𝜎(𝑖),
𝑖=0
𝑗 +1

Í ( 𝑚𝑠1 ) ( 𝑖−𝑠
𝑚2
)
where 𝜎(𝑖) = 𝑠 (𝑚1 −1−𝑠)! · (𝑚2 −1−𝑖+𝑠)! and the sum is over the set of integers 𝑠 such that
both 𝑚 1 − 1 − 𝑠 and 𝑚 2 − 1 − 𝑖 + 𝑠 are nonnegative.
5.3 Wasserstein meets Segre–Veronese 65

𝑗 𝑘=2 𝑘=3 𝑘=4 𝑘=5 𝑘=6 𝑘=7


7 5040
6 720 30240
5 120 3600 80640
4 24 480 7920 124320
3 6 72 840 9840 120960
2 2 12 96 800 7440 75936
1 2 12 64 440 3408 30016
0 2 4 24 128 880 6816

Table 5.2: The table shows the polar degrees 𝛿 𝑗+1 ( M) of the 𝑘-bit independence model for 𝑘 ≤ 7. The
indices 𝑗 with 𝛿 𝑗+1 ( M) ≠ 0 range from 0 to 𝑘. The bottom row, labeled 0, contains the degree of the
hyperdeterminant M ∨ . On the antidiagonal ( 𝑗 = 𝑘) we find degree( M) = 𝑘!. The entries in the first
column (𝑘 = 2) correspond to the three scenarios in Figure 5.1, where each algebraic degree equals 2.

The polar degrees above serve as upper bounds for any particular Wasserstein distance
problem. For a fixed model M, the equality in Theorem 5.5 holds only when the data (ℓ, 𝐿)
is generic. However, for the optimization problem in (5.11), the linear space 𝐿 = 𝐿 𝐹 and
the linear functional ℓ = ℓ𝐹 are very specific. They depend on the Lipschitz polytope 𝑃 𝑑
and the position of the face 𝐹 relative to the model M.

Proposition 5.21 Consider the optimization problem (5.11) for the independence model
M = ((𝑚 1 )𝑟1 , . . . , (𝑚 𝑘 )𝑟𝑘 ) with a given face 𝐹 of the Wasserstein ball 𝐵 = 𝑃∗𝑑 . Suppose
that 𝐹 has codimension 𝑖. The number of critical points of (5.11) is bounded above by the
polar degree 𝛿𝑖 (M).

Proof The critical points of (5.11) are given as the solutions of a system of polynomial
equations that depends on parameters ( 𝝁, ℓ, 𝐿). It follows from Theorem 5.5 that the
number of critical points for general parameters is the polar degree 𝛿𝑖 (M). The Parameter
Continuation Theorem (Theorem 3.18) implies that the number of solutions can only go
down when we pass from general parameters to special parameters. □

Example 5.22 We investigate the drop in algebraic degree experimentally for the four
independence models in Example 5.16. In the language of algebraic geometry, these models
are the Segre threefold P1 × P1 × P1 in P7 , the variety P2 × P2 of rank one 3 × 3 matrices
in P8 , the rational normal curve P1 in P6 = P(𝑆 6 (R2 )), and the Segre–Veronese surface
P1 × P1 in P5 = P(𝑆 2 (R2 ) ⊗ R2 ). The finite metrics 𝑑 are specified in the fourth column
of Table 5.1. The fifth column in Table 5.1 records the combinatorial complexity of our
optimization problem. The algebraic complexity is recorded in Table 5.3.
The second column in Table 5.3 gives the vector (𝛿0 , 𝛿1 , . . . , 𝛿 𝑛−2 ) of polar degrees.
The third and fourth columns are the results of a computational experiment. For each
model, we take 1000 uniform samples 𝝁 with rational coordinates from Δ𝑛−1 , and we
solve the optimization problem (5.9). The output is an exact representation of the optimal
solution 𝝂 ∗ . This includes the optimal face 𝐹 that specifies 𝝂 ∗ , along with its maximal ideal
over Q. The algebraic degree of the optimal solution 𝝂 ∗ is computed as the number of
66 5 Wasserstein Distance

M Polar degrees Maximal degree Average degree


(2, 2, 2) (0, 0, 0, 6, 12, 12, 4) (0, 0, 0, 4, 12, 6, 0) (0, 0, 0, 2.138, 6.382, 3.8, 0)
(3, 3) (0, 0, 0, 6, 12, 12, 6, 3) (0, 0, 0, 2, 8, 6, 6, 0) (0, 0, 0, 1.093, 3.100, 4.471, 6.0, 0)
(26 ) (0, 0, 0, 0, 6, 10) (0, 0, 0, 0, 6, 5) (0, 0, 0, 0, 6, 5)
(22 , 2) (0, 0, 4, 6, 4) (0, 0, 3, 5, 2) (0, 0, 2.293, 3.822, 2.0)

Table 5.3: The algebraic degrees of the problem (5.9) for the four models in Example 5.16.

complex zeros of that maximal ideal. This number is bounded above by the polar degree
(cf. Proposition 5.21). The fourth column in Table 5.3 shows the average of the algebraic
degrees we found. For example, for the 3-bit model (2, 2, 2) we have 𝛿3 = 6, corresponding
to 𝑃∗𝑑 touching M at a 3-face 𝐹. However, the maximum degree we saw in our computations
was 4, with an average degree of 2.138. For 4-faces 𝐹, we have 𝛿4 = 12. This degree was
attained in some runs. The average of the degrees for 4-faces was found to be 6.382. ⋄

In this chapter, we measured the distance to a real algebraic variety with a polyhedral
norm. We focused on the important case when the norm is a Wasserstein norm and the
variety is an independence model. We emphasized the distinction between combinatorial
complexity, given by the 𝑓 -vector of the unit ball, and algebraic complexity, given by the
polar degrees of the model. This distinction was made completely explicit in Theorem 5.14.

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International
License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and
reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter’s Creative Commons
license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s
Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the
permitted use, you will need to obtain permission directly from the copyright holder.
Chapter 6
Curvature

The notion of curvature is central to differential geometry and its numerous applications.
The aim of this chapter is to offer a first introduction to curvature. Our main point is to
explore how curvature connects to algebraic geometry. We start out with plane curves,
and we then turn to more general real algebraic varieties. The third section addresses the
fundamental question of how to compute the volume of a tubular neighborhood of a variety.

6.1 Plane Curves

We consider a smooth algebraic curve 𝐶 ⊂ R2 . This is given to us in its implicit represen-


tation, as the zero set of an irreducible polynomial of degree 𝑑 ≥ 1 in two real variables:

𝑓 (𝑥 1 , 𝑥2 ) ∈ R[𝑥 1 , 𝑥2 ].

We are interested in the curvature of the curve 𝐶 at one of its points x = (𝑥1 , 𝑥2 ).
Geometrically, the curvature is defined as the rate of change at x of a unit normal vector
traveling along the curve 𝐶. To be precise, we first define
1
𝑁 (x) := ∇ 𝑓 (x), (6.1)
∥∇ 𝑓 (x)∥

where the column vector ∇ 𝑓 (x) = (𝜕 𝑓 /𝜕𝑥 1 , 𝜕 𝑓 /𝜕𝑥2 ) ⊤ is the gradient of the polynomial 𝑓 .
For all x ∈ 𝐶, the formula for 𝑁 (x) returns a normal vector of 𝐶 at x. One calls 𝑁 (x) a
unit normal field. Similarly, a unit tangent field is given by the row vector

𝑇 (x) := 𝑁 (x)2 , −𝑁 (x)1 . (6.2)

The curvature of 𝐶 at x is defined as the (signed) magnitude of the derivative of the unit
normal field 𝑁 (x) in tangent direction. Thus, the curvature is the following scalar quantity:
D 𝜕𝑁 𝜕𝑁 E
𝑐(x) := 𝑇 (x) , 𝑇 (x)1 · (x) + 𝑇 (x)2 · (x) . (6.3)
𝜕𝑥1 𝜕𝑥2

© The Author(s) 2024 67


P. Breiding et al., Metric Algebraic Geometry, Oberwolfach Seminars 53,
https://doi.org/10.1007/978-3-031-51462-3_6
68 6 Curvature

This measures the rate of change of 𝑁 (x) as it travels along 𝐶. Since the derivative of a unit
normal field at a curve always points in tangent direction, the definition of the curvature
𝑐(𝑥) in (6.3) is equivalent to the following identity:

𝜕𝑁 𝜕𝑁
𝑇 (x)1 · (x) + 𝑇 (x)2 · (x) = 𝑐(x) · 𝑇 (x).
𝜕𝑥1 𝜕𝑥2

Fig. 6.1: The left picture shows the unit normal field of an ellipse, and the right picture shows how the
unit normal field changes when traveling along the ellipse. The lengths of the tangent vectors in the right
picture indicate the curvature of the ellipse at its various points.

Example 6.1 Consider the ellipse defined by 𝑓 (x) = 𝑥 12 + 4𝑥22 − 1. The left picture in Figure
6.1 shows this ellipse in green and its unit normal field 𝑁 (x) in yellow. The right picture
displays the curvature via 𝑐(x) · 𝑇 (x). The magnitude of a yellow vector attached to a point
x in the right picture gives the curvature at x. On the top and bottom, where the ellipse is
rather flat, the normal vectors do not change much, hence the curvature is small. On the
sides, the normal vectors change more rapidly, so there the curvature is larger. ⋄

The inverse of the signed curvature is denoted 𝑟 (x) := 𝑐(x) −1 . This quantity is called the
(signed) radius of curvature. Indeed, the curve 𝐶 contains an infinitesimally small arc of a
circle with radius |𝑟 (x)| and center x − 𝑟 (x) · 𝑁 (x). This is the circle that best approximates
𝐶 at x. The center of this circle is called a focal point or center of curvature of the curve 𝐶
at the point x. The reason for the negative sign in this formula is that a normal vector
pointing towards the focal point changes towards the direction that is opposite to 𝑇 (x); see
Figure 6.2 for an illustration. We now connect to our historical discussion.

Proposition 6.2 The Zariski closure of the set of all centers of curvature of a plane curve 𝐶
is the evolute of 𝐶, as defined in Section 1.3.

Proof We consider a local parametrization 𝛾(𝑡) of 𝐶 with 𝛾(0) = x and 𝛾(0) ¤ = 𝑇 (x).
Let 𝐸 denote the curve that is traced out by the centers of curvature of 𝐶. Then, the curve
that is defined by 𝜀(𝑡) := 𝛾(𝑡) − 𝑟 (𝛾(𝑡)) · 𝑁 (𝛾(𝑡)) gives a local parametrization of 𝐸. The
derivative of this parametrization at 𝑡 = 0 equals
𝜕𝑁 𝜕𝑁

¤
𝜀(0) = 𝑇 (x) − ∇𝑟 (x), 𝑇 (x) · 𝑁 (x) − 𝑟 (x) · 𝑇 (x)1 · 𝜕𝑥 1
(x) + 𝑇 (x)2 · 𝜕𝑥 2
(x) .
6.1 Plane Curves 69

Since 𝑇 (x)1 · 𝜕𝑁
𝜕𝑥1 (x) + 𝑇 (x)2 · 𝜕𝑁
𝜕𝑥2 (x) = 𝑐(x) · 𝑇 (x) = 𝑟 (x) −1 · 𝑇 (x), we get

¤
𝜀(0) = − ∇𝑟 (x), 𝑇 (x) · 𝑁 (x). (6.4)

Hence the tangent line of 𝐸 at 𝜀(0) = x − 𝑟 (x) · 𝑁 (x) is the normal line of 𝐶 at x. The curve
𝐸 is the envelope of the normal lines. In other words, the curve 𝐸 is the evolute of 𝐶. □

N(x) Ṅ(x)

T(x)

Fig. 6.2: The green curve contains an infinitesimally small arc of the dashed circle. The grey center
of the circle is a focal point of the green curve. The red normal vector 𝑁 (x), pointing towards the
focal point, changes into a normal vector that is slightly tilted in the direction opposite to 𝑇 (x). Hence
(x) 𝜕𝑁 (x)
𝑁¤ (x) := 𝑇 (x) 1 𝜕𝑁
𝜕𝑥1 + 𝑇 (x) 2 𝜕𝑥2 is a negative multiple of 𝑇 (x).

The previous proof shows that the absolute value of the curvature |𝑐(x)| is the inverse
distance from x to its corresponding point on the evolute. Indeed, the latter point is
x − 𝑟 (x) · 𝑁 (x), and so its distance from x is |𝑟 (x)| = |𝑐(x)| −1 . In the remainder of this
section, we will study two types of points: inflection points and points of critical curvature.
These points exhibit special curvature of 𝐶. Inflection points are points where 𝐶 is locally
flat, and critical curvature points are points where the curvature has a local extremum.

Definition 6.3 Let x ∈ 𝐶. We call x an inflection point if the curvature is zero, i.e. 𝑐(x) = 0.
We call x a critical curvature point if x is a critical point of the function 𝐶 → R, 𝑥 ↦→ 𝑐(x).

Example 6.4 We consider the Trott curve 𝑓 (x) = 144(𝑥 4 +𝑦 4 )−225(𝑥 2 +𝑦 2 )+350𝑥 2 𝑦 2 +81,
as we did in Figure 2.1. This has degree 𝑑 = 4. Figure 6.3 shows the curve with its
points from Definition 6.3. We first compute inflection points using the numerical software
HomotopyContinuation.jl [31]. This is based on the formulation in Lemma 6.7.
using HomotopyContinuation, LinearAlgebra
@var x y z; v = [x; y; z];
F = 144*(x^4 + y^4) - 225*(x^2 + y^2) + 350*x^2*y^2 + 81*z^4;
dF = differentiate(F, v);
H0 = differentiate(dF, v);
f = subs(F, z=>1);
h = subs(-det(H0), z=>1);
inflection_points = solve([f; h])
70 6 Curvature

By Theorem 6.8, a general curve of degree 𝑑 has 3𝑑 (𝑑 − 2) = 24 complex inflection points.


Felix Klein [107] proved that at most 𝑑 (𝑑 − 2) = 8 can be real. Indeed, for the Trott curve,
we find 8 real inflection points. They are the yellow points in Figure 6.3.
Next, we compute critical curvature points using the equations in Lemma 6.10.
f1, f2 = dF[1:2]
f11, f12, f12, f22 = H0[1:2,1:2];
hx, hy = differentiate(h,[x; y]);
g = f1 * f2 * (f11-f22) + f12 * (f2^2- f1^2);
c = subs(f2 * hy - f1 * hx - 3 * h * g, z=>1);
crit_curv = solve([f; c])

By Theorem 6.11, there are 2𝑑 (3𝑑 − 5) = 56 complex critical curvature points. We find
that 24 of them are real; out of these, 8 are close (but not equal) to the 8 inflection points,
which is why they are not visible in the picture. The other 16 critical curvature points are
shown in red in Figure 6.3. By Proposition 6.5, the critical curvature points correspond to
cusps on the evolute, which is illustrated in Figure 6.4. ⋄

Fig. 6.3: The Trott curve (2.7) with its inflection points (yellow) and critical curvature points (red).

Proposition 6.5 Let 𝐶 ⊂ R2 be a smooth algebraic curve and 𝐸 ⊂ R2 its evolute. For any
point x ∈ 𝐶, let 𝑟 (x) be the radius of curvature and let Γ(x) := x − 𝑟 (x) · 𝑁 (x) ∈ 𝐸 be the
corresponding point on the evolute. Then
(a) x is an inflection point if and only if Γ(x) is a point at infinity, and
(b) x is a point of critical curvature if and only if 𝐸 has a cusp at Γ(x).

Proof Recall that 𝑐(x) = 𝑟 (x) −1 . The point Γ(x) is at infinity if and only if 𝑐(x) = 0,
which means that x is an inflection point. This proves the first item. For the second item,
we consider a local parametrization 𝛾(𝑡) of 𝐶 with 𝛾(0) = x and 𝛾(0) ¤ = 𝑇 (x). As in the
proof of Proposition 6.2, the function 𝜀(𝑡) := Γ(𝛾(𝑡)) gives a local parametrization of the
¤
evolute 𝐸. The evolute has a cusp at Γ(x) = 𝜀(0) if and only if 𝜀(0) = 0. By (6.4), the latter
is equivalent to ⟨∇𝑟 (x), 𝑇 (x)⟩ = 0, where 𝑇 (x) is the unit tangent field (6.2). This identity
holds exactly when the curvature 𝑐(x) is critical at x since ∇𝑐(x) = −∇𝑟 (x)/𝑟 (x) 2 . □
6.1 Plane Curves 71

Fig. 6.4: The picture shows the Trott curve (2.7) in blue and its evolute in red. The cusps on the evolute
correspond to the red critical curvature points in Figure 6.3. The Trott curve has 24 real critical curvature
points. Out of those, 8 have a radius of curvature that exceeds the boundary of this picture. This is why
we only see 16 cusps. We thank Emil Horobet and Pierpaola Santarsiero for helping us by computing the
equation for the evolute.

Our next goal is to count the number of complex inflection and critical curvature points
for a curve given by a general polynomial 𝑓 of degree 𝑑. For this, let us first understand
𝜕𝑓
the curvature 𝑐(x) better. In the following, we denote partial derivatives by 𝑓𝑖 := 𝜕𝑥 𝑖
and
𝜕2 𝑓
𝑓𝑖, 𝑗 := 𝜕𝑥𝑖 𝑥 𝑗 . With this, the Hessian equals
 
𝑓1,1 𝑓1,2
𝐻 := .
𝑓1,2 𝑓2,2

Lemma 6.6 The curvature of 𝐶 at x equals


1
𝑐(x) = · 𝑇 (x)𝐻 (x) 𝑇 (x) ⊤ .
∥∇ 𝑓 (x)∥
Proof By applying the product rule to (6.1), we obtain

𝑇 (x)1 · 𝜕𝑁
𝜕𝑥1 (x) + 𝑇 (x)2 · 𝜕𝑁
𝜕𝑥2 (x) = ∥∇ 𝑓 (x) ∥ −1 · 𝐻 (x) 𝑇 (x) ⊤ + 𝑎(x) · ∇ 𝑓 (x)

for some scalar function 𝑎(x). Since ⟨𝑇 (x), ∇ 𝑓 (x)⟩ = 0, Equation (6.3) gives the assertion.□
We can write the formula from Lemma 6.6 more explicitly as

𝑓1,1 · 𝑓22 − 2 𝑓1,2 · 𝑓1 · 𝑓2 + 𝑓2,2 · 𝑓12


𝑐(x) = 3
(x). (6.5)
( 𝑓12 + 𝑓22 ) 2

This formula is appealing to algebraic geometers because it writes curvature in terms of


the polynomial 𝑓 (x). To make it even more appealing, we now embed 𝐶 into the complex
72 6 Curvature

projective plane. We write


 
𝑥1 𝑥2
𝐹 (𝑥 0 , 𝑥1 , 𝑥2 ) := 𝑥 0𝑑 𝑓 ,
𝑥0 𝑥0

for the homogenization of 𝑓 . The Hessian of the ternary form 𝐹 is the 3 × 3 matrix
𝐹0,0 𝐹0,1 𝐹0,2 
 
𝐻0 = 𝐹0,1 𝐹1,1 𝐹1,2  . (6.6)
𝐹0,2 𝐹1,2 𝐹2,2 
 
But, we now view the entries 𝐹𝑖, 𝑗 as inhomogeneous polynomials in the two variables
x = (𝑥1 , 𝑥2 ) by setting 𝑥0 = 1. We can rewrite the curvature of 𝐶 in terms of 𝐹. The next
lemma goes back to Salmon [156].
Lemma 6.7 The curvature of the degree 𝑑 curve 𝐶 at the point x is equal to
− det 𝐻0
𝑐(x) = 3
(x).
(𝑑 − 1) 2 · ( 𝑓12 + 𝑓22 ) 2
𝑃
Proof By homogenizing the polynomials in (6.5), we get 𝑐 = 𝑄, where
3
𝑃 = 𝐹1,1 · 𝐹22 − 2𝐹1,2 · 𝐹1 · 𝐹2 + 𝐹2,2 · 𝐹12 and 𝑄 = (𝐹12 + 𝐹22 ) 2 .

By Euler’s formula for homogeneous polynomials, we have

(𝑑 − 1) · 𝐹 𝑗 = 𝑥0 𝐹0, 𝑗 + 𝑥 1 𝐹1, 𝑗 + 𝑥2 𝐹2, 𝑗 , 0 ≤ 𝑗 ≤ 2. (6.7)

Substituting this into 𝑃 gives the following equation:

(𝑑 − 1) 2 · 𝑃 = (𝐹1,1 𝐹2,2 − 𝐹1,2


2
) · (𝑥12 𝐹1,1 + 𝑥22 𝐹2,2 + 2(𝑥0 𝑥 1 𝐹0,1 + 𝑥0 𝑥2 𝐹0,2 + 𝑥1 𝑥2 𝐹1,2 ))
+ 𝑥02 (𝐹0,1
2 2
𝐹2,2 − 2𝐹1,2 𝐹0,1 𝐹0,2 + 𝐹1,1 𝐹0,2 ).

Note that the equation 0 = 𝑑𝐹 = 𝑥0 𝐹0 + 𝑥 1 𝐹1 + 𝑥2 𝐹2 holds on the curve 𝐶. Substituting (6.7)


into this equation, we obtain 𝑥12 𝐹1,1 + 𝑥 2 𝐹2,2
2 + 2(𝑥 𝑥 𝐹 + 𝑥 𝑥 𝐹 + 𝑥 𝑥 𝐹 ) = −𝑥 2 𝐹 .
0 1 0,1 0 2 0,2 1 2 1,2 0 0,0
This identity holds on the curve 𝐶. From this we conclude

𝑥 02 2 2 2
𝑃 = · (−(𝐹1,1 𝐹2,2 − 𝐹1,2 )𝐹0,0 + 𝐹0,1 𝐹2,2 − 2𝐹1,2 𝐹0,1 𝐹0,2 + 𝐹1,1 𝐹0,2 ).
(𝑑 − 1) 2

The latter is −𝑥 02 · det 𝐻0 /(𝑑 − 1) 2 . Setting 𝑥0 = 1 finishes the proof. □


We can now count the inflection points of a plane curve. This is due to Felix Klein [107].
Theorem 6.8 The number of complex inflection points of a general curve 𝐶 of degree 𝑑
is 3𝑑 (𝑑 − 2).
Klein also proved that the number of real inflection points is at most 𝑑 (𝑑 − 2). So, the
real bound is one third of the complex count. Here, we give a short proof for Theorem 6.8.
6.1 Plane Curves 73

Proof By Lemma 6.7, the inflection points on 𝐶 are defined by the equations 𝑓 = det 𝐻0 =
0. This is a system of two polynomial equations in two variables x = (𝑥1 , 𝑥2 ). The degree
of 𝑓 is 𝑑 and the degree of det 𝐻0 is 3(𝑑 − 2). Bézout’s theorem implies that the number of
inflection points is at most 3𝑑 (𝑑 − 2). To show that the number is also at least 3𝑑 (𝑑 − 2),
we use the Parameter Continuation Theorem (Theorem 3.18), and we show that there exist
degree 𝑑 curves with this number of inflection points.
h 𝑔(𝑥1 ) i ∈ R[𝑥1 ] of degree 𝑑 and let 𝐺 (𝑥0 , 𝑥1 ) be its
Consider a univariate polynomial
𝐺 𝐺0,1
homogenization. We write 𝑀 := 𝐺0,0 0,1 𝐺1,1
for the Hessian of the binary form 𝐺 (𝑥0 , 𝑥1 ).
We assume (1) that 𝑔 has 𝑑 regular zeros, (2) that det 𝑀 = 0 has only regular zeros, and (3)
that 𝐺 = det 𝑀 = 0 has no solutions in P1 . All three are Zariski open conditions, so almost
all polynomials 𝑔 satisfy this assumption. Define

𝑓 (𝑥1 , 𝑥2 ) := 𝑥2𝑑 − 𝑔(𝑥 1 ).

The Hessian (6.6) of the plane curve 𝑓 satisfies det 𝐻0 = 𝑑 (𝑑−1)·𝑥2𝑑−2 ·det 𝑀. Consequently,
det 𝐻0 = 0 if and only if either 𝑥 2 = 0, or 𝑥 1 is among the 2(𝑑 − 2) zeros of det 𝑀. This
means that x is an inflection point if either x = (𝑥 1 , 0) and 𝑥1 is a zero of 𝑔, or x = (𝑥1 , 𝑥2 )
where 𝑥 1 is a zero of det 𝑀 and 𝑥2𝑑 = 𝑔(𝑥1 ).
In the first case, we find 𝑑 inflection points, and each has multiplicity 𝑑 −2. In the second
case, since 𝑔(𝑥1 ) ≠ 0, we find 2𝑑 (𝑑 − 2) many regular inflection points with multiplicity
one. Now, if we perturb 𝑓 slightly, then the 𝑑 points with multiplicity 𝑑 − 2 will split into
𝑑 (𝑑 − 2) inflection points, while the other 2𝑑 (𝑑 − 2) inflection points will remain distinct.
In total, this gives 3𝑑 (𝑑 − 2) inflection points. □

Corollary 6.9 For a general plane curve 𝐶 of degree 𝑑, the evolute has degree 3𝑑 (𝑑 − 1).

Proof We compute the degree by intersecting the evolute with the line at infinity. For that,
we consider the Zariski closure 𝐶¯ of the curve 𝐶 in the complex projective plane PC2 . By
Proposition 6.2, the evolute is the image of Γ : 𝐶¯ → P2C , x ↦→ x − 𝑟 (x) · 𝑁 (x). A point Γ(x)
on the evolute can be at infinity for two reasons: Either x ∈ 𝐶¯ is at infinity, or x is a finite
point and a complex inflection point of the curve 𝐶 by Proposition 6.5. Since 𝐶 is a general
curve of degree 𝑑, there are 𝑑 points x of the first kind and 3𝑑 (𝑑 − 2) points x of the second
kind, by Theorem 6.8. For each of the 𝑑 points x ∈ 𝐶¯ at infinity, Salmon [156, §119] shows
that Γ(x) is a cusp whose tangent line is the line at infinity. Hence, when intersecting the
evolute with the line at infinity, there are 𝑑 cusps (that count with multiplicity three each)
plus 3𝑑 (𝑑 − 2) points that correspond to the complex inflection points of 𝐶. All in all, the
degree of the evolute is 3𝑑 + 3𝑑 (𝑑 − 2) = 3𝑑 (𝑑 − 1). □
Let us now find polynomial equations for critical curvature.

Lemma 6.10 The points of critical curvature on the curve 𝐶 = { 𝑓 (x) = 0} are defined by
 
𝜕 det 𝐻0 𝜕 det 𝐻0
( 𝑓12 + 𝑓22 ) · 𝑓2 · − 𝑓1 · − 3 det 𝐻0 · 𝑔 = 0,
𝜕𝑥1 𝜕𝑥 2

where 𝑔 := 𝑓1 𝑓2 · ( 𝑓1,1 − 𝑓2,2 ) + 𝑓1,2 ( 𝑓22 − 𝑓12 ).


74 6 Curvature

Proof Critical curvature points on 𝐶 are defined by the equations

𝜕𝑐(x) 𝜕𝑐(x)
𝑓 (x) = 𝑓2 (x) · − 𝑓1 (x) · = 0.
𝜕𝑥1 𝜕𝑥2
By Lemma 6.7 and the product rule, we have

5 𝜕𝑐(x) 𝜕 det 𝐻0
−(𝑑 − 1) 2 ( 𝑓12 + 𝑓22 ) 2 · = · ( 𝑓12 + 𝑓22 ) − 3 det 𝐻0 · ( 𝑓1 · 𝑓1,𝑖 + 𝑓2 · 𝑓2,𝑖 ).
𝜕𝑥𝑖 𝜕𝑥𝑖
This implies the polynomial equation stated above. □

Theorem 6.11 A general plane curve 𝐶 of degree 𝑑 has 2𝑑 (3𝑑 − 5) critical curvature
points over the complex numbers C.

Proof Recall that critical curvature points correspond to finite cusps of the evolute by
Proposition 6.5. Piene, Riener, and Shapiro prove in [146, Proposition 3.3] that, counting
in the complex projective plane, the number of cusps on the evolute for a general plane
curve 𝐶 of degree 𝑑 is 6𝑑 2 − 9𝑑. As explained in the proof of Corollary 6.9 above,
Salmon [156, §119] shows that 𝑑 of these cusps lie at infinity. Therefore, the curve 𝐶 has
6𝑑 2 − 9𝑑 − 𝑑 = 2𝑑 (3𝑑 − 5) complex critical curvature points. □

6.2 Algebraic Varieties

We now turn to smooth algebraic varieties in R𝑛 of any dimension. Our aim is to study
their curvature. This will lead us to the notions of the second fundamental form and the
Weingarten map. These are fundamental concepts in Riemannian geometry. In standard
textbooks, these concepts are presented in much more general contexts; see, for instance,
[58, 120, 140]. Our main goal in this section is to formulate the second fundamental form
and Weingarten map in terms of the polynomial equations that define the variety.
Let 𝑋 ⊂ R𝑛 be a smooth algebraic variety of dimension 𝑚. As in the case of plane
curves, we consider a unit normal field 𝑁 (x) for 𝑋 and we differentiate it along a tangent
field 𝑇 (x). The main difference to the case of plane curves is that there are usually many
tangent directions and many normal directions. In fact, every choice of normal and tangent
direction defines a curvature. Similar to (6.3), we define the curvature of 𝑋 at a point x in
𝜕𝑁
tangent direction 𝑇 (x) and in normal direction 𝑁 (x) to be ⟨𝑇 (x), 𝑇 (x)1 · 𝜕𝑥 1
(x) + · · · +
𝜕𝑁
𝑇 (x) 𝑛 · 𝜕𝑥𝑛 (x)⟩. We will see that, as for plane curves, this only depends on the values of
𝑇 (x) and 𝑁 (x) at a fixed point x, but not on how those fields behave locally around x.
Let us work this out. We assume that the Zariski closure of 𝑋 is irreducible. Its ideal

𝐼 (𝑋) = ⟨ 𝑓1 , . . . , 𝑓 𝑘 ⟩

is prime. We denote the gradients of the polynomials 𝑓𝑖 by ∇ 𝑓𝑖 and their Hessians by 𝐻𝑖


for 𝑖 = 1, . . . , 𝑘. The (transpose of the) Jacobian of 𝑓1 , . . . , 𝑓 𝑘 at x is denoted by
6.2 Algebraic Varieties 75
 
𝐽 (x) := ∇ 𝑓1 . . . ∇ 𝑓 𝑘 ∈ R𝑛×𝑘 .

A smooth unit normal field on 𝑋 is given by


𝑘
𝐽 (x) 𝑤(x) 1 ∑︁
𝑁 (x) = = 𝑤𝑖 (x) · ∇ 𝑓𝑖 (x), (6.8)
∥𝐽 (x) 𝑤(x) ∥ ∥𝐽 (x) 𝑤(x) ∥ 𝑖=1

where 𝑤 : 𝑋 → R 𝑘 is a smooth function with 𝑤(x) ∉ ker 𝐽 (x) for all x. Differentiating
(6.8) leads to the following equation, for some matrix-valued function 𝑅(x):
𝑘
d 1 ∑︁
𝑁 (x) = 𝑤𝑖 (x) · 𝐻𝑖 (x) + 𝐽 (x) 𝑅(x).
dx ∥𝐽 (x) 𝑤(x) ∥ 𝑖=1

Let us now fix a point x ∈ 𝑋. We denote the tangent vector by t := 𝑇 (x) ∈ 𝑇x 𝑋 and the
normal vector by v := 𝐽 (x)𝑤(x) ∈ 𝑁x 𝑋. Since t⊤ 𝐽 (x) = 0, this implies
𝑘
D E 1  ∑︁ 
t, t1 · 𝜕𝑁
+ · · · + t𝑛 · 𝜕𝑁
= · t⊤ 𝑤𝑖 𝐻𝑖 t.
𝜕𝑥1 𝜕𝑥𝑛 ∥v∥ 𝑖=1

The right-hand side only depends on the values of 𝑇 and 𝑁 at x.

Definition 6.12 The curvature of a real algebraic variety 𝑋 at a smooth point x in tangent
direction t ∈ 𝑇x 𝑋 and in normal direction v ∈ 𝑁x 𝑋 is the scalar
𝑘
1 ⊤  ∑︁ 
𝑐(x, t, v) := t 𝑤𝑖 · 𝐻𝑖 t,
∥v∥ 𝑖=1
Í𝑘
where v = 𝑖=1 𝑤𝑖 ∇ 𝑓𝑖 ∈ 𝑁x 𝑋. In this formula, we use the notation introduced above.

Remark 6.13 If the codimension of 𝑋 is greater than 𝑘, then the 𝑤𝑖 are not unique. Still, the
𝑤𝑖 ·∇ 𝑓𝑖 = 0, then t⊤ ( 𝑖=1
Í𝑘 Í𝑘
formula for 𝑐(x, t, v) is well-defined. Indeed, if 𝑖=1 𝑤𝑖 · 𝐻𝑖 )t = 0.

In fact, for x ∈ 𝑋 and a fixed normal vector v ∈ 𝑁x 𝑋, the curvature 𝑐(x, t, v) is a


quadratic form on 𝑇x 𝑋. This quadratic form is called the second fundamental form of 𝑋 at
x and v. It is often denoted by

IIv (t) := 𝑐(x, t, v). (6.9)

The linear map associated with this quadratic form is the Weingarten map. We denote it by
𝑘
 ∑︁  𝑘
∑︁
𝐿 v : 𝑇x 𝑋 → 𝑇x 𝑋, 𝐿 v (t) = 𝑃x 𝑤𝑖 · 𝐻𝑖 · t , where v = 𝑤𝑖 ∇ 𝑓 𝑖 (6.10)
𝑖=1 𝑖=1

and 𝑃x : R𝑛 → 𝑇x 𝑋 is the orthogonal projection onto the tangent space of 𝑋 at x. Since


𝐿 v is a self-adjoint operator given by a real symmetric matrix, its eigenvalues are all real.
If ∥v∥ = 1, the eigenvalues of 𝐿 v are called the principal curvatures of 𝑋 at x and in
76 6 Curvature

normal direction v. The product of the principal curvatures is called the Gauss curvature;
the arithmetic mean of the principal curvatures is called mean curvature.
Since the principal curvatures are the critical points of the quadratic form IIv (t), the
maximal curvature

𝐶 (𝑋) := max 𝑐(x, t, v) = max max 𝑐(x, t, v) (6.11)


x∈𝑋, t∈𝑇x 𝑋, v∈𝑁x 𝑋 x∈𝑋, v∈𝑁x 𝑋 t∈𝑇x 𝑋

is the maximum over all principal curvatures for varying (x, v).
Example 6.14 (Hypersurfaces) If 𝑋 is defined by one polynomial 𝑓 (x), then we have only
one normal direction (up to sign). Here, the formula in Definition 6.12 can be written as
1
𝑐(x, t) := t⊤ 𝐻 t,
∥∇ 𝑓 (x) ∥
where 𝐻 is the Hessian of 𝑓 . This generalizes the formula in Lemma 6.6. ⋄
Let us now focus on surfaces in R3 . Let 𝑆 ⊂ R3 be a smooth algebraic surface and x ∈ 𝑆.
When the two principal curvatures of 𝑆 at x are equal, the point x is called an umbilic or
umbilical point of the surface 𝑆. Equivalently, the best second-order approximation of 𝑆 at
x is a 2-sphere. Umbilical points can be formulated as the zeros of a system of polynomial
equations, whose complex zeros are called complex umbilics of the surface 𝑆. Salmon [157]
computed the number of complex umbilics of a general surface.
Theorem 6.15 A general surface of degree 𝑑 in R3 has 10𝑑 3 −28𝑑 2 +22𝑑 complex umbilics.
In the case of surfaces of degree 𝑑 = 2, we have results on the number of real umbilics
and critical curvature points. Observe that rotations and translations do not affect the
curvature, and that after a rotation and translation every quadric surface in R3 has the form

𝑆 = {𝑎 1 𝑥12 + 𝑎 2 𝑥22 + 𝑎 3 𝑥 32 = 1}.

By Theorem 6.15, the surface 𝑆 has 12 complex umbilics. The next theorem is proved
in [29]. We shall assume that 𝑎 1 𝑎 2 𝑎 3 (𝑎 1 − 𝑎 2 ) (𝑎 1 − 𝑎 3 ) (𝑎 2 − 𝑎 3 ) ≠ 0.
Theorem 6.16 The number of real umbilics of the quadratic surface 𝑆 equals
• 4 if 𝑆 is an ellipsoid (𝑎 1 , 𝑎 2 , 𝑎 3 are positive) or a two-sheeted hyperboloid (one of the
𝑎 𝑖 is positive and two are negative);
• 0 if 𝑆 is a one-sheeted hyperboloid (two of the 𝑎 𝑖 are positive and one is negative).
Similar to the case of plane curves, we call a point x on a surface 𝑆 a critical curvature
point if one of the two principal curvatures of 𝑆 attains a critical value at x. The first
observation is that umbilics are always critical curvature points. This was shown in [29].
The following result from [29] covers the case of quadrics.
Theorem 6.17 A general quadric surface 𝑆 ⊂ R3 has 18 complex critical curvature points.
The number of real critical curvature points equals
• 10 if 𝑆 is an ellipsoid (𝑎 1 , 𝑎 2 , 𝑎 3 are positive);
• 4 if 𝑆 is a one-sheeted hyperboloid (two of the 𝑎 𝑖 are positive and one is negative);
• 6 if 𝑆 is a two-sheeted hyperboloid (one of the 𝑎 𝑖 is positive and two are negative).
6.3 Volumes of Tubular Neighborhoods 77

Fig. 6.5: The pictures illustrate Theorems 6.16 and 6.17. The figure on the left shows an ellipsoid with 4
red umbilics and 6 green critical curvature points. The umbilics are also critical curvature points, so there
are 10 in total. Similarly, the figure in the middle shows a one-sheeted hyperboloid with 4 green critical
curvature points, and the figure on the right shows a two-sheeted hyperboloid with 4 red umbilics and 2
green critical curvature points (so 6 critical curvature points in total).

6.3 Volumes of Tubular Neighborhoods

In this section, we study the volume of a tubular neighborhood of a real algebraic variety.
This is closely connected to curvature, as we will see. Methods for computing volumes of
semialgebraic sets numerically will be presented in Chapter 14.
The tubular neighborhood of radius 𝜀 of a variety 𝑋 ⊂ R𝑛 is the set

Tube(𝑋, 𝜀) := { u ∈ R𝑛 | 𝑑 (u, 𝑋) < 𝜀 },

where 𝑑 (u, 𝑋) = minx∈𝑋 ∥u − x∥ is the Euclidean distance from u to 𝑋. There are several
general formulas for upper bounds on the volume of Tube(𝑋, 𝜀) in the literature. For
instance, Lotz [125] studied the case of a general complete intersection. Bürgisser, Cucker,
and Lotz studied the case of a (possibly) singular hypersurface [36] in the sphere.
We now state the most general formula, due to Basu and Lerario [14]. Their theorem
also holds for singular varieties. The proof of the theorem is based on approximating 𝑋 in
the Hausdorff topology by a sequence of smooth varieties (𝑋 𝑘 ) 𝑘 ∈N and showing that the
volume of the tubular neighborhood of 𝑋 𝑘 can be controlled as 𝑘 → ∞.
Theorem 6.18 Let 𝑋 ⊂ R𝑛 be a real variety of dimension 𝑚, defined by polynomials of
degree ≤ 𝑑. Fix u ∈ R𝑛 and let 𝐵𝑟 (u) denote the ball of radius 𝑟 > 0 around u. For
every 0 < 𝜀 ≤ 𝑟/(4𝑑𝑚 + 𝑚), we have
  𝑛−𝑚
vol(Tube(𝑋, 𝜀) ∩ 𝐵𝑟 (u)) 4𝑛𝑑𝜀
≤ 4𝑒 .
vol(𝐵𝑟 (u)) 𝑟

The volume of tubular neighborhoods of smooth varieties (in fact, of smooth submani-
folds of R𝑛 ) is given by Weyl’s tube formula. We shall now derive this formula. For a more
detailed derivation and discussion, we refer to Weyl’s original paper [175].
78 6 Curvature

Let 𝑋 ⊂ R𝑛 be smooth and N 𝑋 be the normal bundle of 𝑋. The 𝜀-normal bundle is

N𝜀 𝑋 := {(x, v) ∈ N 𝑋 | ∥v∥ < 𝜀}.

The (normal) exponential map is the following parametrization of the tubular neighborhood:

𝜑 𝜀 : N𝜀 𝑋 → Tube(𝑋, 𝜀), (x, v) ↦→ x + v. (6.12)

Definition 6.19 The reach of 𝑋 is defined as



𝜏(𝑋) := sup 𝜀 > 0 | 𝜑 𝜀 is a diffeomorphism . (6.13)

If 𝑋 is smooth and compact, then the set in (6.13) is non-empty, and hence the reach
𝜏(𝑋) is a positive real number; see, e.g., [121, Theorem 6.24]. See Chapters 7 and 15 for
further properties of the reach. In what follows, we assume that 𝑋 is compact. If not, then
we replace 𝑋 by the semialgebraic set 𝑋 ∩ 𝐵, where 𝐵 is a ball.
The desired volume is the integral of the constant function 1 over the tube. If 𝜀 < 𝜏(𝑋),
then the exponential map 𝜑 𝜀 is a diffeomorphism and we can pull that integral back to the
normal bundle N𝜀 𝑋. To be precise, let 𝐴 be the matrix that represents the derivative of 𝜑 𝜀
with respect to orthonormal bases. We have
∫ ∫ ∫
vol(Tube(𝑋, 𝜀)) = du = |det( 𝐴(x, v))| dv dx. (6.14)
Tube(𝑋, 𝜀) x∈𝑋 v∈𝑁x 𝑋: ∥v ∥< 𝜀

We compute the matrix 𝐴 := 𝐴(x, v). It represents a linear map

𝑇(x,v) N𝜀 𝑋  𝑇x 𝑋 ⊕ 𝑁x 𝑋 → R𝑛  𝑇x 𝑋 ⊕ 𝑁x 𝑋.

Let 𝐵1 be an orthonormal basis for the tangent space 𝑇x 𝑋 and 𝐵2 one for the normal
space 𝑁x 𝑋. An orthonormal basis for 𝑇x 𝑋 ⊕ 𝑁x 𝑋 is {(t, 0) | t ∈ 𝐵1 } ∪ {(0, z) | z ∈ 𝐵2 }.
We compute the image of these basis vectors under 𝐴. First, let t ∈ 𝐵1 . If v = 𝜆 · w, 𝜆 = ∥v∥,
and 𝐿 w denotes the Weingarten map from (6.10), then we have
 
t
𝐴 = t + (𝜆 · 𝐿 w ) t.
0

This is because (t, 0) is the tangent vector of a curve (x(𝑡), v(𝑡)) ∈ N𝜀 𝑋 passing through
(x(0), v(0)) = (x, v), such that ∥v(𝑡) ∥ is constant and equal to 𝜆. If the derivative of x(𝑡)
at 𝑡 = 0 is t, then the derivative of v(𝑡) at 𝑡 = 0 is (𝜆 · 𝐿 w ) t, since the image of t under
the Weingarten map 𝐿 w is the derivative of the unit normal vector 𝜆−1 · v(𝑡). Linearity of
differentiation implies that 𝐴 (t, 0) ⊤ is the sum of these two terms.
Next, we consider a basis vector (0, z) for z ∈ 𝐵2 . It is the tangent vector of a curve
(x(𝑡), v(𝑡)) in N𝜀 𝑋, where x(𝑡) is constant and v(𝑡) is a curve in the normal space 𝑁x 𝑋,
whose derivative at 𝑡 = 0 is z. This shows the equation
 
0
𝐴 = z.
z
6.3 Volumes of Tubular Neighborhoods 79

Therefore, a matrix representation with respect to orthonormal bases is


 
𝐼 + 𝜆 · 𝐿w 0
𝐴(x, v) = 𝑚 , 𝑚 = dim 𝑋. (6.15)
0 𝐼𝑛−𝑚

Since 𝜆 = ∥v∥ < 𝜏(𝑋), the eigenvalues of 𝜆 · 𝐿 w have absolute value at most 1. This implies
that the determinant of 𝐴(x, v) is positive, and therefore

| det( 𝐴(x, v))| = det(𝐼𝑚 + 𝜆 · 𝐿 w ).

The transformation v → (w, 𝜆) has Jacobian determinant 𝜆 𝑛−𝑚−1 . Plugging all this into
the inner integral in (6.14), we arrive at the following integral for the volume of the tube:
∫ ∫ 𝜀∫
vol(Tube(𝑋, 𝜀)) = 𝜆 𝑛−𝑚−1 · det(𝐼𝑚 + 𝜆 · 𝐿 w ) dw d𝜆 dx.
x∈𝑋 𝜆=0 w∈𝑁x 𝑋: ∥w ∥=1

Expanding the characteristic polynomial inside this integral, we see that vol(Tube(𝑋, 𝜀))
is a polynomial in 𝜀 of degree 𝑛 whose coefficients are integrals of the principal minors of
the Weingarten map 𝐿 v over 𝑋. Since 𝐿 −v = −𝐿 v , the integrals over the odd-dimensional
minors of 𝐿 v vanish. All this leads to:

Theorem 6.20 (Weyl’s tube formula [175]) In the notation above, we have
∑︁
vol(Tube(𝑋, 𝜀)) = 𝜅2𝑖 (𝑋) · 𝜀 𝑛−𝑚+2𝑖 .
0≤2𝑖 ≤𝑚

The coefficients 𝜅2𝑖 (𝑋) of this polynomial are called curvature coefficients of 𝑋. Explicitly,
∫ ∫
1
𝜅 2𝑖 (𝑋) = 𝑚 2𝑖 (𝐿 w ) dw dx,
𝑛 − 𝑚 + 2𝑖 x∈𝑋 w∈𝑁x 𝑋: ∥w ∥=1

where 𝑚 2𝑖 ( · ) denotes the sum of the principal minors of format 2𝑖 × 2𝑖.

In fact, the curvature coefficient 𝜅 0 (𝑋) is always equal to the 𝑚-dimensional volume
of 𝑋 times the volume of the unit ball 𝐵 𝑛−𝑚 = {x ∈ R𝑛−𝑚 | ∥x∥ ≤ 1}. This yields:

Corollary 6.21 The volume of a compact variety 𝑋 of dimension 𝑚 in R𝑛 is equal to

vol(Tube(𝑋, 𝜀))
vol(𝑋) = lim .
𝜀→0 𝜀 𝑛−𝑚 · vol(𝐵 𝑛−𝑚 )
We close this chapter by discussing Weyl’s tube formula in two low-dimensional cases.

Example 6.22 (Curves) If 𝑋 ⊂ R𝑛 is a smooth algebraic curve, then

vol(Tube(𝑋, 𝜀)) = 𝜀 𝑛−1 · vol(𝐵 𝑛−1 ) · length(𝑋).

For instance, the volume of the 𝜀-tube around a plane curve 𝐶 is 2𝜀 · length(𝐶). ⋄
80 6 Curvature

Example 6.23 (Surfaces in 3-space) Let 𝑆 = { 𝑓 (x) = 0} ⊂ R3 be a compact smooth


algebraic surface with Euler characteristic 𝜒(𝑆). For 𝜀 < 𝜏(𝑆), the volume of its 𝜀-tube is

2𝜀 area(𝑆) + 𝜀 3 vol(𝐵3 ) 𝜒(𝑆).

Let us prove this. Weyl’s tube formula implies

vol(Tube(𝑆, 𝜀)) = 2𝜀 area(𝑆) + 𝜀 3 𝜅 2 (𝑆),

where the coefficient 𝜅 2 (𝑆) is the integral of the Gauss curvature:



2
𝜅 2 (𝑆) = det(𝐿 𝑁 (x) ) dx,
3 x∈𝑆

where 𝑁 (x) = ∥∇ 𝑓 (x)∥ −1 · ∇ 𝑓 (x) denotes the normal field of 𝑆 at x given by the gradient
of 𝑓 . The surface 𝑆 is orientable since it lives in R3 . Indeed, the orientation is given
by the normal field 𝑁 (x). The Gauss–Bonnet theorem (see, e.g., [120, Theorem 9.3])
implies that the integral over the Gauss curvature is 2𝜋 · 𝜒(𝑆). Moreover, the volume of the
three-dimensional unit ball is vol(𝐵3 ) = 4𝜋/3. ⋄

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International
License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and
reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter’s Creative Commons
license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s
Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the
permitted use, you will need to obtain permission directly from the copyright holder.
Chapter 7
Reach and Offset

In this chapter, we study the medial axis, bottlenecks, and offset hypersurfaces. These
notions are intuitive and important for many applications. They will also lead to a better
understanding of the geometry of the reach, which was introduced in Definition 6.19. The
last section is devoted to the offset discriminant of a variety. This offers a direct link between
the ED problem in Chapter 2 and differential geometric concepts we saw in the previous
chapter, namely the second fundamental form (6.9) and the Weingarten map (6.10).

7.1 Medial Axis and Bottlenecks

The medial axis Med(𝑋) of a set 𝑋 ⊂ R𝑛 is the set of points u ∈ R𝑛 such that there exist
at least two distinct points on 𝑋 at which the distance from 𝑋 to u is attained. In other
words, the medial axis is the locus of points in R𝑛 where the Euclidean projection to 𝑋 is
not well-defined. We shall later focus on the case when 𝑋 is a smooth variety in R𝑛 .

Proposition 7.1 If 𝑋 is a semialgebraic set in R𝑛 then its medial axis Med(𝑋) is also a
semialgebraic set.

Proof The sentence in the introductory paragraph that defines the medial axis can be
expressed using polynomial inequalities, together with the existential quantifier in “there
exist at least two points”. By Tarski’s Theorem on Quantifier Elimination, there exists a
quantifier-free formula for Med(𝑋). The medial axis is, therefore, semialgebraic. □
The reach 𝜏(𝑋) was defined as the supremum over all 𝜀 such that the exponential map
of 𝑋 restricted to normal vectors of length < 𝜀 is a diffeomorphism. This implies that all
points u ∈ R𝑛 whose distance to 𝑋 is less than 𝜏(𝑋) have a unique closest point on 𝑋.
Consequently, the distance between 𝑋 and its medial axis must be at least 𝜏(𝑋). This shows
that the reach is intimately linked with the medial axis. We make this connection more
precise in the following result. Proposition 7.2 can be used as a definition for the reach of
singular varieties. Yet another characterization of the reach will be given in Theorem 7.8.

© The Author(s) 2024 81


P. Breiding et al., Metric Algebraic Geometry, Oberwolfach Seminars 53,
https://doi.org/10.1007/978-3-031-51462-3_7
82 7 Reach and Offset

Proposition 7.2 The distance from a smooth real variety 𝑋 to its medial axis Med(𝑋) is
the reach 𝜏(𝑋).
Proof The exponential map 𝜑 𝜀 : N𝜀 𝑋 → Tube(𝑋, 𝜀) was defined in (6.12) by the
formula (x, v) ↦→ x + v. Suppose 𝜀 < 𝜏(𝑋). Then 𝜑 𝜀 is a diffeomorphism, and the tubular
neighborhood Tube(𝑋, 𝜀) is disjoint from the medial axis Med(𝑋) since otherwise 𝜑 𝜀
cannot be injective. Hence, the distance from 𝑋 to Med(𝑋) is at least 𝜏(𝑋). To show the
reverse inequality, let 𝜀 > 0 be less than the distance from 𝑋 to Med(𝑋). Fix a point u
in Tube(𝑋, 𝜀). The Euclidean closure of Med(𝑋) does not contain u. Thus, in an open
neighborhood 𝑈 ⊂ Tube(𝑋, 𝜀) of u, the points have a unique closest point on 𝑋. This
defines a smooth map 𝑈 → 𝑋, u ↦→ x(u). The map 𝜓u : 𝑈 → N𝜀 𝑋, u ↦→ (x(u), u − x(u))
is then smooth with smooth inverse 𝜓u−1 = 𝜑 𝜀 | 𝜓u (𝑈) . Via a partition of unity of Tube(𝑋, 𝜀)
(see e.g. [121, Chapter 2]), we can obtain a global smooth inverse of 𝜑 𝜀 from the local
inverses 𝜓u . Hence, 𝜑 𝜀 is a diffeomorphism and 𝜀 < 𝜏(𝑋). □
Example 7.3 The reach of the parabola 𝑋 in Example 7.4 is 𝜏(𝑋) = 21 . It is realized as
the distance between (0, 0) ∈ 𝑋 and (0, 21 ), which is a point in the Euclidean closure
of Med(𝑋) = (0, 𝑢 2 ) ∈ R2 𝑢 2 > 21 .


We define the algebraic medial axis as the Zariski closure of the medial axis. In symbols,

𝑀𝑋 := Med(𝑋).

The variety 𝑀𝑋 is our algebraic proxy for the medial axis Med(𝑋). By Proposition 7.1, the
variety 𝑀𝑋 and the semialgebraic set Med(𝑋) have the same dimension.
Example 7.4 Consider the parabola 𝑋 = 𝑉 (𝑥2 − 𝑥12 ). We compute the algebraic medial axis
of 𝑋. The result is shown in Figure 7.4 below. If x = (𝑥 1 , 𝑥2 ) ∈ 𝑋 minimizes the distance
to a point u = (𝑢 1 , 𝑢 2 ) ∈ R2 , then we have ⟨x − u, t⟩ = 0, where t spans the tangent space
𝑇x 𝑋. We use Macaulay2 [73] to compute 𝑀𝑋 algebraically:
R = QQ[x1, x2, y1, y2, u1, u2];
fx = x2 - x1^2; fy = y2 - y1^2;
Jx = matrix {{x1-u1, x2-u2}, {diff(x1, fx), diff(x2, fx)}};
Jy = matrix {{y1-u1, y2-u2}, {diff(y1, fy), diff(y2, fy)}};
distxu = (x1 - u1)^2 + (x2 - u2)^2;
distyu = (y1 - u1)^2 + (y2 - u2)^2;
I = ideal {fx, fy, det(Jx), det(Jy), distxu - distyu};
K = saturate(I, ideal {x1-y1, x2-y2});
eliminate({x1, x2, y1, y2}, K)

This returns the ideal ⟨𝑢 1 ⟩, so the algebraic medial axis is 𝑀𝑋 = {𝑢 1 = 0}. ⋄


Remark 7.5 Propositions 7.1 and 7.2 imply that the reach of a real variety is an algebraic
notion. More concretely, if 𝑋 is smooth and defined by polynomials with rational coeffi-
cients, then its reach 𝜏(𝑋) is an algebraic number over Q. This was shown by Horobeţ and
Weinstein in [92, Proposition 3.14].
Our next goal is to characterize the reach of a smooth variety 𝑋 ⊂ R𝑛 in terms of maximal
curvature and bottlenecks. Curvature is discussed in detail in the previous chapter. We now
7.1 Medial Axis and Bottlenecks 83

introduce bottlenecks. Let x, y ∈ 𝑋 be two distinct points. If x − y is normal to 𝑇x 𝑋 (i.e.,


⟨t, x − y⟩ = 0 for all t ∈ 𝑇x 𝑋) and also normal to 𝑇y 𝑋, then we call {x, y} a bottleneck.
Complex solutions to the corresponding polynomial equations are complex bottlenecks.
Di Rocco, Eklund and Weinstein [57] expressed the number of complex bottlenecks of a
variety in terms of polar classes. The following theorem is their result for planar curves.
Theorem 7.6 A general plane curve of degree 𝑑 has 21 (𝑑 4 − 5𝑑 2 + 4𝑑) complex bottlenecks.
Example 7.7 We compute the bottlenecks of the Trott curve from (2.7) using the numerical
software HomotopyContinuation.jl [31]:
using HomotopyContinuation, LinearAlgebra
@var x y u v
f = 144*(x^4 + y^4) - 225*(x^2 + y^2) + 350*x^2*y^2 + 81;
g = subs(f, x=>u, y=>v);
df = differentiate(f, [x; y]); dg = differentiate(g, [u; v]);
N = [x-u; y-v];
bottlenecks = solve([f; g; det([N df]); det([N dg])])
By Theorem 7.6 there are 21 (𝑑 4 − 5𝑑 2 + 4𝑑) = 96 complex bottlenecks. Our computation
reveals that 36 of the bottlenecks are real. They are marked in Figure 7.1. We note here that
one point can appear in more than one bottleneck. ⋄

Trott curve
bottlenecks

Fig. 7.1: Bottlenecks of the Trott curve (2.7) are displayed as grey normal lines with yellow endpoints.

The width of a bottleneck is 𝑏(x, y) := 12 ∥x − y∥. We denote the width of the smallest
bottleneck of the variety 𝑋 by

𝐵(𝑋) := min 𝑏(x, y).


{x,y} bottleneck of 𝑋

The next theorem links the reach of 𝑋 to its bottlenecks and its maximal curvature 𝐶 (𝑋).
Recall that 𝐶 (𝑋) was defined in Equation (6.11).
Theorem 7.8 Let 𝑋 be a smooth variety in R𝑛 . Then the reach of 𝑋 equals
 
1
𝜏(𝑋) = min 𝐵(𝑋), .
𝐶 (𝑋)
84 7 Reach and Offset

Proof Recall from (6.13) that the reach 𝜏(𝑋) is the supremum over all 𝜀 > 0 such that the
exponential map 𝜑 𝜀 : N𝜀 𝑋 → Tube(𝑋, 𝜀), (x, v) ↦→ x + v is a diffeomorphism. Let

𝜀 := 𝜏(𝑋). (7.1)

For 𝜀 ′ > 𝜀, the exponential map 𝜑 𝜀′ is not a diffeomorphism. The map is either not an
immersion or it is not injective. Thus, there is a point u = x + v ∈ R𝑛 , where (x, v) ∈ N 𝑋,
at distance 𝜀 = ∥v∥ from 𝑋 such that, for 𝜀 ′ > 𝜀, either the derivative of 𝜑 𝜀′ at (x, v) is not
injective or 𝜑−1
𝜀′ (u) has at least two elements.
Suppose first that the derivative of each 𝜑 𝜀′ at (x, v) is not injective. Then it follows
from (6.15) that 𝜀 −1 is a principal curvature at x in normal direction −𝜀 −1 v. According to
(7.1), 𝜀 is the smallest positive number with that property. Therefore, its inverse 𝜀 −1 must
be the maximal curvature 𝐶 (𝑋).
The remaining case to analyze is when each fiber 𝜑−1 𝜀′ (u) contains at least two points
and the derivative of 𝜑 𝜀′ is injective at these points. We have two distinct points x, y ∈ 𝑋
such that u = x + v = y + w, where (y, w) ∈ N 𝑋 and 𝛿 := ∥w∥ ≤ 𝜀. We distinguish two
subcases. First, we assume that u lies on the line spanned by x and y. Then, {x, y} is a
bottleneck. Moreover, u must be the midpoint between x and y; otherwise there is a 𝜎 with
𝑏(x, y) < 𝜎 < 𝜀 and the fiber of the midpoint 21 (x + y) under 𝜑 𝜎 would contain at least two
points, but the latter implies 𝜏(𝑋) ≤ 𝜎 < 𝜀; a contradiction to (7.1). Hence, 𝜀 = 𝑏(x, y).
By (7.1), there cannot be any smaller bottleneck, so that 𝜀 = 𝐵(𝑋) and we are done.
Second, we assume that x, y, u form a triangle. Since the derivative of 𝜑 𝜀′ is injective at
both (x, v) and (y, w), the Inverse Function Theorem implies the existence of two locally
defined and smooth maps u ↦→ x(u) and u ↦→ y(u) that project locally around u to 𝑋.
These define two local smooth functions 𝑑x (u) := ∥u − x(u)∥ and 𝑑y (u) := ∥u − y(u)∥
that locally measure the distance to 𝑋. Their gradients are

∇𝑑x (u) = 𝜀 −1 (u − x) and ∇𝑑y (u) = 𝛿−1 (u − y);

see e.g. [72, Lemma 2.11] and also Remark 7.9.


Let a be a unit norm vector that starts at u and points inside the triangle with vertices
x, y, u such that ⟨u − x, a⟩ < 0 and ⟨u − y, a⟩ < 0. Here is an illustration:
u

a
x y
x (u) y𝜕𝑑 (u)
The partial derivatives of 𝑑x (u) and 𝑑y (u) in direction a satisfy 𝜕𝑑𝜕a < 0 and 𝜕a < 0.
When we move from u in direction a, the local distances from u to 𝑋 both decrease. Hence,
there is a 𝜎 < 𝜀 such that 𝜑 𝜎 is not injective. Thus, 𝜏(𝑋) ≤ 𝜎 < 𝜀. This contradicts (7.1)
and so x, y, u cannot form a triangle. □

Remark 7.9 As above, let 𝑑 be a (locally) defined projection map to a variety 𝑋, such that
x = 𝑑 (u). Write v := (u−x)/∥u−x∥ for the unit normal direction. We claim that ∇𝑑 (u) = v.
An informal proof is as follows: If we move from u infinitesimally in a direction that is
perpendicular to v, then the distance 𝑑 (u) does not change. This means that the derivative
of 𝑑 (u) in a direction perpendicular to v is zero, hence the gradient of 𝑑 (u) must be a
7.2 Offset Hypersurfaces 85

multiple of v. On the other hand, 𝑑 (u + 𝑡 · v) = 𝑑 (u) + 𝑡, which shows that the derivative of
𝑑 (u) in direction v is 1. Consequently, ∇𝑑 (u) = v. In particular, the Weingarten map 𝐿 v
can be obtained via the second derivative of 𝑑 (u). This is worked out in (7.5) below.

7.2 Offset Hypersurfaces

This section is based on the article [92] by Horobeţ and Weinstein. We fix an irreducible
variety 𝑋 in R𝑛 , and we identify 𝑋 with its Zariski closure in C𝑛 . The ED correspondence
E 𝑋 of 𝑋 is the Zariski closure of the set of pairs (x, u) ∈ Reg(𝑋) × R𝑛 such that x is an
ED critical point for u. We recall from Theorem 2.23 that

E 𝑋 = {(x, x + h) | x ∈ Reg(𝑋), (x, h) ∈ 𝑁 𝑋 } ⊆ 𝑋 × C𝑛 .

The branch locus of the projection E 𝑋 → C𝑛 is called the ED discriminant or evolute. For
plane curves, this coincides with the definition of the evolute in Section 1.3. We denote the
ED discriminant of the given variety 𝑋 by Σ𝑋 ⊂ C𝑛 .
For 𝜀 ∈ C and u ∈ C𝑛 , the 𝜀-sphere around u is the variety 𝑆(u, 𝜀) := 𝑉 (∥x − u∥ 2 − 𝜀 2 ).

Definition 7.10 The offset correspondence of 𝑋 is the variety

OC𝑋 = (E 𝑋 × C) ∩ {(x, u, 𝜀) ∈ C𝑛 × C𝑛 × C | x ∈ 𝑆(u, 𝜀)}.

Hence, OC𝑋 is the complex Zariski closure of the set of triples (x, u, 𝜀) such that x is an
ED critical point for u, and 𝜀 2 is the squared Euclidean distance (over R) between x and u.

We consider the two projections 𝜋1 : OC𝑋 → 𝑋 and 𝜋2 : OC𝑋 → C𝑛 × C. The map 𝜋1


is dominant, i.e. 𝜋1 (OC𝑋 ) = 𝑋, because (x, x, 0) ∈ OC𝑋 for all x ∈ 𝑋. However, the other
projection is not dominant. The next definition specifies the image of that projection.

Definition 7.11 The offset hypersurface of 𝑋 is the variety Off 𝑋 := 𝜋2 (OC𝑋 ) ⊂ C𝑛 × C.

The next lemma justifies the name.

Lemma 7.12 codim Off 𝑋 = 1.

Proof The ED correspondence E 𝑋 is the Zariski closure of a vector bundle of rank


codim(𝑋) over Reg(𝑋), which shows that dim E 𝑋 = 𝑛. Since 𝑋 is irreducible, also E 𝑋
is irreducible. The offset correspondence OC𝑋 is the intersection of E 𝑋 × C, which is
irreducible as well, with a hypersurface. This implies dim OC𝑋 = 𝑛. Since the ED degree
of 𝑋 is finite, the projection 𝜋2 has finite fibers generically, which implies dim Off 𝑋 = 𝑛.□

Remark 7.13 For a fixed radius 𝑟 > 0, the level set Off 𝑋,𝑟 ⊂ C𝑛 is the intersection of the
offset hypersurface Off 𝑋 with the hyperplane 𝜀 = 𝑟 in C𝑛 × C. Figure 7.3 shows the level
sets for 𝑟 = 0.5 and 𝑟 = 1.25, respectively, of the offset surface of a parabola. The real locus
of Off 𝑋,𝑟 always contains the boundary of the tubular neighborhood Tube(𝑋, 𝑟), which
86 7 Reach and Offset

is 𝜕Tube(𝑋, 𝑟) = {u ∈ R𝑛 | 𝑑 (u, 𝑋) = 𝑟 }. Indeed, for any u ∈ 𝜕Tube(𝑋, 𝑟), there is a


closest point x ∈ 𝑋 with ∥x − u∥ = 𝑟. In particular, x is an ED critical point for u and
(x, u, 𝑟) ∈ OC𝑋 , i.e., u ∈ Off 𝑋,𝑟 . For the parabola in Figure 7.3, the real locus of Off 𝑋,0.5
is equal to 𝜕Tube(𝑋, 0.5). On the other hand, 𝜕Tube(𝑋, 1.25) is strictly contained in the
real part of Off 𝑋,1.25 . In this example, that change of qualitative behavior occurs when the
radius 𝑟 crosses the reach 𝜏(𝑋) = 0.5.

It follows from Lemma 7.12 that Off 𝑋 is the zero set of a polynomial 𝑔 𝑋 (u, 𝜀); i.e.,

Off 𝑋 = 𝑉 (𝑔 𝑋 ) ⊂ C𝑛 × C.

We call 𝑔 𝑋 the offset polynomial. It is also known as the ED polynomial; see [141].

Fig. 7.2: The offset hypersurface Off 𝑋 of the parabola is a surface in R3 . The surface is symmetric along
the 𝜀-axis, because only even powers of 𝜀 appear in the offset polynomial 𝑔 (u, 𝜀). The parabola itself is
visible at level 𝜀 = 0.

Example 7.14 We compute the offset polynomial of a parabola in Macaulay2 [73]:


R = QQ[x1, x2, u1, u2, eps];
f = x2 - x1^2; d = (x1-u1)^2 + (x2-u2)^2 - eps^2;
J = matrix {{x1-u1, x2-u2}, {diff(x1, f), diff(x2, f)}};
OC = ideal {f, det(J), d};
O = eliminate({x1, x2}, OC);
g = sub((gens O)_0_0, QQ[x1, x2, u1, u2][eps])

Setting 𝑋 = 𝑉 (𝑥2 − 𝑥12 ), this gives 𝑔 𝑋 (u, 𝜀) = 𝑔0 (u) + 𝑔1 (u)𝜀 2 + 𝑔2 (u)𝜀 4 + 𝑔3 (u)𝜀 6 , where

𝑔0 (u) = (𝑢 21 − 𝑢 2 ) 2 (16𝑢 21 + 16𝑢 22 − 8𝑢 2 + 1),


𝑔2 (u) = 48𝑢 21 + 16𝑢 22 + 32𝑢 2 − 8,
𝑔1 (u) = −48𝑢 41 − 32𝑢 21 𝑢 22 + 8𝑢 21 𝑢 2 − 32𝑢 32 − 20𝑢 21 − 8𝑢 22 + 8𝑢 2 − 1,
𝑔3 (u) = −16.
7.3 Offset Discriminant 87

Figure 7.2 shows the real part of the offset surface 𝑔(u, 𝜀) = 0, which lives in the ambient
space R3 = R2 × R ⊂ C2 × C. ⋄

2 2

1 1

0 0

-1 -1

-2 -2
-6 -4 -2 0 2 4 6 -6 -4 -2 0 2 4 6

Fig. 7.3: The offset surface OffX of the parabola intersected with the planes 𝜀 = 1.25 and 𝜀 = 0.5.

We next examine some properties of the offset polynomial.


Proposition 7.15 (a) For a general point u ∈ C𝑛 , the zeros of√︁ the univariate polynomial
function 𝜀 ↦→ 𝑔 𝑋 (u, 𝜀) are the complex numbers 𝜀 = ± ∥u − x∥ 2 , where x ranges
over all ED critical points for u on 𝑋.
(b) The degree of the offset polynomial 𝑔 𝑋 (u, 𝜀) in the unknown 𝜀 is two times the Euclidean
distance degree of 𝑋.
Proof We observe that the projection Off 𝑋 → C𝑛 , (u, 𝜀) ↦→ u is dominant, because general
points in C𝑛 have ED critical points on 𝑋. Take a general u ∈ C𝑛 . Then, 𝑔 𝑋 (u, 𝜀)√︁= 0 if and
only if there exists x ∈ 𝑋 with (x, u) ∈ E 𝑋 and 𝜀 2 = ∥x − u∥ 2 . Therefore, 𝜀 = ± ∥u − x∥ 2 ,
where x ranges over all ED critical points for u. In particular, this shows that the univariate
polynomial function 𝜀 ↦→ 𝑔 𝑋 (u, 𝜀) has 2 · EDdegree(𝑋) many zeros for general u. □
Example 7.16 In Example 7.14, we see that the offset polynomial 𝑔 𝑋 (u, 𝜀) has degree six
in 𝜀. This reflects the fact that the ED degree of the parabola is three. For instance, any
point u ∈ R2 in Figure 7.4 that is both above the blue curve (the parabola) and above the
yellow curve (the evolute) has three real ED critical points on the parabola. ⋄
The coefficients of the offset polynomial were studied by Ottaviani and Sodomaco
in [141]. They prove the following theorem (see [141, Proposition 4.4]).
Theorem 7.17 If 𝑋 is general enough and 𝑔 𝑋 (u, 𝜀) = 𝑐 0 (u) + 𝑐 1 (u)𝜀 2 + · · · + 𝑐 𝑘 (u)𝜀 2𝑘 is
its offset polynomial, then the leading coefficient 𝑐 𝑘 (u) is a real constant.

7.3 Offset Discriminant

In the previous section, we introduced the offset polynomial 𝑔 𝑋 (u, 𝜀) of a variety 𝑋 ⊂ R𝑛 .


For any fixed u ∈ R𝑛 , this encodes the distances from u to its ED critical points on 𝑋. If u
88 7 Reach and Offset

is on the medial axis, then 𝑔 𝑋 (u, 𝜀) must have a double root in 𝜀. This motivates us to study
the discriminant of the offset polynomial with respect to the distinguished variable 𝜀. That
discriminant is a polynomial in u = (𝑢 1 , . . . , 𝑢 𝑛 ).

Definition 7.18 The offset discriminant is the polynomial

𝛿 𝑋 (u) := Disc 𝜀 𝑔 𝑋 (u, 𝜀).

Its zero set is the hypersurface

ΔOff 𝑛
𝑋 := 𝑉 (𝛿 𝑋 ) ⊂ C .

-1
-6 -4 -2 0 2 4 6

Fig. 7.4: The offset discriminant of the parabola 𝑋 = 𝑉 ( 𝑥2 − 𝑥12 ) has three real components: the parabola
itself (blue), the algebraic medial axis 𝑀𝑋 (the red vertical line) and the ED discriminant or evolute Σ𝑋
(the yellow cubic curve).

Example 7.19 The discriminant of the offset polynomial of the parabola in Example 7.14 is

𝛿 𝑋 (u) = 𝑢 41 · (𝑢 21 − 𝑢 2 ) · 𝛿1 (u) 6 · 𝛿2 (u)


where 𝛿1 (u) = −27𝑢 21 + 2(2𝑢 2 − 1) 3 and 𝛿2 (u) = 16𝑢 21 + (4𝑢 2 − 1) 2 .

The factor 𝛿2 (u) has no real zeros, and 𝑢 21 − 𝑢 2 is the polynomial of 𝑋. The real zero locus
of the other factors 𝑢 1 and 𝛿1 (u) are shown in Figure 7.4. The medial axis of the parabola
is Med(𝑋) = {(0, 𝑢 2 ) | 𝑢 2 > 12 } and 𝑢 1 = 0 is the Zariski closure of Med(𝑋). The variety
𝛿1 (u) = 0 is the ED discriminant or evolute of the parabola, also known as the semicubical
parabola. Above the evolute, every point u ∈ R2 has three real ED critical points on 𝑋,
and below the evolute it has one real and two complex ED critical points. ⋄

The discriminant ΔOff


𝑋 in the previous example has three irreducible components: the
variety 𝑋, its algebraic medial axis, and its evolute. We show that this is a general fact,
following [92]. For that, we define the bisector hypersurface Bis𝑋 of the variety 𝑋. If we
7.3 Offset Discriminant 89

write Bl𝑋 ⊂ C𝑛 × C for the branch locus of the projection 𝜋2 : OC𝑋 → C𝑛 × C, the bisector
hypersurface is the set of all points u that arise from that branch locus:

Bis𝑋 := { u | (u, 𝜀) ∈ Bl𝑋 }.

Theorem 7.20 The offset discriminant has the following decomposition:

ΔOff
𝑋 = Bis𝑋 ∪ Σ𝑋 ⊇ 𝑋 ∪ 𝑀𝑋 ∪ Σ𝑋 .

The real locus of ΔOff


𝑋 consists of the real points of the varieties 𝑋, 𝑀𝑋 , and Σ 𝑋 .

Proof By Proposition 7.15, the offset discriminant is the locus of those u such that
𝑔 𝑋 (u, 𝜀) ∈ C[𝜀] has fewer than 2 · EDdegree(𝑋) distinct complex zeros. This can happen
for two reasons: either u has fewer than EDdegree(𝑋) distinct ED critical points on 𝑋, or u
has two distinct ED critical points

x1 ≠ x2 with ∥x1 − u∥ 2 = ∥x2 − u∥ 2 . (7.2)

The first case is accounted for by the ED discriminant Σ𝑋 and the second case is the bisector
hypersurface Bis𝑋 . By definition, the medial axis Med(𝑋) is contained in Bis𝑋 , and thus
we also have the inclusion 𝑀𝑋 ⊆ Bis𝑋 . Since the 𝜀 that come from zeros of 𝑔 𝑋 (u, 𝜀)
come in signed pairs (cf. Proposition 7.15), we see that 𝑋 × {0} is doubly covered by the
projection 𝜋2 . This implies 𝑋 ⊆ Bis𝑋 . All other components of Bis𝑋 that are not in 𝑋 ∪ 𝑀𝑋
consist of non-real points u that have ED critical points as in (7.2). □
Suppose now that u0 ∈ R𝑛 \ΔOff 𝑋 is a real point outside the offset discriminant. Using
Remark 7.9, we can compute a unit normal field from the offset polynomial by working
locally near u0 . Namely, we first choose 𝜀0 such that (u0 , 𝜀0 ) ∈ R𝑛 × R is a real zero of 𝑔 𝑋 .
Then, by varying u in a small neighborhood of u0 , we obtain a function u ↦→ 𝜀(u). This
function is defined implicitly by the equation 𝑔 𝑋 (u, 𝜀) = 0.
We consider the gradient d𝜀du (u, 𝜀) of the function u ↦→ 𝜀(u). It follows from Remark 7.9
that this gradient is a unit normal vector which points from a real ED critical point on 𝑋
towards u. We compute that gradient by implicit differentiation. Namely, by differentiating
the equation 𝑔 𝑋 (u, 𝜀) = 0, we obtain
  −1
d𝜀 𝜕𝑔 𝑋 𝜕𝑔 𝑋
∇𝜀 := (u, 𝜀) = − · ∈ R𝑛 . (7.3)
du 𝜕𝜀 𝜕u

Furthermore, by differentiating (7.3), we obtain the following formula for the Hessian
matrix of u ↦→ 𝜀(u):
 −1  2 ⊤
d2 𝜀 𝜕 𝑔𝑋 𝜕 2 𝑔𝑋
 
𝜕𝑔 𝑋 ⊤ 𝜕 (𝜕𝑔 𝑋 /𝜕𝜀)
= − · + · ∇𝜀 (∇𝜀) + 2∇𝜀 . (7.4)
du2 𝜕𝜀 𝜕u2 𝜕𝜀 2 𝜕u

The expression in (7.4) is an 𝑛 × 𝑛 matrix. The entries of the gradient vector and the Hessian
matrix are rational functions in u, whose denominator vanishes when 𝜕𝑔 𝜕𝜀 (u, 𝜀) = 0. This
𝑋
90 7 Reach and Offset

is why we assumed u0 ∉ ΔOff


𝑋 . The next theorem shows that we can compute the second
fundamental form of 𝑋 from the Hessian of 𝑔 𝑋 .

Theorem 7.21 Let u ∈ R𝑛 \ΔOff𝑋 and 𝜀 > 0 with 𝑔 𝑋 (u, 𝜀) = 0. Let x ∈ 𝑋 be the (uniquely
determined) ED critical point corresponding to (u, 𝜀). The following two statements hold:
d𝜀
(a) The gradient du (u, 𝜀)is a unit normal vector at x pointing towards u.
(b) Let t ∈ 𝑇x 𝑋 be a tangent vector. The second fundamental form of 𝑋 evaluated at t is
 2 
⊤ d 𝜀
IIu−x (t) = lim t (x + 𝑠(u − x), 𝑠𝜀) t.
𝑠→0
𝑠>0
du2

Proof Item (a) follows from Remark 7.9 and we have discussed this above. We need to
prove item (b). Since u ∉ ΔOff 𝑋 , there can only be finitely many points on the line through x
and u that belong to ΔOff𝑋 . This implies that there exists 𝑠 ′ > 0 such that x + 𝑠(u − x) ∉ ΔOff
𝑋
for all 0 < 𝑠 < 𝑠 ′. Item (a) implies that, for all 0 < 𝑠 < 𝑠 ′, the vector d𝜀du (x + 𝑠(u − x), 𝑠𝜀)
is a unit normal vector at x pointing towards u.
Fix 0 < 𝑠 < 𝑠 ′. By definition of the second fundamental form in (6.9), we know that
IIu−x (t) is the directional derivative of the unit normal field above in direction t, i.e.,
 
⊤ d d𝜀
IIu−x (t) = t (x + 𝑠(u − x), 𝑠𝜀) t for all 0 < 𝑠 < 𝑠 ′ . (7.5)
dx du

Let 𝐿 v denote the Weingarten map at x in normal direction v = (u − x)/∥u − x∥. By (6.15),
 
du 𝐿 0
= 𝐼𝑛 + 𝜀 · v .
dx 0 0

By applying the chain rule, we find that

d d𝜀 d2 𝜀 du
= ·
dx du du2 dx
d2 𝜀
  
𝐿v 0
= 𝐼𝑛 + 𝜀 · .
du2 0 0

Evaluating this equation at (x + 𝑠(u − x), 𝑠𝜀), we obtain

d2 𝜀 d d𝜀
(x + 𝑠(u − x), 𝑠𝜀) = (x + 𝑠(u − x), 𝑠𝜀)
du2 dx du
 2  
d 𝜀 𝐿∇𝜀 0
− 𝑠𝜀 · · (x + 𝑠(u − x), 𝑠𝜀).
du2 0 0

If we multiply both sides of this equation from the left by t⊤ and from the right by t and then
take the limit 𝑠 → 0, the formula (7.5) implies that we obtain IIu−x (t) on the right-hand
side. This proves item (b). □
7.3 Offset Discriminant 91

Example 7.22 We compute the expression (7.3) for the parabola 𝑋 = 𝑉 (𝑥2 − 𝑥 12 ). Using
the offset polynomial 𝑔 𝑋 (u, 𝜀) in Example 7.14, we find d𝜀 1
du (u, 𝜀) = 𝑝 (ℎ1 , ℎ2 ), where
    
ℎ1 = − 96𝑢1 𝜀 4 + 192𝑢13 + 64𝑢1 𝑢22 − 16𝑢1 𝑢2 + 40𝑢1 𝜀 2 − 4𝑢1 𝑢12 − 𝑢2 24 𝑢12 + 16 𝑢22 − 16 𝑢2 + 1
 
ℎ2 = (−32𝑢2 − 32) 𝜀 4 + 64𝑢12 𝑢2 − 8𝑢12 + 96𝑢22 + 16𝑢2 − 8 𝜀 2
  
− 2 𝑢12 − 𝑢2 16 𝑢12 𝑢2 2 − 20 𝑢12 − 32 𝑢22 + 12 𝑢2 − 1
 
𝑝 = − 96𝜀 5 + 192𝑢12 + 64𝑢22 + 128𝑢2 − 32 𝜀 3
 
+ −96𝑢14 − 64𝑢12 𝑢22 + 16𝑢12 𝑢2 − 64𝑢23 − 40𝑢12 − 16𝑢22 + 16𝑢2 − 2 𝜀.

For instance, if we plug in (𝑢 1 , 𝑢 2 , 𝜀) = (0, 14 , 41 ), we obtain (ℎ1 , ℎ2 ) = (0, 1), which is the
unit normal vector on the parabola at x = (0, 0) pointing towards u = (0, 14 ).
Now we compute the Hessian matrix of 𝜀(u) using the formula in (7.4). This expression
is very large and this is why we chose not to display it. Instead, we evaluate it directly at
(𝑢 1 , 𝑢 2 , 𝜀) = (0, 𝑠, 𝑠), where 𝑠 > 0, and thereafter we let 𝑠 → 0. This yields the matrix
 
−2 0
𝐴 = .
0 0

We see from Theorem 7.21 (b) that the (signed) curvature of the parabola at x = (0, 0) is
t 𝐴 t⊤ = −2, where t = (1, 0) is the tangent direction of 𝑋 at x. Here, the negative sign
arises because the normal field points “inwards”, which causes the derivative of the normal
field to point in the opposite direction; this can be seen in Figure 6.2.
It was shown in Example 7.3 that the reach of 𝑋 is 12 . This confirms Theorem 7.8, which
here states that the reach of the parabola is the inverse of its maximal curvature 𝐶 (𝑋).
Indeed, a parabola has no real bottlenecks, and its curvature is maximal at the apex. ⋄

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International
License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and
reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter’s Creative Commons
license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s
Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the
permitted use, you will need to obtain permission directly from the copyright holder.
Chapter 8
Voronoi Cells

Every real algebraic variety 𝑋 determines a Voronoi decomposition of its ambient Euclidean
space R𝑛 . This is a partition of R𝑛 into Voronoi cells, one for each point in 𝑋. The Voronoi
cell of y ∈ 𝑋 is the set of points in R𝑛 whose nearest point on 𝑋 is y. Hence, u is in the
Voronoi cell of y if 𝑑 (u, 𝑋) = 𝑑 (u, y). The Voronoi cell is a convex, semialgebraic set in
the normal space of 𝑋 at y. Most readers are familiar with the case when 𝑋 is a finite set.
In this chapter, we study Voronoi cells of varieties, with a primary focus on their algebraic
boundaries. We consider them only for the Euclidean metric, but it also makes much sense to
study Voronoi cells under the Wasserstein distance from Chapter 5 [16] or Kullback–Leibler
divergence from Chapter 11 [5]. As before, ⟨·, ·⟩ denotes the Euclidean inner product.

8.1 Voronoi Basics

Let 𝑋 be a finite subset of R𝑛 . The Voronoi cell of y ∈ 𝑋 collects all points whose closest
point in 𝑋 is y. Writing 𝑑 (u, x) = ∥u − x∥ for the Euclidean norm, the Voronoi cell equals

Vor𝑋 (y) := u ∈ R𝑛 | y ∈ arg minx∈𝑋 𝑑 (u, x) . (8.1)

The study of these cells, and how they depend on the configuration 𝑋, is ubiquitous in
computational geometry and its numerous applications. We begin with the fact that the
Voronoi cell is a (possibly unbounded) convex polyhedron with at most |𝑋 | − 1 facets.
Proposition 8.1 The Voronoi cell of a point y in the finite set 𝑋 ⊂ R𝑛 is the polyhedron

Vor𝑋 (y) = u ∈ R𝑛 | ⟨u, x − y⟩ ≤ 21 ||x|| 2 − ||y|| 2 for all x ∈ 𝑋\{y} .


 
(8.2)

Proof By definition, the Voronoi cells Vor𝑋 (y) consists of all points u such that 𝑑 (u, x) ≥
𝑑 (u, y) for all x ∈ 𝑋\{y}. This is equivalent to ||u − x|| 2 − ||u − y|| 2 being nonnegative. But,
this expression is equal to ||x|| 2 − ||y|| 2 − 2 ⟨u, x − y⟩. The main point is that the quadratic
term drops out, so the expression is linear in u. □
The collection of Voronoi cells, as y ranges over the set 𝑋, is also known as the Voronoi
diagram of 𝑋. This is a polyhedral subdivision of R𝑛 into finitely many convex cells.
© The Author(s) 2024 93
P. Breiding et al., Metric Algebraic Geometry, Oberwolfach Seminars 53,
https://doi.org/10.1007/978-3-031-51462-3_8
94 8 Voronoi Cells

We now shift gears, and we replace the finite set 𝑋 by a real algebraic variety of positive
dimension. Thus, let 𝑋 be a real algebraic variety of codimension 𝑐 in R𝑛 , and consider a
point y ∈ 𝑋. The Voronoi cell Vor𝑋 (y) is defined as before. It consists of all points u in R𝑛
such that y is closer or equal to u than any other point x ∈ 𝑋. Equation (8.2) still holds, and
we conclude that Vor𝑋 (y) is a convex set. We seek the Voronoi diagram {Vor𝑋 (y)}y∈𝑋 in
R𝑛 where y runs over all (infinitely many) points in the variety 𝑋.

Proposition 8.2 If y is a smooth point of the variety 𝑋, then its Voronoi cell Vor𝑋 (y) is a
convex semialgebraic full-dimensional subset of the 𝑐-dimensional affine normal space

𝑁 𝑋 (y) := y+ 𝑁y 𝑋 = u ∈ R𝑛 | u−y is perpendicular to the tangent space of 𝑋 at y .

Proof Fix u ∈ Vor𝑋 (y). Consider any point x in 𝑋 that is close to y, and set v = x − y. The
inequality in (8.2) implies ⟨u, v⟩ ≤ 21 (||y + v|| 2 − ||y|| 2 ) = ⟨y, v⟩ + 21 ||v|| 2 . For any w in
the tangent space of 𝑋 at y, there exists v = 𝜀w + 𝑂 (𝜀 2 ) such that x = y + v is in 𝑋.
The inequality above yields ⟨u, w⟩ ≤ ⟨y, w⟩, and the same with −w instead of w. Then
⟨u−y, w⟩ = 0, and hence u is in the normal space 𝑁 𝑋 (y). We already argued that Vor𝑋 (y) is
convex. It is semialgebraic, by Tarski’s Theorem on Quantifier Elimination. This allows us
to eliminate x from the formula (8.2). Finally, the Voronoi cell Vor𝑋 (y) is full-dimensional
in the 𝑐-dimensional space 𝑁 𝑋 (y) because every point u in an 𝜀-neighborhood of y has a
unique closest point in 𝑋. Moreover, if u ∈ 𝑁 𝑋 (y) and |u − y| < 𝜖, then y must be the point
in 𝑋 that is closest to u. □
One approach to understanding Voronoi cells of a variety 𝑋 is to take a large but finite
sample from 𝑋 and consider the Voronoi diagram of that sample. This is a finite approxi-
mation to the desired limit object. By taking finer and finer samples, the Voronoi diagram
should converge nicely to a subdivision with infinitely many lower-dimensional regions,
namely the Voronoi cells Vor𝑋 (y). This process was studied by Brandt and Weinstein
in [25] for the case when 𝑛 = 2 and 𝑋 is a curve. An illustration, similar to [25, Figure 1],
is shown in Figure 8.1. Note that, for 𝑛 ≥ 3, the Voronoi cells are generally not polyhedra.
Theorem 1 in [25] states that under some mild hypothesis, the limit of the Voronoi
cells in this process converges indeed to the Voronoi cells Vor𝑋 (y). The authors posted
a delightful YouTube video, called Mathemaddies’ Ice Cream Map. Please do watch that
movie! Their curve 𝑋 is the shoreline that separates the city of Berkeley from the San
Francisco Bay. One hopes to find many ice cream shops at the shore.
The topological boundary of the Voronoi cell Vor𝑋 (y) in the normal space 𝑁 𝑋 (y) is
denoted by 𝜕Vor𝑋 (y). It consists of all points in 𝑁 𝑋 (y) that have at least two closest points
in 𝑋, including y. Note that 𝜕Vor𝑋 (y) is contained in the intersection of 𝑁 𝑋 (y) with the
medial axis Med(𝑋) that was introduced in Chapter 7. We are interested in the algebraic
boundary 𝜕algVor𝑋 (y). This is a hypersurface in the complex affine space 𝑁 𝑋 (y)C ≃ C𝑐 ,
defined as the Zariski closure of 𝜕Vor𝑋 (y). For the sake of algebraic consistency, here the
Zariski closure should be computed over the field of definition of 𝑋 (cf. Example 8.5).

Definition 8.3 The degree of the algebraic boundary of the Voronoi cell at y ∈ 𝑋 is denoted

𝜈 𝑋 (y) := deg(𝜕algVor𝑋 (y)).


8.1 Voronoi Basics 95

Fig. 8.1: We see the quartic curve 𝑋 = {𝑥 4 − 𝑥 2 𝑦 2 + 𝑦 4 − 4𝑥 2 − 2𝑦 2 − 𝑥 − 4𝑦 + 1 = 0}, called butterfly


curve or tooth curve. In each picture, the grey lines are the boundaries of the Voronoi diagram of a finite
sample on or near the curve 𝑋. From left to right, the number of points in the sample increases. The
Voronoi diagram becomes finer and approaches the Voronoi diagram of the curve. Note how the medial
axis Med(𝑋) becomes visible here. For the reach 𝜏 (𝑋) see [25, Example 6.1].

The positive integer 𝜈 𝑋 (y) is called the Voronoi degree of 𝑋 at y. If 𝑋 is irreducible and y
is a general point on 𝑋, then the Voronoi degree 𝜈 𝑋 (y) does not depend on the choice of y.
We call that integer the Voronoi degree of the variety 𝑋.

Example 8.4 (Curves in 3-space) Let 𝑋 be a general algebraic curve in R3 . For y ∈ 𝑋, the
Voronoi cell Vor𝑋 (y) is a convex set in the normal plane 𝑁 𝑋 (y). Its algebraic boundary
𝜕algVor𝑋 (y) is a plane curve of degree 𝜈 𝑋 (y). This Voronoi degree can be expressed in
terms of the degree and genus of 𝑋. Specifically, this degree is 12 when 𝑋 is the intersection
of two general quadrics in R3 . Figure 8.2 shows one such curve 𝑋 together with the normal
plane at a point y ∈ 𝑋. The Voronoi cell Vor𝑋 (y) is the planar convex region highlighted
on the right. Its algebraic boundary 𝜕algVor𝑋 (y) is a curve of degree 𝜈 𝑋 (y) = 12. The
topological boundary 𝜕Vor𝑋 (y) is only a small subset of that algebraic boundary. ⋄

Example 8.5 (Surfaces in 3-space) Fix a general polynomial 𝑓 ∈ Q[𝑥1 , 𝑥2 , 𝑥3 ] of degree


𝑑 ≥ 2 and let 𝑋 = 𝑉 ( 𝑓 ) be its surface in R3 . The normal space at a general point y ∈ 𝑋 is
the affine line 𝑁 𝑋 (y) = {y + 𝜆 · ∇ 𝑓 (y) | 𝜆 ∈ R}. The Voronoi cell Vor𝑋 (y) is a (possibly
unbounded) line segment in 𝑁 𝑋 (y) that contains y. The topological boundary 𝜕Vor𝑋 (y)
consists of at most two points from among the zeros of an irreducible polynomial in Q[𝜆].
We shall see that this univariate polynomial has degree 𝑑 3 + 𝑑 − 7. Its complex zeros
form the algebraic boundary 𝜕algVor𝑋 (y). Thus, the Voronoi degree of the surface 𝑋 is
𝑑 3 + 𝑑 − 7. Note that, in this example, our hypothesis “over the field of definition” becomes
important. Here, the field of definition is Q. The Q-Zariski closure of one boundary point
is the collection of all 𝑑 3 + 𝑑 − 7 points in 𝜕algVor𝑋 (y). ⋄

Example 8.6 (Quadrics in 3-space) We illustrate Example 8.5 in the case y = (0, 0, 0) and
𝑑 = 2. We consider 𝑓 = 𝑥12 + 𝑥22 + 𝑥 32 − 3𝑥 1 𝑥 2 − 5𝑥 1 𝑥3 − 7𝑥2 𝑥3 + 𝑥 1 + 𝑥2 + 𝑥3 . Let 𝑟 0 ≈ −0.209,
𝑟 1 ≈ −0.107, 𝑟 2 ≈ 0.122 be the roots of the cubic polynomial 368𝜆3 + 71𝜆2 − 6𝜆 − 1. The
96 8 Voronoi Cells

Fig. 8.2: A quartic space curve, shown with the Voronoi cell in one of its normal planes.

Voronoi cell Vor𝑋 (y) is the line segment connecting the points (𝑟 1 , 𝑟 1 , 𝑟 1 ) and (𝑟 2 , 𝑟 2 , 𝑟 2 ).
The topological boundary 𝜕Vor𝑋 (y) consists of these two points, whereas the algebraic
boundary 𝜕alg Vor𝑋 (y) also contains (𝑟 0 , 𝑟 0 , 𝑟 0 ). The cubic polynomial in the unknown 𝜆
was found with the algebraic method that is described in the next section. Namely, the
Voronoi ideal in (8.4) equals Vor 𝐼 (0) = 𝑢 1 − 𝑢 3 , 𝑢 2 − 𝑢 3 , 368𝑢 33 + 71𝑢 23 − 6𝑢 3 − 1 . This
is a maximal ideal in Q[𝑢 1 , 𝑢 2 , 𝑢 3 ], and it defines a field extension of degree 3 over Q. ⋄

8.2 Algebraic Boundaries

For any point in the ambient space, the ED problem asks the question “What point on the
variety 𝑋 am I closest to?” Another question one might ask is “How far do we have to
get away from 𝑋 before there is more than one answer to the closest point question?” The
union of the boundaries of the Voronoi cells is the locus of points in R𝑛 that have more
than one closest point on 𝑋. This is the medial axis Med(𝑋).
The distance from the variety to its medial axis, which is the answer to the “how far”
question, is the reach of 𝑋. We have proved this in Proposition 7.2. The distance from a
point y on 𝑋 to the variety’s medial axis is called the local reach of 𝑋. We formally define
the local reach in (15.1), where we use it in a theorem that tells us how to compute the
homology of 𝑋 from finite samples. This is relevant for topological data analysis.
The material that follows is based on the article [50] by Cifuentes, Ranestad, Sturmfels,
and Weinstein. We begin with the exact symbolic computation of the Voronoi boundary
at y from the equations that define 𝑋. This uses a Gröbner-based algorithm whose input is y
and the ideal of 𝑋 and whose output is the ideal defining 𝜕algVor𝑋 (y). In the next section,
we present formulas for the Voronoi degree 𝜈 𝑋 (y) when 𝑋 and y are sufficiently general
and dim(𝑋) ≤ 2. The proofs of these formulas require some intersection theory. Thereafter,
in Section 8.4, we study the case when y is a low-rank matrix and 𝑋 is the variety of all
matrices of bounded rank. This relies on the Eckart–Young Theorem (Theorem 2.9).
8.2 Algebraic Boundaries 97

We now describe Gröbner basis methods for finding the Voronoi boundaries of a given
variety. We start with an ideal 𝐼 = ⟨ 𝑓1 , 𝑓2 , . . . , 𝑓𝑚 ⟩ in Q[𝑥1 , . . . , 𝑥 𝑛 ] whose real variety
𝑋 = 𝑉 (𝐼) ⊂ R𝑛 is assumed to be non-empty. We assume that 𝐼 is real radical and prime,
so that the zero set of 𝐼 in C𝑛 is an irreducible variety whose real points are Zariski dense.
Our aim is to compute the Voronoi boundary of a given point y ∈ 𝑋. In our examples,
the coordinates of y and the coefficients of the polynomials 𝑓𝑖 are rational numbers. Under
these assumptions, the following computations can be done in polynomial rings over Q.
Fix the polynomial ring 𝑅 = Q[𝑥 1 , . . . , 𝑥 𝑛 , 𝑢 1 , . . . , 𝑢 𝑛 ] where u = (𝑢 1 , . . . , 𝑢 𝑛 ) is an
auxiliary point with unknown coordinates. As in Chapter 2, the augmented Jacobian
A J (x, u) of 𝑋 at x is the (𝑚 + 1) × 𝑛 matrix with entries in 𝑅 that is obtained by adding
the row vector u − x to the Jacobian matrix (𝜕 𝑓𝑖 /𝜕𝑥 𝑗 ).
Let 𝑁 𝐼 denote the ideal in 𝑅 generated by 𝐼 and the (𝑐 + 1) × (𝑐 + 1) minors of the
augmented Jacobian matrix A J (x, u), where 𝑐 is the codimension of the variety 𝑋 ⊂ R𝑛 .
If 𝑋 is smooth, then the ideal 𝑁 𝐼 in 𝑅 defines a subvariety of dimension 𝑛 in R2𝑛 , namely
the Euclidean normal bundle of 𝑋. Its points are pairs (x, u) where x is a point in the given
variety 𝑋 and u lies in the normal space of 𝑋 at x.
In Chapter 2, we have worked with the critical ideal. The ideal 𝑁 𝐼 is similar to the
critical ideal, but the key difference is that now u is a vector of variables. In both cases,
when 𝑋 is singular, we may wish to saturate with respect to the ideal of the singular locus
of 𝑋. In what follows, for any y ∈ 𝑋, let 𝑁 𝐼 (y) denote the linear ideal of the normal space.
This is obtained from 𝑁 𝐼 by replacing the unknown point x by the specific point y.

Example 8.7 (Cuspidal cubic) Let 𝑛 = 2 and 𝐼 = ⟨ 𝑥13 − 𝑥22 ⟩, so 𝑋 = 𝑉 (𝐼) ⊂ R2 is a cubic
curve with a cusp at the origin. The ideal of the Euclidean normal bundle of 𝑋 is generated
by two polynomials:
h 𝑢 −𝑥 𝑢 −𝑥 i
1 1 2 2
𝑁 𝐼 = 𝑥13 − 𝑥22 , det 3𝑥12 −2𝑥2 ⊂ 𝑅 = Q[𝑥1 , 𝑥2 , 𝑢 1 , 𝑢 2 ]. (8.3)

Consider the normal line of 𝑋 at y = (4, 8). Its ideal is 𝑁 𝐼 (y) = ⟨𝑢 1 + 3𝑢 2 − 28⟩. ⋄

Returning to the general setting, we define for a fixed point y the following ideal:

𝐶𝐼 (y) = 𝑁 𝐼 + 𝑁 𝐼 (y) + ⟨ ∥x − u∥ 2 − ∥y − u∥ 2 ⟩ ⊂ 𝑅.

The real variety of 𝐶𝐼 (y) lives in R2𝑛 . It consists of all pairs (u, x) such that x and y are
equidistant from u and both are critical points of the distance function from u to 𝑋.

Definition 8.8 The Voronoi ideal in Q[𝑢 1 , . . . , 𝑢 𝑛 ] is obtained from the ideal 𝐶𝐼 (y) defined
above by saturation and elimination, as follows:

𝐶𝐼 (y) : ⟨x − y⟩ ∞ ∩ Q[𝑢 1 , . . . , 𝑢 𝑛 ].

Vor 𝐼 (y) = (8.4)

The geometric interpretation of each step in our construction implies the following result:

Proposition 8.9 The affine variety in C𝑛 defined by the Voronoi ideal Vor 𝐼 (y) contains
the algebraic Voronoi boundary 𝜕algVor𝑋 (y) of the given real variety 𝑋 at its point y.
98 8 Voronoi Cells

Remark 8.10 The verb “contains” sounds weak, but it is much stronger than it may seem.
Indeed, in generic situations, the ideal Vor 𝐼 (y) is prime and defines an irreducible hypersur-
face in the normal space of 𝑋 at y. This hypersurface equals the algebraic Voronoi boundary,
so containment is an equality. We saw this in Examples 8.5 and 8.6. The ideal Vor 𝐼 (y)
usually defines a hypersurface in the normal space. For special data, it can have extraneous
components, but these are easy to identify and remove when the dimension is low.

Example 8.11 We consider the cuspidal cubic 𝑋 = 𝑉 (𝐼) ⊂ R2 in Example 8.7, where
𝐼 = ⟨ 𝑥13 − 𝑥22 ⟩, and we fix the point y = (4, 8) ∈ 𝑋. Going through the steps above, we find
that the Voronoi ideal equals

Vor 𝐼 (y) = ⟨𝑢 1 −28, 𝑢 2 ⟩ ∩ ⟨𝑢 1 +26, 𝑢 2 −18⟩ ∩ ⟨𝑢 1 +3𝑢 2 −28, 27𝑢 22 −486𝑢 2 +2197⟩. (8.5)

The third component has no real roots and is hence extraneous. The Voronoi boundary
consists of two points. Namely, we have 𝜕Vor𝑋 (y) = {(28, 0), (−26, 18)}. The Voronoi
cell Vor𝑋 (y) is the line segment connecting these points. This segment is shown in green
in Figure 8.3. Its right endpoint (28, 0) is equidistant from y and the point (4, −8). Its left
endpoint (−26, 18) is equidistant from y and the origin (0, 0), which is the singular point
of the curve 𝑋. Its Voronoi cell will be discussed in Remark 8.12.
The issue of saturation is subtle and interesting in this example. In (8.3), we did not
saturate the ideal 𝑁 𝐼 , and this led to the three components in (8.5). By contrast, suppose we
saturate by the singular point of our curve, i.e. we replace 𝑁 𝐼 by 𝑁 𝐼 : ⟨𝑥1 , 𝑥2 ⟩ ∞ . Then (8.4)
yields a stricly larger ideal than in (8.5). The second prime ideal is gone, and Vor 𝐼 (y) is only
the intersection of the first and third prime ideals. Geometrically, we are losing the point
(−26, 18). This makes sense because that point has the same distance to (4, 8) and to (0, 0).
The saturation step has removed the singular point (0, 0) from our algebraic representation.
The resulting Voronoi ideal only sees pairs of smooth points that are equidistant.

20

10

-40 -20 20 40

-10

-20

Fig. 8.3: The cuspidal cubic is shown in red. The Voronoi cell of a smooth point is a green line segment.
The Voronoi cell of the cusp is the blue convex region bounded by the blue curve.
8.2 Algebraic Boundaries 99

The cuspidal cubic 𝑋 is very special. If we replace 𝑋 by a general cubic (defined over Q)
in R2 , then Vor 𝐼 (y) is generated modulo 𝑁 𝐼 (y) by an irreducible polynomial of degree eight
in Q[𝑢 1 , 𝑢 2 ]. Thus, the expected Voronoi degree for general plane cubics is 𝜈 𝑋 (y) = 8. ⋄
Remark 8.12 (Singularities) Voronoi cells at singular points can be computed with the
same tools as above. However, these Voronoi cells can have higher dimensions. For an
illustration, consider the cuspidal cubic, and let y = (0, 0) be the cusp. A Gröbner basis
computation yields the Voronoi boundary 27𝑢 42 + 128𝑢 31 + 72𝑢 1 𝑢 22 + 32𝑢 21 + 𝑢 22 + 2𝑢 1 . The
Voronoi cell is the two-dimensional convex region bounded by this quartic, shown in blue
in Figure 8.3. The Voronoi cell can also be empty at a singularity. This happens for instance
for 𝑉 (𝑥13 + 𝑥 12 − 𝑥22 ), which has an ordinary double point at y = (0, 0). In general, the cell
dimension depends on both the embedding dimension and the branches of the singularity.
Proposition 8.9 gives an algorithm for computing the Voronoi ideal Vor 𝐼 (y) when y is
a smooth point in 𝑋 = 𝑉 (𝐼). Experiments with Macaulay2 [73] are reported in [50]. For
small instances, the computation terminates and we obtain the defining polynomial of the
Voronoi boundary 𝜕algVor𝑋 (y). This polynomial is unique modulo the linear ideal of the
normal space 𝑁 𝐼 (y). For larger instances, we can only compute the degree of 𝜕algVor𝑋 (y)
but not its equation. This is done by working over a finite field and adding 𝑐 − 1 random
linear equations in 𝑢 1 , . . . , 𝑢 𝑛 in order to get a zero-dimensional polynomial system.
Computations are easiest to set up for the case of hypersurfaces (𝑐 = 1). One can
explore random polynomials 𝑓 of degree 𝑑 in Q[𝑥1 , . . . , 𝑥 𝑛 ], both inhomogeneous and
homogeneous. These are chosen among those that vanish at a preselected point y in Q𝑛 .
In each iteration, the Voronoi ideal Vor 𝐼 (y) from (8.4) was found to be zero-dimensional.
In fact, Vor 𝐼 (y) is a maximal ideal in Q[𝑢 1 , . . . , 𝑢 𝑛 ], and the Voronoi degree 𝜈 𝑋 (y) is the
degree of the field extension of Q that is defined by that maximal ideal.
We summarize our results in Tables 8.1 and 8.2, and we extract conjectural formulas.

𝑛\𝑑 2 3 4 5 6 7 8 𝜈𝑋 ( 𝑦) = degree(𝜕alg Vor ⟨ 𝑓 ⟩ ( 𝑦))


1 1 2 3 4 5 6 7 𝑑−1
2 2 8 16 26 38 52 68 𝑑 2 +𝑑−4
3 3 23 61 123 215 343 𝑑 3 +𝑑−7
4 4 56 202 520 1112 𝑑 4 −𝑑 3 +𝑑 2 +𝑑−10
5 5 125 631 𝑑 5 −2𝑑 4 +2𝑑 3 +𝑑−13
6 6 266 1924 𝑑 6 −3𝑑 5 +4𝑑 4 −2𝑑 3 +𝑑 2 +𝑑−16
7 7 551 𝑑 7 −4𝑑 6 +7𝑑 5 −6𝑑 4 +3𝑑 3 +𝑑−19

Table 8.1: The Voronoi degree of an inhomogeneous polynomial 𝑓 of degree 𝑑 in R𝑛 .

Conjecture 8.13 The Voronoi degree of a generic hypersurface of degree 𝑑 in R𝑛 equals


4
(𝑑 −1) 𝑛 + 3(𝑑 −1) 𝑛−1 + 𝑑−2 ((𝑑 −1)
𝑛−1
− 1) − 3𝑛.

Conjecture 8.14 The Voronoi degree of a generic homogeneous polynomial of degree 𝑑 is


4
2(𝑑 −1) 𝑛−1 + 𝑑−2 ((𝑑 −1)
𝑛−1
− 1) − 3𝑛 + 2.
100 8 Voronoi Cells

𝑛\𝑑 2 3 4 5 6 7 8 𝜈𝑋 ( 𝑦) = degree(𝜕alg Vor ⟨ 𝑓 ⟩ ( 𝑦))


2 2 4 6 8 10 12 14 2𝑑−2
3 3 13 27 45 67 93 123 2𝑑 2 −5
4 4 34 96 202 2𝑑 3 −2𝑑 2 +2𝑑−8
5 5 79 309 2𝑑 4 −4𝑑 3 +4𝑑 2 −11
6 6 172 2𝑑 5 −6𝑑 4 + 8𝑑 3 −4𝑑 2 +2𝑑−14
7 7 361 2𝑑 6 −8𝑑 5 +14𝑑 4 −12𝑑 3 +6𝑑 2 −17

Table 8.2: The Voronoi degree of a homogeneous polynomial 𝑓 of degree 𝑑 in R𝑛 .

Both conjectures are proved for 𝑛 ≤ 3 in [50, Section 4], where the geometric theory of
Voronoi degrees of low-dimensional varieties is developed. The case 𝑑 = 2 was analyzed
in [49, Proposition 5.8]. For 𝑛 ≥ 4 and 𝑑 ≥ 3, the conjectures remain open.

8.3 Degree Formulas

To recap, the algebraic boundary of the Voronoi cell Vor𝑋 (y) is a hypersurface in the
normal space to a variety 𝑋 ⊂ R𝑛 at a point y ∈ 𝑋. If y has rational coordinates, then
that hypersurface is defined over Q. We shall present formulas for the degree 𝜈 𝑋 (y) of that
hypersurface when 𝑋 is a curve or a surface. All proofs appear in [50, Section 6]. We identify
𝑋 and 𝜕algVor𝑋 (y) with their Zariski closures in complex projective space P𝑛 , so there is a
natural assigned hyperplane at infinity. We say that the variety 𝑋 is in general position in P𝑛
if the hyperplane at infinity intersects 𝑋 transversally. The next result is [50, Theorem 5.1].

Theorem 8.15 Let 𝑋 ⊂ P𝑛 be a curve of degree 𝑑 and geometric genus 𝑔 with at most
ordinary multiple points as singularities. If 𝑋 is in general position, then the Voronoi
degree at a general point y ∈ 𝑋 equals

𝜈 𝑋 (y) = 4𝑑 + 2𝑔 − 6.

Example 8.16 If 𝑋 is a smooth curve of degree 𝑑 in the plane, then 2𝑔 − 2 = 𝑑 (𝑑 − 3), so

𝜈 𝑋 (y) = 𝑑 2 + 𝑑 − 4.

This confirms our experimental results in the row 𝑛 = 2 of Table 8.1. ⋄

Example 8.17 If 𝑋 is a rational curve of degree 𝑑, then 𝑔 = 0 and our formula gives
𝜈 𝑋 (y) = 4𝑑 − 6. If 𝑋 is an elliptic curve (𝑔 = 1), then 𝜈 𝑋 (y) = 4𝑑 − 4. A space curve with
𝑑 = 4 and 𝑔 = 1 was studied in Example 8.4. Its Voronoi degree equals 𝜈 𝑋 (y) = 12. ⋄

The general position assumption in Theorem 8.15 is essential. For an example, let 𝑋 be
the twisted cubic curve in P3 , with affine parameterization 𝑡 ↦→ (𝑡, 𝑡 2 , 𝑡 3 ). Here 𝑔 = 0 and
𝑑 = 3, so the expected Voronoi degree is 6. However, a computation shows that 𝜈 𝑋 (y) = 4.
This drop arises because the plane at infinity in P3 intersects the curve 𝑋 in a triple point.
8.3 Degree Formulas 101

After a general linear change of coordinates in P3 , which amounts to a linear fractional


transformation in R3 , we correctly find 𝜈 𝑋 (y) = 6.
We next present a formula for the Voronoi degree of a surface 𝑋, which is smooth and
irreducible in P𝑛 . Our formula is in terms of its degree 𝑑 and two further invariants. The first
is the topological Euler characteristic 𝜒(𝑋). This equals the degree of the second Chern
class of the tangent bundle; see Example 4.22 (b). The second invariant, denoted 𝑔(𝑋), is
the genus of the curve obtained by intersecting 𝑋 with a general quadratic hypersurface
in P𝑛 . Thus, 𝑔(𝑋) is the quadratic analogue to the sectional genus of the surface 𝑋.
Theorem 8.18 (Theorem 5.4 in [50]) Let 𝑋 ⊂ P𝑛 be a smooth surface of degree 𝑑. Then

𝜈 𝑋 (y) = 3𝑑 + 𝜒(𝑋) + 4𝑔(𝑋) − 11,

provided the surface 𝑋 is in general position in P𝑛 and y is a general point on 𝑋.


Example 8.19 If 𝑋 is a smooth surface in P3 of degree 𝑑, then (4.10) and Example 2.21
yield 𝜒(𝑋) = deg(𝑐 2 (𝑋)) = 𝑑 (𝑑 2 − 4𝑑 + 6). A smooth quadratic hypersurface section of 𝑋
is an irreducible curve of degree (𝑑, 𝑑) in P1 × P1 with genus 𝑔(𝑋) = (𝑑 − 1) 2 . Thus,

𝜈 𝑋 (y) = 3𝑑 + 𝑑 (𝑑 2 − 4𝑑 + 6) + 4(𝑑 − 1) 2 − 11 = 𝑑 3 + 𝑑 − 7.

This confirms our experimental results in the row 𝑛 = 3 of Table 8.1. ⋄


Example 8.20 Let 𝑋 be the Veronese surface of order 𝑒 in P ( ) −1
𝑒+2
(see Definition 12.5),
2

taken after a general linear change of coordinates in that ambient space. The degree of
𝑋 equals 𝑑 = 𝑒 2 (this is proved in Corollary 12.21). We have 𝜒(𝑋) = 𝜒(P2 ) = 3, and
the general quadratic hypersurface section of 𝑋 is a curve of genus 𝑔(𝑋) = 2𝑒−1 2 . We
conclude that the Voronoi degree of 𝑋 at a general point y equals

𝜈 𝑋 (y) = 3𝑒 2 + 3 + 2(2𝑒−1)(2𝑒−2) − 11 = 11𝑒 2 − 12𝑒 − 4.

For instance, for the Veronese surface in P5 we have 𝑒 = 2 and hence 𝜈 𝑋 (y) = 16. This is
smaller than the number 18 to be found later in Example 8.25. That example concerns the
cone over the Veronese surface in R6 , and not the Veronese surface in R5 ⊂ P5 . ⋄
We finally consider affine surfaces defined by homogeneous polynomials. Namely, let
𝑋 ⊂ R𝑛 be the affine cone over a general smooth curve of degree 𝑑 and genus 𝑔 in P𝑛−1 .
Theorem 8.21 (Theorem 5.7 in [50]) If 𝑋 is the cone over a smooth curve in P𝑛−1 then

𝜈 𝑋 (y) = 6𝑑 + 4𝑔 − 9,

provided that the curve is in general position and y is a general point.


Example 8.22 If 𝑋 ⊂ R3 is the cone over a smooth curve of degree 𝑑 in P2 , then we have
2𝑔 − 2 = 𝑑 (𝑑 − 3), by the degree-genus formula for plane curves. We conclude that

𝜈 𝑋 (y) = 2𝑑 2 − 5.

This confirms our experimental results on Voronoi degrees in the row 𝑛 = 3 of Table 8.2. ⋄
102 8 Voronoi Cells

Let us comment on the assumption made in our theorems, namely that 𝑋 is in general
position in P𝑛 . If this is not satisfied, then the Voronoi degree may drop, assuming it
remains zero-dimensional. Indeed, the Voronoi ideal Vor 𝐼 (y) depends polynomially on the
description of 𝑋, and the degree of this ideal can only go down – and not up – when that
description specializes. This follows from the Parameter Continuation Theorem 3.18.

8.4 Voronoi meets Eckart–Young

We now turn to a case of great interest in applications. Let 𝑋 be the variety of real 𝑚 × 𝑛
matrices of rank at most 𝑟. We consider two norms on the space R𝑚×𝑛 of real 𝑚 ×𝑛 matrices.
Our first matrix norm is the spectral norm or operator norm ∥𝑈 ∥ op := max𝑖 𝜎𝑖 (𝑈) which
extracts the
√︃ largest singular value of the matrix 𝑈. Our second norm is the Frobenius norm
√︁
∥𝑈 ∥ 𝐹 :=
Í 2 Trace(𝑈 ⊤𝑈). The Frobenius norm agrees with the Euclidean norm
𝑖 𝑗 𝑈𝑖 𝑗 =
on R𝑚×𝑛 , so it fits into our setting. The case of symmetric matrices will be discussed later.
Fix a rank 𝑟 matrix 𝑉 in 𝑋. This is a nonsingular point in 𝑋. Consider any matrix 𝑈 in the
Voronoi cell Vor𝑋 (𝑉). This means that the closest point to 𝑈 in the rank 𝑟 variety 𝑋 relative
to the Frobenius norm is the matrix 𝑉. By the Eckart–Young Theorem (Theorem 2.9), the
matrix 𝑉 is derived from 𝑈 by computing the singular value decomposition 𝑈 = Σ1 𝐷 Σ2 .
Here Σ1 and Σ2 are orthogonal matrices of size 𝑚 × 𝑚 and 𝑛 × 𝑛, respectively, and 𝐷 is a
nonnegative diagonal matrix whose entries are the singular values. Let 𝐷 [𝑟 ] be the matrix
that is obtained from 𝐷 by replacing all singular values except for the 𝑟 largest ones by
zero. Then, according to Eckart–Young, we have 𝑉 = Σ1 · 𝐷 [𝑟 ] · Σ2 .
Remark 8.23 The Eckart–Young Theorem works for both the Frobenius norm and the
spectral norm. This means that Vor𝑋 (𝑉) is also the Voronoi cell for the spectral norm.
The following theorem describes the Voronoi cells for low-rank matrix approximation.
Theorem 8.24 Let 𝑉 be an 𝑚 × 𝑛-matrix of rank 𝑟. Let 𝑢 be the 𝑟-th singular value of 𝑉.
The Voronoi cell Vor𝑋 (𝑉) is the ball of radius 𝑢 in the spectral norm on the space of
(𝑚 − 𝑟) × (𝑛 − 𝑟)-matrices.
Proof Since the Frobenius norm is orthogonally invariant, we can assume that the matrix
𝑉 = (𝑣𝑖 𝑗 ) ∈ 𝑋 is a diagonal matrix whose entries are 𝑣11 ≥ 𝑣22 ≥ · · · ≥ 𝑣𝑟𝑟 = 𝑢 > 0. These
entries are the singular values of 𝑉. The normal space of the determinantal variety 𝑋 is
described in Lemma 9.12. In particular, the normal space of 𝑋 at 𝑉 consists of the matrices
 
0 0
𝐴= ,
0𝑈

where 𝑈 is an arbitrary (𝑚 − 𝑟) × (𝑛 − 𝑟) matrix. The matrix 𝑉 is the rank 𝑟 matrix closest


to 𝑉 + 𝐴 if and only if the spectral norm of 𝑈 is less than 𝑢. This shows that the Voronoi
cell Vor𝑋 (𝑉) is a full-dimensional convex body in the normal space, which we identified
with the matrices 𝑈. Namely, Vor𝑋 (𝑉) equals 𝑢 times the unit ball in R (𝑚−𝑟)×(𝑛−𝑟) under
the spectral norm. □
8.4 Voronoi meets Eckart–Young 103

Fig. 8.4: The Voronoi cell of a symmetric 3×3 matrix of rank 1 is a convex body of dimension 3. It is
shown for the Frobenius norm (left) and for the Euclidean norm (right). See Example 8.25 for a discussion.

The proof of Theorem 8.24 offers the following perspective on the Voronoi cells Vor𝑋 (𝑉)
of the determinantal variety 𝑋. Suppose 𝑚 = 𝑛. Consider the set 𝑍 of vectors in R𝑛 that
have at most 𝑟 non-zero coordinates. This is a reducible variety with 𝑛𝑟 components, each
a coordinate subspace. For a general point y in such a subspace, the Voronoi cell Vor 𝑍 (y)
is a convex polytope. It is congruent to a regular cube of dimension 𝑛 − 𝑟, which is the unit
ball in the 𝐿 ∞ -norm on R𝑛−𝑟 . By Theorem 8.24, the Voronoi cell Vor𝑋 (𝑉) is the orbit of
that cube under the group of orthogonal transformations. To make sense of this action, we
here identify R𝑛−𝑟 with the space of diagonal matrices in R (𝑛−𝑟)×(𝑛−𝑟) .
For example, consider the special case where 𝑛 = 3 and 𝑟 = 1. In this case, 𝑍 consists
of the three coordinate axes in R3 . The Voronoi decomposition of this reducible curve
decomposes R3 into squares, each normal to a different point on the three lines. The image
of this picture under orthogonal transformations is the Voronoi decomposition of R3×3
associated with the affine variety of rank 1 matrices. That variety has dimension 5, and
each Voronoi cell is a 4-dimensional convex body in the normal space.
If 𝑢 is the smallest singular value of 𝑉, then 𝜆 · 𝑢 is the smallest singular value of
𝜆 · 𝑉, for every 𝜆 ≠ 0. If we wish to compare the sizes of Voronoi cells, then we should
work with some normalization and consider the relative size of Voronoi cells. Let us
normalize rank-𝑟 matrices such that their largest singular value is equal to one. That is, we
intersect the variety 𝑋 with the unit sphere in the spectral norm. Let 𝑉 be a matrix in this
intersection. Then, by Theorem 8.24 the size of its Voronoi cell is 𝜆 = 𝜎𝑟 (𝑉)/𝜎1 (𝑉). In
Chapter 9 we will study this ratio of singular values. In particular, we will show in (9.4)
that 𝜎𝑟 (𝑉)/𝜎1 (𝑉) is the inverse of the Turing condition number of 𝑉, which is related to
matrix inversion. Therefore, the relative size of the Voronoi cell of 𝑉 is the inverse of the
relative condition number of 𝑉. There is a close connection between condition numbers
and errors in numerical computation. We explain this in Chapter 9.
Our problem is even more interesting when we restrict to matrices in a linear subspace.
To see this, let now 𝑋 denote the variety of symmetric 𝑛 × 𝑛 matrices of rank at most 𝑟.
We can regard 𝑋 either as a variety in the matrix space R𝑛×𝑛 , or in the space R ( 2 ) whose
𝑛+1

coordinates are the upper triangular entries. On the latter space we have the Euclidean
norm and the Frobenius norm (aka Bombieri–Weyl norm). These are now different!
104 8 Voronoi Cells

The Frobenius norm on R ( 2 ) is the restriction of the Frobenius norm on R𝑛×𝑛 to the
𝑛+1

subspace of symmetric matrices. For instance, if 𝑛 = 2, we identify the vector


𝑎 𝑏 √ (𝑎, 𝑏, 𝑐)
with the symmetric matrix 𝑏 𝑐 . The Frobenius norm of this matrix is 𝑎 2 +2𝑏 2 +𝑐2

(cf. Example 9.15). On the other hand, the Euclidean norm is 𝑎 2 +𝑏 2 +𝑐2 . The two norms
have dramatically different properties with respect to low-rank approximation. The Eckart–
Young Theorem remains valid for the Frobenius norm on R ( 2 ) , but it is not valid for the
𝑛+1

Euclidean norm. Some implications are explained in [60, Example 3.2]. In what follows,
we elucidate this point by comparing the Voronoi cells with respect to the two norms.

Example 8.25 Let 𝑋 be the variety of symmetric 3 × 3 matrices of rank ≤ 1. For the
Euclidean metric, 𝑋 lives in R6 . For the Frobenius metric, 𝑋 lives in a 6-dimensional
subspace of R3×3 . Let 𝑉 be a smooth point in 𝑋, i.e. a symmetric 3 × 3 matrix of rank 1.
The normal space to 𝑋 at 𝑉 has dimension 3. Hence, in either norm, the Voronoi cell
Vor𝑋 (𝑉) is a 3-dimensional convex body. Figure 8.4 shows these two bodies.
For the Frobenius metric,
 each Voronoi cell of the Veronese variety 𝑋 is congruent to
the set of matrices 𝑏𝑎 𝑏𝑐 whose eigenvalues are between −1 and 1. This semialgebraic
 
set is bounded by the singular quadratic surfaces with defining polynomials det 𝑎+1 𝑏
𝑏 𝑐+1
 𝑎−1 𝑏 
and det 𝑏 𝑐−1 . The Voronoi ideal is of degree 4, and it is generated by the product of
these two determinants (modulo the normal space). The Voronoi cell is shown on the left
in Figure 8.4. It is the intersection of two quadratic cones. The cell is the convex hull of the
circle in which the two quadrics meet, together with the two vertices.
For the Euclidean metric, the Voronoi boundary at a generic point 𝑉 in 𝑋 is defined by
an irreducible polynomial of degree 18 in 𝑎, 𝑏, 𝑐. This polynomial is found by the ideal
computation in equation (8.4). In some cases,
h 1 0 0 ithe Voronoi degree can drop. For instance,
consider the special rank 1 matrix 𝑉 = 0 0 0 . For this point, the degree of the Voronoi
000
boundary is only 12. This particular Voronoi cell is shown on the right in Figure 8.4. This
cell is the convex hull of two ellipses, which are marked in red in the diagram. ⋄

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International
License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and
reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter’s Creative Commons
license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s
Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the
permitted use, you will need to obtain permission directly from the copyright holder.
Chapter 9
Condition Numbers

The concept of a condition number has its origin in numerical analysis. It measures how
much the output value of a function we wish to evaluate can change for a small change in
the input argument. In this chapter, we discuss condition numbers in the context of metric
algebraic geometry. In the first section, we offer an introduction to the relevant notions for
assessing errors in numerical computations.
Suppose the function to be evaluated is an algebraic function. For instance, we may wish
to map the coefficients of a univariate polynomial to one of its roots. This function is well-
defined locally, and it is well-behaved when the polynomial is far from the hypersurface
defined by the discriminant. Indeed, the condition number stands in a reciprocal relationship
to the distance to the variety of ill-posed instances. This variety is often a discriminantal
hypersurface, and thus we are naturally led to the ED problem for discriminants. This topic
will be studied in the third and last sections of this chapter. The classical discriminant is the
dual variety to the Veronese variety, and other discriminants are dual to other toric varieties.
We can apply ED duality (Theorem 2.23) to gain insight and computational speed.
A special case of a discriminant is the determinant of a square matrix. This arises when
our function is matrix inversion. The relevant ED problem points us to the Eckart–Young
Theorem (Theorem 2.9). This is why we include the proof of Eckart–Young in the second
section, which is about the condition number of matrix inversion.

9.1 Errors in Numerical Computations

Input data for numerical algorithms can have errors. These may be caused by measurement
errors. Hence, the output of the computation also has errors. We wish to compare the output
error with the input error. This is a fundamental issue for numerical computations.

Example 9.1 (Exact algorithm) Given a matrix 𝐴 ∈ R2×2 with det( 𝐴) ≠ 0, we want to
compute the inverse matrix 𝐴−1 . We consider two instances of this problem. The errors are
measured by the Euclidean norm.

© The Author(s) 2024 105


P. Breiding et al., Metric Algebraic Geometry, Oberwolfach Seminars 53,
https://doi.org/10.1007/978-3-031-51462-3_9
106 9 Condition Numbers

1
 1

(a) First, let 𝐴 = −1 1 . We consider this matrix to be the true input data. A small
measurement error gives the new input data 𝐴˜ = −1+𝜀 1 1 , where 0 < 𝜀 ≪ 1. The
1
−1 ˜ −1
exact solutions 𝐴 and 𝐴 are then
   
1 1 −1 1 1 −1
𝐴−1 = , and 𝐴˜ −1 =
2 1 1 2−𝜀 1−𝜀 1
 
−1 𝜀 1 −1
= 𝐴 + .
2(2 − 𝜀) −1 1

Comparing the errors, we find that ∥ 𝐴−1 − 𝐴˜ −1 ∥ ≈ ∥ 𝐴 − 𝐴∥.


˜ In words, the error in the
˜ −1 ˜ −1
input ∥ 𝐴 − 𝐴∥ and the error in the output ∥ 𝐴 − 𝐴 ∥ are roughly the same for small
values of 𝜀. They both are of the order 𝑂 (𝜀).
 
(b) The true input in our second example is the matrix 𝐵 = 11 1+1 𝛿 , where |𝛿| ≠ 0 is
small.
 We perturb the input by adding 𝜀 to the lower left entry. The perturbed input is
𝐵˜ = 1+𝜀
1

1 . The matrix inverses are
1+ 𝛿
   
−1 1 1 + 𝛿 −1 1 1 + 𝛿 −1
𝐵 = and 𝐵˜ −1 =
𝛿 −1 1 𝛿 − 𝜀 −1 − 𝜀 1
 
−1 𝜀 −(1 + 𝛿) 1
= 𝐵 + .
𝛿(𝜀 − 𝛿) 1 + 𝛿 −1
1
This implies ∥𝐵−1 − 𝐵˜ −1 ∥ ≈ 𝛿 ( 𝜀− ˜
𝛿) · ∥𝐵 − 𝐵∥. If 𝜀 < 𝛿, then the error is amplified by
−2
a factor of roughly 𝛿 , which is large. The behavior here is different from that before.
We applied an exact algorithm to the problem of matrix inversion, and we observed
considerable differences in the output. In the first example, the output 𝐴˜ −1 for the perturbed
data 𝐴˜ was close to the true output 𝐴−1 . On the other hand, in the second example, the
output 𝐵˜ −1 for the perturbed data 𝐵˜ was far from the true output 𝐵−1 . ⋄

The previous example shows that, even if we can compute the exact solution of a
problem, small errors in the data may be amplified tremendously in the output. The theory
of condition numbers helps us to understand when and why this happens. In simple terms,
a condition number is a quantity associated with a computational problem, and it measures
the sensitivity of the output to small errors in the input data.

Definition 9.2 A computational problem is a function 𝜙 : 𝑀 → 𝑁 from a space 𝑀 of


inputs to a space 𝑁 of outputs. For us, each space is a subset of a Euclidean space, and it
carries the induced Euclidean metric.

Example 9.3 In Example 9.1, the input space and the output space are both given by
𝑀 = 𝑁 = {𝐴 ∈ R2×2 | det( 𝐴) ≠ 0}. The computational problem is matrix inversion, so
the relevant function is 𝜙( 𝐴) = 𝐴−1 . ⋄

Let (𝑀, 𝑑 𝑀 ) and (𝑁, 𝑑 𝑁 ) be metric spaces. The following definition is due to Rice [152].
9.1 Errors in Numerical Computations 107

Definition 9.4 The (absolute) condition number of 𝜙 : 𝑀 → 𝑁 at the input p ∈ 𝑀 is

𝑑 𝑁 (𝜙(p), 𝜙(q))
𝜅 [𝜙] (p) := lim sup .
𝜀→0 q∈𝑀: 𝑑 𝑀 (p, q)
𝑑 𝑀 (p,q) ≤ 𝜀

The motivation for this definition is as follows: For small 𝑑 𝑀 (p, q) we have

𝑑 𝑁 (𝜙(p), 𝜙(q)) ≤ 𝜅 [𝜙] (p) · 𝑑 𝑀 (p, q) + 𝑜(𝑑 𝑀 (p, q)).

In words, a small error 𝜀 = 𝑑 𝑀 (p, q) in the input data causes an error of roughly 𝜅 [𝜙] (p) · 𝜀
in the output data. This relationship is entirely independent of the algorithm that is used
to evaluate 𝜙(p). At this stage, given the lim-sup definition, it is unclear how condition
numbers can be computed. As we shall see, this is where the geometric perspective of
Demmel [55] comes in. But, let us first discuss an important variant.

Remark 9.5 Fix the Euclidean spaces 𝑀 = R𝑛 and 𝑁 = R𝑚 . What does “small error” mean
in this case? If ∥p∥ = 104 , is an error of size ∥p − q∥ = 102 small or large? To address
a question like this, there is a notion of relative error in numerical analysis. By definition,
the relative error between p and q is

∥p − q∥
RelError(p, q) := for p, q ∈ 𝑀.
∥p∥
The relative condition number of the function 𝜙 at the input datum p ∈ 𝑀 is as follows:

RelError(𝜙(p), 𝜙(q)) ∥p∥ 𝑀


𝜅REL [𝜙] (p) := lim sup = 𝜅 [𝜙] (p) · .
𝜀→0 RelError(p,q) ≤ 𝜀 RelError(p, q) ∥𝜙(p) ∥ 𝑁

In numerical analysis, relative errors are more significant than absolute errors because
floating-point arithmetic introduces relative errors (see, e.g., [89] or [173, p. 91]). Modern
architectures are optimized for computing with floating-point numbers. A floating-point
number system F is a subset of the real numbers R that is specified by four integers
Í𝑡 𝑡 is𝑑𝑖 called precision, and [𝑒 min , 𝑒 max ] is called
𝛽, 𝑡, 𝑒 min , 𝑒 max , where 𝛽 is called base,
exponential range. Then, F := {±𝛽𝑒 𝑖=1 𝛽𝑖
| 0 ≤ 𝑑𝑖 ≤ 𝛽 − 1, 𝑒 min ≤ 𝑒 ≤ 𝑒 max }. The
quantity 𝑢 = 12 𝛽1−𝑡 is referred to as the relative precision of F .
The range of F is the set G := {𝑥 ∈ R | 𝛽𝑒min −1 ≤ |𝑥| ≤ 𝛽𝑒max (1 − 𝛽−1 )}. Note that
F ⊂ G. Consider the rounding function fl : R → F , 𝑥 ↦→ argmin 𝑦 ∈ F |𝑥 − 𝑦|. One can
show that every 𝑥 ∈ G satisfies fl(𝑥) = 𝑥(1 + 𝛿) ∈ F for some 𝛿 with |𝛿| ≤ 𝑢. This is a
crucial property. It tells us that every number in G can be approximated by a number of F
with relative precision 𝑢. Namely, the following inequality holds:

RelError (𝑥, fl(𝑥)) = ∥𝛿∥ ≤ 𝑢 for all 𝑥 ∈ G. (9.1)

Many hardware floating-point units use the IEEE 754 standard. This is a system F with
the specifications
108 9 Condition Numbers

𝛽 t 𝑒 min 𝑒 max u
half (16 bit) 2 11 −14 16 = 24 ≈ 5 · 10−4
single (32 bit) 2 24 −125 128 = 27 ≈ 6 · 10−8
double (64 bit) 2 53 −1021 1024 = 210 ≈ 10−16

This is designed so that the arithmetic operations ◦ ∈ {+, −, ×, ⧸, ·} satisfy the property
fl(𝑥 ◦ 𝑦) = (𝑥 ◦ 𝑦) (1 + 𝛿) for some |𝛿| ≤ 𝑢. For instance, the 64-bit floating-point number
system, specified in the third row of the table, can approximate any real number within its
range with a relative error of at most 𝑢 ≈ 10−16 .
After this digression into the practical aspects of numerical computing, we now return
to the mathematical theory. The next theorem is also due to Rice [152]. In his article, 𝑀
and 𝑁 are arbitrary Riemannian manifolds. We here specialize to the algebraic setting. For
us, each of 𝑀 and 𝑁 is a submanifold in a Euclidean space, described by a finite Boolean
combination of polynomial equations and inequalities.
Theorem 9.6 Fix a differentiable function 𝜙 : 𝑀 → 𝑁. The condition number of this
computational problem at the input datum p ∈ 𝑀 is the maximal norm of the derivative
over the unit sphere in the tangent space at p; i.e.,

𝜅 [𝜙] (p) = max ∥𝐷 p 𝜙(t) ∥.


t∈𝑇p 𝑀: ∥t ∥=1

We obtain the relative condition number 𝜅REL [𝜙] (p) by multiplying this with ||p||/||𝜙(p)||.
A key step in computing the condition number with Rice’s formula is to find an ex-
pression for the Jacobian 𝐷 p 𝜙. For problems of interest to us, this step uses implicit
differentiation or geometric arguments.
Example 9.7 (Roots of univariate polynomials) Following [35, Section 14.1.1], we ex-
amine the computational problem of finding one real root of a polynomial 𝑓 in one variable
𝑧 of degree 𝑑. We write

𝑓 (𝑧) = 𝑓0 + 𝑓1 𝑧 + 𝑓2 𝑧2 + · · · + 𝑓 𝑑 𝑧 𝑑 .

The coefficient vector 𝑓 = ( 𝑓0 , 𝑓1 , . . . , 𝑓 𝑑 ) now serves as the input p, and the output is a
particular real number 𝑎 which satisfies 𝑓 (𝑎) = 0. The function 𝑓 ↦→ 𝑎( 𝑓 ) is well defined
in a small open subset 𝑈 of the coefficient space R𝑑+1 . The set 𝑈 must be small enough so
that one root can be identified for each polynomial in 𝑈.
To find the derivative 𝐷 𝑓 𝑎 of our root-finding function 𝑓 ↦→ 𝑎( 𝑓 ), we assume that the
coefficients are differentiable functions 𝑓𝑖 (𝑡) of a parameter 𝑡, and we set 𝑓¤𝑖 = 𝑓𝑖′ (0) and
𝑓¤ = 𝑖=0
Í𝑑 ¤ 𝑖
𝑓𝑖 𝑧 . By differentiating the identity 𝑓 (𝑎( 𝑓 )) = 0 with respect to 𝑡, we find the
following formula for the desired derivative:

𝑓¤(𝑎)
𝐷𝑓𝑎 = − . (9.2)
𝑓 ′ (𝑎)

We now think of 𝑎 as a fixed root of a fixed polynomial 𝑓 (𝑧). Theorem 9.6 implies that
the condition number 𝜅 [𝑎] ( 𝑓 ) equals | 𝑓 ′ (𝑎)| −1 times the maximal value | 𝑓¤(𝑎)|, where 𝑓¤
9.2 Matrix Inversion and Eckart–Young 109

runs over all points ( 𝑓¤0 , 𝑓¤1 , . . . , 𝑓¤𝑑 ) on the unit


√︃ 𝑑-sphere. The Cauchy–Schwarz inequality
implies that this maximum equals | 𝑓¤(𝑎)| =
Í𝑑 2𝑖
𝑎 , and therefore we have the following
𝑖=0
formula for the desired condition number:
√︃
2𝑖
Í𝑑
𝑖=0 𝑎
𝜅 [𝑎] ( 𝑓 ) = ′
. (9.3)
| 𝑓 (𝑎)|
This quantity is +∞ when 𝑎 is a double zero of 𝑓 . The further away from being a double
zero, the smaller the condition number. The relative condition number for the univariate
root-finding problem equals
√︃ Í
𝑓𝑖2 ) ( 𝑖=0
𝑑 Í𝑑 2𝑖
( 𝑖=0 𝑎 )
𝜅 REL [𝑎] ( 𝑓 ) = .
|𝑎| | 𝑓 ′ (𝑎)|

This formula involves not just the polynomial 𝑓 (𝑧) but also the zero 𝑎 we seek to find. This
is due to the fact that 𝑎( 𝑓 ) is a local map, defined locally around the zero 𝑎; see [93]. ⋄

Example 9.8 (The condition number of the ED minimization problem) We revisit


the ED minimization problem (2.1) for a smooth algebraic variety 𝑋 ⊂ R𝑛 from the
point of view of condition numbers. Recall the definition of the medial axis Med(𝑋)
from Chapter 7. Every point outside the medial axis has a unique closest point on 𝑋.
Formulating this as a computational problem, we have the input space 𝑀 = R𝑛 \Med(𝑋)
and the output space 𝑁 = 𝑋. Here, 𝜙 : (R𝑛 \Med(𝑋)) → 𝑋 is the closest-point function
𝜙(u) = argminx∈𝑋 ∥x − u∥. We can apply Theorem 9.6 to compute the associated condition
number 𝜅 [𝜙] (u). This was carried out in detail in [32]. Suppose x = 𝜙(u). We have

𝜅 [𝜙] (u) = max (𝐼𝑚 − 𝜆 · 𝐿 v ) −1 t ,


t∈𝑇x 𝑋: ∥t ∥=1

where 𝜆 = ∥u − x∥ is the distance from u to 𝑋, v = 𝜆−1 (u − x) is the normal vector at x


pointing towards u, and 𝐿 v is the Weingarten map (6.10) of 𝑋 at x in normal direction v. ⋄

9.2 Matrix Inversion and Eckart–Young

In this section, we study the condition number for matrix inversion. This will lead us back
to the Eckart–Young Theorem, for which we here present a proof. We begin by reviewing
some norms on the space of real 𝑚 ×𝑛 matrices. The Euclidean norm (or Frobenius norm) is
√︄ ∑︁ √︁
∥ 𝐴∥ = 𝑎 2𝑖 𝑗 = trace( 𝐴𝐴⊤ ) for 𝐴 ∈ R𝑚×𝑛 .
𝑖, 𝑗

By contrast, in Theorem 9.6, we used the spectral norm, or operator norm. This is given by

∥ 𝐴∥ op := max ∥ 𝐴x∥.
∥x ∥=1
110 9 Condition Numbers

We have already met the spectral norm in Section 8.4. There, we introduced it as the
largest singular value of 𝐴. To see that this is an equivalent definition, we first observe
that, if 𝑈 and 𝑉 are orthogonal matrices, then ∥𝑈 ⊤ 𝐴𝑉 ∥ op = ∥ 𝐴∥ op . In words, the spectral
norm is orthogonally invariant. Suppose 𝑚 ≥ 𝑛. Let 𝐴 = 𝑈𝐷𝑉 ⊤ be the singular value
decomposition of 𝐴, where 𝑈 ∈ R𝑚×𝑚 and 𝑉 ∈ R𝑛×𝑛 are orthogonal matrices and 𝐷 is
the 𝑚 × 𝑛 diagonal matrix with singular values 𝜎1 ≥ · · · ≥ 𝜎𝑛 ≥ 0 on the main diagonal.
Orthogonal invariance implies ∥ 𝐴∥ op = ∥𝐷 ∥ op = 𝜎1 . Similarly, the Frobenius norm is
orthogonally invariant and hence satisfies ∥ 𝐴∥ = ∥𝐷 ∥ = (𝜎12 + · · · + 𝜎𝑛2 ) 1/2 . Furthermore,
in the case where 𝑛 = 𝑚 and 𝐴 is invertible, we have 𝐴−1 = 𝑉 𝐷 −1𝑈 ⊤ , so that

∥ 𝐴−1 ∥ op = 𝜎𝑛−1 .

We now focus on the case of square matrices (𝑚 = 𝑛). Matrix inversion is the map

inv : D → D, 𝐴 ↦→ 𝐴−1 ,

where D = {𝐴 ∈ R𝑛×𝑛 | det( 𝐴) ≠ 0}. We shall prove the following characterization of the
condition number of matrix inversion. For any 𝐴 ∈ D, the smallest singular value 𝜎𝑛 is a
positive real number.
Theorem 9.9 The condition number of matrix inversion at 𝐴 ∈ D is

𝜅 [inv] ( 𝐴) = ∥ 𝐴−1 ∥ op
2
= 𝜎𝑛−2 .

Before we prove this theorem, let us briefly bring it into context with Remark 9.5. In
numerical analysis, a popular choice for measuring the relative error is using the spectral
norm. In this case, by Theorem 9.9, the relative condition number can be expressed as the
ratio of the largest and smallest singular value of 𝐴:

∥ 𝐴∥ op 𝜎1
𝜅 REL [inv] ( 𝐴) = 𝜅 [inv] ( 𝐴) · −1
= . (9.4)
∥ 𝐴 ∥ op 𝜎𝑛

This ratio is Turing’s condition number and goes back to the work of Turing [174]. The
meaning of (9.4) for Voronoi cells of determinantal varieties was discussed in Section 8.4.
Proof (of Theorem 9.9) Let adj( 𝐴) denote the adjoint matrix of 𝐴. Since
1
inv( 𝐴) = 𝐴−1 = · adj( 𝐴),
det( 𝐴)
the map inv is a polynomial function on the open set D. In particular, inv is differentiable
on D. By Theorem 9.6, the condition number is 𝜅 [inv] ( 𝐴) = ∥𝐷 𝐴inv∥ op . We compute
the derivative of inv. Taking the derivative of 𝐴𝐵 = 𝐼𝑛 we have 𝐴𝐵 ¤ + 𝐴 𝐵¤ = 0. Since
𝐵 = 𝐴−1 , we conclude 𝐵¤ = −𝐴−1 𝐴𝐴¤ −1 . For a tangent vector 𝐴¤ = 𝑅 ∈ R𝑛×𝑛 we therefore
have that 𝐷 𝐴inv(𝑅) = 𝐴−1 𝑅 𝐴−1 . Let 𝐴 = 𝑈𝐷𝑉 ⊤ be the singular value decomposition
of 𝐴. Then, 𝐴−1 = 𝑉 𝐷 −1𝑈 ⊤ . By orthogonal invariance of the Euclidean norm, we find

∑︁ 𝑟 𝑖,2 𝑗
max ∥ 𝐴−1 𝑅 𝐴−1 ∥ 2 = max ∥𝐷 −1 𝑅𝐷 −1 ∥ 2 = Í max .
∥𝑅 ∥=1 ∥𝑅 ∥=1 2
𝑖, 𝑗 𝑟𝑖, 𝑗 =1 𝑖, 𝑗 𝜎𝑖2 𝜎 2𝑗
9.2 Matrix Inversion and Eckart–Young 111

The last expression is maximized when 𝑟 𝑛,𝑛 = 1 and all other 𝑟 𝑖, 𝑗 are zero. We conclude
that 𝜅 [inv] ( 𝐴) = max ∥𝑅 ∥=1 ∥𝐷 𝐴inv(𝑅) ∥ = 𝜎12 = ∥ 𝐴−1 ∥ 2op is the condition number of
𝑛
matrix inversion at 𝐴. □
 1 1 1 1 
Example 9.10 We revisit Example 9.1. The matrices were 𝐴 = −1 1 and 𝐵 = 1 1+ 𝛿 .
To be concrete, we set 𝛿 = 10−8 . Since 𝐴⊤ 𝐴 = 2 · 𝐼2 , we have that ∥ 𝐴−1 x∥ = 21 ∥x∥ for
all x ∈ R2 . By Theorem 9.9, 𝜅 [inv] ( 𝐴) = ∥ 𝐴−1 ∥ 2op = 41 . On the other hand, we have
∥𝐵−1 ∥ op ≥ ∥𝐵−1 e0 ∥ ≥ 108 , and this implies 𝜅 [inv] (𝐵) = ∥𝐵−1 ∥ 2op ≥ 1016 . This explains
the different behaviors of the outputs with respect to errors in the input in Example 9.1. ⋄

The Eckart–Young Theorem (Theorem 2.9) yields a metric interpretation of Turing’s


condition number 𝜅 [inv] ( 𝐴) from Theorem 9.9. The smallest singular value 𝜎𝑛 of a square
matrix 𝐴 equals the Euclidean distance of 𝐴 to the variety of singular matrices. This is the
hypersurface defined by the determinant:

Σ := {𝐴 ∈ R𝑛×𝑛 | det( 𝐴) = 0}.

Turing’s condition number is the squared inverse distance from 𝐴 to the hypersurface Σ:

1 ∥ 𝐴∥ op
𝜅 [inv] ( 𝐴) = and 𝜅REL [inv] ( 𝐴) = . (9.5)
dist( 𝐴, Σ) 2 dist( 𝐴, Σ)

Example 9.11 Fix the 2×2-determinant Σ = 𝑉 (det) ⊂ R2×2 and consider the set of matrices

𝐴 ∈ R2×2 for which 𝜅 [inv] ( 𝐴) = 𝜀 −1 . This is the offset hypersurface of Σ at level 𝜀.
We can compute this as in Example 7.14. In what follows we compute the hypersurface
defined by 𝜅REL [inv] ( 𝐴) = 𝜀 −1 for 𝜀 > 0. To make the formula in (9.5) more convenient,
we replace ∥ 𝐴∥ op by ∥ 𝐴∥. We proceed as in Section 7.2 to compute a polynomial equation
for dist( 𝐴, Σ) = 𝜀 · ∥ 𝐴∥ in terms of 𝐴 and 𝜀, but for 𝐵 ∈ Σ we replace the affine sphere
∥ 𝐴 − 𝐵∥ = 𝜀 by the homogeneous sphere ∥ 𝐴 − 𝐵∥ = 𝜀 · ∥ 𝐴∥. We use Macaulay2 [73]:
R = QQ[a_0..a_3, b_0..b_3, eps];
f = b_0*b_3 - b_1*b_2;
nAsq = a_0^2 + a_1^2 + a_2^2 + a_3^2;
d = (a_0-b_0)^2+(a_1-b_1)^2+(a_2-b_2)^2+(a_3-b_3)^2-eps^2*nAsq;
J1 = {diff(b_0, f), diff(b_1, f), diff(b_2, f), diff(b_3, f)};
J2 = {diff(b_0, d), diff(b_1, d), diff(b_2, d), diff(b_3, d)};
J = matrix {J1, J2};
OC = ideal {f, minors(2, J), d};
O = eliminate({b_0, b_1, b_2, b_3}, OC);
g = sub((gens O)_0_0, QQ[a_0..a_3, b_0..b_3][eps])

The result of this computation is a polynomial of the form

𝑔(a, 𝜀) = (𝑎 20 + 𝑎 21 + 𝑎 22 + 𝑎 23 ) 2 · (𝑔0 (a) + 𝑔1 (a)𝜀 2 + 𝑔2 (a)𝜀 4 + 𝑔3 (a)𝜀 6 + 𝑔4 (a)𝜀 8 ).


112 9 Condition Numbers

The coefficients of this relative offset polynomial are


𝑔4 (a) = (𝑎02 + 𝑎12 + 𝑎22 + 𝑎32 ) 2
𝑔3 (a) = −3(𝑎02 + 𝑎12 + 𝑎22 + 𝑎32 ) 2
𝑔2 (a) = 3𝑎04 + 6𝑎02 𝑎12 + 3𝑎14 + 6𝑎02 𝑎22 + 7𝑎12 𝑎22 + 3𝑎24 − 2𝑎0 𝑎1 𝑎2 𝑎3 + 7𝑎02 𝑎32 + 6𝑎12 𝑎32 + 6𝑎22 𝑎32 + 3𝑎34
𝑔1 (a) = −(𝑎04 + 2𝑎02 𝑎12 + 𝑎14 + 2𝑎02 𝑎22 + 4𝑎12 𝑎22 + 𝑎24 − 4𝑎0 𝑎1 𝑎2 𝑎3 + 4𝑎02 𝑎32 + 2𝑎12 𝑎32 + 2𝑎22 𝑎32 + 𝑎34 )
𝑔0 (a) = (𝑎1 𝑎2 − 𝑎0 𝑎3 ) 2 .

Figure 9.1 shows the zero set of 𝑔(a, 𝜀) at level 𝜀 = 0.5 in the affine patch 𝑎 0 = 1. We
remark that, if dist( 𝐴, Σ) = 𝜀 · ∥ 𝐴∥, then 𝜀 = sin 𝛼, where 𝛼 is the minimal angle between
the line R · 𝐴 and a line R · 𝐵 with 𝐵 ∈ Σ. In this case, 𝜀 −1 is also called a conic condition
number (see [35, Chapters 20 & 21]). ⋄

Fig. 9.1: This picture shows the determinantal hypersurface Σ = {det( 𝐴) = 0} ⊂ R2×2 (the red-blue
surface in the middle) together with the hypersurface defined by dist( 𝐴, Σ) = 𝜀 · ∥ 𝐴∥ with 𝜀 = 0.5 (the
union of the two green-yellow surfaces on the outside). The picture is drawn in the affine patch where the
upper left entry of 𝐴 is fixed to be one.

In the remainder of this section, we give a proof of the Eckart–Young Theorem. For this,
we return now to rectangular matrices and denote by 𝑋𝑟 := {𝐴 ∈ R𝑚×𝑛 | rank( 𝐴) ≤ 𝑟 } the
variety of real matrices of rank at most 𝑟. Recall that Sing(𝑋𝑟 ) = 𝑋𝑟−1 . We first compute
the normal space of 𝑋𝑟 at a smooth point. Lemma 9.12 can be viewed as a variant of
Example 2.22, but presented in a more down-to-earth manner.

Lemma 9.12 Fix 𝐴 ∈ 𝑋𝑟 of rank 𝑟. Suppose that 𝐴 = 𝑅𝑆 ⊤ , where 𝑅 ∈ R𝑚×𝑟 and 𝑆 ∈ R𝑛×𝑟
have rank 𝑟. The normal space of 𝑋𝑟 at 𝐴 has dimension (𝑚 − 𝑟) (𝑛 − 𝑟) and it equals

𝑁 𝐴 𝑋𝑟 = span uv⊤ | u⊤ 𝑅 = 0 and 𝑆 ⊤ v = 0 .




Proof Let 𝑅(𝑡) ∈ R𝑚×𝑟 and 𝑆(𝑡) ∈ R𝑛×𝑟 be smooth curves with 𝑅(0) = 𝑅 and 𝑆(0) = 𝑆.
Then, 𝛾(𝑡) := 𝑅(𝑡)𝑆(𝑡) ⊤ is a smooth curve with 𝛾(0)=𝐴. By the product rule from calculus,

𝜕 𝜕 ⊤ 𝜕 
𝛾(𝑡) = 𝑅 𝑆(𝑡) + 𝑅(𝑡) 𝑆⊤ . (9.6)
𝜕𝑡 𝑡=0 𝜕𝑡 𝑡=0 𝜕𝑡 𝑡=0
9.3 Condition Number Theorems 113

Let V := {𝑅𝑃⊤ | 𝑃 ∈ R𝑛×𝑟 } and W := {𝑄𝑆 ⊤ | 𝑄 ∈ R𝑚×𝑟 }. The equation (9.6) shows
that the tangent space of 𝑋𝑟 at 𝐴 is the sum 𝑇𝐴 𝑋𝑟 = V + W. (Aside for students: what
is the intersection V ∩ W ?) We note that V consists of all matrices 𝐿 ∈ R𝑚×𝑛 such that
u⊤ 𝐿x = 0 for all u with u⊤ 𝑅 = 0 and x ∈ R𝑛 arbitrary. Since u⊤ 𝐿x = Trace(𝐿 ⊤ ux⊤ ), this
shows that the normal space of V is spanned by matrices of the form ux⊤ . Similarly, the
normal space of W is spanned by yv⊤ , where 𝑆 ⊤ v = 0 and y ∈ R𝑚 arbitrary. Therefore,
the normal space of 𝑇𝐴 𝑋𝑟 = V + W is spanned by all uv⊤ with u and v as above. □

Corollary 9.13 dim 𝑋𝑟 = 𝑛𝑚 − (𝑚 − 𝑟) (𝑛 − 𝑟) = 𝑟 (𝑚 + 𝑛 − 𝑟).

We use Lemma 9.12 to prove the Eckart–Young Theorem.


Proof (of Theorem 2.9) Let 𝐵 ∈ 𝑋𝑟 be a matrix of rank 𝑟. We consider a singular value
decomposition 𝐵 = 𝑈𝐷𝑉 ⊤ . The matrices 𝑈 ∈ R𝑚×𝑟 and 𝑉 ∈ R𝑛×𝑟 have orthonormal
columns, and 𝐷 = diag(𝜎1 , . . . , 𝜎𝑟 ) with 𝜎1 , . . . , 𝜎𝑟 > 0 (not necessarily ordered). To
derive Theorem 2.9, we shall prove a claim that is reminiscent of Theorem 8.24. Namely,
the singular value decomposition of all  𝐷 matrices 𝐴 ∈ R𝑚×𝑛 such that 𝐵 is an ED critical

point for 𝐴 has the form 𝐴 = [𝑈 𝑈 ] 0 𝐷′ [𝑉 𝑉 ′] ⊤ , where 𝐷 ′ = diag(𝜎𝑟+1 , . . . , 𝜎𝑛 ).
0

 
By orthogonal invariance, we can assume that 𝐵 = 𝐷0 00 . LetÍ𝐴 ∈ 𝐵 Í+ 𝑁 𝐵 𝑋𝑟 be a
matrix in the normal space of 𝐵. By Lemma 9.12, we have 𝐴 = 𝐵 + 𝑖=𝑟+1 𝑚 𝑛 ⊤
𝑗=𝑟+1 𝑎 𝑖 𝑗 e𝑖 e 𝑗
for some coefficients 𝑎 𝑖 𝑗 ∈ R, i.e.
 
𝐷 0
𝐴 = , where 𝐴 ′ = (𝑎 𝑖 𝑗 ) ∈ R (𝑚−𝑟)×(𝑛−𝑟) .
0 𝐴′

Let now 𝐴 ′ = 𝑈 ′ 𝐷 ′𝑉 ′⊤ be the singular value decomposition of 𝐴 ′. Then,


 
𝐷 0
𝐴 = [𝐼𝑟 𝑈 ′] [𝐼𝑟 𝑉 ′] ⊤ . (9.7)
0 𝐷′

This is the desired singular value decomposition of the 𝑚 × 𝑛 matrix 𝐴. □

Remark 9.14 Our proof of the Eckart–Young Theorem also works for symmetric matrices.
It implies that the rank 𝑟 matrix 𝐵, which minimizes the distance to a symmetric matrix 𝐴,
is also symmetric.

9.3 Condition Number Theorems

The formula in (9.5) states that the condition number of matrix inversion at the input
𝐴 ∈ R𝑛×𝑛 is the inverse squared distance to the variety of singular matrices Σ. To a numerical
analyst, the elements of a set like Σ are the ill-posed inputs of the computational problem. A
result that connects a condition number and an inverse distance to ill-posed inputs is called
a condition number theorem. Equation (9.5) yields a condition number theorem for matrix
inversion. Condition number theorems were derived in [176] for computing eigenvalues of
matrices, and in [93] for computing zeros of polynomials, as in Example 9.7.
114 9 Condition Numbers

Condition number theorems connect metric algebraic geometry with numerical analysis.
They relate the numerical difficulty of an input datum p to the distance of p to the locus of ill-
posed inputs. This is explained in detail in Demmel’s paper [55]. The determinant of a square
matrix is a special case of a discriminant, and Σ will generally be a hypersurface. This will
be made precise in the next section. In this section, we prove a condition number theorem
for solving systems of polynomial equations. We consider homogeneous polynomials and
their zeros in projective space. This differs from Example 9.7, where 𝑎 was a zero on
the affine line. While this difference may seem insignificant to an algebraic geometer, it
becomes significant in our metric setting. Namely, affine space with its Euclidean metric and
projective space with the metric described below are markedly different as metric spaces.
We fix the real projective space PR𝑛 and we write H𝑑 for the vector space of homogeneous
polynomials of degree 𝑑 in x = (𝑥0 , . . . , 𝑥 𝑛 ). For 𝑚 ≤ 𝑛 and d = (𝑑1 , . . . , 𝑑 𝑚 ) we abbreviate

Hd := H𝑑1 × · · · × H𝑑𝑚 .

Suppose 𝑚 = 𝑛, let 𝐹 ∈ Hd and let a ∈ PR𝑛 a regular zero of 𝐹. By the Implicit Function
Theorem, there is a locally defined solution function 𝑎 : 𝑈 → 𝑉, where 𝑈 ⊂ Hd is a
neighborhood of 𝐹 and 𝑉 ⊂ PR𝑛 is a neighborhood of a, such that 𝐹 (𝑎(𝐹)) = 0. Our goal
is to give a formula for the condition number of the solution function 𝑎.
For this, we first need to introduce metrics on the space of polynomials and the space
of zeros. Since 𝑎 is defined locally, we can replace projective space PR𝑛 by the 𝑛-sphere
S𝑛 ⊂ R𝑛+1 . The latter carries the natural metric inherited from its ambient space. In fact,
we can use the Riemannian metric on the sphere to define a metric on PR𝑛 , so that it becomes
a Riemannian manifold (this approach is worked out in Section 12.3 for complex projective
space). In this way, PR𝑛 becomes curved, while affine space is flat.
For H𝑑 , we use the Bombieri–Weyl metric. Let 𝐴 := {𝛼 ∈ N𝑛+1 | 𝛼0 +· · ·+𝛼Í𝑛 = 𝑑}. The
Bombieri–Weyl
Í inner product between two homogeneous polynomials 𝑓 = 𝛼∈ 𝐴 𝑓 𝛼 x 𝛼
and 𝑔 = 𝛼∈ 𝐴 𝑔 𝛼 x 𝛼 in H𝑑 is defined by the formula
∑︁ 𝛼0 ! · · · 𝛼𝑛 !
⟨ 𝑓 , 𝑔⟩BW := 𝑓𝛼 · 𝑔𝛼. (9.8)
𝛼∈ 𝐴
𝑑!

For 𝑑 = 1, this is the usual Euclidean inner product in R𝑛+1 .


The reason for the multinomial coefficients in (9.8) is that the Bombieri-Weyl inner
product is orthogonally invariant: If 𝑈 ∈ 𝑂 (𝑛 + 1) is an orthogonal matrix, then

⟨ 𝑓 ◦ 𝑈, 𝑔 ◦ 𝑈⟩BW = ⟨ 𝑓 , 𝑔⟩BW .

Kostlan [110, 111] showed that (9.8) is the unique (up to scaling) orthogonally invariant
inner product on H𝑑 such that monomials are pairwise orthogonal. This inner product
extends to Hd . Namely, for tuples 𝐹 = ( 𝑓1 , . . . , 𝑓𝑚 ) and 𝐺 = ( 𝑓1 , . . . , 𝑓𝑚 ), we define

⟨𝐹, 𝐺⟩BW := ⟨ 𝑓1 , 𝑔1 ⟩BW + · · · + ⟨ 𝑓𝑚 , 𝑔𝑚 ⟩BW .


9.3 Condition Number Theorems 115
√︁
The Bombieri–Weyl norm is ∥𝐹 ∥ BW := ⟨𝐹, 𝐹⟩BW , and the corresponding distance is

distBW (𝐹, 𝐺) := ∥𝐹 − 𝐺 ∥ BW for 𝐹, 𝐺 ∈ Hd .

Example 9.15 (𝑛 = 1, 𝑑 = 2) Consider two quadrics 𝑓 (𝑥 0 , 𝑥1 ) = 𝑎𝑥 02 + 𝑏𝑥0 𝑥 1 + 𝑐𝑥12 = x⊤ 𝐴x


and 𝑔(𝑥 0 , 𝑥1 ) = 𝛼𝑥02 + 𝛽𝑥0 𝑥1 + 𝛾𝑥12 = x⊤ 𝐵x, where x = (𝑥0 , 𝑥1 ) ⊤ , with symmetric matrices
   
𝑎 𝑏/2 𝛼 𝛽/2
𝐴 = and 𝐵 = .
𝑏/2 𝑐 𝛽/2 𝛾

The inner product of the two quadratic forms is the trace inner product of the two matrices:
2! · 0! 1! · 1! 2! · 0! 1
⟨ 𝑓 , 𝑔⟩BW = 𝑎𝛼 + 𝑏𝛽 + 𝑐𝛾 = 𝑎𝛼 + 𝑏𝛽 + 𝑐𝛾 = Trace( 𝐴⊤ 𝐵).
2! 2! 2! 2
An analogous formula holds for quadrics in more than two variables. Thus, the Bombieri–
Weyl product generalizes the trace inner product for symmetric matrices to homogeneous
polynomials of any degree. ⋄
We now turn to the condition number of the solution function 𝑎 : 𝑈 → 𝑉. The zero
a = 𝑎(𝐹) is represented by a unit vector in S𝑛 . Proceeding as in Example 9.7, we differentiate
the equation 𝐹 (𝑎(𝐹)) = 0. This gives 𝐽𝐹 (a) a¤ + 𝐹¤ (a). Here, 𝐽𝐹 (a) = 𝜕𝑥𝜕 𝑓𝑖 
𝑗
(a) ∈ R𝑛×(𝑛+1)
is the Jacobian matrix of 𝐹 at a, and a¤ ∈ 𝑇a S𝑛 . The tangent space 𝑇a S𝑛 is the image of the
projection matrix 𝑃a := 𝐼𝑛+1 − aa⊤ . Note that det(𝑃a ) = 1 − ||a|| 2 = 0. When a is a regular
zero of 𝐹, the rank of 𝐽𝐹 (a) is 𝑛, and we obtain

a¤ = (𝐽𝐹 (a)| 𝑇a S𝑛 ) −1 𝐹¤ (a).

This formula is a multivariate version of (9.2). By Theorem 9.6, the condition number
for 𝑎 is 𝜅 [𝑎] (𝐹) = max ∥ 𝐹¤ ∥ BW =1 ∥ (𝐽𝐹 (a)| 𝑇a S𝑛 ) −1 𝐹¤ (a) ∥. We use orthogonal invariance of
the Bombieri–Weyl metric to compute this maximum. Fix 𝑈 ∈ 𝑂 (𝑛 + 1) such that a = 𝑈e0 ,
where e0 = (1, 0, . . . , 0) ∈ S𝑛 . We have ∥ 𝐹¤ ∥ BW = ∥ 𝐹¤ ◦ 𝑈 ∥ BW for all 𝐹¤ ∈ Hd . This implies
that 𝜅 [𝑎] (𝐹) is also obtained by maximizing ∥ (𝐽𝐹 (a)| 𝑇a S𝑛 ) −1 𝐹¤ (e0 ) ∥ over all 𝐹¤ ∈ Hd with
∥ 𝐹¤ ∥ BW = 1. Let us write 𝐹¤ (x) = 𝑥 0𝑑 · b + 𝐺 (x), where b ∈ R𝑛 and 𝐺 involves only powers
√︃
of 𝑥0 of degree less than 𝑑. Then, 𝐹¤ (e0 ) = b and so ∥ 𝐹¤ (e0 ) ∥ = ∥b∥ = 1 − ∥𝐺 ∥ 2BW .
This uses the fact that 𝑥0𝑑 · b and 𝐺 are orthogonal for the Bombieri–Weyl inner product.
We have thus shown that { 𝐹¤ (a) | ∥ 𝐹¤ ∥ BW = 1} is the unit ball in R𝑛+1 . Consequently,

𝜅 [𝑎] (𝐹) = ∥ (𝐽𝐹 (a)| 𝑇a S𝑛 ) −1 ∥ op . (9.9)

Corollary 9.16 The condition number for solving 𝑛 polynomial equations on P𝑛 equals
1
𝜅 [𝑎] (𝐹) = . (9.10)
𝜎𝑛 (𝐽𝐹 (a) 𝑃a )

Proof The matrix 𝐽𝐹 (a)𝑃a represents the linear map 𝐽𝐹 (a)| 𝑇a S𝑛 . Hence, the two have the
same singular values. □
116 9 Condition Numbers

Example 9.17 (Univariate polynomials revisited) We examine our formula for 𝑛 = 1. The
computation takes a binary form 𝑓 (𝑥0 , 𝑥1 ) to one of its zeros a = (𝑎 0 , 𝑎 1 ) in S1 . This is the
projective version of Example 9.7. The Jacobian equals 𝐽 𝑓 (a) = [𝜕 𝑓 /𝜕𝑥 0 (a) 𝜕 𝑓 /𝜕𝑥1 (a)].
Equation (9.10) yields the following analogue to Equation (9.3):
1
𝜅 [𝑎] (𝐹) = √︁ .
(𝜕 𝑓 /𝜕𝑥0 (a)) 2 + (𝜕 𝑓 /𝜕𝑥1 (a)) 2

Here, a is a point on the circle S1 , representing a zero of 𝑓 in P1 . ⋄

We now return to the general case 𝑚 ≤ 𝑛, i.e. we allow systems with fewer equations.

Proposition 9.18 For x ∈ PR𝑛 , denote Σ(x) := {𝐹 ∈ Hd | 𝐹 (x) = 0 and rank 𝐽𝐹 (x) < 𝑚}
and set 𝐷 = diag(𝑑1 , . . . , 𝑑 𝑚 ). The distance from 𝐹 to the discriminant Σ(x) equals
√︃
distBW (𝐹, Σ(x)) = ∥𝐹 (x) ∥ 2 + 𝜎𝑚 (𝐷 −1/2 𝐽𝐹 (x) 𝑃x ) 2 .

Hence, if a is a zero of the system 𝐹, then we have distBW (𝐹, Σ(a)) = 𝜎𝑚 (𝐷 −1/2 𝐽𝐹 (a) 𝑃a ).

Proof Let 𝑈 ∈ 𝑂 (𝑛 + 1) with x = 𝑈e0 and set 𝐹0 := 𝐹 ◦ 𝑈. By orthogonal invariance,


distBW (𝐹, Σ(x)) = distBW (𝐹0 , Σ(e0 )). We shall compute the latter. We write

𝐹0 (x) = 𝑥 0𝑑 · b + 𝑥0𝑑−1 · 𝐵 (𝑥1 , . . . , 𝑥 𝑛 ) ⊤ + 𝐻 (x),

where b ∈ R𝑚 , 𝐵 ∈ R𝑚×𝑛 and 𝐻 has degree ≤ 𝑑 − 2 in 𝑥0 . Note that b = 𝐹0 (e0 ) = 𝐹 (x)


and 𝐵 = 𝐽𝐹0 (e0 ) 𝑃e0 = 𝐽𝐹 (x) 𝑃x 𝑈 ⊤ . Recall that 𝐺 ∈ Σ(e0 ) if and only if 𝐺 (e0 ) = 0 and
the Jacobian 𝐽𝐺 (e0 ) has rank at most 𝑚 − 1. This means that the distance from Σ(e0 ) to 𝐹0
is minimized at a polynomial system of the form 𝐺 0 (x) = 𝑥0𝑑−1 · 𝐴 (𝑥1 , . . . , 𝑥 𝑛 ) ⊤ ∈ Σ(e0 ),
where 𝐴 is a matrix of rank at most 𝑚 − 1. We have

∥𝐹0 − 𝐺 0 ∥ 2BW = ∥b∥ 2 + ∥𝐷 −1/2 ( 𝐴 − 𝐵) ∥ 2 .

The Eckart–Young Theorem implies that the distance from 𝐷 −1/2 𝐵 to the variety of matrices
of rank at most 𝑚 − 1 equals 𝜎𝑚 (𝐷 −1/2 𝐵). From this, we infer the desired formula for the
distance to the variety Σ(x):
√︃ √︃
distBW (𝐹, Σ(x)) = ∥b∥ 2 + 𝜎𝑚 (𝐷 −1/2 𝐵) 2 = ∥𝐹 (x) ∥ 2 + 𝜎𝑚 (𝐷 −1/2 𝐽𝐹 (x) 𝑃x ) 2 .

Here, we use the fact that the singular values are invariant under multiplication with the
orthogonal matrix 𝑈 ⊤ . □
Proposition 9.18 can be viewed as a condition number theorem. If 𝑚 = 𝑛 and a is a zero
of 𝐹, then the formula for the condition number in (9.10) is equal to the reciprocal distance
to Σ(a), up to the scaling factor by the diagonal matrix 𝐷. The variety Σ(a) plays the role
of a discriminant, but it still depends on the point a. The actual discriminant is defined as

Σ := {𝐹 ∈ Hd | there is x ∈ PR𝑛 s.t. 𝐹 (x) = 0 and rank 𝐽𝐹 (x) < 𝑚}. (9.11)
9.3 Condition Number Theorems 117

This is the union of the local discriminants Σ(a) where a runs over P𝑛 . Note that Σ is the
discriminant since we are asking for x to be a real point. In the next section, we replace Σ
by its Zariski closure. This is the variety that is obtained by allowing x to be complex.
The next theorem gives a formula for the distance from a polynomial system 𝐹 to
the discriminant Σ. This was proved by Raffalli [151] for the case 𝑚 = 1. Bürgisser and
Cucker [35] cover the case 𝑚 = 𝑛.

Theorem 9.19 Let 𝑚 ≤ 𝑛 and d = (𝑑1 , . . . , 𝑑 𝑚 ) be a tuple of degrees. Let 𝐹 ∈ Hd . Then,


√︃
distBW (𝐹, Σ) = min𝑛 ∥𝐹 (x) ∥ 2 + 𝜎𝑚 (𝐷 −1/2 𝐽𝐹 (x) 𝑃x ) 2 ,
x∈S

where, as before, 𝐷 = diag(𝑑1 , . . . , 𝑑 𝑚 ) and 𝑃x := 𝐼𝑛+1 − xx⊤ is the projection onto 𝑇x S𝑛 .


Ð
Proof By definition, the discriminant equals Σ = x∈S𝑛 Σ(x). This implies

distBW (𝐹, Σ) = min𝑛 distBW (𝐹, Σ(x)).


x∈S

The minimum is attained since S𝑛 is compact. Proposition 9.18 now yields the claim. □

Remark 9.20 Theorem 9.19 can be generalized as follows. Fix 1 ≤ 𝑘 < 𝑚. Consider the
distance from 𝐹 ∈ Hd to the space of polynomial systems 𝐺 ∈ Hd such that there exists
x ∈ P𝑛 with 𝐺 (x) = 0 and rank 𝐽𝐺 (x) < 𝑘. This distance equals
v
t 𝑚
∑︁
min𝑛 ∥𝐹 (x)∥ 2 + 𝜎𝑖 (𝐷 −1/2 𝐽𝐹 (x) 𝑃x ) 2 ,
x∈S
𝑖=𝑘

where 𝜎𝑘 (·), . . . , 𝜎𝑚 (·) are the 𝑚 − 𝑘 + 1 smallest singular values. This is because the
distance
√︃Í from a matrix 𝐴 ∈ R𝑚×𝑛 to the nearest matrix of rank at most 𝑘 − 1 is equal to
𝑚 2
𝑖=𝑘 𝜎𝑖 ( 𝐴) , by the Eckart–Young Theorem.

Remark 9.21 Let 𝑚 = 1. √︃ We have only one polynomial 𝑓 ∈ H𝑑 , and Theorem 9.19 yields
distBW ( 𝑓 , Σ) = minx∈S𝑛 𝑓 (x) 2 + 𝑑1 ∥𝑃x ∇ 𝑓 (x) ∥ 2 , where the column vector ∇ 𝑓 (x) is the
gradient of the polynomial 𝑓 at x. By Euler’s formula for homogeneous functions, we have
x⊤ · ∇ 𝑓 (x) = 𝑑 · 𝑓 (x), and hence 𝑃x ∇ 𝑓 (x) = ∇ 𝑓 (x) − (𝑑 · 𝑓 (x)) x. We obtain
√︃
distBW ( 𝑓 , Σ) = min𝑛 𝑓 (x) 2 + 𝑑1 ∥∇ 𝑓 (x) − (𝑑 · 𝑓 (x)) x∥ 2 . (9.12)
x∈S

Example 9.22 (𝑚 = 1, 𝑛 = 2, 𝑑 = 3) We compute the discriminant Σ for ternary cubics:


R = QQ[x,y,z,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9];
c0*x^3+c1*y^3+c2*z^3+c3*x^2*y+c4*x^2*z+c5*x*y^2
+c6*y^2*z+c7*x*z^2+c8*y*z^2+c9*x*y*z;
I = ideal(diff(x,oo),diff(y,oo),diff(z,oo), z-1);
disc = first first entries gens eliminate({x,y,z},I);
toString disc
degree disc, # terms disc
118 9 Condition Numbers

We see that Σ is given by a polynomial with 2040 terms of degree 12 in 10 unknowns.


We now compute the distance from the Fermat cubic 𝑓 (x) = 𝑥03 + 𝑥 13 + 𝑥23 to the
√︁
discriminant Σ. This is easy if we use (9.12). We have distBW ( 𝑓 , Σ) = minx∈S𝑛 ℎ(x),
2
where ℎ(x) = (𝑥03 + 𝑥 13 + 𝑥23 ) 2 + 3 2𝑖=0 𝑥 𝑖2 − (𝑥 03 + 𝑥13 + 𝑥23 ) 𝑥𝑖 . The polynomial function
Í 

ℎ : S2 → R is minimized at the point x0 = √1 (1, 1, 1), and we conclude that


3

√︁ 1
distBW ( 𝑓 , Σ) = ℎ(x0 ) = √ .
3
Since Σ is a cone in H3 , we can compute the minimal angle (measured in the Bombieri–
Weyl metric) between 𝑓 and any√ polynomial in Σ as in Example 9.11. Since the norm of
the Fermat cubic is ∥ 𝑓 ∥ BW = 3, the minimal angle is arcsin(1/3) ≈ 0.21635 · 𝜋2 . ⋄

9.4 Distance to the Discriminant

Theorem 9.19 expresses the distance from a polynomial system 𝐹 to its discriminant Σ as
the optimal value of an optimization problem over the unit sphere S𝑛 . Thus, we are solving
the ED problem from Chapter 2 for discriminants. In this section, we examine this problem
through the lens of algebraic geometry. This uses the ED duality in Theorem 2.23 and the
fact that discriminants are projectively dual to toric varieties.
In the previous section, we considered dense systems, where the polynomials involve
all monomials of a fixed degree. In that setting, we used the orthogonal invariance of the
Bombieri–Weyl metric to prove Theorem 9.19. In many applications, however, polynomial
systems are not dense but sparse, and there is no such invariant metric. To address this, we
now work in the setting of 𝑛 sparse Laurent polynomials in 𝑛 variables. Our equations are not
homogeneous. The given data is a collection of finite support sets A1 , A2 , . . . , A 𝑛 ⊂ Z𝑛 .
Our system of equations takes the form 𝑓1 (x) = 𝑓2 (x) = · · · = 𝑓𝑛 (x) = 0, where
∑︁
𝑓𝑖 (x) = 𝑐 𝑖,a xa for 𝑖 = 1, 2, . . . , 𝑛. (9.13)
a∈A𝑖

The BKK Theorem [19] tells us that the number of solutions in (C∗ ) 𝑛 equals the mixed
volume MV(𝑃1 , 𝑃2 , . . . , 𝑃𝑛 ). Here, 𝑃𝑖 is the convex hull of A𝑖 and the coefficients 𝑐 𝑖,a are
assumed to be generic. Thus, 𝑓𝑖 (x) is a polynomial with Newton polytope 𝑃𝑖 . The BKK
theorem was discussed in Example 3.31. We assume that the mixed volume is at least 2.
The discriminant of the system (9.13) is the irreducible polynomial Δ(c) which vanishes
whenever our equations have a double root in (C∗ ) 𝑛 . Here c = (𝑐 𝑖,a ) denotes the vector
of all coefficients. The discriminant Δ is unique up to scaling. We refer to [42] for many
details about Δ, including a more precise definition. Our goal here is to solve the Euclidean
distance problem for the discriminant hypersurface

Σ = c ∈ R 𝑁 | Δ(c) = 0 . (9.14)
9.4 Distance to the Discriminant 119

Remark 9.23 The real discriminant equals the real locus in the discriminant Σ. This means
that the real hypersurface defined (for the dense case) in (9.11) agrees with the definition
above. Indeed, let c be a generic real point c in the hypersurface Σ. Then the corresponding
polynomial system 𝐹 = ( 𝑓1 , . . . , 𝑓𝑛 ) has a complex double zero x. That double zero x is
unique. Since 𝐹 has real coefficients, x is invariant under complex conjugation. Therefore x
has real coordinates, and c is also in the set (9.11). In fact, there is a formula for expressing
x by rational operations in c. See (9.15) and [71, Equation (1.28) in Section 12.1.B].

From now on, we work over the field C and we view the discriminant Σ as a complex
projective hypersurface, defined by an irreducible homogeneous polynomial with integer
coefficients. This is consistent with [71] and with our earlier chapters.
Example 9.24 We consider the case 𝑛 = 1 and A = {0, 2, 5, 6}. The discriminant of the
polynomial 𝑓 (𝑥) = 𝑐 1 + 𝑐 2 𝑥 2 + 𝑐 3 𝑥 5 + 𝑐 4 𝑥 6 equals
Δ = 46656𝑐14 𝑐45 + 32400𝑐13 𝑐2 𝑐32 𝑐43 − 3125𝑐13 𝑐36 + 13824𝑐12 𝑐23 𝑐44 − 1500𝑐12 𝑐22 𝑐34 𝑐4
+ 192𝑐1 𝑐24 𝑐32 𝑐42 + 1024𝑐26 𝑐43 − 108𝑐25 𝑐34 .

This defines a surface Σ of degree 9 in P3 . For any point c ∈ Σ, we find the double root 𝑥
of 𝑓 by evaluating the gradient of the discriminant. This yields
 
𝜕Δ 𝜕Δ 𝜕Δ 𝜕Δ
(c) = 1 : 𝑥 2 : 𝑥 5 : 𝑥 6 .

: : : (9.15)
𝜕𝑐 1 𝜕𝑐 2 𝜕𝑐 3 𝜕𝑐 4

This identity follows from the duality between discriminants and toric varieties. In partic-
ular, if c is a real vector, then 𝑥 is a real number. ⋄

Given any sparse system 𝐹, we seek the distance from its coefficient vector u to the
discriminant Σ. We will use the formulation of the ED problem given in Theorem 2.23.
Let 𝑋 be the toric variety naturally associated with the tuple (A1 , A2 , . . . , A 𝑛 ). Then, the
dual variety 𝑋 ∨ is precisely the discriminant hypersurface Σ. This observation is known as
the Cayley trick; see [71] and [42, Section 2] for expositions.
We write x for a point in 𝑋 and c for a point in Σ. The conormal variety 𝑁 𝑋 consists
of pairs (x, c) such that the hyperplane c is tangent to 𝑋 at the point x. Equivalently, c is a
polynomial system whose variety is singular at x. Given any system u, our task is to solve
the equations x + c = u for (x, c) = (x, u − x) ∈ 𝑁 𝑋 . The desired distance from u to Σ is
the minimum of ||x|| over all solutions to these equations. In symbols, we have

dist(u, Σ) = min ∥u − c∥ = min ||x||. (9.16)


c∈Σ (x,u−x) ∈𝑁𝑋

Here, the minimum is taken over all real points. Of course, the minimum value depends on
the metric that we choose. In the previous section, we took the Bombieri–Weyl metric.

Example 9.25 (𝑛 = 1, 𝑑 = 3) Fix a polynomial u = 𝑢 0 + 𝑢 1 𝑡 + 𝑢 2 𝑡 2 + 𝑢 3 𝑡 3 with three distinct


complex roots. The coefficients 𝑢 0 , 𝑢 1 , 𝑢 2 , 𝑢 3 are fixed numbers. Here A = {0, 1, 2, 3}, so
𝑋 = 𝑋 A is the twisted cubic curve in P3 . The discriminant 𝑋 ∨ = Σ is given by

Δ = 𝑐21 𝑐22 − 4𝑐 0 𝑐32 − 4𝑐31 𝑐 3 + 18𝑐 0 𝑐 1 𝑐 2 𝑐 3 − 27𝑐20 𝑐23 ,


120 9 Condition Numbers

as computed in Example 4.13. We consider the following problem:

minimize ||u − c|| 2 = (𝑢 0 − 𝑐 0 ) 2 + (𝑢 1 − 𝑐 1 ) 2 + (𝑢 2 − 𝑐 2 ) 2 + (𝑢 3 − 𝑐 3 ) 2 subject to c ∈ Σ.

The conormal variety 𝑁 𝑋 is a 4-dimensional affine variety in C8 . Its prime ideal equals

⟨ 𝑥12 − 𝑥0 𝑥2 , 𝑥 1 𝑥 2 − 𝑥0 𝑥3 , 𝑥 22 − 𝑥1 𝑥 3 , Δ,
𝑐 0 𝑥0 − 𝑐 2 𝑥2 − 2𝑐 3 𝑥3 , 𝑐 1 𝑥 1 + 2𝑐 2 𝑥 2 + 3𝑐 3 𝑥3 , 3𝑐 0 𝑥1 + 2𝑐 1 𝑥2 + 𝑐 2 𝑥 3 , 𝑐 1 𝑥0 + 2𝑐 2 𝑥1 + 3𝑐 3 𝑥2 ⟩.

The equation x + c = u has 7 complex solutions in 𝑁 𝑋 , since 𝑋 has ED degree 7. We


seek the one that minimizes ||x|| 2 . For a numerical example, consider the polynomial
3𝑡 3 − 26𝑡 2 + 61𝑡 − 30, which is represented by the vector u = (−30, 61, −26, 3). We solve
the equations x + c = u and (x, c) ∈ 𝑁 𝑋 . Among the seven complex solutions, three are
real. The optimal value is ||x|| 2 = 0.0251866, and this is attained by the point

c = u − x = (−29.997, 61.011, −25.959, 3.153).

In larger cases, where computing the ideal of 𝑁 𝑋 is infeasible, we can still solve the ED
problem with the monomial parametrization of 𝑋. In our example, the problem is:
3
∑︁ 3
∑︁
minimize (𝑠𝑡 𝑖 ) 2 over all critical points of (𝑠, 𝑡) ↦→ (𝑢 𝑖 − 𝑠𝑡 𝑖 ) 2 . (9.17)
𝑖=0 𝑖=0

The optimal point is (𝑠, 𝑡) = (−0.002824, 3.78442), and the optimal value is 0.0251866. ⋄

We now turn to the general case 𝑛 > 1. The toric variety 𝑋 has dimension 2𝑛 − 1,
and it is associated with the Cayley configuration of A1 , A2 , . . . , A 𝑛 . To define this, we
introduce new variables 𝑦 1 , 𝑦 2 , . . . , 𝑦 𝑛 . We
Í𝑛 encode our polynomial system 𝐹 = ( 𝑓1 , . . . , 𝑓𝑛 )
into the single polynomial 𝜓(x, y) = 𝑖=1
Í a
a∈A𝑖 𝑐 𝑖,a 𝑦 𝑖 x . The toric variety 𝑋 = 𝑋 A is
a
parametrized by all monomials 𝑦 𝑖 x , where 𝑖 = 1, . . . , 𝑛 and a ∈ A𝑖 .
Consider the hypersurface Ω := {(x, y) ∈ (C∗ ) 2𝑛 | 𝜓(x, y) = 0}. The discriminant Σ is
a hypersurface in the space of coefficient vectors c = (𝑐 𝑖,a ). It comprises all c such that Ω
has a singular point. Therefore, the toric variety 𝑋 is dual to the discriminant Σ. Points u in
the common ambient space of 𝑋 and Σ are identified with polynomial systems (9.13) that
have concrete numerical coefficients. The distance from such a system to the discriminant
Σ can be computed as described in (9.16). We summarize our discussion as follows:

Theorem 9.26 The Euclidean distance from a polynomial system u to the discriminant Σ
equals the smallest norm ||x|| among all points x in the toric variety 𝑋 that are critical for
the distance to u.

We emphasize again that the distance crucially depends on the norm that we choose.
This was Bombieri–Weyl in Theorem 9.19. The points on 𝑋 that are critical for the distance
to u are best computed with the monomial parametrization. For 𝑛 = 1, we saw this in (9.17).

Example 9.27 (Hyperdeterminant) Fix 𝑛 = 2 and A1 = A2 = {(0, 0), (0, 1), (1, 0), (1, 1)}.
The Cayley configuration is the 3-cube, and 𝑋 is a 4-dimensional affine toric variety in C8 ,
9.4 Distance to the Discriminant 121

namely the cone over the Segre variety P1 ×P1 ×P1 ⊂ P7 . The points c in C8 correspond to
pairs of bilinear equations in two unknowns:

𝑐 11 + 𝑐 12 𝑡 1 + 𝑐 13 𝑡2 + 𝑐 14 𝑡1 𝑡2 = 𝑐 21 + 𝑐 22 𝑡1 + 𝑐 23 𝑡2 + 𝑐 24 𝑡 1 𝑡 2 = 0. (9.18)

For generic c, this polynomial system has 2 solutions, and the two solutions coincide when
the discriminant Δ vanishes. The discriminant for (A1 , A2 ) is the 2×2×2 hyperdeterminant
computed in Example 3.16:

Δ = 𝑐211 𝑐224 + 𝑐212 𝑐223 + 𝑐213 𝑐222 + 𝑐214 𝑐221 + 4𝑐 11 𝑐 14 𝑐 22 𝑐 23 + 4𝑐 12 𝑐 13 𝑐 21 𝑐 24 − 2𝑐 11 𝑐 12 𝑐 23 𝑐 24


−2𝑐 11 𝑐 13 𝑐 22 𝑐 24 − 2𝑐 11 𝑐 14 𝑐 21 𝑐 24 − 2𝑐 12 𝑐 13 𝑐 22 𝑐 23 − 2𝑐 12 𝑐 14 𝑐 21 𝑐 23 − 2𝑐 13 𝑐 14 𝑐 21 𝑐 22 .

Given any polynomial system u of the form (9.18), we seek its squared distance to the
hyperdeterminantal hypersurface Σ = {Δ = 0} in R8 . This number is the optimal value of:
Í2
minimize 𝑖=1 𝑦 2𝑖 (1 + 𝑡 12 + 𝑡 22 + 𝑡12 𝑡22 ) over all critical points of the function
Í2
(𝑢 𝑖1 − 𝑦 𝑖 ) 2 + (𝑢 𝑖2 − 𝑦 𝑖 𝑡1 ) 2 + (𝑢 𝑖3 − 𝑦 𝑖 𝑡2 ) 2 + (𝑢 𝑖4 − 𝑦 𝑖 𝑡1 𝑡2 ) 2 .

(𝑦 1 , 𝑦 2 , 𝑡1 , 𝑡2 ) ↦→ 𝑖=1

This objective function has 6 critical points over C. The ED degree is 6, by [60, Exam-
ple 8.2]. The ED degree jumps to 34 if the Euclidean norm is replaced by any nearby generic
quadratic form. Indeed, the generic ED degree of the hyperdeterminant Δ equals 34. This
can be seen by summing the polar degrees in the column labeled 𝑘 = 3 in Table 5.2. ⋄

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International
License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and
reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter’s Creative Commons
license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s
Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the
permitted use, you will need to obtain permission directly from the copyright holder.
Chapter 10
Machine Learning

One of the principal goals of machine learning is to learn in an automated way functions
that represent the relationship between data points. Suppose we are given the data set
D = {(x1 , y1 ), . . . , (x𝑑 , y𝑑 )} ⊂ R𝑛 × R𝑚 . The vectors x𝑖 are the input data. The vectors y𝑖
are the output data. For instance, in image classification, the x𝑖 might encode images of
certain objects and the y𝑖 are the respective classifiers. Another popular example from
generative AI is the scenario where x𝑖 and y𝑖 encode word tokens that co-occur in text data.
The goal is to find a function 𝑓 : R𝑛 → R𝑚 such that 𝑓 (x𝑖 ) ≈ y𝑖 . The meaning of ≈ rests
on a loss function 𝑙 (y′, y). We seek to minimize the mean loss ℓ D ( 𝑓 ) := 𝑑1 𝑖=1
Í𝑑
𝑙 ( 𝑓 (x𝑖 ), y𝑖 )
over a class of functions 𝑓 . Often, the loss function comes from a metric. For instance, the
squared-error loss is the squared Euclidean distance 𝑙 (y′, y) = ∥y′ −y∥ 2 in output space R𝑚 ,
but also the Wasserstein distance from Chapter 5 and Kullback–Leibler divergence from
Chapter 11 are used. One usually restricts to a model, consisting of functions that are
specified by 𝑁 real parameters 𝜃 = (𝜃 1 , . . . , 𝜃 𝑁 ) ∈ R 𝑁 . To learn a function means to
compute 𝜃 that minimizes the loss for the data D.
Problems of the type described above fall under the header supervised learning. Here,
every input data point x𝑖 has an associated output y𝑖 , also called label, and the goal is to
find a relationship between them. By contrast, in unsupervised learning, we are given data
points D = {x1 , . . . , x𝑑 } ⊂ R𝑛 without labels. The goal in unsupervised learning is to
describe the data with as few parameters as possible. For instance, assuming the variety
hypothesis, our goal could be to learn a variety 𝑋 ⊂ R𝑛 that represents the data D. Here, the
parameters define the polynomials that cut out 𝑋. We discuss this approach in Section 10.3.
The next sections offer a glimpse of machine learning from a geometry perspective. For a
systematic introduction, we refer to the book Mathematical Aspects of Deep Learning [75].

10.1 Neural Networks

The model we focus on is the (feedforward) neural network. Such a network is a composition

𝑓 := 𝑓 𝐿, 𝜃 ◦ · · · ◦ 𝑓2, 𝜃 ◦ 𝑓1, 𝜃 .

© The Author(s) 2024 123


P. Breiding et al., Metric Algebraic Geometry, Oberwolfach Seminars 53,
https://doi.org/10.1007/978-3-031-51462-3_10
124 10 Machine Learning

Here, 𝑓𝑖, 𝜃 is a function that depends on a parameter 𝜃. The function 𝑓 is called the end-
to-end function. We call 𝐿 the number of layers. The dimension of the domain of 𝑓𝑖, 𝜃 is
the width of the 𝑖-th layer. The number of layers, their widths, and the type of each layer
function 𝑓𝑖, 𝜃 constitute the network’s architecture. The variables of the 𝑖-th layer 𝑓𝑖, 𝜃 are
neurons or nodes. A neural network is often visualized by a graph as in Figure 10.1.

x1

y1

x2

y2

x3

y3

x4

Fig. 10.1: A fully connected neural network with two layers 𝑓1, 𝜃 : R4 → R2 and 𝑓2, 𝜃 : R2 → R3 .

We say that the network is fully connected if, for every index 𝑖 = 1, . . . , 𝐿, every
component of the 𝑖-th layer 𝑓𝑖, 𝜃 depends on every variable/neuron/node. Figure 10.1 shows
a fully connected network. On the other hand, Figure 10.2 shows a network that is not fully
connected. Some of the edges are missing.

x1

y1

x2

y2

x3

y3

x4

Fig. 10.2: A neural network with two layers that is not fully connected.

Most commonly, the layer functions are compositions of an affine linear map 𝛼𝑖, 𝜃 with
a (typically nonlinear) map 𝜎𝑖 : R → R that is applied componentwise:

𝑓𝑖, 𝜃 = (𝜎𝑖 , . . . , 𝜎𝑖 ) ◦ 𝛼𝑖, 𝜃 . (10.1)


10.1 Neural Networks 125

The map 𝜎𝑖 is called the activation function. One example of an activation function is
the Rectified Linear Unit (ReLU), which is 𝜎(𝑧) = max{0, 𝑧}. Methods from (metric or
tropical) algebraic geometry can be used to study neural networks when the activation
function has an algebraic structure (identity, polynomial, ReLU, etc.).
Here, we consider the simplest case where the activation function is the identity. The
theoretical study of neural networks is much more challenging if that function is nonlinear.
For instance, the end-to-end function of a ReLU neural network (i.e., all activation functions
are ReLU) is piecewise linear. In fact, every piecewise linear function with finitely many
pieces arises from a fully connected ReLU network [8]. ReLU end-to-end functions can
be interpreted as tropical rational functions [180]. That perspective was further developed
in [134] to provide sharp bounds on the number of linear regions of the end-to-end functions.
Another geometric perspective on ReLU networks is described in [74]. A first algebro-
geometric study for networks with polynomial activation functions appears in [105].
The term expressivity refers to which functions neural networks with fixed architecture
can express. Thus, expressivity is the study of the space M of all functions that are given
by our network. This function space M is often called the neuromanifold of the neural
network architecture. Note that M is typically not a smooth manifold. The neuromanifold
is the image of the network’s parametrization map

𝜇 : R 𝑁 → M, 𝜃 ↦→ 𝑓 𝐿, 𝜃 ◦ · · · ◦ 𝑓2, 𝜃 ◦ 𝑓1, 𝜃 . (10.2)

The loss function ℓ D is defined on M. We can pull it back to the parameter space via 𝜇,
i.e. we consider the composition
𝜇 ℓD
L : R 𝑁 −→ M −→ R. (10.3)

Instead of minimizing the loss function ℓ D over the neuromanifold M, training a neural
network means minimizing L over the parameter space R 𝑁 of the neuromanifold.

Remark 10.1 The numerical uncertainty in minimizing the loss depends on the condition
number of the function L. Following Chapter 9, it would be interesting to compare the
condition numbers of L and ℓ D and how they are related to the network’s architecture.
There is lots of room for metric algebraic geometry to contribute.

One of the big mysteries in machine learning theory is why training neural networks
results in “nice” minima. The concrete meaning of the adjective nice varies in the literature.
See [130] for an algebro-geometric perspective on “flat” minima. Training a neural network
minimizes the loss function L = ℓ D ◦ 𝜇 in (10.3) on the parameter space R 𝑁 . The mean-
ingful critical points are those that come from critical points of ℓ D on the neuromanifold
M. Formally, such pure critical points 𝜃 of L satisfy that 𝜇(𝜃) is a critical point of the
functional ℓ D restricted to the smooth locus of M. The network parametrization map 𝜇
can induce additional spurious critical points of the function L.
The following two questions play a central role in the study of learning problems:
1. How does the network architecture affect the geometry of the neuromanifold M?
2. How does the geometry of the neuromanifold impact the training of the network?
126 10 Machine Learning

We shall discuss these questions for two specific network architectures. In the remainder
of this section, we start with the simplest class, namely networks that are linear and fully
connected. Thereafter, in Section 10.2, we turn to linear convolutional networks. This will
lead us to interesting algebraic varieties.
In a linear fully connected neural network, the activation function 𝜎𝑖 in layer 𝑖 is
the identity and the layer functions 𝑓𝑖, 𝜃 are arbitrary linear maps, for 𝑖 = 1, . . . , 𝐿. The
parameters 𝜃 are the entries of the matrices representing the linear layer functions. The
network parametrization map (10.2) specializes to

𝜇 : R 𝑘1 ×𝑘0 × R 𝑘2 ×𝑘1 × · · · × R 𝑘𝐿 ×𝑘𝐿−1 → R 𝑘𝐿 ×𝑘0 ,


(10.4)
(𝑊1 , 𝑊2 , . . . , 𝑊 𝐿 ) ↦→ 𝑊 𝐿 · · · 𝑊2𝑊1 .

Let us first discuss the expressivity of this model. The image of the parametrization map 𝜇
consists of all matrices with rank at most min(𝑘 0 , 𝑘 1 , . . . , 𝑘 𝐿 ). Hence, the neuromanifold

M = {𝑊 ∈ R 𝑘𝐿 ×𝑘0 | rank(𝑊) ≤ min(𝑘 0 , 𝑘 1 , . . . , 𝑘 𝐿 )}

is a determinantal variety. If the input or output dimension is one of the minimal widths, then
M is equal to the whole ambient space. Equivalently, in symbols, if min(𝑘 0 , 𝑘 1 , . . . , 𝑘 𝐿 ) =
min(𝑘 0 , 𝑘 𝐿 ), then M = R 𝑘𝐿 ×𝑘0 . Otherwise, M is a lower-dimensional Zariski closed subset.
The singular locus of M is the variety of matrices of rank at most min(𝑘 0 , 𝑘 1 , . . . , 𝑘 𝐿 ) − 1,
and therefore, it is the neuromanifold for a smaller network architecture.
Next, we turn to questions about optimization. Theoretical studies on the optimization
problem of training neural networks can be roughly grouped into static and dynamic studies.
Static investigations concern the loss landscape [124] and the critical points of (10.3), while
dynamic studies focus on a training algorithm, e.g., by investigating its convergence.
We first discuss static properties. For linear fully connected networks, the pure and
spurious critical points were characterized in [33]. The critical points 𝜃 of L such that 𝜇(𝜃)
has maximal rank are pure [33, Proposition 6]. All spurious critical points 𝜃 correspond to
lower-rank matrices 𝜇(𝜃). These are essentially always saddles [33, Proposition 9]. If ℓ D is
smooth and convex, then all non-global local minima of L (often called “bad” minima) are
pure critical points. It is a common, but false, belief that linear fully connected networks
do not have bad minima. Our next result follows from [33, Proposition 10]:
Theorem 10.2 Consider a linear fully connected network and a smooth and convex func-
tion ℓ D . The function L = ℓ D ◦ 𝜇 has non-global local minima if and only if ℓ D | Reg( M)
has non-global local minima.
This result immediately implies that linear fully connected networks in two special
settings do not have bad minima. First, if M equals the ambient space (i.e., the input or
output dimension of the network is its minimal width), then any convex function ℓ D has
exactly one minimum on M, and so L does not have any bad minima. This is the main
result from [119]. The second setting concerns the squared-error loss
𝑑
1 ∑︁
ℓ D : R 𝑘𝐿 ×𝑘0 → R, 𝑊 ↦→ ∥𝑊x𝑖 − y𝑖 ∥ 2 , (10.5)
𝑑 𝑖=1
10.1 Neural Networks 127

for the training data D = {(x1 , y1 ), . . . , (x𝑑 , y𝑑 )} ⊂ R 𝑘0 × R 𝑘𝐿 . Writing 𝑋 ∈ R 𝑘0 ×𝑑 and


𝑌 ∈ R 𝑘𝐿 ×𝑑 for the data matrices whose columns are 𝑥𝑖 and 𝑦 𝑗 , the squared-error loss
becomes the squared Frobenius norm
1
ℓ D (𝑊) = ∥𝑊 𝑋 − 𝑌 ∥ 2 . (10.6)
𝑑
1
If 𝑋 𝑋 ⊤ has full rank, then we record the data in the matrix 𝑈 = 𝑌 𝑋 ⊤ ((𝑋 𝑋 ⊤ ) 2 ) −1 .
Minimizing (10.6) is equivalent to minimizing the squared Euclidean distance ∥𝑊 − 𝑈 ∥ 2
over all 𝑊 ∈ Reg(M); see [33, Section 3.3]. According to the Eckart–Young Theorem, this
optimization problem has a unique local and global minimum, provided the singular values
of 𝑈 are distinct and positive. Hence, given many generic data pairs (x𝑖 , y𝑖 ), the squared-
error loss ℓ D has no non-global minima on Reg(M). Theorem 10.2 now implies that the
squared-error loss L on the parameter space has no bad minima. This is a prominent result
in machine learning, often attributed to [11] or [103]. However, the two settings where
either M is a vector space or we consider the squared-error loss are rather special. Non-
global local minima are expected for other loss functions and architectures where M is a
proper determinantal variety; see [33, Example 13].
Now, we turn to dynamical properties. Optimization algorithms used in the training of
neural networks are variations of gradient descent. After picking initial parameters 𝜃, gra-
dient descent adapts the parameters successively with the goal of minimizing the loss L (𝜃).
When training linear fully connected networks with the squared-error loss, where the data
matrix 𝑋 𝑋 ⊤ has full rank, gradient descent converges for almost all initializations (under
reasonable assumptions on its step sizes) to a critical point 𝜃 of the loss L [136, Theo-
rem 2.4]. Moreover, the matrix 𝜇(𝜃) ∈ M is a global minimum of ℓ𝐷 restricted to the
smooth manifold of all matrices of the same format and rank [136, Theorem 2.6]. The
authors of [136] conjecture that the matrix 𝜇(𝜃) has maximal possible rank, so it is a
smooth point on the determinantal variety M.
An essential ingredient in the convergence analysis of [136] are the algebraic invariants
of gradient flow. The curve in parameter space traced by gradient flow is typically tran-
scendental, but it does satisfy some algebraic relations. In other words, its Zariski closure
is not the whole ambient parameter space.

Proposition 10.3 ([9]) Consider a linear fully connected network with parametrization
(10.4). Let 𝜃 (𝑡) = (𝑊1 (𝑡), 𝑊2 (𝑡), . . . , 𝑊 𝐿 (𝑡)) be the curve traced out by gradient flow,
starting at 𝑡 = 0. Then, the 𝐿 − 1 matrices

𝑊𝑖⊤ (𝑡) 𝑊𝑖 (𝑡) − 𝑊𝑖−1 (𝑡) 𝑊𝑖−1



(𝑡), where 𝑖 = 2, 3, . . . , 𝐿,

remain constant for all times 𝑡 ≥ 0.

We discuss some practical consequences of this result. One calls a parameter tuple
𝜃 = (𝑊1 , . . . , 𝑊 𝐿 ) balanced if 𝑊𝑖⊤𝑊𝑖 = 𝑊𝑖−1𝑊𝑖−1 ⊤ for 𝑖 ∈ {2, . . . , 𝐿}. Note that all

matrices in a balanced tuple have the same Frobenius norm: ∥𝑊1 ∥ = ∥𝑊2 ∥ = · · · = ∥𝑊 𝐿 ∥.
If a linear network is initialized at a balanced tuple 𝜃 (0), then every tuple 𝜃 (𝑡) along the
gradient flow curve is balanced, by Proposition 10.3. Since all matrices in 𝜃 (𝑡) have the
128 10 Machine Learning

same Frobenius norm, it cannot happen that one matrix converges to zero while another
matrix has entries that diverge to infinity. In fact, if one matrix converges to zero, then
so does the whole tuple 𝜃 (𝑡). Algebraic invariants of gradient flow were also studied
in [108, Proposition 5.13] for linear convolutional networks (cf. Section 10.2). For ReLU
networks and other networks, see [177, Lemma 3] and [62, Theorems 2.1–2.2].

Remark 10.4 (Nonlinear Autoencoders) Invariants also play a crucial role in the study of
attractors of autoencoders. An autoencoder is a composition of two neural networks: an
encoder and a decoder network, such that the input dimension of the encoder equals the
output dimension of the decoder. Given training data x1 , . . . , x𝑑 , the composed network is
typically trained by minimizing the autoencoding loss
𝑑
∑︁
𝑓 ↦→ ∥ 𝑓 (x𝑖 ) − x𝑖 ∥ 2 .
𝑖=1

Note that x𝑖 serves both as input and as output data. It is shown in [150] that an
autoencoder trained with gradient descent on a single training example x (i.e., 𝑑 = 1)
memorizes x as an attractor (under suitable assumptions on the activation function and
initialization).
 Namely, x is a fixed point of the learned function 𝑓 such that the sequence
𝑓 𝑖 (y) 𝑖 ∈N converges to x for any y in an open neighborhood of x.

10.2 Convolutional Networks

A linear neural network parametrizes matrices that admit the structured product decom-
position (10.4). When each layer is a one-dimensional convolution, the matrices 𝑊𝑖 are
generalized Toeplitz matrices. An example of such a matrix is
𝑤0 𝑤1 𝑤2 0 0 0 0 
 
 0 0 𝑤0 𝑤1 𝑤2 0 0  . (10.7)
 
 0 0 0 0 𝑤0 𝑤1 𝑤2 
 
A convolution on one-dimensional signals is a linear map that depends on a filter
w = (𝑤0 , . . . , 𝑤 𝑘−1 ) ∈ R 𝑘 and a stride 𝑠 ∈ N. It computes the inner product of the filter w
with parts of a given input vector x, and traverses the whole vector x by moving w through
it with stride 𝑠. The formula for this linear map is
𝑚−1
𝑘−1
𝑠 (𝑚−1)+𝑘 𝑚 © ∑︁
→ R , x ↦→ ­ 𝑤 𝑗 · x𝑖𝑠+ 𝑗 ® (10.8)
ª
R .
« 𝑗=0 ¬𝑖=0
For instance, for 𝑚 = 3, the convolution in (10.7) has filter size 𝑘 = 3 and stride 𝑠 = 2.
A linear convolutional neural network is the composition of 𝐿 convolutions with filter
sizes k = (𝑘 1 , 𝑘 2 , . . . , 𝑘 𝐿 ) and strides s = (𝑠1 , 𝑠2 , . . . , 𝑠 𝐿 ). All activation functions in this
network are the identity. The resulting end-to-end function is also a convolution with filter
10.2 Convolutional Networks 129
Í𝐿 Î𝑙−1
size 𝑘 = 𝑘 1 + 𝑙=2 (𝑘 𝑙 − 1) 𝑖=1 𝑠𝑖 and stride 𝑠 = 𝑠1 𝑠2 · · · 𝑠 𝐿 . This was shown in [108,
Proposition 2.2]; see also [109, Section 2]. The point is this: any product of generalized
Toeplitz matrices like (10.7) is again a generalized Toeplitz matrix. The parametrization
(10.4) sends the filters of each layer to the filter of the end-to-end convolution:

𝜇 : R 𝑘1 × R 𝑘2 × · · · × R 𝑘 𝐿 → R 𝑘 . (10.9)

The map 𝜇 can be evaluated via polynomial multiplication. This is done as follows. For
any positive integers 𝑘 and 𝑡, we write R[𝑥 𝑡 ] ≤𝑘−1 for the space of univariate polynomials
of degree at most 𝑘 − 1. The variable in these polynomials is the power 𝑥 𝑡 . We identify any
filter of size 𝑘 with the coefficient vector of such a polynomial via

𝜋𝑡 ,𝑘 : R 𝑘 → R[𝑥 𝑡 ] ≤𝑘−1 , w ↦→ 𝑤0 𝑥 𝑡 (𝑘−1) + 𝑤1 𝑥 𝑡 (𝑘−2) + · · · + 𝑤 𝑘−2 𝑥 𝑡 + 𝑤 𝑘−1 .

The filter w of the end-to-end convolution corresponds to the polynomial 𝜋1,𝑘 (w) that
admits a sparse factorization into polynomials corresponding to the filters w1 , w2 , . . . , w 𝐿 :

𝜋1,𝑘 (𝜇(w1 , . . . , w 𝐿 )) = 𝜋𝑡𝐿 ,𝑘𝐿 (w 𝐿 ) · · · 𝜋𝑡2 ,𝑘2 (w2 ) · 𝜋𝑡1 ,𝑘1 (w1 ), 𝑡𝑙 := 𝑠1 𝑠2 · · · 𝑠𝑙−1 .

The powers t = (𝑡 1 , . . . , 𝑡 𝐿 ) of the factors in the above formula uniquely encode the
strides s = (𝑠1 , . . . , 𝑠 𝐿−1 ) of the convolutions. The last stride 𝑠 𝐿 does not influence the
filter 𝜇(w1 , . . . , w 𝐿 ) of the end-to-end convolution. We summarize our discussion in the
following result, which is found in [109, Proposition 2.2].
Proposition 10.5 The neuromanifold Mk,t for a linear convolutional neural network with
filter sizes k = (𝑘 1 , 𝑘 2 , . . . , 𝑘 𝐿 ) and powers t = (𝑡 1 , 𝑡2 , . . . , 𝑡 𝐿 ) is parametrized by polyno-
mial multiplication, namely

𝜇 : R[𝑥 𝑡1 ] ≤𝑘1 −1 × R[𝑥 𝑡2 ] ≤𝑘2 −1 × · · · × R[𝑥 𝑡𝐿 ] ≤𝑘𝐿 −1 → R[𝑥] ≤𝑘−1 ,


(10.10)
( 𝑝 1 , 𝑝 2 , . . . , 𝑝 𝐿 ) ↦→ 𝑝 1 𝑝 2 · · · 𝑝 𝐿 .

Example 10.6 (𝐿 = 2, t = (1, 2)) For k = (3, 2) and k = (2, 3), the matrix products are
 
  𝑢0 𝑢1 𝑢2 0 0  
𝑣0 𝑣1 = 𝑢 0 𝑣0 𝑢 1 𝑣0 𝑢 0 𝑣1 + 𝑢 2 𝑣0 𝑢 1 𝑣1 𝑢 2 𝑣1 ,
0 0 𝑢0 𝑢1 𝑢2

 𝑢 0 𝑢 1 0 0 0 0 
 
  
𝑣0 𝑣1 𝑣2  0 0 𝑢 0 𝑢 1 0 0  = 𝑢 0 𝑣0 𝑢 1 𝑣0 𝑢 0 𝑣1 𝑢 1 𝑣1 𝑢 0 𝑣2 𝑢 1 𝑣2 .
 
 0 0 0 0 𝑢0 𝑢1 
 
These correspond to multiplying pairs of polynomials, as specified by Proposition 10.5:

(𝑢 0 𝑥 2 + 𝑢 1 𝑥 + 𝑢 2 ) (𝑣0 𝑥 2 + 𝑣1 ) and (𝑢 0 𝑥 + 𝑢 1 ) (𝑣0 𝑥 4 + 𝑣1 𝑥 2 + 𝑣2 ). (10.11)

The neuromanifold Mk,t consists of polynomials that admit such a factorization. ⋄


For linear convolutional networks, the powers t = (𝑡1 , 𝑡2 , . . . , 𝑡 𝐿 ) satisfy that 𝑡 1 = 1
and 𝑡𝑙−1 divides 𝑡𝑙 for each 𝑙 = 2, . . . , 𝐿. From the algebraic perspective, it is interesting
130 10 Machine Learning

to study the polynomial multiplication map (10.10) for arbitrary positive integers 𝑡𝑙 . Its
Í𝐿
image Mk,t lives in the vector space R[𝑥] ≤𝑘−1 ≃ R 𝑘 , where 𝑘 − 1 = 𝑙=1 𝑡𝑙 (𝑘 𝑙 − 1). By
Tarski’s Theorem on Quantifier Elimination, Mk,t is a semialgebraic set, i.e., it can be
described by a Boolean combination of polynomial inequalities.
As is customary in applied algebraic geometry, we simplify our problem by replacing
Mk,t with its Zariski closure Vk,t in the complex projective space P 𝑘−1 . Thus, by definition,
the variety Vk,t is the image of the map

P 𝑘1 −1 × P 𝑘2 −1 × · · · × P 𝑘𝐿 −1 → P 𝑘−1 , ( 𝑝 1 , 𝑝 2 , . . . , 𝑝 𝐿 ) ↦→ 𝑝 1 𝑝 2 · · · 𝑝 𝐿 . (10.12)

Proposition 10.7 The map in (10.12) has no base points, so it is a morphism. Moreover,
the map (10.12) is finite-to-one. If the integers 𝑡1 , 𝑡2 , . . . , 𝑡 𝐿 are pairwise distinct, then the
map is generically one-to-one.

Proof A product of polynomials can only be zero if one of its factors is zero. Hence,
the projective multiplication map (10.12) is well-defined at all points in its domain. The
map is finite-to-one because the irreducible factorization of a polynomial is unique, up
to reordering the factors. If all factors have distinct powers, then the factors of a generic
polynomial cannot be swapped, and the map is generically one-to-one. □

Corollary 10.8 The variety Vk,t has dimension 𝑘 1 + 𝑘 2 + · · · + 𝑘 𝐿 − 𝐿, and its degree is

(𝑘 1 +𝑘 2 + · · · +𝑘 𝐿 − 𝐿)!
divided by the size of the general fiber of (10.12).
(𝑘 1 − 1)! (𝑘 2 − 1)! · · · (𝑘 𝐿 − 1)!

Proof We consider the variety P 𝑘1 −1 × P 𝑘2 −1 × · · · × P 𝑘𝐿 −1 in its Segre embedding (see


Definition 12.4). The map (10.12) is the composition of this Segre embedding followed
by a linear projection. That projection has no base points by Proposition 10.7 and thus
preserves dimension. Moreover, the linear projection is finite-to-one and of the same
degree 𝛿 as (10.12). Hence, the degree of its image Vk,t is the degree of the Segre
variety P 𝑘1 −1 × · · · × P 𝑘𝐿 −1 divided by 𝛿. The degree of the Segre variety is computed in
Corollary 12.21 below. It is the multinomial coefficient in the stated formula. □

Example 10.9 If k = (2, 2, . . . , 2) and t = (1, 1, . . . , 1), we simply multiply linear polyno-
mials. Here 𝑘 − 1 = 𝐿. The map (10.12) is onto, by the Fundamental Theorem of Algebra,
and hence Vk,t = P 𝐿 . The fiber has cardinality 𝐿! since the linear factors can be reordered
arbitrarily. The multinomial coefficient in Corollary 10.8 is also 𝐿!, so the degree of the
image is 1. The neuromanifold Mk,t is Zariski dense in R[𝑥] ≤𝐿 . It consists of all real-rooted
polynomials of degree ≤ 𝐿, so it is an interesting semialgebraic set. ⋄

The size of the general fiber in Corollary 10.8 can be read off from the filter sizes k and
the powers t, namely, it is the order of the symmetry group of the factorization (10.10).
Such a symmetry arises whenever 𝑡 𝑖 = 𝑡 𝑗 for 𝑖 ≠ 𝑗. In this case, we can merge the factors
R[𝑥 𝑡𝑖 ] ≤𝑘𝑖 −1 and R[𝑥 𝑡 𝑗 ] ≤𝑘 𝑗 −1 into a single factor R[𝑥 𝑡𝑖 ] ≤𝑘𝑖 +𝑘 𝑗 −2 without changing the image
variety Vk,t . Therefore, for computing the degree or other properties of Vk,t , we can always
assume that t has distinct coordinates. For example, suppose that 𝐿 = 6, k = (5, 4, 3, 7, 6, 3)
and t = (1, 5, 5, 5, 3, 3). Then Vk,t ⊂ P80 has dimension 22 = 6𝑖=1 (𝑘 𝑖 − 1). After merging
Í
10.2 Convolutional Networks 131

as described above, our new parameter vectors are k = (5, 12, 8) and t = (1, 5, 3). Using
Proposition 10.7, we now see that the degree of Vk,t equals 4! 22! 11! 7! = 232792560.
Equipped with Corollary 10.8, we explore the prime ideal of Vk,t in some small cases.
Í 𝑘−1
This ideal lives in the polynomial ring Q[𝑐 0 , 𝑐 1 , . . . , 𝑐 𝑘−1 ] where 𝑝(𝑥) = 𝑖=0 𝑐 𝑖 𝑥 𝑖 is in the
codomain of (10.10). We start with Example 10.6. The two varieties are cubic threefolds,
in P4 resp. P5 . Their prime ideals are

⟨ 𝑐 0 𝑐23 + 𝑐21 𝑐 4 − 𝑐 1 𝑐 2 𝑐 3 ⟩ and ⟨ 𝑐 0 𝑐 3 − 𝑐 1 𝑐 2 , 𝑐 0 𝑐 5 − 𝑐 1 𝑐 4 , 𝑐 2 𝑐 5 − 𝑐 3 𝑐 4 ⟩. (10.13)

The second ideal shows that V(2,3) , (1,2) = P1 × P2 ⊂ P5 . The first ideal defines the variety
V(3,2), (1,2) , which is a projection of that Segre threefold from P5 into P4 .

Example 10.10 (𝐿=3, t = (1, 2, 2)) We extend the polynomials from (10.11) by multiplying
them with a sparse quadratic factor:

𝑝(𝑥) = (𝑢 2 + 𝑢 1 𝑥 + 𝑢 0 𝑥 2 ) (𝑣1 + 𝑣0 𝑥 2 ) (𝑤1 + 𝑤0 𝑥 2 ) for k = (3, 2, 2),


and 𝑝(𝑥) = (𝑢 1 + 𝑢 0 𝑥) (𝑣2 + 𝑣1 𝑥 2 + 𝑣0 𝑥 4 ) (𝑤1 + 𝑤0 𝑥 2 ) for k = (2, 3, 2).

The resulting varieties Vk,t live in P6 and P7 respectively. We can understand them by
examining the factors of 𝑝(𝑥) + 𝑝(−𝑥) and 𝑝(𝑥) − 𝑝(−𝑥). Both varieties are 4-dimensional
and they admit nice determinantal representations. The ideal of V(3,2,2), (1,2,2) is generated
by the four 3 × 3 minors of the 3 × 4 matrix
𝑐 0 𝑐 2 𝑐 4 𝑐 6 
 
𝑐 1 𝑐 3 𝑐 5 0  .
 
 0 𝑐1 𝑐3 𝑐5 
 
While the parametrization for k = (2, 3, 2) is not a monomial map, the variety V(2,3,2), (1,2,2)
is still toric. Its prime ideal is generated by the six 2 × 2 minors of the 2 × 4 matrix
 
𝑐0 𝑐2 𝑐4 𝑐6
.
𝑐1 𝑐3 𝑐5 𝑐7

We conclude that V(2,3,2), (1,2,2) is the Segre embedding of P1 × P3 into P7 . ⋄

These examples suggest that our varieties Vk,t are interesting objects for further study in
combinatorial commutative algebra. From the perspective of metric algebraic geometry, one
should pursue the concepts introduced in the previous chapters. One of these is Euclidean
distance optimization. Computations show that the two varieties in Example 10.6 have ED
degrees 10 and 2, while the varieties in Example 10.10 have ED degrees 23 and 2. Can we
find a general formula for the ED degree of Vk,t in terms of k and t?
We turn our attention to describing the singular locus of the variety Vk,t that represents
convolutional networks. As argued above, we can restrict ourselves to the case when the
powers t = (𝑡1 , . . . , 𝑡 𝐿 ) are pairwise distinct integers. The singular locus was determined
for those varieties Vk,t that come from linear convolutional networks (i.e., under the
assumption that 𝑡𝑙−1 |𝑡𝑙 ) in [109, Theorem 2.8]:
132 10 Machine Learning

Theorem 10.11 Let 1 = 𝑡 1 < 𝑡2 < . . . < 𝑡 𝐿 be integers such that 𝑡𝑙−1 |𝑡𝑙 for all 𝑙 = 2, . . . , 𝐿.
The singular locus of Vk,t consists of all its proper subvarieties Vk′ ,t .

This result says that the neuromanifold is singular along smaller neuromanifolds of
convolutional networks with the same strides. Hence, as in the case of linear fully connected
networks, discussed in Section 10.1, the singular locus of the neuromanifold is parametrized
by smaller network architectures.
In the remainder of this section, we discuss critical points of training linear convolutional
networks. For that, we have to return to the semialgebraic neuromanifold Mk,t . This
set is closed in the Euclidean topology. Describing its Euclidean relative boundary is a
challenging problem, studied in [109, Section 6].
When all strides are one (i.e., t = (1, . . . , 1)), the neuromanifold Mk,t is a full-
dimensional semialgebraic subset of the ambient space R 𝑘 . Here, critical points of the
loss function often correspond to points on the Euclidean boundary of Mk,t . These are
critical points of the network parametrization map 𝜇. This stands in sharp contrast to con-
volutional networks where all strides are larger than one (i.e, 𝑡 1 < 𝑡2 < . . .) and Mk,t is a
lower-dimensional subset of R 𝑘 . The following results from [109, Theorem 2.11].

Theorem 10.12 Consider the map 𝜇 in (10.10) with integers 1 = 𝑡 1 < 𝑡2 < . . . < 𝑡 𝐿 such
that 𝑡𝑙−1 |𝑡𝑙 for all 𝑙 = 2, . . . , 𝐿. Let 𝑑 ≥ 𝑘, and let ℓ D be the squared-error loss (10.5) for
the end-to-end convolution 𝑊. For almost all 𝑑-tuples D of training data, every critical
point 𝜃 of L = ℓ D ◦ 𝜇 satisfies:
(a) either 𝜇(𝜃) = 0, or
(b) 𝜃 is a regular point of 𝜇 and 𝜇(𝜃) lies in the smooth locus of Vk,t and the Euclidean
interior of Mk,t .

We summarize our discussion on the training of linear networks with the squared-error
loss. For fully connected networks as in Section 10.1, the neuromanifold M is a classical
determinantal variety. Its Euclidean relative boundary is empty. Nevertheless, spurious
critical points commonly appear; they correspond to singular points of M. For convolu-
tional networks of stride one, M is semialgebraic, Euclidean closed, and full-dimensional.
Here, the singular locus (of its Zariski closure) is empty, but often critical points are on its
Euclidean boundary and are thus critical points of 𝜇. Finally, for convolutional networks
with all strides larger than one, M is a semialgebraic, Euclidean closed, lower-dimensional
subset. Its Euclidean relative boundary and its singular locus are usually nontrivial. Never-
theless, these loci are not relevant for training the network when using a sufficient amount
of generic data: All critical points – except when a filter in one of the layers is zero – are
pure and correspond to interior smooth points of M.

Remark 10.13 In this section, we studied convolutions on one-dimensional signals (i.e.,


vectors). Many practical neural networks, notably in image processing, use convolutions
on two-dimensional signals. Higher-dimensional convolutions move a filter tensor through
an input tensor. The composition of such convolutions corresponds to the multiplication
of multivariate polynomials [108, Section 4.3].
10.3 Learning Varieties 133

10.3 Learning Varieties

Suppose that we are given 𝑑 data points D = {x1 , . . . , x𝑑 } ⊂ R𝑛 . We assume the variety
hypothesis. This means we assume that the points in D are (possibly noisy) samples from
a real algebraic variety 𝑋 ⊂ R𝑛 . The goal is to learn the variety 𝑋 from the data D. The
unknown variety 𝑋 is represented by the ideal 𝐼 (𝑋) of all polynomials that vanish on 𝑋.
Assuming 𝑋 to be irreducible, the ideal 𝐼 (𝑋) is prime. However, 𝐼 (𝑋) is unknown. All we
are given is the finite set D. In this section, we discuss strategies to learn an ideal 𝐼 D which
is meant to approximate 𝐼 (𝑋). Our discussion is an invitation to the article [26].
Remark 10.14 In some situations, one is interested in specific features of 𝑋, such as its
dimension or homology. In this case, learning the ideal means asking for more information
than what is actually needed. Other strategies can be more efficient: Theorem 15.2 in
Chapter 15 gives conditions under which one can recover the homology of 𝑋 from the
finite sample D by computing the C̆ech complex of a union of balls. For estimating the
dimension of 𝑋, see [26, Section 3] and the vast literature on data dimensionality.
We now focus on learning the approximate ideal 𝐼 D . First, we need to find an ap-
propriate loss function. One immediate option is to use the mean squared loss function
ℓ D ( 𝑓 ) = 𝑑1 𝑖=1 𝑓 (x𝑖 ) 2 . Next, we must define a threshold 𝜀 ≥ 0 so that we keep only those
Í𝑑
polynomials for which ℓ D ( 𝑓 ) ≤ 𝜀. Moreover, since 𝑓 ∈ 𝐼 (𝑋) if and only if 𝜆 · 𝑓 ∈ 𝐼 (𝑋)
for every 𝜆 ∈ R, we must work with some kind of normalization for 𝑓 . The next example
illustrates one approach to computing the approximate ideal 𝐼 D using linear algebra.
Example 10.15 Suppose 𝑛 = 2 and that we have 𝑑 = 3 data points D = {x, y, z} ⊂ R2 .
Given 𝜀 > 0 we want to compute polynomials 𝑓 ∈ R[𝑥1 , 𝑥2 ] of degree at most two that
(a) have mean squared loss at most 𝜀 ≥ 0, and
(b) satisfy the normalization
𝑓12 + · · · + 𝑓62 = 1,
where 𝑓 = 𝑓1 𝑥12 + 𝑓2 𝑥1 𝑥2 + 𝑓3 𝑥 22 + 𝑓4 𝑥 1 + 𝑓5 𝑥2 + 𝑓6 .
For this, we set up the bivariate Vandermonde matrix of degree ≤ 2 for our data points:
 𝑥 2 𝑥1 𝑥2 𝑥 2 𝑥1 𝑥2 1 
 1 2 
𝑀 D :=  𝑦 21 𝑦 1 𝑦 2 𝑦 22 𝑦 1 𝑦 2 1  ∈ R3×6 . (10.14)
 
 2
 𝑧 𝑧1 𝑧2 𝑧2 𝑧1 𝑧2 1 

 1 2 

The mean squared loss equals 𝑑1 𝑖=1 𝑓 (x𝑖 ) 2 = 𝑑1 ∥ 𝑀 D 𝑓 ∥ 2 . Suppose that 𝑓 ∈ R6 is a


Í𝑑

right-singular vector of 𝑀 D with singular value 𝜎. Then, ∥ 𝑀 D 𝑓 ∥ 2 = 𝜎 2 . This means one


can compute the singular value decomposition of 𝑀 D and keep those right singular vectors
of 𝑀 D whose squared singular values are at most 𝑑 · 𝜀. (Caveat: this does not yield all
polynomials with mean squared loss at most 𝜀). The polynomials corresponding to these
singular vectors generate an ideal, which is a candidate for 𝐼 D . ⋄
The approach from Example 10.15 can be generalized to any ambient dimension 𝑛 and
any number of points 𝑑. The matrix in (10.14) is called a multivariate Vandermonde matrix.
134 10 Machine Learning

In the general setting, it is a 𝑑 × 𝑚-matrix, where 𝑚 is the number of monomials we are


considering for our polynomials in 𝐼 D . In Example 10.15, all monomials of degree at most
two are used. In general, the choice of monomials is a hyperparameter for this approach.
This means that we have to specify the monomials before solving for 𝑓 .
In Example 10.15, we used the singular value decomposition for computing polynomials
that generate our ideal 𝐼 D . Two alternative methods are discussed in [26, Section 5],
namely the QR-decomposition and row-echelon, also for the Vandermonde matrix. All
three methods have their advantages and disadvantages.
In other situations, one might have prior knowledge on the polynomials that generate
𝐼 (𝑋). This might come from geometric considerations (as in [26, Section 2]). These might
suggest determinantal representations, or torus actions on 𝑋, which ensure that 𝐼 (𝑋)
is homogeneous with respect to some multigrading. This amounts to information about
sparsity. Sometimes, we have a priori bounds for the degrees of the generators of 𝐼 (𝑋).
The “variety of varieties” in [26, Section 2.2] suggests many options.
In order to search for sparse polynomials, we can utilize methods from compressed sens-
ing. This field is concerned with computing sparse solutions to underdetermined systems
of linear equations. Moreover, polynomials coming from specific applications often have
rational or integer coefficients, so one might seek polynomials that also have this property.
For this, finite field techniques can be very useful.
For the normalization of the polynomials in Example 10.15, we used the Euclidean
norm of the vector of coefficients. An alternative approach is to fix a monomial ordering
on R[𝑥1 , . . . , 𝑥 𝑛 ] (see Chapter 3), and then require the leading coefficient of every 𝑓 to
be 1. This leads to the following definition.

Definition 10.16 Let D = {x1 , . . . , x𝑑 } ⊂ R𝑛 be a finite sample of points and 𝜀 ≥ 0. The


𝜀-approximate vanishing ideal over D is
n 𝑑
∑︁ o
𝜀 1 2
𝐼D := 𝑓 | 𝑑 𝑓 (x𝑖 ) ≤ 𝜀 and the leading coefficient of 𝑓 is 1 .
𝑖=1

We always have the inclusion 𝐼 (𝑋) ⊆ 𝐼 D 𝜀 . In the limit, when the sample D consists
0
of all points in 𝑋 and 𝜀 = 0, we have 𝐼 𝑋 = 𝐼 (𝑋). However, it is not known under which
conditions the dimension of the variety of 𝐼 D 𝜀 is equal to the dimension of 𝑋, or how their

degrees are related (if at all). There is a vast literature on the approximate vanishing ideal
and how to compute it. We refer to [148] and the references therein.
Wirth and Pokutta [148] present a novel algorithm for computing the approximate
𝜀 , given any tolerance 𝜀 ≥ 0. In contrast to the approach from Exam-
vanishing ideal 𝐼 D
ple 10.15, for their algorithm, they do not have to specify monomials; i.e., monomials are
not hyperparameters. The algorithm of [148] returns sparse generators for the ideal 𝐼 D 𝜀.

Both approaches presented above use the mean squared loss that comes from evaluating
polynomials. A more geometric choice for the loss would be ℓ D = 𝑑1 𝑖=1 ∥x𝑖 − 𝑋 ∥ 2 , where
Í𝑑
∥x − 𝑋 ∥ is the Euclidean distance from x to 𝑋. This idea has not been worked out, neither
from a theoretical nor from an algorithmic perspective. This desirable aim underscores the
relevance of the ED problem (2.1) for machine learning.
10.3 Learning Varieties 135

Remark 10.17 In Chapter 15, we present methods for sampling points from algebraic
varieties given their equations. Thus, once we have learned equations, we can set up a
generative model that produces synthetic data. For instance, Figure 15.4 shows points that
have been generated near the Trott curve. For enlightening varieties in higher dimensions,
see [26, Section 2.2]. One data set D to start with is [26, Example 2.13].

We now shift gears. In the remainder of this section, we discuss how machine learning
can be helpful for theoretical research in algebraic geometry. Several articles have explored
this theme, and we shall offer a brief guide to this emerging literature. However, it is not
clear yet what type of information can be learned and which type of tasks can be solved by
training neural networks. Despite its massive success in classification tasks (e.g., “Is there
a cat in this picture?”), machine learning with neural networks has not improved explicitly
geometric tasks such as solving systems of polynomial equations. For instance, the problem
of reconstructing 3D scenes from images taken by unknown cameras (see Section 13.3)
amounts to solving certain polynomial systems. There have been numerous attempts to
solve that problem with machine learning methods. However, none of them have been as
successful as traditional symbolic techniques with Gröbner bases or resultants [158, 181].
The works that have used machine learning techniques to answer questions in algebraic
geometry come roughly in two flavors. On the one hand, machine learning has been used to
directly compute geometric properties, e.g. of Hilbert series [12], of irreducible represen-
tations [47], or numerical Calabi–Yau (Ricci flat Kähler) metrics [59]. Those approaches
trade off the reliability of the output with performance, and this can yield valuable insights
into problem instances that lie outside of the scope of traditional techniques.
Many algebro-geometric algorithms depend on a heuristic that has to be chosen by the
user and that might heavily influence their performance. For instance, to compute a Gröb-
ner basis, a monomial ordering has to be chosen. Machine learning has been successful at
predicting such a heuristic, which is then used to speed up the computation using traditional
algorithms. In that way, the performance can be enhanced without compromising the relia-
bility of the final output. This approach has been used to speed up Buchberger’s Algorithm
by learning S-pair selection strategies [144], and Cylindrical Algebraic Decomposition by
learning a variable ordering and by exploring Gröbner basis preconditioning [97].
In a similar spirit, the computation of periods of hypersurfaces is enhanced in [84].
The authors study pencils of hypersurfaces, and they use neural networks to predict the
complexity of the Gauss–Manin connection for the period matrix along the pencil. Based on
that prediction, they explore all smooth quartic surfaces in P3 whose polynomials are sums
of five monomials, and they guess when their periods are computable by Gauss–Manin.
This leads them to determine the periods of 96% of those surfaces.
Although neural networks have not shown great potential for solving systems of poly-
nomials, they can be trained to predict their number of real solutions [18, 27]. Such a
prediction might be used by homotopy methods that track real solutions only. This assumes
that one has pre-computed a starting system for each possible number of real solutions, and
– ideally – one for each chamber of the real discriminant.
That would yield a reliable numerical computation that requires less computation time
since it tracks fewer paths. A more drastic approach was taken in [95] where the authors
learn a single starting solution for a real homotopy that has a good chance of reaching a
136 10 Machine Learning

good solution of the desired target system. That way of computing produces a less reliable
solution, but since they propose their method as part of a random sample consensus
(RANSAC) scheme, bad solutions can be detected and disregarded. Since tracking a single
solution can be very fast, they can simply repeat their approach for each bad solution.

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International
License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and
reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter’s Creative Commons
license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s
Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the
permitted use, you will need to obtain permission directly from the copyright holder.
Chapter 11
Maximum Likelihood

In Chapter 2, we discussed the problem of minimizing the Euclidean distance from a data
point u to a model 𝑋 in R𝑛 that is described by polynomial equations. In Chapter 5, we
studied the analogous problem in the setting of algebraic statistics [167], where the model 𝑋
represents a family of probability distributions, and we used the Wasserstein metric to
measure the distance from u to 𝑋. Finally, in Chapter 9, we considered the distance from a
polynomial system u to the discriminant in the context of numerical analysis.
In this chapter, we return to statistical models, but we now replace the Wasserstein
distance with the Kullback–Leibler (KL) divergence. This will be defined in Section 11.1.
We show that minimizing KL divergence is equivalent to maximum likelihood estimation.
In Section 11.2, we introduce the maximum likelihood (ML) degree, which is an analogue
to the ED degree from Chapter 2. An interesting connection to physics is featured in
Section 11.3, and in Section 11.4, we study the ML degree for Gaussian models.

11.1 Kullback–Leibler Divergence

The two scenarios of most interest for statisticians are Gaussian models and discrete models.
We start with discrete models, where we take as the state space the finite set {0, 1, . . . , 𝑛}.
In Chapter 5, we have worked with the closed probability simplex Δ𝑛 . Here, we use the
open simplex of probability distributions, and we denote it by

Δ𝑜𝑛 := p = ( 𝑝 0 , 𝑝 1 , . . . , 𝑝 𝑛 ) ∈ R𝑛+1 | 𝑝 0 + 𝑝 1 + · · · + 𝑝 𝑛 = 1 and 𝑝 0 , 𝑝 1 , . . . , 𝑝 𝑛 > 0 .

Definition 11.1 The Kullback–Leibler (KL) divergence of two distributions q, p ∈ Δ𝑜𝑛 is


𝑛
∑︁
𝐷 KL ( q || p ) = 𝑞 𝑖 · log(𝑞 𝑖 /𝑝 𝑖 ). (11.1)
𝑖=0

© The Author(s) 2024 137


P. Breiding et al., Metric Algebraic Geometry, Oberwolfach Seminars 53,
https://doi.org/10.1007/978-3-031-51462-3_11
138 11 Maximum Likelihood

The KL divergence is not symmetric, i.e. 𝐷 KL ( q || p ) ≠ 𝐷 KL ( p || q ) holds in general.


Nevertheless, we interpret KL divergence as a kind of metric on the open simplex Δ𝑜𝑛 .
The definition of KL divergence has the following background. Fix a random variable 𝑍
Í𝑛{0, 1, . . . , 𝑛} with probability distribution q. In information theory, the quantity
on the set
𝐻 = − 𝑖=0 𝑞 𝑖 · log(𝑞 𝑖 ) is called the entropy of q. The information content of the event
𝑍 = 𝑖 equals log(1/𝑞 𝑖 ) = − log(𝑞 𝑖 ), so 𝐻 is the expected value of the information content.
We explain the motivation for this definition. The probability of 𝑖 and its information
content are inversely proportional: the more likely 𝑖, the smaller is its information content.
We anticipate events with high probability. Hence, we gain little information once we
observe such an event. On the other hand, if we observe an event of small probability, then
we should receive comparably more information. The entropy of q is the expected value
of the information content, and the KL divergence 𝐷 KL ( q || p ) is the expected loss of
information content, when we approximate q by p.
Lemma 11.2 The KL divergence is nonnegative. It is zero if and only if the two distributions
agree. In symbols, 𝐷 KL ( q || p ) ≥ 0 for all p, q ∈ Δ𝑜𝑛 , with equality if and only if p = q.
Proof We use the calculus fact that the function 𝑥 ↦→ (𝑥 − 1) − log(𝑥) is nonnegative
for 𝑥 ∈ R>0 . Its only zero occurs at 𝑥 = 1. The sum in (11.1) is bounded below as follows:
𝑛
∑︁ 𝑛
∑︁ 𝑛
∑︁ 𝑛
∑︁

𝐷 KL ( q || p ) = − 𝑞 𝑖 · log( 𝑝 𝑖 /𝑞 𝑖 ) ≥ − 𝑞 𝑖 · 𝑝 𝑖 /𝑞 𝑖 − 1 = 𝑞𝑖 − 𝑝 𝑖 = 0.
𝑖=0 𝑖=0 𝑖=0 𝑖=0

Moreover, equality holds if and only if 𝑝 𝑖 /𝑞 𝑖 = 1 for all indices 𝑖. □


Our statistical model is a subset 𝑋 of the probability simplex Δ𝑜𝑛 . That subset is defined
by homogeneous polynomial equations. As before, for venturing beyond linear algebra,
we identify 𝑋 with its Zariski closure in complex projective space P𝑛 . In this chapter,
we present the algebraic approach to maximum likelihood estimation for 𝑋. Our sources
include the articles [41, 63, 90, 100, 101, 167] and references therein.
Suppose we are given 𝑁 i.i.d. samples. This data is summarized in the data vector
u = (𝑢 0 , 𝑢 1 , . . . , 𝑢 𝑛 ), whose 𝑖th coordinate 𝑢 𝑖 is the number of samples that were in state 𝑖.
We assume that 𝑢 𝑖 > 0 for all 𝑖. The sample size is 𝑁 = |u| := 𝑢 0 + 𝑢 1 + · · · + 𝑢 𝑛 . The
associated log-likelihood function equals

ℓu : Δ𝑜𝑛 → R , p ↦→ 𝑢 0 · log( 𝑝 0 ) + 𝑢 1 · log( 𝑝 1 ) + · · · + 𝑢 𝑛 · log( 𝑝 𝑛 ).

Performing ML estimation for the model 𝑋 means solving the optimization problem:

Maximize ℓu (p) subject to p ∈ 𝑋. (11.2)

If we write q = 𝑁1 u for the empirical distribution in Δ𝑜𝑛 corresponding to u, then the


maximum likelihood estimation problem (11.2) is equivalent to:
1
Minimize 𝐷 KL ( q || p ) subject to p ∈ 𝑋, where q = 𝑁 u. (11.3)

This holds because the KL divergence can be written as the negative


Í𝑛 entropy of q minus the
log-likelihood function: 𝐷 KL ( q || p ) = − 𝐻 − 𝑁1 ℓu (p) = 𝑖=0 𝑞 𝑖 log(𝑞 𝑖 ) − 𝑁1 ℓu (p).
11.2 Maximum Likelihood Degree 139

Therefore, viewed through the lens of metric algebraic geometry, this problem amounts
to minimizing a certain distance, namely KL divergence, to the variety 𝑋. The objective
function in the optimization problem (11.2) involves logarithms and is not algebraic.
However, each of its partial derivatives is a rational function, and therefore we can study
this problem using algebraic geometry.

Example 11.3 The independence model for two binary random variables is a quadratic sur-
face 𝑋 in the tetrahedron Δ3𝑜 . We studied this model under the optimization of a Wasserstein
distance in Theorem 5.14. The model 𝑋 is described by the constraints
 
𝑝 𝑝
det 0 1 = 0 and 𝑝 0 + 𝑝 1 + 𝑝 2 + 𝑝 3 = 1 and 𝑝 0 , 𝑝 1 , 𝑝 2 , 𝑝 3 > 0. (11.4)
𝑝2 𝑝3

The data for this model takes the form of a 2 × 2 matrix


 
𝑢 𝑢
u= 0 1 .
𝑢2 𝑢3

The sample size of the data is |u| = 𝑢 0 +𝑢 1 +𝑢 2 +𝑢 3 .


Minimizing the KL divergence from u to the quadratic surface 𝑋 means solving the
optimization problem (11.3). This is equivalent to solving the constrained optimization
problem (11.2). To do this, we apply Lagrange multipliers to the constraints in (11.4),
bearing in mind that the gradient of the objective function ℓu (p) equals
⊤
∇ℓu (p) = 𝑢 0 /𝑝 0 , 𝑢 1 /𝑝 1 , 𝑢 2 /𝑝 2 , 𝑢 3 /𝑝 3 .

We solve the Lagrange multiplier equations, and we find that it has a unique solution p̂.
This unique critical point is the maximum likelihood estimate for the model 𝑋 given the
data u. Its coordinates are
𝑝ˆ0 = |u| −2 (𝑢 0 +𝑢 1 ) (𝑢 0 +𝑢 2 ), 𝑝ˆ1 = |u| −2 (𝑢 0 +𝑢 1 ) (𝑢 1 +𝑢 3 ),
(11.5)
𝑝ˆ2 = |u| −2 (𝑢 2 +𝑢 3 ) (𝑢 0 +𝑢 2 ), 𝑝ˆ3 = |u| −2 (𝑢 2 +𝑢 3 ) (𝑢 1 +𝑢 3 ).
1
In words, we multiply the row sums with the column sums of |u| u. ⋄

Let 𝑋 ⊂ P𝑛 be any fixed real projective variety, viewed as a statistical model as above.
For any given data vector u, we write p̂ for the optimal solution to our optimization problem
(11.2) – (11.3) in the statistical model 𝑋 ∩ Δ𝑜𝑛 . Note that p̂ is an algebraic function of u. In
the next section, we study the algebraic geometry of the function u ↦→ p̂. A key player will
be the very affine variety 𝑋 𝑜 ; see Theorem 11.7.

11.2 Maximum Likelihood Degree

We fix a real projective variety 𝑋 in P𝑛 , and we consider the problem in (11.2) or (11.3).
140 11 Maximum Likelihood

Definition 11.4 The maximum likelihood degree (ML degree) of the variety 𝑋 is defined
to be the number of complex critical points of the optimization problem (11.2) for generic
data u. We denote it by MLdegree(𝑋).
For arbitrary data u, the optimal solution in the statistical model 𝑋 ∩ Δ𝑜𝑛 is called the
maximum likelihood estimate (MLE) of the model 𝑋 for the data u. It is denoted by p̂. Thus,
the ML degree is the analogue to the ED degree, when now KL divergence replaces the
Euclidean distance. The ML degree measures the algebraic complexity of the MLE.
The critical equations for (11.2) are similar to those of the ED problem in Chapter 2.
We shall now describe these equations. Let 𝐼 𝑋 = ⟨ 𝑓1 , . . . , 𝑓 𝑘 ⟩ be the homogeneous ideal
of the model 𝑋. In addition, we consider  the inhomogeneous linear polynomial 𝑓0 :=
𝑝 0 + 𝑝 1 +· · ·+ 𝑝 𝑛 −1. Let J = 𝜕 𝑓𝑖 /𝜕 𝑝 𝑗 denote the Jacobian matrix of size (𝑘 +1) × (𝑛 +1)
for these polynomials, and set 𝑐 = codim(𝑋). Following Chapters 2 and 5, the augmented
Jacobian A J is obtained from the Jacobian matrix J by prepending one more row,

namely the gradient of the objective function ∇ℓu = 𝑢 0 /𝑝 0 , 𝑢 1 /𝑝 1 , . . . , 𝑢 𝑛 /𝑝 𝑛 . To
obtain the critical ideal, we enlarge 𝐼 𝑋 by the (𝑐 + 2) × (𝑐 + 2) minors of the (𝑘 + 2) × (𝑛 + 1)
matrix A J , then we clear denominators, and finally we remove extraneous components
by saturation. Thus, MLdegree(𝑋) is the degree of the critical ideal.
Example 11.5 (Space curves) Let 𝑛 = 3 and 𝑋 be the curve in Δ3𝑜 defined by two general
polynomials 𝑓1 and 𝑓2 of degrees 𝑑1 and 𝑑2 in 𝑝 0 , 𝑝 1 , 𝑝 2 , 𝑝 3 . The augmented Jacobian is
 𝑢 0 /𝑝 0 𝑢 1 /𝑝 1 𝑢 2 /𝑝 2 𝑢 3 /𝑝 3 

 1 1 1 1 
AJ = 
𝜕 𝑓1 /𝜕 𝑝 0
. (11.6)
 𝜕 𝑓1 /𝜕 𝑝 1 𝜕 𝑓1 /𝜕 𝑝 2 𝜕 𝑓1 /𝜕 𝑝 3 
𝜕 𝑓2 /𝜕 𝑝 0 𝜕 𝑓2 /𝜕 𝑝 1 𝜕 𝑓2 /𝜕 𝑝 2 𝜕 𝑓2 /𝜕 𝑝 3 

Since the codimension of 𝑋 equals 𝑐 = 2, we need to enlarge 𝐼 𝑋 by the determinant of the
4 × 4 matrix A J . Clearing denominators amounts to multiplying the 𝑖th column of A J
by 𝑝 𝑖 , so the determinant contributes a polynomial of degree 𝑑1 + 𝑑2 + 1 to the critical
equations. The generators of 𝐼 𝑋 have degrees 𝑑1 and 𝑑2 respectively. We therefore conclude
that the ML degree of 𝑋 equals 𝑑1 𝑑2 (𝑑1 + 𝑑2 + 1) by Bézout’s Theorem. ⋄
The following general upper bound on the ML degree is established in [90, Theorem 5].
Proposition 11.6 Let 𝑋 be a model of codimension 𝑐 in the probability simplex Δ𝑜𝑛 whose
ideal 𝐼 𝑋 is generated by 𝑘 ≥ 𝑐 polynomials 𝑓1 , . . . , 𝑓 𝑘 of degrees 𝑑1 ≥ · · · ≥ 𝑑 𝑘 . Then
∑︁
MLdegree(𝑋) ≤ 𝑑1 𝑑2 · · · 𝑑 𝑐 · 𝑑1𝑖1 𝑑2𝑖2 · · · 𝑑 𝑐𝑖𝑐 . (11.7)
𝑖1 +𝑖2 +···+𝑖𝑐 ≤𝑛−𝑐

Equality holds when 𝑋 is a generic complete intersection of codimension 𝑐 (hence 𝑐 = 𝑘).


The formula in Theorem 11.7 below shows that, under some assumptions, the ML degree
is equal to a signed Euler characteristic. This is the likelihood analogue to Theorem 2.13,
which relates the ED degree to polar degrees, and hence to Chern classes (Chapter 4).
Given our variety 𝑋 in the complex projective space P𝑛 , we  let 𝑋 be the
𝑜
Í𝑛open subset
of 𝑋 that is obtained by removing the hyperplane arrangement 𝑝 0 𝑝 1 · · · 𝑝 𝑛 ( 𝑖=0 𝑝𝑖 ) = 0 .
11.2 Maximum Likelihood Degree 141

s p0
s

1-s p1

1-s p2

Fig. 11.1: Probability tree that describes the coin toss model in Example 11.8.

We recall from [99, 100] that a very affine variety is a closed subvariety of an algebraic
torus (C∗ ) 𝑟 . In our setting, the open set 𝑋 𝑜 is a very affine variety with 𝑟 = 𝑛 + 2. The
following formula works for any very affine variety.

Theorem 11.7 Suppose that the very affine variety 𝑋 𝑜 is nonsingular. Then,

MLdegree(𝑋) = (−1) dim(𝑋) · 𝜒(𝑋 𝑜 ),

where the latter is the topological Euler characteristic of the manifold 𝑋 𝑜 .

Proof (and Discussion) This was proved under additional assumptions by Catanese,
Hoşten, Khetan, and Sturmfels in [41, Theorem 19], and then in full generality by Huh
in [99, Theorem 1]. If the very affine variety 𝑋 𝑜 is singular, then the Euler characteristic
can be replaced by the Chern–Schwartz–MacPherson class, as shown in [99, Theorem 2].□

Varieties for which the ML degree is equal to one are of special interest, both in statistics
and in geometry. For a model 𝑋 to have ML degree one means that the MLE p̂ is a rational
function of the data u. This happens for the independence model in Example 11.3. The ML
degree of the surface 𝑋 = 𝑉 ( 𝑝 0 𝑝 3 − 𝑝 1 𝑝 2 ) is one because the MLE in (11.5) is a rational
function of the data. To be precise, p̂ is a homogeneous rational function of degree 0 in u.
Here is another model which has ML degree one.

Example 11.8 Given a biased coin, we perform the following experiment: Flip the biased
coin. If it shows heads, flip it again. The outcome of this experiment is the number of
heads: 0, 1, or 2. This describes a generative statistical model on three states, illustrated
in Figure 11.1. If 𝑠 denotes the bias of our coin, thenthe model is the parametric curve 𝑋
given by (0, 1) → 𝑋 ⊂ Δ2𝑜 , 𝑠 ↦→ 𝑠2 , 𝑠(1 − 𝑠), 1 − 𝑠 . The underlying variety is the conic
𝑋 = 𝑉 ( 𝑝 0 𝑝 2 − ( 𝑝 0 + 𝑝 1 ) 𝑝 1 ) ⊂ P2 . Its MLE is given by the formula

(2𝑢 0 + 𝑢 1 ) 2 (2𝑢 0 +𝑢 1 ) (𝑢 1 +𝑢 2 ) 𝑢1 + 𝑢2
 
𝑝ˆ = ( 𝑝ˆ0 , 𝑝ˆ1 , 𝑝ˆ2 ) = 2
, 2
, . (11.8)
(2𝑢 0 +2𝑢 1 +𝑢 2 ) (2𝑢 0 + 2𝑢 1 + 𝑢 2 ) 2𝑢 0 +2𝑢 1 +𝑢 2
Since the coordinates of p̂ are rational functions, the ML degree of 𝑋 is equal to one. ⋄

The following theorem explains what we saw in equations (11.5) and (11.8):

Theorem 11.9 If 𝑋 ⊂ Δ𝑜𝑛 is a model of ML degree one, so that p̂ is a rational function of u,


then each coordinate 𝑝ˆ𝑖 is an alternating product of linear forms with positive coefficients.
142 11 Maximum Likelihood

Proof (and Discussion) This was proved by Huh [100] in the setting of arbitrary complex
very affine varieties. It was adapted to real algebraic geometry, and hence to statistical mod-
els, by Duarte, Marigliano, and Sturmfels [63]. These two articles offer precise statements
via Horn uniformization for 𝐴-discriminants [71]. 𝐴-discriminants are hypersurfaces dual
to toric varieties, as we already saw at the end of Chapter 9. For additional information, we
refer to the paper by Huh and Sturmfels [101, Corollary 3.12]. □
Models given by rank constraints on matrices and tensors are particularly important in
applications since these represent conditional independence. Consider two random vari-
ables, having 𝑛1 and 𝑛2 states respectively, which are conditionally independent given a
hidden random variable with 𝑟 states. For us, this model is the determinantal variety 𝑋𝑟
in P𝑛1 𝑛2 −1 that is defined by the (𝑟 +1) × (𝑟 +1) minors of an 𝑛1 ×𝑛2 matrix ( 𝑝 𝑖 𝑗 ). It appeared
as the neuromanifold of linear fully connected neural networks in Section 10.1. The ML de-
gree of this rank 𝑟 model was first studied by Hauenstein, Rodriguez, and Sturmfels in [82],
who obtained the following results using methods from numerical algebraic geometry.

Proposition 11.10 For small values of 𝑛1 and 𝑛2 , the ML degrees of low-rank models 𝑋𝑟
are presented in the following table:

𝑟\(𝑛1 , 𝑛2 ) (3, 3) (3, 4) (3, 5) (4, 4) (4, 5) (4, 6) (5, 5)


1 1 1 1 1 1 1 1
2 10 26 58 191 843 3119 6776
(11.9)
3 1 1 1 191 843 3119 61326
4 1 1 1 6776
5 1

The table in (11.9) can be viewed as a Kullback–Leibler analogue to Corollary 5.20.


Every entry in the 𝑟 = 1 row equals 1 because the MLE for the independence model is a
rational function in the data (𝑢 𝑖 𝑗 ). One finds p̂ = ( 𝑝ˆ𝑖 𝑗 ) by multiplying the column vector of
row sums of u with the row vector of column sums of u, and then dividing by |u| 2 , as shown
in (11.5). The other entries are more interesting, and they give precise information on the
algebraic complexity of minimizing the Kullback–Leibler divergence from a given data
matrix u to the conditional independence model 𝑋𝑟 . Here is an example taken from [82].

Example 11.11 We fix 𝑛1 = 𝑛2 = 5. Following [82, Example 7], we consider the data
2864 6 6 3 3 

 2 7577 2 2 5 

u =  4 1 7543 2 4  .

 5 1 2 3809 4 

 6 2 6 3 5685

For 𝑟 = 2 and 𝑟 = 4, this instance of our ML estimation problem has the expected number
of 6776 distinct complex critical points. In both cases, 1774 of these are real and 90 of
these are real and positive. This illustrates the last statement in Theorem 11.12 below. The
number of local maxima for 𝑟 = 2 equals 15, and the number of local maxima for 𝑟 = 4
equals 6. For 𝑟 = 3, we have 61326 critical points, of which 15450 are real. Of these, 362
11.2 Maximum Likelihood Degree 143

are positive and 25 are local maxima. We invite our readers to critically check these claims,
by running software for solving polynomial equations, as explained in Chapter 3. ⋄

The columns of the table in (11.9) exhibit an obvious symmetry. This was conjectured
in [82], and it was proved by Draisma and Rodriguez in their article [61] on maximum
likelihood duality. We now state their result. Given an 𝑛1 × 𝑛2 matrix u, we write Ωu for
the matrix whose (𝑖, 𝑗) entry equals
𝑢 𝑖 𝑗 𝑢 𝑖+ 𝑢 + 𝑗
.
(𝑢 ++ ) 3
Here, we use the following notation for the row sums, the column sums, and the sample size:
𝑛2
∑︁ 𝑛1
∑︁ 𝑛1 ∑︁
∑︁ 𝑛2
𝑢 𝑖+ = 𝑢𝑖 𝑗 , 𝑢+ 𝑗 = 𝑢𝑖 𝑗 , and 𝑢 ++ = 𝑢𝑖 𝑗 .
𝑗=1 𝑖=1 𝑖=1 𝑗=1

In the following theorem, the symbol ★ denotes the Hadamard product (or entrywise
product) of two matrices. That is, if p = ( 𝑝 𝑖 𝑗 ) and q = (𝑞 𝑖 𝑗 ), then p ★ q = ( 𝑝 𝑖 𝑗 · 𝑞 𝑖 𝑗 ).

Theorem 11.12 Fix 𝑛1 ≤ 𝑛2 and u an 𝑛1 × 𝑛2 -matrix with strictly positive integer entries.
There exists a bijection between the complex critical points p1 , p2 , . . . , p𝑠 of the likelihood
function for u on 𝑋𝑟 and the complex critical points q1 , q2 , . . . , q𝑠 on 𝑋𝑛1 −𝑟+1 such that

p1 ★ q1 = p2 ★ q2 = · · · = p𝑠 ★ q𝑠 = Ωu . (11.10)

In particular, this bijection preserves reality, positivity, and rationality of the critical points.

This result is a multiplicative version of Theorem 2.23 on duality for ED degrees. By


“multiplicative” we mean that u𝑖 /p𝑖 instead of u𝑖 − p𝑖 appears in the first row of the
augmented Jacobian matrix. Theorem 11.12 concerns the case of determinantal varieties.
In the ED theory, these led us to the Eckart–Young Theorem.
It is a challenge in intersection theory and singularity theory to find general formulas
for the ML degrees in Proposition 11.10. This problem was solved for 𝑟 = 2 by Rodriguez
and Wang in [154]. They give a recursive formula in [154, Theorem 4.1], and they present
impressive values in [154, Table 1]. They unravel the recursion, and they obtain the ex-
plicit formulas for the ML degree of conditional independence models in many cases. In
particular, they obtain the following result, which had been stated as a conjecture in [82].

Theorem 11.13 (Rodriguez–Wang [154]) Consider the variety 𝑋2 ⊂ P3𝑛−1 whose points
are the 3 × 𝑛 matrices of rank at most two. The ML degree of this variety is

MLdegree(𝑋2 ) = 2𝑛+1 − 6.
144 11 Maximum Likelihood

11.3 Scattering Equations

We now turn to a connection between algebraic statistics and particle physics that was
developed in [165]. The context is scattering amplitudes, where the critical equations
for (11.2) – (11.3) are the scattering equations. We consider the CEGM model, due to
Cachazo and his collaborators [37, 38]. The role of the data vector u is played in physics
by the Mandelstam invariants. This theory rests on the space 𝑋 𝑜 of 𝑚 labeled points in
general position in P 𝑘−1 , up to projective transformations.
Consider the Grassmannian Gr(𝑘 − 1, P𝑚−1 ) in its Plücker embedding into P ( 𝑘 ) −1 . The
𝑚


torus (C ) acts on this by scaling the columns of 𝑘 × 𝑚 matrices representing subspaces.
𝑚

Let Gr(𝑘 −1, P𝑚−1 ) 𝑜 be the open Grassmannian where all Plücker coordinates are non-zero.

Definition 11.14 The CEGM model is the (𝑘 − 1) (𝑚 − 𝑘 − 1)-dimensional manifold

𝑋𝑜 = Gr(𝑘 − 1, P𝑚−1 ) 𝑜 /(C∗ ) 𝑚 . (11.11)

Example 11.15 (𝑘 = 2) For 𝑘 = 2, the very affine variety in (11.11) has dimension 𝑚 − 3,
and it is the moduli space of 𝑚 distinct labeled points on the complex projective line P1 . This
space is ubiquitous in algebraic geometry, where it is known as M0,𝑚 . The punchline of our
discussion here is that we interpret the moduli space M0,𝑚 as a statistical model. And, we
then argue that its ML degree is equal to (𝑚 − 3)!. For instance, if 𝑚 = 4 then 𝑋 𝑜 = M0,4
is the Riemann sphere P1 with three points removed. The signed Euler characteristic of this
surface is one, and Theorem 11.9 applies. ⋄

Proposition 11.16 The configuration space 𝑋 𝑜 in (11.11) is a very affine variety, with
coordinates given by the 𝑘 × 𝑘 minors of the 𝑘 × 𝑚 matrix
 
𝑀𝑘,𝑚 = 𝐴 𝐵 ,

where the matrices 𝐴 ∈ R 𝑘×𝑘 and 𝐵 ∈ R 𝑘×(𝑚−𝑘) are given by

0 0 0 ... 0 (−1) 𝑘 
(−1) 𝑘−1
0 0 0 ... 0 


 .. .. .. .. ..
 .. 
𝐴 = . . . . . . 

0
 0 −1 ... 0 0 
0 1 0 ... 0 0 
−1 0 0 ... 0 0 

 1 1 1 ... 1 

 1 𝑥1,1 𝑥1,2 ... 𝑥1,𝑚−𝑘−1 
 . ... .. .. .. 
and 𝐵 = 
 .. . . . 
.

 1 𝑥 𝑘−3,1 𝑥 𝑘−3,2 ... 𝑥 𝑘−3,𝑚−𝑘−1 

 1 𝑥 𝑘−2,1 𝑥 𝑘−2,2 ... 𝑥 𝑘−2,𝑚−𝑘−1 

 1 𝑥 𝑘−1,1 𝑥 𝑘−1,2 ... 𝑥 𝑘−1,𝑚−𝑘−1 

We denote by 𝑝 𝑖1 𝑖2 ···𝑖𝑘 the 𝑘 × 𝑘 minor of 𝑀𝑘,𝑚 with columns 𝑖 1 < 𝑖2 < · · · < 𝑖 𝑘 .
11.3 Scattering Equations 145

Following [2, Equation (4)], the antidiagonal matrix in the left 𝑘 × 𝑘 block of 𝑀𝑘,𝑚
is chosen so that each unknown 𝑥𝑖, 𝑗 is precisely equal to the minor 𝑝 𝑖1 𝑖2 ···𝑖𝑘 for some
𝑖1 < 𝑖2 < · · · < 𝑖 𝑘 . No signs are needed.
Definition 11.17 The scattering potential for the CEGM model is the function
∑︁
ℓu = 𝑢 𝑖1 𝑖2 ···𝑖𝑘 · log( 𝑝 𝑖1 𝑖2 ···𝑖𝑘 ). (11.12)
𝑖1 𝑖2 ···𝑖𝑘

This is a multi-valued function on the very affine complex variety 𝑋 𝑜 . Here, u = (𝑢 𝑖1 𝑖2 ···𝑖𝑘 )
is the data vector (its coordinates are called Mandelstam invariants in physics) and the
𝑝 𝑖1 𝑖2 ···𝑖𝑘 are the coordinates of the open Grassmannian in the Plücker embedding.
The critical point equations, known as scattering equations [2, equation (7)], are given by

𝜕ℓu
= 0 for 1 ≤ 𝑖 ≤ 𝑘 − 1 and 1 ≤ 𝑗 ≤ 𝑚 − 𝑘 − 1. (11.13)
𝜕𝑥𝑖, 𝑗

These are equations of rational functions. Solving these equations is the agenda in the
articles [37, 38, 165].

Corollary 11.18 The number of complex solutions to (11.13) is the ML degree of the CEGM
model 𝑋 𝑜 . This number equals the signed Euler characteristic (−1) (𝑘−1) (𝑚−𝑘−1) · 𝜒(𝑋 𝑜 ).

Example 11.19 (𝑘 = 2, 𝑚 = 6) The very affine threefold 𝑋 𝑜 = M0,6 sits in (C∗ ) 9 via

𝑝 24 = 𝑥1 , 𝑝 25 = 𝑥2 , 𝑝 26 = 𝑥 3 , 𝑝 34 = 𝑥1 − 1, 𝑝 35 = 𝑥2 − 1,
𝑝 36 = 𝑥3 − 1, 𝑝 45 = 𝑥2 − 𝑥 1 , 𝑝 46 = 𝑥3 − 𝑥 1 , 𝑝 56 = 𝑥3 − 𝑥 2 .

These nine coordinates on 𝑋 𝑜 ⊂ (C∗ ) 9 are the non-constant 2 × 2 minors of our matrix
 
0 1 1 1 1 1
𝑀2,6 = .
−1 0 1 𝑥1 𝑥2 𝑥3

The scattering potential is the analogue to the log-likelihood function in statistics:

ℓu = 𝑢 24 log( 𝑝 24 ) + 𝑢 25 log( 𝑝 25 ) + · · · + 𝑢 56 log( 𝑝 56 ).

This function has six critical points in 𝑋 𝑜 . Hence, MLdegree(𝑋 𝑜 ) = −𝜒(𝑋 𝑜 ) = 6. ⋄

We now examine the number of critical points of the scattering potential (11.12).

Theorem 11.20 The known values of the ML degree for the CEGM model (11.11) are as
follows. For 𝑘 = 2, the ML degree equals (𝑚 − 3)! for all 𝑚 ≥ 4. For 𝑘 = 3, the ML degree
equals 2, 26, 1272, 188112, 74570400 when the number of points is 𝑚 = 5, 6, 7, 8, 9. For
𝑘 = 4 and 𝑚 = 8, the ML degree equals 5211816.

Proof We refer to [2, Example 2.2], [2, Theorem 5.1], and [2, Theorem 6.1] for 𝑘 = 2, 3, 4.□
146 11 Maximum Likelihood

Knowing these ML degrees for the CEGM model helps in solving the scattering equa-
tions reliably. It was demonstrated in [2, 165] how this can be done in practice with the
software HomotopyContinuation.jl [31]. For instance, [165, Table 1] discusses the
computation of the 10! = 3628800 critical points for 𝑘 = 2 and 𝑚 = 13. See [2, Section 6]
for the solution in the challenging case 𝑘 = 4 and 𝑚 = 8.
One purpose of this short section was to demonstrate that ML degrees of very affine
varieties 𝑋 𝑜 appear in many scenarios, notably in physics, well beyond statistical models.
By connecting these scenarios to algebraic statistics, both sides benefit. Metric algebraic
geometry offers a framework for developing such connections. See also [7] for connecting
ML estimation with norm minimization over a group orbit in invariant theory.

11.4 Gaussian Models

We now change the topic by turning to statistical models for Gaussian random variables.
Let PD𝑛 denote the set of positive-definite symmetric 𝑛 × 𝑛 matrices, i.e. matrices all of
whose eigenvalues are positive. This is an open convex cone in the real vector space 𝑆 2 (R𝑛 )
𝑛+1
of symmetric 𝑛 × 𝑛 matrices, which has dimension 2 . This cone now plays the role
which was played by the simplex Δ𝑜𝑛 when we discussed discrete models.
Given a mean vector 𝝁 ∈ R𝑛 and a covariance matrix Σ ∈ PD𝑛 , the associated Gaussian
distribution is supported on R𝑛 . Its density has the familiar “bell shape”; it is the function
1
· exp − 21 (x − 𝝁) ⊤ Σ−1 (x − 𝝁) .

𝑓 𝝁,Σ (x) := √︁
(2𝜋) 𝑛 det(Σ)

We fix a model 𝑌 ⊂ R𝑛 × PD𝑛 defined by polynomial equations in ( 𝝁, Σ). Suppose we


are given 𝑁 samples 𝑈 (1), . . . , 𝑈 ( 𝑁 ) . These samples are vectors in R𝑛 . These data are
¯ 1 Í𝑁
summarized in the sample mean 𝑈 = 𝑁 𝑖=1 𝑈 (𝑖) and in the sample covariance matrix

𝑁
1 ∑︁ (𝑖) ¯
𝑆 = (𝑈 − 𝑈) (𝑈 (𝑖) − 𝑈)
¯ ⊤.
𝑁 𝑖=1

With this data matrix, the log-likelihood is the following function in the unknowns ( 𝝁, Σ):
 
𝑁 −1 ¯ ⊤ −1 ¯
ℓ( 𝝁, Σ) = − · log det(Σ) + trace(𝑆Σ ) + (𝑈 − 𝝁) Σ (𝑈 − 𝝁) . (11.14)
2

The task of likelihood inference is to maximize this function subject to ( 𝝁, Σ) ∈ 𝑌 .


There are two extreme cases. First, consider a model where Σ is fixed to be the identity
matrix 𝐼𝑛 . Then 𝑌 = 𝑋 × {𝐼𝑛 } and we are supposed to minimize the Euclidean distance
from the sample mean 𝑈¯ to the variety 𝑋 in R𝑛 . This is precisely the earlier ED problem.
We instead focus on the second case, when 𝑌 = R𝑛 × 𝑋 for some subvariety 𝑋 of
2
𝑆 (R𝑛 ). Then, any maximum ( 𝝁, Σ) ∈ 𝑌 of (11.14) satisfies 𝝁 = 𝑈, ¯ and so the problem is
reduced to estimating the covariance matrix Σ ∈ 𝑋. Hence, by shifting all samples until 𝑈¯
becomes 0, we may assume that our model has the form 𝑌 = {0} × 𝑋 and our task is
11.4 Gaussian Models 147

Minimize the function Σ ↦→ log det(Σ) + trace(𝑆 Σ−1 ) subject to Σ ∈ 𝑋. (11.15)

Using the concentration matrix 𝐾 = Σ−1 , we can write this equivalently as follows:

Maximize the function 𝐾 ↦→ log det(𝐾) − trace(𝑆 𝐾) subject to 𝐾 ∈ 𝑋 −1 . (11.16)

Here, the variety 𝑋 −1 is the Zariski closure of the set of inverses of all matrices in 𝑋.

Remark 11.21 The optimization problem (11.15)-(11.16) has a metric interpretation as


in (11.3). Namely, we can define the KL divergence between two continuous probability
distributions on R𝑛 by replacing the sum in (11.1) with the corresponding integral over R𝑛 .
That way, we obtain a certain kind of distance between the unknown matrix Σ and the given
sample covariance matrix 𝑆.

The critical equations for (11.15)-(11.16) can be written as polynomials since the partial
derivatives of the logarithm are rational functions. These equations have finitely many
complex solutions. Their number is the ML degree of the statistical model 𝑋 −1 .
In the remainder of this section, we focus on Gaussian statistical models that are de-
scribed by linear constraints on either the covariance matrix or its inverse, which is the
concentration matrix. We consider a linear space of symmetric matrices (LSSM),

L ⊂ 𝑆 2 (R𝑛 ),

whose general element is assumed to be invertible. We are interested in the models 𝑋 −1 = L


and 𝑋 = L. It is convenient to use primal-dual coordinates (Σ, 𝐾) to write the respective
critical equations. For a proof of the next result, see [166, Propositions 3.1 and 3.3].

Proposition 11.22 Fix an LSSM L and its orthogonal complement L ⊥ under the Euclidean
inner product ⟨𝑋, 𝑌 ⟩ = Trace(𝑋 ⊤𝑌 ). The critical equations for the linear concentration
model 𝑋 −1 = L are
𝐾 ∈ L and 𝐾Σ = 𝐼𝑛 and Σ − 𝑆 ∈ L ⊥ . (11.17)
The critical equations for the linear covariance model 𝑋 = L are

Σ ∈ L and 𝐾Σ = 𝐼𝑛 and 𝐾𝑆𝐾 − 𝐾 ∈ L ⊥ . (11.18)

The system (11.17) is linear in the unknown matrix 𝐾, whereas the last group of equations
in (11.18) is quadratic in 𝐾. The numbers of complex solutions are the ML degree of L
and the reciprocal ML degree of L. The former is smaller than the latter.

Example 11.23 Let 𝑛 = 4 and let L be a generic LSSM of dimension 𝑘. The degrees are:

𝑘 = dim(L) : 2 3 4 5 6 7 8 9
MLdegree : 3 9 17 21 21 17 9 3
reciprocal MLdegree : 5 19 45 71 81 63 29 7

These numbers and many more appear in [166, Table 1]. ⋄


148 11 Maximum Likelihood

ML degrees and reciprocal ML degrees of linear spaces of symmetric matrices have


been studied intensively in the recent literature, both for generic and special spaces L.
See [6, 22, 67] and the references therein. We now present an important result due to
Manivel, Michałek, Monin, Seynnaeve, Vodička, and Wiśniewski. Theorem 11.24 para-
phrases highlights from their articles [126, 132].

Theorem 11.24 The ML degree of a generic linear subspace L of dimension 𝑘 in 𝑆 2 (R𝑛 )


𝑛+1
is the number of quadrics in P 𝑛−1 that pass through 2 − 𝑘 general points and are tangent
to 𝑘 − 1 general hyperplanes. For fixed 𝑘, this number is a polynomial in 𝑛 of degree 𝑘 − 1.

Proof The first statement is [132, Corollary 2.6 (4)], here interpreted classically in terms
of Schubert calculus. For a detailed discussion, see the introduction of the article [126].
The second statement appears in [126, Theorem 1.3 and Corollary 4.13]. □

Example 11.25 Let 𝑛 = 4. Fix 10 − 𝑘 points and 𝑘 − 1 planes in P3 . We are interested in all
quadratic surfaces that contain the points and are tangent to the planes. These points and
planes impose 9 constraints on P(𝑆 2 (C4 )) ≃ P9 . Passing through a point imposes a linear
equation. Being tangent to a plane is a cubic constraint on P9 . Bézout’s Theorem suggests
that there could be 3 𝑘−1 solutions. This is correct for 𝑘 ≤ 3, but it overcounts for 𝑘 ≥ 4.
Indeed, in Example 11.23, we see 17, 21, 21, . . . instead of 27, 81, 243, . . . ⋄

The intersection theory approach in [126, 132] leads to formulas for the ML degrees
of linear Gaussian models. From this, we obtain provably correct numerical methods for
maximum likelihood estimation, based on homotopy continuation. Namely, after computing
all critical points as in [166], we can certify them with interval arithmetic as in [30]. Since
the ML degree is known beforehand, one can be sure that all solutions have been found.

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International
License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and
reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter’s Creative Commons
license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s
Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the
permitted use, you will need to obtain permission directly from the copyright holder.
Chapter 12
Tensors

Tensors are generalizations of matrices. They can be viewed as tables of higher dimension.
A 2 × 2-matrix is a table that contains four numbers aligned in two directions, and each
direction has dimension 2. Similarly, a 2 × 2 × 2-tensor is a table with eight numbers aligned
in three directions where each direction has dimension 2.

5 6
6
1 2
2 8
1 2 1 2
𝐴= 𝐵= 4
3 4 3 4

Fig. 12.1: A 2 × 2 matrix 𝐴 and a 2 × 2 × 2 tensor 𝐵.

In this chapter, we offer an introduction to tensors, with a view toward metric algebraic
geometry. We present the notion of tensor rank, along with the Segre variety and the
Veronese variety. These arise from tensors of bounded rank. We then turn to the spectral
theory of tensors, and we show that eigenvectors and singular vectors arise naturally in the
study of Euclidean distance problems. In the last section, we study volumes in complex
projective space, and we determine these volumes for Segre and Veronese varieties.

12.1 Tensors and their Rank

For positive integers 𝑛1 , . . . , 𝑛 𝑑 , the vector space of real 𝑛1 × · · · × 𝑛 𝑑 tensors is denoted by


n o
R𝑛1 ×···×𝑛𝑑 := 𝐴 = 𝑎 𝑖1 ,...,𝑖𝑑 1≤𝑖1 ≤𝑛1 ,...,1≤𝑖𝑑 ≤𝑛𝑑 𝑎 𝑖1 ,...,𝑖𝑑 ∈ R .


© The Author(s) 2024 149


P. Breiding et al., Metric Algebraic Geometry, Oberwolfach Seminars 53,
https://doi.org/10.1007/978-3-031-51462-3_12
150 12 Tensors

In the literature, elements in the vector space R𝑛1 ×···×𝑛𝑑 are also called hypermatrices or
Cartesian tensors, because our definition of a tensor as a multidimensional array relies on a
basis. The dimension of the vector space R𝑛1 ×···×𝑛𝑑 is 𝑛1 · · · 𝑛 𝑑 . We also consider the space
of complex tensors C𝑛1 ×···×𝑛𝑑 . The number 𝑑 is called the order of the tensor. Tensors of
order one are vectors. Tensors of order two are matrices.
A common notation for order-three tensors is by writing them as a tuple of matrices.

Example 12.1 The tensor 𝐵 = 𝑏 𝑖 𝑗 𝑘 1≤𝑖, 𝑗,𝑘 ≤2 from Figure 12.1 can be written as
 
12 56
𝐵 = ∈ R2×2×2 .
34 78

The left matrix contains the entries 𝑏 𝑖 𝑗1 and the matrix on the right contains the 𝑏 𝑖 𝑗2 . ⋄
The Euclidean inner product of two tensors 𝐴 = (𝑎 𝑖1 ,...,𝑖𝑑 ) and 𝐵 = (𝑏 𝑖1 ,...,𝑖𝑑 ) is defined as
𝑛1
∑︁ 𝑛𝑑
∑︁
⟨𝐴, 𝐵⟩ := ··· 𝑎 𝑖1 ,...,𝑖𝑑 · 𝑏 𝑖1 ,...,𝑖𝑑 .
𝑖1 =1 𝑖𝑑 =1
√︁
The resulting norm on R𝑛1 ×···×𝑛𝑑 is given by the familiar formula ∥ 𝐴∥ = ⟨𝐴, 𝐴⟩.
One way to create a tensor is to take the outer product of 𝑑 vectors v𝑖 ∈ R𝑛𝑖 , where
1 ≤ 𝑖 ≤ 𝑑. This tensor is defined by taking all 𝑛1 𝑛2 · · · 𝑛 𝑑 possible products between the
entries of distinct vectors:

v1 ⊗ · · · ⊗ v𝑑 := (v1 )𝑖1 · · · (v𝑑 )𝑖𝑑 1≤𝑖1 ≤𝑛1 ,...,1≤𝑖𝑑 ≤𝑛𝑑 . (12.1)

The outer products of the standard basis vectors e𝑖 𝑗 ∈ R𝑛 𝑗 give the standard basis
of R𝑛1 ×···×𝑛𝑑 . In particular, we have (𝑎 𝑖1 ,...,𝑖𝑑 ) = 𝑖𝑛11=1 · · · 𝑖𝑛𝑑𝑑=1 𝑎 𝑖1 ,...,𝑖𝑑 e𝑖1 ⊗ · · · ⊗ e𝑖𝑑 .
Í Í

If 𝑛 := 𝑛1 = · · · = 𝑛 𝑑 are all equal, then we write the tensor space as (R𝑛 ) ⊗𝑑 := R𝑛×···×𝑛 .
Each permutation 𝜋 ∈ 𝔖𝑑 acts on outer products in (R𝑛 ) ⊗𝑑 by permuting the factors:
𝜋(v1 ⊗ · · · ⊗ v𝑑 ) = v 𝜋 (1) ⊗ · · · ⊗ v 𝜋 (𝑑) . This yields an action of the symmetric group 𝔖𝑑
on (R𝑛 ) ⊗𝑑 via linear extension. For 𝑑 = 2, this is transposition of matrices.
Definition 12.2 A tensor 𝐴 ∈ (R𝑛 ) ⊗𝑑 is called symmetric if 𝜋( 𝐴) = 𝐴 for all 𝜋 ∈ 𝔖𝑑 . We
use the following notation for the vector space of symmetric tensors:

𝑆 𝑑 (R𝑛 ) := {𝐴 ∈ (R𝑛 ) ⊗𝑑 | 𝐴 is symmetric}.

Being a symmetric tensor is a linear condition. Hence, the space 𝑆 𝑑 (R𝑛 ) of symmetric
tensors is a linear subspace of (R𝑛 ) ⊗𝑑 . For v ∈ R𝑛 , we write the 𝑑-fold outer product as

v⊗𝑑 := v ⊗ · · · ⊗ v ∈ 𝑆 𝑑 (R𝑛 ).

Every symmetric tensor 𝐴 ∈ 𝑆 𝑑 (R𝑛 ) determines a homogeneous polynomial of degree 𝑑:


𝑛 ∑︁
∑︁ 𝑛 𝑛
∑︁
𝐹𝐴 (x) := ··· 𝑎 𝑖1 ,𝑖2 ,...,𝑖𝑑 𝑥 𝑖1 𝑥 𝑖2 · · · 𝑥 𝑖𝑑 . (12.2)
𝑖1 =1 𝑖2 =1 𝑖𝑑 =1
12.1 Tensors and their Rank 151

This is a polynomial in 𝑛 variables 𝑥1 , . . . , 𝑥 𝑛 . The map 𝐴 ↦→ 𝐹𝐴 is an isomorphism between


𝑆 𝑑 (R𝑛 ) and the vector space of
 homogeneous polynomials of degree 𝑑 in 𝑛 variables. Their
common dimension is 𝑛+𝑑−1 𝑑 . We can write the polynomial in (12.2) as

𝐹𝐴 (x) = ⟨𝐴, x⊗𝑑 ⟩.

For 𝐴 ∈ 𝑆 𝑑 (R𝑛 ), we have ∥ 𝐴∥ = ∥𝐹𝐴 ∥ BW . This is the Bombieri–Weyl metric (Chapter 9).

Example 12.3 Symmetric tensors of order three are in bijection with homogeneous cubics.
For instance, symmetric 2 × 2 × 2 tensors correspond to binary cubics:

∈ 𝑆 3 (R2 ), we have 𝐹𝐴 (x) = 𝑥13 − 3𝑥12 𝑥2 + 2𝑥 23 .


 1 −1 −1 0 
For 𝐴 = −1 0 0 2

This generalizes the familiar bijection between symmetric matrices and quadratic forms. ⋄

Given a tuple of matrices (𝑀1 , . . . , 𝑀𝑑 ) ∈ R 𝑘1 ×𝑛1 × · · · × R 𝑘𝑑 ×𝑛𝑑 , we define the multi-


linear multiplication by letting each matrix act on one side. For outer products, we have

(𝑀1 , . . . , 𝑀𝑑 ).(v1 ⊗ · · · ⊗ v𝑑 ) := (𝑀1 v1 ) ⊗ · · · ⊗ (𝑀𝑑 v𝑑 ).

This action extends by linearity to all of R𝑛1 ×···×𝑛𝑑 . For 𝑘 1 = 𝑛1 , . . . , 𝑘 𝑑 = 𝑛 𝑑 , this induces
a representation of GL(𝑛1 ) × · · · × GL(𝑛 𝑑 ) into the general linear group of R𝑛1 ×···×𝑛𝑑 . If
𝑑 = 2, then (𝑀1 , 𝑀2 ).𝐴 = 𝑀1 𝐴𝑀2⊤ . Thus, multilinear multiplication is a generalization of
simultaneous left-right multiplication for matrices.
A central topic of this chapter are rank-one tensors. A tensor 𝐴 has rank one if it has
the form (12.1). For 𝑑 = 2, this gives us 𝑛1 × 𝑛2 matrices of rank one. The inner product
between rank-one tensors is

⟨v1 ⊗ · · · ⊗ v𝑑 , w1 ⊗ · · · ⊗ w𝑑 ⟩ = ⟨v1 , w1 ⟩ · · · ⟨v𝑑 , w𝑑 ⟩. (12.3)

Definition 12.4 The (real) Segre variety S𝑛1 ,...,𝑛𝑑 consists of all 𝑛1 × · · · × 𝑛 𝑑 -tensors of
rank one, i.e.
S𝑛1 ,...,𝑛𝑑 := {v1 ⊗ · · · ⊗ v𝑑 | v𝑖 ∈ R𝑛𝑖 , 1 ≤ 𝑖 ≤ 𝑑}.

We simply write S when 𝑛1 , . . . , 𝑛 𝑑 are clear from the context. The most immediate
way to see that S is an algebraic variety goes as follows. We Î can always flatten a tensor
𝐴 ∈ R𝑛1 ×···×𝑛𝑑 into 𝑑 matrices 𝐹1 , . . . , 𝐹𝑑 , where 𝐹𝑖 ∈ R𝑛𝑖 ×( 𝑗≠𝑖 𝑛 𝑗 ) . Then, we have 𝐴 ∈ S
if and only if the column span of 𝐹𝑖 has dimension at most one for 1 ≤ 𝑖 ≤ 𝑑. This is
equivalent to saying that the 𝐹𝑖 are all of rank at most one; i.e., their 2 × 2-minors vanish.
The dimension of the Segre variety is dim S = 𝑛1 + · · · + 𝑛 𝑑 + 1 − 𝑑.
The analogue of the Segre variety for symmetric tensors is the Veronese variety.

Definition 12.5 The Veronese variety is the variety of symmetric tensors of rank one:

V := V𝑛,𝑑 := {v⊗𝑑 | v ∈ R𝑛 }.

This is the intersection of the Segre variety S with a linear subspace. Hence, V is an
algebraic variety. Note that dim V = 𝑛.
152 12 Tensors

Example 12.6 Let v = (𝑥, 𝑦) ∈ R2 . Then, v⊗3 comprises all monomials of degree three:
 3
𝑥 2 𝑦 𝑥 2 𝑦 𝑥𝑦 2

𝑥
v⊗3 = 2 .
𝑥 𝑦 𝑥𝑦 2 𝑥𝑦 2 𝑦 3

Here, the Veronese variety V is a surface. Namely, it is the cone over the twisted cubic
curve. In general, the distinct entries of v⊗𝑑 are all monomials of degree 𝑑 in the entries of
the vector v. The Veronese variety V is parametrized by these monomials. ⋄

The Segre variety induces a notion of rank of a tensor 𝐴 ∈ R𝑛1 ×···×𝑛𝑑 . Namely, we define

rank( 𝐴) := min {𝑟 ≥ 0 | there exists 𝐴1 , . . . , 𝐴𝑟 ∈ S with 𝐴 = 𝐴1 + · · · + 𝐴𝑟 } .

For matrices (𝑑 = 2), this is the usual matrix rank. We denote tensors of rank at most 𝑟 by

R𝑟 := R𝑟 ,𝑛1 ,...,𝑛𝑑 := 𝐴 ∈ R𝑛1 ×···×𝑛𝑑 | rank( 𝐴) ≤ 𝑟 .




A tensor of order three and rank 𝑟 can be visualized as follows:

= +···+ .

In the case of matrices, the set R𝑟 is a variety. It is the common zero set of all (𝑟 +1) × (𝑟 +1)-
minors of the matrix. For 𝑑 ≥ 3 and 𝑟 ≥ 2, however, R𝑟 is no longer a variety. This is
implied by the following result due to de Silva and Lim [53].

Proposition 12.7 The set R 2 of tensors of rank at most two is generally not closed in the
Euclidean topology.

Proof Fix 𝑑 = 3 and 𝑛1 = 𝑛2 = 𝑛3 = 2. Consider linearly independent pairs {x1 , x2 },


{y1 , y2 }, and {z1 , z2 } in R2 . For any 𝜀 > 0, we define a rank-two tensor 𝐴 𝜀 ∈ R 2 as follows:

𝐴 𝜀 := 𝜀 −1 (x1 + 𝜀x2 ) ⊗ (y1 + 𝜀y2 ) ⊗ (z1 + 𝜀z2 ) − 𝜀 −1 x1 ⊗ y1 ⊗ z1 . (12.4)

The limit tensor equals 𝐴 := lim 𝜀→0 𝐴 𝜀 = x1 ⊗ y1 ⊗ z2 +x1 ⊗ y2 ⊗ z1 +x2 ⊗ y1 ⊗ z1 . We claim


that 𝐴 has rank three. For h ∈ R2 , we apply multilinear multiplication by 𝑋 := (𝐼2 , 𝐼2 , h⊤ )
to 𝐴. This gives the 2 × 2-matrix

𝑋.𝐴 = ⟨h, z2 ⟩ · x1 ⊗ y1 + ⟨h, z1 ⟩ · x1 ⊗ y2 + ⟨h, z1 ⟩ · x2 ⊗ y1 . (12.5)

Choosing h with ⟨h, z1 ⟩ ≠ 0 yields a matrix of rank two, and hence 𝐴 has rank at least
two. We suppose now that 𝐴 = u1 ⊗ v1 ⊗ w1 + u2 ⊗ v2 ⊗ w2 has rank two. Among the
three pairs of vectors, at least two pairs are linearly independent. Suppose the pairs (u1 , u2 )
and (v1 , v2 ) are linearly independent. Then

𝑋.𝐴 = ⟨h, w1 ⟩ · u1 ⊗ v1 + ⟨h, w2 ⟩ · u2 ⊗ v2 . (12.6)


12.1 Tensors and their Rank 153

Let us now pick a non-zero h such that ⟨h, z1 ⟩ = 0. By (12.5), the matrix 𝑋.𝐴 has rank one
and hence ⟨h, w1 ⟩ = 0 or ⟨h, w2 ⟩ = 0 by (12.6). We may assume ⟨h, w1 ⟩ = 0. This implies
that w1 is a multiple of z1 , since both are perpendicular to h. We distinguish two cases.
First, if the pair (w1 , w2 ) is linearly independent, there is another h′ with ⟨h′, w1 ⟩ ≠ 0
but ⟨h′, w2 ⟩ = 0. Then, ⟨h′, z1 ⟩ ≠ 0 and so 𝑋.𝐴 has rank two by (12.5) and it has rank one
by (12.6); a contradiction. Second, if w1 , w2 and z1 are multiples of one another, then the
tensor 𝐴 is of the form 𝐴 = (𝜆1 u1 ⊗ v1 + 𝜆2 u2 ⊗ v2 ) ⊗ z1 (i.e., its “third row space” is
spanned by z1 ). This is a contradiction to 𝐴 = x1 ⊗ y1 ⊗ z2 + (x1 ⊗ y2 ⊗ + x2 ⊗ y1 ) ⊗ z1 . In
both cases, we have derived a contradiction, so 𝐴 cannot have rank two, but it must have
rank three. Finally, the same proof extends to larger tensor formats. Namely, we can simply
embed 𝐴 into a larger tensor format while retaining the relevant rank properties. □
A decomposition of a tensor 𝐴 of the form 𝐴 = 𝐴1 + · · · + 𝐴𝑟 with 𝐴𝑖 ∈ S is called a
rank-𝑟 decomposition. In the signal processing literature, it is also called canonical polyadic
decomposition. One appealing property of higher-order tensors is identifiability. That is,
many tensor decompositions are actually unique (while matrices of rank at least two do not
have a unique decomposition). The following is [48, Theorem 1.1] and [149, Lemma 28].
Î𝑑
Theorem 12.8 Let 𝑑 ≥ 3 and 𝑛1 ≥ · · · ≥ 𝑛 𝑑 with 𝑖=1 𝑛𝑖 ≤ 15000, and set

dim R𝑛1 ×···×𝑛𝑑


   
𝑛1 · · · 𝑛 𝑑
𝑟0 = = .
dim S
Í𝑑
1 + 𝑖=1 (𝑛𝑖 − 1)

Suppose that 𝑟 < 𝑟 0 and the tuple (𝑛1 , . . . , 𝑛 𝑑 , 𝑟) is not among the following special cases:
(𝑛1 , . . . , 𝑛 𝑑 ) 𝑟
(4, 4, 3) 5
(4, 4, 4) 6
(6, 6, 3) 8
(𝑛, 𝑛, 2, 2) 2𝑛 − 1
(2, 2, 2, 2, 2) 5
Î𝑑 Í𝑑 Î𝑑 Í𝑑
𝑛1 > 𝑖=2 𝑛𝑖 − 𝑖=2 (𝑛𝑖 − 1) 𝑟 ≥ 𝑖=2 𝑛𝑖 − 𝑖=2 (𝑛𝑖 − 1)
Then, a general tensor in R𝑟 has a unique rank-𝑟 decomposition.

Remark 12.9 There are other notions of tensor rank, and these give alternative decompo-
sitions. Let 𝒌 = (𝑘 1 , . . . , 𝑘 𝑑 ) be a vector of integers with 1 ≤ 𝑘 𝑖 ≤ 𝑛𝑖 . Let 𝐴 ∈ R𝑛1 ×···×𝑛𝑑
and 𝐹1 , . . . , 𝐹𝑑 be the flattenings of 𝐴. Then, we say that 𝐴 has multilinear rank (at most) 𝒌
if rank(𝐹 𝑗 ) ≤ 𝑘 𝑗 for all 1 ≤ 𝑗 ≤ 𝑑. A block term decomposition of the tensor 𝐴 has the
form 𝐴 = 𝐴1 + · · · + 𝐴𝑟 , where each 𝐴𝑖 has low multilinear rank 𝒌. For order-three tensors,
a block term decomposition can be visualized as follows:

= + ··· + .
154 12 Tensors

The rank decomposition is the special case k = (1, . . . , 1). In statistics, this corresponds
to mixtures of independence models. Block term decompositions represent mixtures of
discrete probability distributions that are more complex. Identifiability for block term
decompositions is less studied than for rank decompositions. Some results, primarily for
the case 𝑑 = 3, can be found in [118] and references therein. ⋄

12.2 Eigenvectors and Singular Vectors

In this section, we study the Euclidean distance (ED) problem for the Segre variety and
the Veronese variety. We start with the observation that each of them is the image of a
polynomial map. The maps are

𝜓 : R𝑛1 × · · · × R𝑛𝑑 → S, (v1 , . . . , v𝑑 ) ↦→ v1 ⊗ · · · ⊗ v𝑑 , and


(12.7)
𝜈 : R𝑛 → V, v ↦→ v⊗𝑑 .

We first consider the ED problem for the Segre variety S. Given any tensor 𝐴 ∈ R𝑛1 ×···×𝑛𝑑 ,
we seek the rank one tensor 𝐵 which is closest to 𝐴 in Euclidean norm. Thus, we must
solve the optimization problem

min ∥ 𝐴 − 𝐵∥ = min𝑛 ∥ 𝐴 − 𝜓(v1 , . . . , v𝑑 ) ∥. (12.8)


𝐵∈S v𝑖 ∈R 𝑖

Consider the best rank 𝑟 approximation for a tensor 𝐴 of order 𝑑 ≥ 3. This means computing
min 𝐵∈R𝑟 ∥ 𝐴 − 𝐵∥. For 𝑟 = 1, this is precisely (12.8), and we shall present the solution in
this section. For 𝑟 ≥ 2, this problem can be ill-posed (i.e., no minimizer exists). In fact,
Proposition 12.7 implies that this problem is ill-posed for all tensors 𝐴 in a full-dimensional
open subset of R𝑛1 ×···×𝑛𝑑 . This was first noted by de Silva and Lim [53]. This is different for
matrices, where the Eckart–Young Theorem (Theorem 2.9) provides an explicit algorithm
for computing the minimizer. Likewise, for 𝑟 = 1, the image of the Segre map 𝜓 is closed,
and hence the problem (12.8) has a solution 𝐵 ∈ S. Our goal is to identify this 𝐵.
The critical values of the distance function S → R, 𝐵 ↦→ ∥ 𝐴 − 𝐵∥ are in one-to-one
correspondence to the critical values of

R𝑛1 × · · · × R𝑛𝑑 → S, (v1 , . . . , v𝑑 ) ↦→ ∥ 𝐴 − 𝜓(v1 , . . . , v𝑑 ) ∥,

up to scaling (v1 , . . . , v𝑑 ) ↦→ (𝑡 1 v1 , . . . , 𝑡 𝑑 v𝑑 ) with 𝑡1 · · · 𝑡 𝑑 = 1. Our goal is therefore to


find the critical points of the function that maps the tuple (v1 , . . . , v𝑑 ) to

∥ 𝐴 − 𝜓(v1 , . . . , v𝑑 ) ∥ 2 = ∥ 𝐴∥ 2 − 2⟨𝐴, 𝜓(v1 , . . . , v𝑑 )⟩ + ∥𝜓(v1 , . . . , v𝑑 ) ∥ 2 . (12.9)

We compute the gradient of this function and set it equal to zero. This yields the critical
points 𝐵 we are interested in. By (12.3), the norm of 𝜓 can be written as

∥𝜓(v1 , . . . , v𝑑 ) ∥ 2 = ∥v1 ∥ 2 · · · ∥v𝑑 ∥ 2 .


12.2 Eigenvectors and Singular Vectors 155

The gradient of (12.9) with respect to v 𝑘 therefore equals

− 2 dvd𝑘 ⟨𝐴, 𝜓(v1 , . . . , v𝑑 )⟩ + d


dv 𝑘 (∥v1 ∥ 2 · · · ∥v𝑑 ∥ 2 )
 ⟨𝐴, v1 ⊗ · · · ⊗ v 𝑘−1 ⊗ e1 ⊗ v 𝑘+1 ⊗ · · · ⊗ v𝑑 ⟩ 

..
  Ö  (12.10)
2
= −2  + 2 ∥v ∥ v𝑘 .
 
.  𝑗
 
 ⟨𝐴, v1 ⊗ · · · ⊗ v 𝑘−1 ⊗ e𝑛 ⊗ v 𝑘+1 ⊗ · · · ⊗ v𝑑 ⟩  𝑗≠𝑘
 𝑘 
Here e1 , . . . , e𝑛𝑘 is the standard basis of R𝑛𝑘 . Abbreviating 𝜎𝑘 := 𝑗≠𝑘 ∥v 𝑗 ∥ 2 , we write
Î

the critical equations dvd𝑘 ∥ 𝐴 − 𝜓(v1 , . . . , v𝑑 ) ∥ 2 = 0 from (12.10) in compact form:

𝐴 • ⊗ 𝑗≠𝑘 v 𝑗 = 𝜎𝑘 · v 𝑘 for 𝑘 = 1, . . . , 𝑑. (12.11)

For 𝑑 = 3, we can visualize this as follows:

v𝑖 v𝑗 = 𝜎𝑘 · v𝑘 (12.12)

Definition 12.10 Let 𝐴 ∈ R𝑛1 ×···×𝑛𝑑 . We say that (v1 , . . . , v𝑑 ) ∈ C𝑛1 × · · · × C𝑛𝑑 , v𝑖 ≠ 0,
is a singular vector tuple for 𝐴 if the equation (12.11) is valid for some 𝜎1 , . . . , 𝜎𝑑 ∈ C. If
this holds, then (𝑡 1 v1 , . . . , 𝑡 𝑑 v𝑑 ) satisfies the same condition, for all 𝑡1 , . . . , 𝑡 𝑑 ∈ C \ {0}.
Thus, singular vector tuples are considered only up to scaling.
For 𝑑 = 2, this coincides with the classic definition for rectangular matrices. The singular
vector pair consists of the left singular vector and the right singular vector. The singular
value decomposition implies that a general matrix 𝐴 ∈ R𝑛1 ×𝑛2 has precisely min{𝑛1 , 𝑛2 }
real singular vector pairs. For higher-order tensors, not all singular vectors need to be real.
Proposition 12.11 The critical points (over C) of the ED problem for the Segre variety S
are the tuples of singular vectors. Hence, the Euclidean distance degree of S equals the
number of singular vector tuples.
Proof The computation in (12.10) shows that every critical point of the optimization
problem (12.8) is a singular vector tuple of the tensor 𝐴. Conversely, consider a solution
of (12.11). Multiplying (12.11) from the left with v⊤𝑘 yields that 𝜎𝑘 · ∥v 𝑘 ∥ 2 = 𝐴 • ⊗ 𝑑𝑗=1 v 𝑗
is independent of 𝑘. Thus, 𝑡 := 𝜎𝑘 · ∥v 𝑘 ∥ 2 / 𝑑𝑗=1 ∥v 𝑗 ∥ 2 is independent of 𝑘. Now, rescaling
Î
(v1 , . . . , v𝑑 ) by (𝑡1 , . . . , 𝑡 𝑑 ) such that 𝑡1 · 𝑡2 · · · 𝑡 𝑑 = 𝑡 yields a new solution of (12.11) that
satisfies 𝜎𝑘 = 𝑗≠𝑘 ∥v 𝑗 ∥ 2 for all 𝑘. Hence, the critical points are in bijection with the
Î

singular vector tuples, assuming that these are viewed as points in P𝑛1 −1 × · · · × P𝑛𝑑 −1 . □
Example 12.12 (𝑑 = 3) Fix an 𝑛1 ×𝑛2 ×𝑛3 tensor 𝐴 = (𝑎 𝑖 𝑗 𝑘 ). Our unknowns are the vectors
v1 = (𝑥1 , . . . , 𝑥 𝑛1 ) ∈ P𝑛1 −1 , v2 = (𝑦 1 , . . . , 𝑦 𝑛2 ) ∈ P𝑛2 −1 , and v3 = (𝑧 1 , . . . , 𝑧 𝑛3 ) ∈ P𝑛3 −1 .
The singular vector equations (12.11) are
Í𝑛2 Í𝑛3
𝑗=1 𝑘=1 𝑎 𝑖 𝑗 𝑘 𝑦 𝑗 𝑧 𝑘 = 𝜎1 𝑥 𝑖 for 𝑖 = 1, 2, . . . , 𝑛1 ,
Í𝑛1 Í𝑛3
𝑘=1 𝑎 𝑖 𝑗 𝑘 𝑥 𝑖 𝑧 𝑘 = 𝜎2 𝑦 𝑗 for 𝑗 = 1, 2, . . . , 𝑛2 ,
Í𝑖=1
𝑛1 Í𝑛2
𝑖=1 𝑗=1 𝑎 𝑖 𝑗 𝑘 𝑥 𝑖 𝑦 𝑗 = 𝜎3 𝑧 𝑘 for 𝑘 = 1, 2, . . . , 𝑛3 .
156 12 Tensors

To work modulo scaling, we set 𝑥 1 = 𝑦 1 = 𝑧1 = 1. Then this is a square system of


polynomial equations, and it has finitely many solutions for generic tensors 𝐴 = (𝑎 𝑖 𝑗 𝑘 ).
For instance, the number of solutions is 6 when 𝑛1 = 𝑛2 = 𝑛3 = 2 and it is 37 when
𝑛1 = 𝑛2 = 𝑛3 = 3. This will be explained by Theorem 12.13.
Îour ED problem (12.8), we retain 𝑥1 , 𝑦 1 , 𝑧1 as unknowns,
To obtain the critical points of
and we add the constraints 𝜎𝑘 = 𝑗≠𝑘 ∥v 𝑗 ∥ 2 for 𝑘 = 1, 2, 3. Explicitly, for 𝑛1 = 𝑛2 = 𝑛3 = 2,
these constraints are the polynomial equations

(𝑥 12 + 𝑥22 ) (𝑦 21 + 𝑦 22 ) = 𝜎3 , (𝑥12 + 𝑥22 ) (𝑧12 + 𝑧 22 ) = 𝜎2 , and (𝑦 21 + 𝑦 22 ) (𝑧12 + 𝑧 22 ) = 𝜎1 .

For each singular vector triple, we obtain a curve of solutions that maps to the same critical
tensor 𝐵 of rank one, up to scaling. For instance, for 𝑛1 = 𝑛2 = 𝑛3 = 2, there are six
such curves. Each of them has degree 12. In other words, the formulation on the right
of (12.8) requires some care because the rank one factorization (12.1) is not unique. By
using singular vector tuples up to scaling, we are on the safe side. ⋄
The following theorem of Friedland and Ottaviani [68] gives a formula, in terms of
𝑛1 , 𝑛2 , . . . , 𝑛 𝑑 , for the number of singular vector tuples, and so for the ED degree of S.
Theorem 12.13 Let 𝐴 ∈ R𝑛1 ×···×𝑛𝑑 be a general tensor. The number of singular vector
tuples of 𝐴, counted up to scaling (v1 , . . . , v𝑑 ) ↦→ (𝑡1 v1 , . . . , 𝑡 𝑑 v𝑑 ), is the coefficient
of 𝑥1𝑛1 −1 · · · 𝑥 𝑑𝑛𝑑 −1 in the polynomial

Ö𝑑
𝑓𝑖𝑛𝑖 − 𝑥𝑖𝑛𝑖 ∑︁
, where 𝑓𝑖 := 𝑥𝑗.
𝑖=1
𝑓𝑖 − 𝑥 𝑖 𝑗≠𝑖

Example 12.14 The formula in Theorem 12.13 for binary tensors 𝐴 ∈ R2×···×2 gives

Ö𝑑
𝑓𝑖2 − 𝑥𝑖2 Ö𝑑
= ( 𝑓𝑖 + 𝑥𝑖 ) = (𝑥 1 + 𝑥2 + · · · + 𝑥 𝑑 ) 𝑑 .
𝑖=1
𝑓 𝑖 − 𝑥 𝑖 𝑖=1

The coefficient of 𝑥1 𝑥2 · · · 𝑥 𝑑 in this polynomial equals 𝑑!. In particular, the ED degree of


the Segre variety S in R2×2×2 is found to be 3! = 6. ⋄
We turn from general tensors to symmetric tensors, and we consider the ED problem for
the Veronese variety V in Definition 12.5. Now 𝐴 is a symmetric tensor, all v𝑖 are equal to
the same vector v in R𝑛 , and the gradient in (12.10) does not depend on 𝑘. Setting 𝜆 := 𝜎𝑘 ,
the critical equations for the ED problem on V are

𝐴 • v⊗ (𝑑−1) = 𝜆v. (12.13)

Similarly to (12.12), we visualize this equation for symmetric tensors of order 𝑑 = 3:

v v = 𝜆· v
12.2 Eigenvectors and Singular Vectors 157

Definition 12.15 Let 𝐴 ∈ 𝑆 𝑑 (R𝑛 ). We call v ∈ C𝑛 \{0} an eigenvector of 𝐴 if (12.13) holds


for some 𝜆 ∈ C. The pair (v, 𝜆) is called an eigenpair of the symmetric tensor 𝐴.
Eigenpairs have another interesting interpretation, next to being critical points for the
Euclidean distance problem on the Veronese variety V. Recall that every symmetric tensor
𝐴 ∈ 𝑆 𝑑 (R𝑛 ) corresponds uniquely to a homogeneous polynomial 𝐹𝐴 (x) = ⟨𝐴, x⊗𝑑 ⟩ of
degree 𝑑 in 𝑛 variables. Under this interpretation, the vector 𝐴 • x⊗ (𝑑−1) on the left in
(12.13) is the gradient vector ∇𝐹𝐴 (x) = (𝜕𝐹𝐴/𝜕𝑥1 , . . . , 𝜕𝐹𝐴/𝜕𝑥 𝑛 ) ⊤ . Therefore, eigenpairs
correspond to fixed points of the gradient map P𝑛−1 d P𝑛−1 , x ↦→ ∇𝐹𝐴 (x).
Example 12.16 (𝑛 = 3) Symmetric tensors of order 𝑑 and format 3 × 3 × · · · × 3 correspond
to ternary forms 𝐹 (𝑥1 , 𝑥2 , 𝑥3 ) of degree 𝑑. The eigenvectors of such a tensor are solutions of

𝜕𝐹/𝜕𝑥1 = 𝜆𝑥 1 , 𝜕𝐹/𝜕𝑥2 = 𝜆𝑥 2 , 𝜕𝐹/𝜕𝑥3 = 𝜆𝑥 3 .

Eliminating 𝜆 is equivalent to the statement that the following matrix has rank one:
 
𝑥1 𝑥2 𝑥3
.
𝜕𝐹/𝜕𝑥1 𝜕𝐹/𝜕𝑥2 𝜕𝐹/𝜕𝑥3

This is a dependent system of three homogeneous equations of degree 𝑑 in three variables.


The number of solutions (𝑥1 : 𝑥2 : 𝑥3 ) in P2 equals 𝑑 2 − 𝑑 + 1. For 𝑑 = 2, these are just
the three eigenvectors of a symmetric 3 × 3 matrix. For 𝑑 = 3, one interesting example
is 𝐹 = 𝑥13 + 𝑥 23 + 𝑥23 . The corresponding 3 × 3 × 3 tensor has 7 eigenvectors, namely the
elements of {0, 1}3 \{0}3 . How about 𝐹 = 𝑥 1𝑑 + 𝑥2𝑑 + 𝑥3𝑑 for 𝑑 ≥ 4? ⋄
We now remove the assumption that 𝐴 is symmetric. Definition 12.15 makes sense for
any 𝐴 ∈ (R𝑛 ) ⊗𝑑 . We lose the interpretations above, but we gain a general definition. The
number of eigenpairs of a general tensor was found by Cartwright and Sturmfels in [39].
Theorem 12.17 Let 𝐴 ∈ (R𝑛 ) ⊗𝑑 be a general tensor. The number of complex eigenvectors
of 𝐴, up to scaling v ↦→ 𝑡v, is the sum
𝑛−1
∑︁
(𝑑 − 1) 𝑖 .
𝑖=0

Proof For 𝑑 = 2, the sum gives 𝑛, which is the number of eigenvectors of a general matrix
𝐴 ∈ R𝑛×𝑛 . Hence, we assume 𝑑 > 2 from now on. We use the same proof strategy as for
Corollary 3.15. Consider the symmetric tensor 𝐴 with

𝐹𝐴 (x) = 𝑥 1𝑑 + 𝑥2𝑑 + · · · + 𝑥 𝑛𝑑 .

The equations for its eigenpairs are

𝑥 1𝑑−1 − 𝜉 𝑑−2 𝑥 1 = 𝑥 2𝑑−1 − 𝜉 𝑑−2 𝑥 2 = · · · = 𝑥 𝑛𝑑−1 − 𝜉 𝑑−2 𝑥 𝑛 = 0,

where 𝜆 = 𝜉 𝑑−2 is the eigenvalue. We count that this system of homogeneous polynomial
equations has precisely (𝑑 − 1) 𝑛 regular solutions in P𝑛 . By Bézout’s theorem, a general
158 12 Tensors

system of 𝑛 polynomials with degrees (𝑑 − 1, . . . , 𝑑 − 1) also has (𝑑 − 1) 𝑛 regular zeros.


The Parameter Continuation Theorem 3.18 then implies that the analogous equations for
a general tensor 𝐴 ∈ (R𝑛 ) ⊗𝑑 also have (𝑑 − 1) 𝑛 regular zeros. We remove the extraneous
solution in P𝑛 that is given by 𝜉 = 1 and x = 0. The remaining (𝑑 − 1) 𝑛 − 1 solutions come
in clusters of 𝑑 − 2, where 𝜉 runs over the (𝑑 − 2)-th roots of unity. After taking the image
of the projection (𝜉, x) ↦→ x, the number of distinct points x in P𝑛−1 is the quotient
𝑛−1
(𝑑 − 1) 𝑛 − 1 ∑︁
= (𝑑 − 1) 𝑖 .
𝑑−2 𝑖=0
Í𝑛−1
We conclude that a general tensor of format 𝑛 × · · · × 𝑛 has 𝑖=0 (𝑑 − 1) 𝑖 eigenvectors. □
For matrices, every 𝑛-tuple of linearly independent vectors can be eigenvectors of a
matrix. For tensors, this is not so. Abo, Sturmfels, and Seigal proved in [1] that a set of 𝑑
points v1 , . . . , v𝑑 in C2 is the eigenconfiguration of a symmetric tensor in 𝑆 𝑑 (C2 ) if and
𝜕2 𝜕2 𝑘
only if 𝑑 is odd, or 𝑑 = 2𝑘 is even and the differential operator ( 𝜕𝑥 2 + 𝜕𝑦 2 ) annihilates
Î𝑑
the binary form 𝑓v𝑖 (𝑥, 𝑦) := 𝑖=1 (𝑏 𝑖 𝑥 − 𝑎 𝑖 𝑦), where v𝑖 = (𝑎 𝑖 , 𝑏 𝑖 ), for all 𝑖 = 1, . . . , 𝑑. The
extension of this result to any number of variables was studied by Beorchia, Galuppi, and
Venturello in [17]. This study of eigenschemes continues to be an area of active research.
In this section, we showed that the ED problem for Segre varieties and Veronese
varieties leads directly to singular vectors and eigenvectors of tensors. By the ED duality in
Theorem 2.23, it is equivalent to study the ED problem for the dual hypersurfaces, which
are the hyperdeterminant and the discriminant, respectively. This, in turn, takes us to the
geometry of condition numbers, as discussed in Chapter 9. A natural generalization arises
from the Segre–Veronese varieties, whose polar degrees we saw in Theorem 5.18.

12.3 Volumes of Rank-One Varieties

We now shift gears, and we examine the metric geometry of the Segre variety and the
Veronese variety. Both are now taken to be complex projective varieties. To this end, we
pass to complex projective space P 𝑁 , where 𝑁 = 𝑛1 · · · 𝑛 𝑑 − 1, or 𝑁 = 𝑛 𝑑 − 1 if the 𝑛𝑖 are
all equal. Our two complex projective varieties are

SP := v1 ⊗ · · · ⊗ v𝑑 ∈ P 𝑁 | v𝑖 ∈ P𝑛𝑖 −1 , 1 ≤ 𝑖 ≤ 𝑑

and
 ⊗𝑑 (12.14)
𝑁 𝑛−1
VP := v ∈ P | v𝑖 ∈ P .

Thus, SP consists of rank-one tensors v1 ⊗ · · · ⊗ v𝑑 , where v𝑖 ∈ C𝑛𝑖 , taken up to scaling by


C∗ . Similarly, VC consists of all vectors v⊗𝑑 for v ∈ C𝑛 , again taken up to scaling by C∗ .
Our aim is to compute the volumes of SP and VP . The first crucial step is to explain
what this means. In Section 6.3 and Chapter 14, we discuss volumes of real semialgebraic
sets. But here, the situation is different. In this section, our objects are lower-dimensional
12.3 Volumes of Rank-One Varieties 159

submanifolds in the complex projective space P 𝑁 . How does one measure volumes in P 𝑁 ?
How is the volume of a submanifold defined and computed?
We begin with the Hermitian inner product on the tensor space C𝑛1 ×···×𝑛𝑑 . This is
𝑛1
∑︁ 𝑛𝑑
∑︁
⟨𝐴, 𝐵⟩C := ··· 𝑎 𝑖1 ,...,𝑖𝑑 · 𝑏 𝑖1 ,...,𝑖𝑑 .
𝑖1 =1 𝑖𝑑 =1

We view C𝑛1 ×···×𝑛𝑑 as a real Euclidean space


 of dimension 2𝑛1 · · · 𝑛 𝑑 , where the Euclidean
inner product is ( 𝐴, 𝐵) ↦→ Re ⟨𝐴, 𝐵⟩C . The same definitions make sense in C𝑛 , now
identified with R2𝑛 , and we define the unit sphere in the Euclidean space C𝑛 as

S2𝑛−1 := {a ∈ C𝑛 | ⟨a, a⟩C = 1}.

This sphere is a real manifold of real dimension dimR S2𝑛−1 = 2𝑛 − 1. The projection
𝜋 : S2𝑛−1 → P𝑛−1 sends a vector a ∈ S2𝑛−1 to its class in complex projective space. The
fiber of the quotient map 𝜋 has real dimension one: it is a circle. The tangent space of the
sphere S2𝑛−1 at a point a is the real vector space

𝑇a S2𝑛−1 = t ∈ C𝑛 | Re ⟨a, t⟩C = 0 ≃ R2𝑛−1 .


 

Lemma 12.18 Let t ∈ C𝑛 . We have Re(⟨a, t⟩ √C ) = 0 if and only if t is a point in the real
hyperplane spanned by the real line through −1 · a and the codimension-two linear space
defined by ⟨a, t⟩C = 0.
Proof The space of all t ∈ C𝑛 such that Re(⟨a,
√ t⟩C ) = 0 is a linear space of real codimension
one in C𝑛  R2𝑛 . If t is a real multiple of −1·a or ⟨a, t⟩C = 0, then we have Re(⟨a, t⟩C ) = 0.
The other inclusion follows from comparing dimensions. □

For x = 𝜋(a) ∈ P𝑛−1 , the fiber under 𝜋 is 𝜋 −1 (x) = exp( −1𝜑) · a | 𝜑 ∈ R . Its tangent

d
√ √
space at a is spanned by ( d𝜑 exp( −1𝜑) · a)| 𝜑=0 = −1 · a. Consequently, Lemma 12.18
implies that the tangent space of the sphere 𝑇a S2𝑛−1√ has an orthogonal decomposition
into the tangent space of the fiber 𝑇a 𝜋 −1 (x) = R · −1 a and the linear space defined
by ⟨a, t⟩C = 0. Therefore, we can view the following as the tangent space of projective
space at the point x = 𝜋(a), where a ∈ S2𝑛−1 :

𝑇x P𝑛−1 = { t ∈ C𝑛 | ⟨a, t⟩C = 0 } ≃ R2𝑛−2 . (12.15)

In conclusion, the complex projective space P𝑛−1 is a Riemannian manifold with respect to
the Euclidean structure Re(⟨a, b⟩)C . This induces a notion of volume for subsets of P𝑛−1 .
Our metric structures on S2𝑛−1 and P𝑛−1 have the property that the projection 𝜋 is a
Riemannian submersion. This implies that the 𝑚-dimensional real volume of a measurable
subset 𝑈 ⊂ P𝑛−1 is
vol𝑚 (𝑈) = 21𝜋 vol𝑚+1 (𝜋 −1 (𝑈)),
since the preimage 𝜋 −1 (x) for x ∈ P𝑛−1 is a circle.
160 12 Tensors

The volume of projective space itself is

1 𝜋 𝑛−1
vol2(𝑛−1) (P𝑛−1 ) = vol2𝑛−1 (S2𝑛−1 ) = . (12.16)
2𝜋 (𝑛 − 1)!
In the following, we sometimes omit the subscript from vol when the dimension is clear
from the context. For the next proposition, we abbreviate 𝑚 := dimR SP .
Proposition 12.19 The 𝑚-dimensional volume of the Segre variety SP in (12.14) is

vol(SP ) = vol(P𝑛1 −1 ) · · · vol(P𝑛𝑑 −1 ).

Proof The Segre map from (12.7) for complex projective space is the smooth embedding

𝜓P : P𝑛1 −1 × · · · × P𝑛𝑑 −1 → SP .

Let (x1 , . . . , x𝑑 ) ∈ P𝑛1 −1 × · · · × P𝑛𝑑 −1 and a𝑖 ∈ S2𝑛𝑖 −1 with 𝜋(a𝑖 ) = x𝑖 for 𝑖 = 1, . . . , 𝑑.


We also fix elements t𝑖 ∈ C𝑛𝑖 with ⟨a𝑖 , t𝑖 ⟩C = 0 for all 𝑖. These specify vectors in the
various tangent spaces (12.15). The derivative of the Segre map 𝜓P at our point takes
(t1 , . . . , t𝑑 ) ∈ 𝑇(x1 ,...,x𝑑 ) (P𝑛1 −1 × · · · × P𝑛𝑑 −1 ) to

𝜃 := t1 ⊗ a2 ⊗ · · · ⊗ a𝑑 + a1 ⊗ t2 ⊗ · · · ⊗ a𝑑 + · · · + a1 ⊗ a2 ⊗ · · · ⊗ t𝑑 .

It follows from (12.3) that the terms in this sum are pairwise orthogonal. Therefore,

∥𝜃 ∥ 2 = ∥t1 ∥ 2 + ∥t2 ∥ 2 + · · · + ∥t𝑑 ∥ 2 .

Hence, the derivative of 𝜓P preserves norms, and 𝜓P is a volume-preserving embedding.□


Proposition 12.20 The 2(𝑛 − 1)-dimensional volume of the Veronese variety in (12.14) is

vol(VP ) = 𝑑 𝑛−1 · vol(P𝑛−1 ).

Proof The proof is similar to that of Proposition 12.19. We denote the projective Veronese
map by 𝜈P : P𝑛−1 → VP . Just like the Segre map, 𝜈P is a smooth embedding. Let x ∈ P𝑛−1
be a point in projective space and fix a representative a ∈ S2𝑛−1 for x; i.e., 𝜋(a) = x. Let
t ∈ C𝑛 with ⟨a, t⟩C = 0. The derivative of 𝜈P at a maps t ∈ 𝑇x P𝑛−1 to

𝜃 := t ⊗ a ⊗ · · · ⊗ a + a ⊗ t ⊗ · · · ⊗ a + · · · + a ⊗ a ⊗ · · · ⊗ t.

It follows from (12.3) that the terms in this sum are pairwise orthogonal,
√ so ∥𝜃 ∥ 2 = 𝑑 ∥t∥ 2 .
This shows that the derivative of 𝜈P scales norms by a factor of 𝑑. We get the formula
√  dimR P𝑛−1
vol(VP ) = 𝑑 · vol(P𝑛−1 ) = 𝑑 𝑛−1 · vol(P𝑛−1 ),

which relates the volume of the Veronese variety to that of the underlying projective space.□
The volume of a complex projective variety is closely related to its degree. This is
the content of Howard’s Kinematic Formula [94], which concerns the average volume of
12.3 Volumes of Rank-One Varieties 161

intersections of submanifolds in homogeneous spaces. For complex projective space, we


apply [94, Theorem 3.8 & Corollary 3.9] as follows. Let 𝑀 ⊂ P 𝑁 be a smooth manifold of
complex dimension 𝑚. Here, the Kinematic Formula states

vol2𝑚 (𝑀)
E𝑈 #(𝑀 ∩ 𝑈 · (P 𝑁 −𝑚 × {0} 𝑚 )) = ,
vol2𝑚 (P𝑚 )

where the expectation refers to the probability Haar measure on the unitary group 𝑈 (𝑁 +1).
If 𝑋 ⊂ P 𝑁 is a smooth variety of complex dimension 𝑚, then the number of intersection
points #(𝑋 ∩ 𝑈 · (P 𝑁 −𝑚 × {0} 𝑚 )) equals the degree of 𝑋 for almost all 𝑈 ∈ 𝑈 (𝑁 + 1).
Thus, we take the expected value of a constant function:

vol2𝑚 (𝑋)
deg(𝑋) = , where 𝑚 = dimC (𝑋). (12.17)
vol2𝑚 (P𝑚 )
Using Propositions 12.19 and 12.20, our volume computation yields the following result:
Corollary 12.21 The degrees of the Segre variety and the Veronese variety are equal to
(𝑛1 + · · · + 𝑛 𝑑 − 𝑑)!
(a) deg(SP ) = ,
(𝑛1 − 1)! · · · (𝑛 𝑑 − 1)!
(b) deg(VP ) = 𝑑 𝑛−1 .
Proof The second formula follows directly from Proposition 12.20 and (12.17). For the first
𝜋 𝑛−1
formula, we recall from (12.16) the volume of projective space: vol2(𝑛−1) (P𝑛−1 ) = (𝑛−1)! .
We set 𝑚 := dimC SP . Using Proposition 12.19 and (12.17) we then have
Í𝑑
vol(P𝑛1 −1 ) · · · vol(P𝑛𝑑 −1 ) 𝜋 𝑖=1 (𝑛𝑖 −1) 𝑚!
deg(SP ) = =
vol(P ) 𝑚 𝜋 𝑚 (𝑛1 − 1)! · · · (𝑛 𝑑 − 1)!
(𝑛1 + · · · + 𝑛 𝑑 − 𝑑)!
= ,
(𝑛1 − 1)! · · · (𝑛 𝑑 − 1)!
where we have used that 𝑚 = 𝑛1 + · · · + 𝑛 𝑑 − 𝑑. □
Remark 12.22 By (12.2), a linear equation on the Veronese variety VP is a homogeneous
polynomial equation of degree 𝑑 on projective space P𝑛−1 . Thus, deg(VP ) = 𝑑 𝑛−1 means
that 𝑛 − 1 general homogeneous polynomials of degree 𝑑 have 𝑑 𝑛−1 zeros.
Remark 12.23 Howard’s Kinematic Formula [94] also provides the following result for real
projective space PR𝑁 . Let 𝑀 ⊂ PR𝑁 be a real submanifold of real dimension 𝑚. Then, the
Kinematic Formula implies that E𝑈 #(𝑀 ∩ 𝑈 · (PR𝑁 −𝑚 × {0} 𝑚 )) = vol𝑚 (𝑀)/vol𝑚 (PR𝑚 ),
where the expectation refers to the probability measure on the real orthogonal group
𝑂 (𝑛 + 1). Thus, the volume of real projective varieties can be interpreted as an “average
degree”. We can use the same proof strategies as above to show that the projective volume
of the real Segre variety S is equal to vol(PR𝑛1 −1 ) · · · vol(PR𝑛𝑑 −1 ) and the projective volume

of the real Veronese V is 𝑑 𝑛−1 · vol(PR𝑛−1 ). The latter result was first derived by Edelman
and Kostlan in their seminal paper [66]. They use this to find the average number of real
zeros of a system of homogeneous polynomials of degree 𝑑 in 𝑛 variables.
162 12 Tensors

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International
License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and
reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter’s Creative Commons
license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s
Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the
permitted use, you will need to obtain permission directly from the copyright holder.
Chapter 13
Computer Vision

The field of computer vision studies how computers can gain understanding from images
and videos, similar to human cognitive abilities. One of the classical challenges is to
reconstruct a 3D object from images taken by several unknown cameras. While the resulting
questions in multiview geometry [80] have a long history in computer vision, recent years
have seen a confluence with ideas and algorithms from algebraic geometry. This led to
the development of a new subject area called Algebraic Vision [104]. In this chapter, we
present an introduction to this area from the perspective of metric algebraic geometry.

13.1 Multiview Varieties

A pinhole camera consists of a point c, called camera center, and an image plane 𝐻 in
3-space. Taking an image of a 3D point x is modeled by the following process. One draws
a line between x and the camera center c. The intersection point of that line with 𝐻 is
the image point. This is shown in Figure 13.1. The common algebraic model for such a
camera is a surjective linear projection 𝐶 : P3 d P2 , given by a full-rank 3 × 4 matrix 𝐴,
i.e., 𝐶 (x) = 𝐴x. Thus, we work in projective geometry, with homogeneous coordinates.
We take 3D points in projective space P3 , and we identify the image plane 𝐻 with the
projective plane P2 . For arbitrary 𝐴, such cameras are called projective or uncalibrated.
In many applications, one does not allow arbitrary matrices 𝐴 because one assumes
several internal camera parameters, such as focal length, to be known. Calibrated cameras
are those that can be obtained by rotating and translating a camera in standard position; see
3 2
Figure13.1. The standard camera is the linear projection
  P d P , [𝑥1 : 𝑥2 : 𝑥3 : 𝑥4 ] ↦→
[𝑥 1 : 𝑥2 : 𝑥3 ], given by the 3 × 4 matrix 𝐴 = 𝐼3 | 0 . Thus, all calibrated cameras are
given by matrices 𝐴 = 𝑅 | 𝑡 , where 𝑅 ∈ SO(3) and 𝑡 ∈ R3 . Between uncalibrated and
 

calibrated cameras, there are also partially calibrated camera models; see [80, Chapter 6].
For 3D reconstruction, one needs at least two cameras. The joint camera map is

Φ : C𝑚 × 𝑋 d 𝑌 . (13.1)

© The Author(s) 2024 163


P. Breiding et al., Metric Algebraic Geometry, Oberwolfach Seminars 53,
https://doi.org/10.1007/978-3-031-51462-3_13
164 13 Computer Vision

x = (x,y, z ) c

C(x) = (x / z ,y / z ,1)
R,t

(0 , 0, 1 )

Fig. 13.1: Calibrated cameras: in standard position (on the left) and arbitrary (on the right).

This map takes an 𝑚-tuple of cameras (𝐶1 , . . . , 𝐶𝑚 ) ∈ C𝑚 and an algebraic 3D object


x ∈ 𝑋 to the 𝑚 images (𝐶1 (x), . . . , 𝐶𝑚 (x)) ∈ 𝑌 . Here, 𝑋 and 𝑌 are appropriate spaces
of objects and their images, respectively. For instance, the 3D object x could be a single
point (i.e., 𝑋 = P3 ), a line (i.e., 𝑋 = Gr(1, P3 )), an arrangement of points and lines with
prescribed incidences, a curve, or a surface. The image space 𝑌 parametrizes 𝑚-tuples of
points, lines, or other arrangments in P2 . For instance, if 𝑋 = P3 then 𝑌 = (P2 ) 𝑚 .
Formally, the task of 3D reconstruction from unknown cameras means to compute fibers
under the joint camera map Φ. Thus, there are unknown objects in 3-space and 𝑚 unknown
cameras. We get to see the planar projections of the objects. The task is to find the original
objects and the cameras with which the images were taken.

Example 13.1 For 𝑚 = 2 projective cameras observing 𝑘 points, the joint camera map is

Φ : (P R3×4 ) 2 × (P3R ) 𝑘 d (P2R ) 𝑘 × (P2R ) 𝑘 ,


(13.2)
( 𝐴1 , 𝐴2 , x1 , . . . , x 𝑘 ) ↦→ ( 𝐴1 x1 , . . . , 𝐴1 x 𝑘 , 𝐴2 x1 , . . . , 𝐴2 x 𝑘 ).

It is defined whenever none of the 3D points x𝑖 is the kernel of 𝐴1 or 𝐴2 . The kernel of the
matrix 𝐴𝑖 is the camera center of 𝐶𝑖 . We note that Φ maps a space of dimension 22 + 3𝑘
to a space of dimension 4𝑘. The general non-empty fiber has dimension at least 15. This
is given by transforming 𝐴𝑖 ↦→ 𝐴𝑖 𝑔 and x 𝑗 ↦→ 𝑔 −1 x 𝑗 for some 𝑔 ∈ PGL(4). For large 𝑘,
the image of Φ is a proper subvariety of its codomain. For small 𝑘, the map Φ is dominant.
The transition occurs for 𝑘 = 7. Indeed, 7 is the largest 𝑘 such that the map Φ is dominant.
We will study this issue of dominance transition in Section 13.3.
For calibrated cameras, given by matrices 𝐴𝑖 = [ 𝑅𝑖 | 𝑡𝑖 ], the joint camera map becomes

Φ : (SO(3) × R3 ) 2 × (P3R ) 𝑘 d (P2R ) 𝑘 × (P2R ) 𝑘 . (13.3)

Here, the domain has dimension 12 + 3𝑘. The dominance transition occurs at 𝑘 = 5. ⋄
13.1 Multiview Varieties 165

We now change the problem, and we assume that the cameras are fixed and known.
We are thus fixing a camera configuration 𝐶 = (𝐶1 , . . . , 𝐶𝑚 ) ∈ C𝑚 , and we consider the
specialization Φ𝐶 : 𝑋 d 𝑌 of the joint camera map. The Zariski closure of the image of
that map is the multiview variety M𝐶 of the cameras 𝐶.
In what follows, we focus on the multiview variety of a single point in 3-space. This
means that 𝑋 = P3 and 𝑌 = (P2 ) 𝑚 . In this case, the multiview variety M𝐶 is the closure of
the image of the map given by multiplying the same vector with 𝑚 distinct matrices:

Φ𝐶 : P3 d (P2 ) 𝑚 , x ↦→ ( 𝐴1 x, 𝐴2 x, . . . , 𝐴𝑚 x). (13.4)

This map is well-defined at all points of P3 except for the camera centers ker( 𝐴𝑖 ). If 𝑚 ≥ 2
and not all camera centers coincide, then M𝐶 is a threefold. For an algebraic geometer,
M𝐶 is the threefold obtained from P3 by blowing up the camera centers.
From a computational point of view, the first question is to find the implicit description
of M𝐶 as a subvariety of (P2 ) 𝑚 . Writing (y1 , . . . , y𝑚 ) for the 3𝑚 coordinates of (P2 ) 𝑚 , we
seek multihomogeneous polynomials in the y𝑖 whose common zero set is equal to M𝐶 .
The desired implicit description is given by the 3𝑚 × (𝑚 + 4) matrix

 𝐴1 y1 0 · · · 0 
 
 𝐴2 0 y2 · · · 0 
𝑀 𝐴 :=  . (13.5)
 
.. .
 .. . 
 
 𝐴 𝑚 0 0 · · · y𝑚 
 
Here, 𝐴𝑖 is the 3 × 4 matrix that defines the camera 𝐶𝑖 , and y𝑖 is an unknown column vector
of length 3, serving as homogeneous coordinates for the 𝑖th image plane P2 . The following
result on the multiview variety for a single point goes back to [88]. For recent ideal-theoretic
versions of Proposition 13.2, see [104, Theorem 2] and the references therein.
Proposition 13.2 The multiview variety for 𝑚 cameras with at least two distinct centers is

M𝐶 = (y1 , . . . , y𝑚 ) ∈ (P2 ) 𝑚 | rank 𝑀 𝐴 (y1 , . . . , y𝑚 ) < 𝑚 + 4 .




Proof (Idea) A tuple (y1 , . . . , y𝑚 ) ∈ (P2 ) 𝑚 is in the image of (13.4) if and only if there
exists x ∈ P3 and non-zero scalars 𝜆𝑖 such that 𝐴𝑖 x = 𝜆𝑖 y𝑖 for 𝑖 = 1, . . . , 𝑚. The latter
condition is equivalent to the vector (x⊤ , −𝜆1 , . . . , −𝜆 𝑚 ) ⊤ being in the kernel of the matrix
𝑀 𝐴 in (13.5). Taking the closure, we obtain that the multiview variety M𝐶 consists of
those tuples (y1 , . . . , y𝑚 ) such that 𝑀 𝐴 has a non-zero kernel. □
Example 13.3 For 𝑚 = 2 cameras, the matrix in (13.5) has format 6 × 6, and it equals
 
𝐴 1 y1 0
𝑀𝐴 = .
𝐴2 0 y2

The multiview variety M𝐶 is the hypersurface in P2 × P2 defined by det(𝑀 𝐴) = 0. This


determinant is a bilinear form. Hence, there exists a 3 × 3 matrix 𝐹 such that

det(𝑀 𝐴) = y⊤
2 𝐹 y1 . (13.6)
166 13 Computer Vision

Note that the entries of 𝐹 depend on the matrices 𝐴𝑖 . The matrix 𝐹 is called the fundamental
matrix. A computation verifies the following explicit formula:
 [2356] −[1356] [1256] 
 
𝐹 =  −[2346] [1346] −[1246]  . (13.7)
 [2345] −[1345] [1245] 
 

Here, [𝑖 𝑗 𝑘𝑙] is the determinant


⊤ of the 4 × 4 submatrix with row indices 𝑖, 𝑗, 𝑘, 𝑙 of the
6 × 4 matrix 𝐴1⊤ 𝐴2⊤ . The matrix 𝐹 has rank two. In fact, its right kernel is the image of
the camera center of 𝐶2 under the camera 𝐶1 . Similarly, the left kernel of 𝐹 is the image
of the camera center of 𝐶1 under the camera 𝐶2 . A geometric interpretation is shown in
Figure 13.2. The two cameras are projections onto the two planes. ⋄

Fig. 13.2: The image of the center of one camera under the other camera (red points) is the kernel of the
fundamental matrix.

In computer vision, the term triangulation is used quite differently from the usage of that
term in geometry and topology. Here, triangulation refers to the task of 3D reconstruction,
assuming the configuration 𝐶 of cameras is known. This task amounts to computing fibers
under the specialized joint camera map Φ𝐶 .
Recall that, for 𝑚 ≥ 2 cameras, the generic fiber under Φ𝐶 in (13.4) is empty. The
measurements y := (y1 , . . . , y𝑚 ) on the images are typically noisy. They do not lie on
the multiview variety M𝐶 , but hopefully close it. To triangulate a corresponding space
point x ∈ P3 , one seeks to compute the point ỹ on M𝐶 that is closest to y, and then identify
its fiber Φ𝐶−1 ( ỹ). Hence, the algebraic complexity of triangulating a single point from 𝑚

images is determined by the ED degree of the multiview variety M𝐶 .


In real-life applications, the image measurements (y1 , . . . , y𝑚 ) come from an affine
chart (R2 ) 𝑚 inside (P2 ) 𝑚 . In that chart, we are working with the affine multiview variety

M𝐶 := M𝐶 ∩ (R2 ) 𝑚 .
◦ in R2𝑚 .
Triangulation thus means solving the ED problem (2.1) for the affine variety M𝐶
13.1 Multiview Varieties 167

The algebraic complexity of that problem is the ED degree of the affine multiview
variety M𝐶◦ . The interest in that ED degree originated in the computer vision community,

namely in the articles [79] and [162] titled How hard is 3-view triangulation really?.
The computer vision experts Stewénius and Nistér computed the ED degree of M𝐶 ◦ for

𝑚 ≤ 7 cameras [77]. Using Gröbner bases, one finds



EDdegree(M𝐶 ) = 6, 47, 148, 336, 638, 1081 for 𝑚 = 2, 3, 4, 5, 6, 7. (13.8)

That computation was the original motivation for the development of the general notion of
ED degrees of algebraic varieties. It started the five-author collaboration on the article [60].
Based on the numbers (13.8), the following cubic polynomial for the ED degree of the
multiview variety M𝐶◦ for 𝑚 cameras was conjectured in [60, Example 3.3]. That conjecture

was proven by Maxim, Rodriguez, and Wang in [128]. Their result is as follows:
Theorem 13.4 The ED degree of the affine multiview variety M𝐶 ◦ for 𝑚 ≥ 2 cameras in

general position is
9 3 21 2
𝑚 − 𝑚 + 8𝑚 − 4.
2 2
We close this section by explaining the Gröbner basis computation that solves the
triangulation problem for small 𝑚. The 𝑚 cameras are given by 𝑚 matrices 𝐴𝑖 = (𝑎 𝑖 𝑗 𝑘 )
of format 3 × 4. In each image plane P2 , we choose the affine chart by setting the last
coordinate to 1. Our data are points (𝑦 𝑖1 , 𝑦 𝑖2 , 1) in these planes for 𝑖 = 1, 2, . . . , 𝑚. We
similarly fix affine coordinates for the unknown point x = (𝑥 1 , 𝑥2 , 𝑥3 , 1) in the space P3 .
Consider the squared Euclidean distance to a point Φ𝐶 (x) on M𝐶 ◦:

2 
𝑚 ∑︁ 2
∑︁ 𝑎 𝑖 𝑗1 𝑥1 + 𝑎 𝑖 𝑗2 𝑥2 + 𝑎 𝑖 𝑗3 𝑥3 + 𝑎 𝑖 𝑗4
Δ(x) = − 𝑦𝑖 𝑗 .
𝑖=1 𝑗=1
𝑎 𝑖31 𝑥1 + 𝑎 𝑖32 𝑥2 + 𝑎 𝑖33 𝑥 3 + 𝑎 𝑖34

The optimization problem (2.1) asks us to compute the point x in R3 that minimizes the
distance Δ(x). To model this problem algebraically, we consider the common denominator
of our objective function:
𝑚
Ö
denom(x) := (𝑎 𝑖31 𝑥1 + 𝑎 𝑖32 𝑥2 + 𝑎 𝑖33 𝑥3 + 𝑎 𝑖34 ).
𝑖=1

We introduce a new variable 𝑧 with 𝑧 · denom(x) = 1. This ensures that all denominators
are non-zero. Let 𝐼 denote the ideal in the polynomial ring R[𝑥1 , 𝑥2 , 𝑥3 , 𝑧] that is generated
by 𝑧 · denom(x) − 1 and the numerators of the partial derivatives 𝜕Δ(x)/𝜕𝑥 𝑘 for 𝑘 = 1, 2, 3.
Thus, 𝐼 represents a system of four polynomial equations in four unknowns. The complex
variety 𝑉 (𝐼) is finite, and its points are precisely the complex critical points of the objective
function Δ(x) in the open set given by denom(x) ≠ 0. We compute a Gröbner bases of 𝐼 and
we consider the set B of standard monomials. By Proposition 3.7, we have # B = # 𝑉 (𝐼).
That number equals 6, 47, 148, . . . for 𝑚 = 2, 3, 4 . . ., as promised in Theorem 13.4.
Example 13.5 We consider the dinosaur data set from the Visual Geometry Group in the
Department of Engineering Science at the University of Oxford. This data set contains 36
168 13 Computer Vision

Fig. 13.3: The 36 views of the 4983 3D points from the dinosaur data set in Example 13.5.

Fig. 13.4: The 4983 3D points that have been triangulated from the dinosaur data set in Example 13.5.

cameras as 3 × 4 matrices and a list of pictures taken from 4983 3D points by these
36 cameras. The data is shown in Figure 13.3. We solve triangulation for 𝑚 = 2 ran-
domly chosen cameras as described above, solving the resulting polynomial system with
HomotopyContinuation.jl [31]. The result can be seen in Figure 13.4. ⋄
13.2 Grassmann Tensors 169

13.2 Grassmann Tensors

The fundamental matrix 𝐹 from Example 13.3 is a projectively invariant representation of


two cameras; see Proposition 13.12. Note that 𝐹 has seven degrees of freedom since 𝐹 has
rank two and is defined up to scale. This number makes sense because each matrix 𝐴𝑖 has 11
degrees of freedom, up to scale, and we are taking the quotient modulo the 15-dimensional
group PGL(4). Thus, the dimension of the quotient space is 2 · 11 − 15 = 7.
In this section, we introduce a class of tensors that generalize the fundamental matrix.
These give projectively invariant representations for 𝑚 ≥ 2 cameras. We now allow higher-
dimensional projections

𝐶𝑖 : P 𝑁 d P𝑛𝑖 . (13.9)

Such projections can be used to model basic dynamics [96, 178]. The camera center of the
camera 𝐶𝑖 is its base locus in P 𝑁 . This is represented by the kernel of the corresponding
matrix 𝐴𝑖 with 𝑁 + 1 columns. The approach we shall describe was introduced in computer
vision by Hartley and Schaffalitzky [78].
As before, the multiview variety is the closure in P𝑛1 × · · · × P𝑛𝑚 of the image of P 𝑁
under the 𝐶𝑖 . We are interested in tuples of linear spaces 𝐿 𝑖 ⊂ P𝑛𝑖 whose product meets the
multiview variety. To this end, we fix the cameras 𝐶𝑖 in (13.9), and we fix 𝑐 𝑖 = codim(𝐿 𝑖 )
with 1 ≤ 𝑐 𝑖 ≤ 𝑛𝑖 . Let Γ𝐶,𝑐 be the closure of

(𝐿 1 , . . . , 𝐿 𝑚 ) ∈ Gr(𝑛1 − 𝑐 1 , P𝑛1 ) × . . . × Gr(𝑛𝑚 − 𝑐 𝑚 , P𝑛𝑚 ) |
(13.10)
∃ x ∈ P 𝑁 : 𝐶1 (x) ∈ 𝐿 1 , . . . , 𝐶𝑚 (x) ∈ 𝐿 𝑚 .

Note that Γ𝐶,𝑐 is a subvariety in a product of Grassmannians. This projective variety fills
its ambient space when the 𝑐 𝑖 are small. It has high codimension when the 𝑐 𝑖 are large. The
following theorem concerns the sweet spot in the middle.

Theorem 13.6 For generic cameras 𝐶𝑖 , the variety Γ𝐶,𝑐 is a hypersurface if and only if
𝑐 1 + · · · + 𝑐 𝑚 = 𝑁 + 1. In that case, its defining equation is multilinear in the Plücker
coordinates of the Grassmannians Gr(𝑛𝑖 − 𝑐 𝑖 , P𝑛𝑖 ).

Multilinear forms are represented by tensors, just like bilinear forms are represented
by matrices. The equation described in Theorem 13.6 is a multilinear form in 𝑚 sets
of unknowns, namely the Plücker coordinates of the Grassmannians Gr(𝑛𝑖 − 𝑐 𝑖 , P𝑛𝑖 ) for
𝑖 = 1, . . . , 𝑚. The Grassmann tensor of the camera configuration 𝐶 is the order 𝑚 tensor
which represents the multilinear equation of the hypersurface Γ𝐶,𝑐 .
Before we come to the proof of Theorem 13.6, we present a census of all Grassmann
tensors in the case of primary interest in computer vision, namely 𝑁 = 3 and 𝑛𝑖 = 2
for all 𝑖 = 1, . . . , 𝑚. According to Theorem 13.6, a Grassmann tensor exists whenever
𝑐 1 + · · · + 𝑐 𝑚 = 4 and 1 ≤ 𝑐 𝑖 ≤ 2 for 𝑖 = 1, . . . , 𝑚.

Example 13.7 (𝑚 = 2, 𝑐 1 = 𝑐 2 = 2) Here, the Grassmann tensor is the fundamental


matrix 𝐹. The ambient space in (13.10) is (Gr(2 − 2, P2 )) 2 = (P2 ) 2 with coordinates
(y1 , y2 ), one for each of the two image points. The hypersurface Γ(𝐶1 ,𝐶2 ), (2,2) is the
170 13 Computer Vision

multiview variety M𝐶1 ,𝐶2 in Example 13.3. The bilinear form in (13.6) is represented by
the 3 × 3 matrix 𝐹. The formula (13.7) can be obtained by computing the determinant of
the 6 × 6 matrix 𝑀 𝐴 using Laplace expansion with respect to the last two columns. ⋄
Example 13.8 (𝑚 = 3, 𝑐 1 = 2, 𝑐 2 = 𝑐 3 = 1) This Grassmann tensor has format 3 × 3 × 3.
It is known as the trifocal tensor of three cameras. The ambient space in (13.10) is
Gr(2 − 2, P2 ) × (Gr(2 − 1, P2 )) 2  (P2 ) 3 . The first plane P2 has coordinates y1 . The other
factors represent lines in P2 , each spanned by two points y𝑖1 , y𝑖2 for 𝑖 = 2, 3. The Plücker
coordinates of the line y𝑖1 ∨ y𝑖2 are the 2 × 2 minors of the 3 × 2 matrix [y𝑖1 y𝑖2 ]. The
determinant of the following 9 × 9 matrix is a trilinear form in y1 , y21 ∨ y22 , and y31 ∨ y32 :

 𝐴1 y1 0 0 0 0 
 
det  𝐴2 0 y21 y22 0 0  .
 
 𝐴3 0 0 0 y31 y32 
 
There are actually three trifocal tensors, one for each choice for the triple of codimensions
(𝑐 1 , 𝑐 2 , 𝑐 3 ) ∈ {(2, 1, 1), (1, 2, 1), (1, 1, 2)}. The variety of all trifocal tensors, for one such
fixed choice, was studied by Aholt and Oeding in [3]. ⋄
Example 13.9 (𝑚 = 4, 𝑐 1 = 𝑐 2 = 𝑐 3 = 𝑐 4 = 1) Here, we get the quadrifocal tensor of
format 3 × 3 × 3 × 3. It represents a multilinear form on four sets of lines y𝑖1 ∨ y𝑖2 , namely
the determinant of the 12 × 12 matrix
 𝐴1
 y11 y12 0 0 0 0 0 0 
𝐴 0 0 y21 y22 0 0 0 0 
det  2 .
 𝐴3 0 0 0 0 y31 y32 0 0 
 𝐴4
 0 0 0 0 0 0 y41 y42 

The variety of all quadrifocal tensors was studied by Oeding in [139]. ⋄


Proof (of Theorem 13.6) This result appears in [78]. We give an independent proof. For
general 𝐿 𝑖 ∈ Gr(𝑛𝑖 − 𝑐 𝑖 , P𝑛𝑖 ), the back-projected space 𝐿˜ 𝑖 := 𝐶𝑖−1 (𝐿 𝑖 ) also has codimen-
sion 𝑐 𝑖 , i.e., 𝐿˜ 𝑖 ∈ Gr(𝑁 − 𝑐 𝑖 , P 𝑁 ). If 𝑐 𝑖 ≤ 𝑁, the subspaces 𝐿˜ 1 , . . . , 𝐿˜ 𝑚 always intersect,
Í
meaning that Γ𝐶,𝑐Íis equal to its ambient space.
Now suppose 𝑐 𝑖 = 𝑁 + 1. Due to the genericity of the cameras, the multiview variety
M𝐶 of a single point (i.e., the Zariski closure of the image of Φ𝐶 : P 𝑁 d P𝑛1 × · · · × P𝑛𝑚 )
has dimension 𝑁. Hence, the product 𝐿 1 × · · · × 𝐿 𝑚 of general subspaces 𝐿 𝑖 ⊆ P𝑛𝑖 of
codimension 𝑐 𝑖 does not intersect the multiview variety M𝐶 . Therefore, Γ𝐶,𝑐 is a proper
subvariety. We show that it is a hypersurface and we simultaneously compute its multidegree
by intersecting it with generic pencils in Gr(𝑛1 − 𝑐 1 , P𝑛1 ) × · · · × Gr(𝑛𝑚 − 𝑐 𝑚 , P𝑛𝑚 ).
It suffices to show that every general pencil meets Γ𝐶,𝑐 in exactly one point. Such a
pencil is of the form 𝐿 1 × · · · × L 𝑘 × · · · × 𝐿 𝑚 , where 𝐿 𝑖 (for 𝑖 ≠ 𝑘) is a general point in
the Grassmannian Gr(𝑛𝑖 − 𝑐 𝑖 , P𝑛𝑖 ), and

L 𝑘 = {𝐿 ∈ Gr(𝑛 𝑘 − 𝑐 𝑘 , P𝑛𝑘 ) | 𝑉𝑘 ⊂ 𝐿 ⊂ 𝑊 𝑘 },

where 𝑉𝑘 , 𝑊 𝑘 ⊆ P𝑛𝑘 are general subspaces of codimension 𝑐 𝑘 + 1 and 𝑐 𝑘 − 1, respectively.


The back-projected spaces 𝐿˜ 1 , . . . , 𝑊˜ 𝑘 , . . . , 𝐿˜ 𝑚 intersect in a single point x ∈ P 𝑁 . That
13.3 3D Reconstruction from Unknown Cameras 171

point x does not lie in the back-projected space 𝑉˜ 𝑘 . Otherwise, for general 𝐿 ∈ L 𝑘 , the point
𝐿 1 × · · · × 𝐿 × · · · × 𝐿 𝑚 would be in Γ𝐶,𝑐 . This a contradiction since the codimension of Γ𝐶,𝑐
is at least one. Thus, there is exactly one 𝐿 ∈ L 𝑘 (namely, the span of 𝑉𝑘 with 𝐶 𝑘 (x)) which
satisfies 𝐿 1 ×· · ·×𝐿×· · ·×𝐿 𝑚 ∈ Γ𝐶,𝑐 . This shows that Γ𝐶,𝑐 is a hypersurface of multidegree
(1, . . . , 1). The multidegree of a hypersurface in a product of Grassmannians equals the
multidegree of its equation in Plücker coordinates [71, Chapter 3, Proposition 2.1]. Similar
Í
arguments show that Γ𝐶,𝑐 has codimension ≥ 2 whenever 𝑐 𝑖 > 𝑁 + 1. □
By varying the Grassmann tensors over all camera configurations, we obtain a variety
that parametrizes camera configurations modulo projective transformations; see Proposi-
tion 13.12. In the classical case of three cameras (𝑁 = 3), this quotient space has dimension
11𝑚 − 15. This approach yields the variety of fundamental matrices for 𝑚 = 2, the trifocal
variety [3] for 𝑚 = 3, and the quadrifocal variety [139] for 𝑚 = 4. For 𝑚 ≥ 5, we can form
quotient varieties by taking appropriate collections of fundamental matrices, trifocal ten-
sors, and quadrifocal tensors. A more systematic representation is furnished by the Hilbert
schemes, which were studied by Aholt, Sturmfels, and Thomas in [4].

13.3 3D Reconstruction from Unknown Cameras

We now turn to the problem of 3D reconstruction from images taken by unknown cameras.
This amounts to computing fibers under the joint camera map Φ in (13.1). Typically,
a nontrivial group 𝐺 acts on the fibers of Φ since global 3D transformations that act
simultaneously on the cameras and the 3D scene do not change the resulting images. Most
real-life applications assume that the cameras are calibrated, so we are naturally led to the
rotation group SO(3), which is an important player in metric algebraic geometry.

Example 13.10 For a projective camera 𝐴 ∈ PR3×4 that observes a point x ∈ P3 , the
projective linear group PGL(4) acts via 𝑔 ↦→ ( 𝐴𝑔 −1 , 𝑔x) on cameras and points without
changing the image 𝐴𝑔 −1 · 𝑔x = 𝐴x. Hence, PGL(4) acts on the fibers of the joint camera
map in (13.2), where projective cameras observe 𝑘 points in P3 . This means that 3D
reconstruction is only possible up to a projective transformation.
The action of the group PGL(4) does not map calibrated cameras to calibrated cameras.
The largest subgroup 𝐺 of GL(4) that preserves the structure of calibrated camera matrices
[ 𝑅 | 𝑡 ] ∈ SO(3) × R3 equals

𝐺 = 𝑔 ∈ GL(4) | 𝑔 = 𝑅0 𝜆𝑡 for some 𝑅 ∈ SO(3), 𝑡 ∈ R3 , 𝜆 ∈ R \ {0} . (13.11)


  

This is the scaled special Euclidean group of R3 . Paraphrasing for computer vision, we
conclude that 3D reconstruction with calibrated cameras is only possible up to a proper
rigid motion and a non-zero scale. ⋄

The state-of-the-art 3D reconstruction algorithms work with minimal problems, where


the joint camera map Φ is dominant and its fibers are generically finite modulo the group 𝐺.
For minimal problems, computing the fibers of Φ means solving a square parametrized
172 13 Computer Vision

system of polynomial equations. Such 3D reconstruction problems use the minimal amount
of data on the images while having finitely many solutions. The algebraic degree of a
minimal problem is the number of complex solutions for generic data.

Proposition 13.11 Consider 3D reconstruction for 𝑚 ≥ 2 unknown cameras observing 𝑘


points. For projective cameras, there are two minimal problems, namely (𝑚, 𝑘) = (2, 7)
and (𝑚, 𝑘) = (3, 6), both of algebraic degree 3. For calibrated cameras, the only minimal
problem is (𝑚, 𝑘) = (2, 5), with an algebraic degree of 20.

Proof For 𝑚 ≥ 2 projective cameras and 𝑘 points, the joint camera map Φ takes the quotient
𝑚
space (P R3×4 ) 𝑚 × (P3R ) 𝑘 /PGL(4) to the space of images (P2 ) 𝑘 . (A comment for
experts: the quotient is meant in the sense of geometric invariant theory, but we here only
need a birational model.) If the 3D reconstruction problem is minimal, then both spaces
have the same dimension, which gives 11𝑚 + 3𝑘 − 15 = 2𝑘𝑚. This equation has precisely
two integer solutions 𝑚 ≥ 2 and 𝑘 ≥ 1, namely (𝑚, 𝑘) = (2, 7) and (𝑚, 𝑘) = (3, 6). Both
yield minimal problems of algebraic degree three [76]. These degrees were found in the
19th century by Hesse [87] and Sturm [163].
For calibrated cameras instead of projective cameras, the domain of the joint camera
map Φ changes to (SO(3) × R3 ) 𝑚 × (P3 ) 𝑘 /𝐺, where 𝐺 is the group in (13.11). Now, the

two spaces have the same dimension if and only if 6𝑚 + 3𝑘 − 7 = 2𝑘𝑚. The only relevant
integer solution is (𝑚, 𝑘) = (2, 5). This yields a minimal problem of algebraic degree 20.
This problem has the label 50002 in the census of minimal problems found in [64, Table 1].
It is the minimal problem most widely used in practical 3D reconstruction algorithms. □
Later, we shall take a closer look at the systems of polynomial equations arising from
Proposition 13.11. First, however, we explain the practical usage of minimal problems for
3D reconstruction in computer vision. Imagine two calibrated cameras that observe 100
points. Then, the joint camera map Φ in (13.3) for 𝑘 = 100 is not dominant. Hence, the
fiber under Φ of two noisy images is empty. We would need to find a closest point on the
image of Φ, before we can compute any fiber. In other words, we must first solve an ED
problem like that in Theorem 13.4. But this is now even harder because the cameras are
unknown. In addition, in practical scenarios, it often happens that some of the given point
pairs are outliers. Then, solving the ED problem yields incorrect solutions.
In practice, one simply avoids any such ED problem. Instead, one chooses five of the
100 given point pairs and solves the associated minimal problem in Proposition 13.11.
This process gets repeated many times. The solutions to the many minimal problems get
patched together via random sample consensus (RANSAC), until all 100 points and both
cameras are reconstructed. For more details, see [104].
Since minimal problems must be solved many times for RANSAC, it is crucial that their
formulation as a square polynomial system is efficient. A common strategy for simplification
is to first reconstruct the cameras only and afterward recover the 3D scene via triangulation.
Hence, instead of solving the full minimal problem at once, we start with a polynomial
system whose only unknowns are the camera parameters.
To parametrize the 𝑚 cameras modulo the group 𝐺, we use the Grassmann tensors. We
work in arbitrary dimensions, as in (13.10), starting with 𝐺 = PGL(𝑁 + 1). We consider
𝑚 surjective projections 𝐶𝑖 : P 𝑁 d P𝑛𝑖 and integers 𝑐 1 , . . . , 𝑐 𝑚 that satisfy 1 ≤ 𝑐 𝑖 ≤ 𝑛𝑖
13.3 3D Reconstruction from Unknown Cameras 173

and 𝑐 1 +· · ·+𝑐 𝑚 = 𝑁 +1. The Grassmann tensor 𝑇𝐶,𝑐 exists, by Theorem 13.6. Namely, 𝑇𝐶,𝑐
is parametrized by the rational map
𝑛1 +1
𝛾𝑐 : P R (𝑛1 +1)×( 𝑁 +1) × · · · × P R (𝑛𝑚 +1)×( 𝑁 +1) d P R ( 𝑐1 ) ×···× ( 𝑛𝑐𝑚𝑚+1) .

This map sends the 𝑚 cameras 𝐶𝑖 to their Grassmann tensor, written in Plücker coordinates.
Proposition 13.12 ([78]) The group PGL(𝑁 + 1) acts on the fibers of 𝛾𝑐 by componentwise
right-multiplication. The map 𝛾𝑐 becomes birational on the quotient of its domain modulo
that group action.
Example 13.13 Consider the basic scenario in Example 13.7, where we have 𝑁 = 3 and
𝑚 = 𝑛1 = 𝑛2 = 𝑐 1 = 𝑐 2 = 2. The map 𝛾𝑐 sends two 3 × 4 matrices 𝐴1 , 𝐴2 to the 3 × 3
matrix 𝐹 in (13.7). The Zariski closure of the image of 𝛾𝑐 is the hypersurface F = 𝑉 (det)
defined by the 3×3 determinant in P R3×4 = P8 . It is birational to pairs of projective cameras
modulo PGL(4). This quotient construction reduces the number of camera parameters from
22 to 7. Any pair of image points (y1 , y2 ) ∈ P2 × P2 imposes a linear condition on F ,
namely y⊤2 𝐹y1 = 0 as in (13.6). Reconstructing a fundamental matrix means intersecting
the seven-dimensional variety F with seven hyperplanes. We conclude that observing seven
points with two projective cameras is a minimal problem of degree deg(F ) = 3. ⋄
We now turn to pairs of calibrated cameras and the scaled special Euclidean group 𝐺
in (13.11). A real 3 × 3 matrix 𝐸 is called essential if it has rank two and the two non-zero
singular values are equal. The Zariski closure of the set of essential matrices is the essential
variety E in P R3×3  P8 .
Theorem 13.14 The map 𝛾𝑐 in Example 13.13 is two-to-one when restricted to pairs of
calibrated cameras modulo the group 𝐺. Its image is the essential variety E. This variety
has dimension five, degree ten, and is defined by the following ten cubic equations in the
entries of an unknown 3 × 3 matrix:
1
det 𝐸 = 0 and 𝐸 𝐸 ⊤ 𝐸 − tr(𝐸 𝐸 ⊤ )𝐸 = 0. (13.12)
2
Proof This can be proved by direct computations. The set of essential matrices is a semial-
gebraic set of codimension three. Demazure [54] showed that the equations (13.12) hold on
that set. With Macaulay2 [73], we can check that these ten homogeneous cubics generate
a prime ideal of codimension three. The fact that the map 𝛾𝑐 is two-to-one can be verified
by a computation in the coordinates that are used in [64]. □
The reconstruction of calibrated cameras is now analogous to Example 13.13. Any pair
of image points (y1 , y2 ) ∈ P2 × P2 imposes a linear condition y⊤ 2 𝐸y1 = 0 on E. Hence, we
intersect the five-dimensional variety E with five hyperplanes. That intersection consists
of ten complex matrices 𝐸. Each 𝐸 comes from two pairs of calibrated cameras modulo 𝐺.
We conclude that observing five points with two calibrated cameras is a minimal problem
of algebraic degree 20 = 2 · 10, confirming Proposition 13.11.
To reiterate: what we described is the standard approach in state-of-the-art reconstruction
algorithms. Given two images, one first reconstructs an essential matrix using RANSAC
174 13 Computer Vision

by intersecting the variety E with five hyperplanes, then one recovers the pair of calibrated
cameras, and finally, one reconstructs the 3D points using triangulation. It would be inter-
esting to study this process through the lens of metric algebraic geometry. In particular,
following Chapter 9, what is the condition number of intersecting E with five hyperplanes
y⊤
2 𝐸y1 = 0 given by five image point pairs (y1 , y2 )? One may hope to utilize those condition
numbers in homotopy continuation solvers.
More generally, we can ask the same question for intersecting the variety G𝑐 := im(𝛾𝑐 )
of Grassmann tensors with dim G𝑐 hyperplanes given by (𝐿 1 , . . . , 𝐿 𝑚 ) as in (13.10)? The
condition number of intersecting a fixed projective variety with varying linear subspaces of
complementary dimension was studied in [34]. However, that theory does not immediately
apply to our problem since E is only intersected by special linear spaces, namely those that
are intersections of five hyperplanes of the form {𝐸 : y⊤ 2 𝐸y1 = 0}.

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International
License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and
reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter’s Creative Commons
license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s
Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the
permitted use, you will need to obtain permission directly from the copyright holder.
Chapter 14
Volumes of Semialgebraic Sets

In this chapter, we study the problem of computing the volume of a semialgebraic subset 𝑆
of R𝑛 . Being semialgebraic means that 𝑆 is described by a finite Boolean combination of
polynomial inequalities. Most of our discussion is limited to semialgebraic sets of the form

𝑆 = x ∈ R𝑛 | 𝑓 (x) ≥ 0 for some 𝑓 ∈ R[𝑥1 , . . . , 𝑥 𝑛 ]. (14.1)

This is the special case of only one polynomial inequality. The volume of 𝑆 is the numerical
value of an integral that is described by polynomials. Students encounter such integrals in
Multivariable Calculus, and we shall review this elementary perspective in Section 14.1.
The rest of the chapter is much less elementary. Algebraic geometers use the term period
integrals for real numbers such as vol(𝑆). Our objective is the highly accurate numerical
evaluation of period integrals. This is relevant for many fields, including physics (Feynman
integrals) and statistics (Bayesian integrals). We present two algebraic methods, developed
recently by Lairez [116], Lasserre [86], and their collaborators. Section 14.2 uses linear
partial differential equations (D-modules) to represent and evaluate integrals. Section 14.3
explains the evaluation of integrals by means of semidefinite programming (SDP).

14.1 Calculus and Beyond

Suppose we are given a basic semialgebraic set in R𝑛 . This means that our set is described
by a conjunction of polynomial inequalities; i.e., it has a representation of the form

𝑆 = x ∈ R𝑛 | 𝑓1 (x) ≥ 0 and 𝑓2 (x) ≥ 0 and · · · and 𝑓 𝑘 (x) ≥ 0 . (14.2)

Here 𝑓1 , 𝑓2 , . . . , 𝑓 𝑘 are polynomials in 𝑛 unknowns with real coefficients. Our task is to com-
pute the volume of 𝑆, as reliably and accurately as possible, from the input 𝑓1 , 𝑓2 , . . . , 𝑓 𝑘 .
The simplest scenario arises when 𝑘 = 1, so our semialgebraic set 𝑆 is the domain of
nonnegativity of one polynomial 𝑓 (x) = 𝑓 (𝑥1 , . . . , 𝑥 𝑛 ) with real coefficients, as in (14.1).

© The Author(s) 2024 175


P. Breiding et al., Metric Algebraic Geometry, Oberwolfach Seminars 53,
https://doi.org/10.1007/978-3-031-51462-3_14
176 14 Volumes of Semialgebraic Sets

Writing dx for the Lebesgue measure on R𝑛 , we wish to evaluate the integral



vol(𝑆) = dx. (14.3)
𝑆

More generally, we can consider integrals 𝑆 𝑔(x)dx, where 𝑔(x) is a rational function, or
even an algebraic function. The value of such an integral (if it converges) is a real number,
which is called a period [115]. Our integrals are special cases of period integrals.
We begin with an instance where the volume of 𝑆 can be found explicitly using calculus.

Fig. 14.1: The yellow convex body is the elliptope. It is bounded by Cayley’s cubic surface.

Example 14.1 (Elliptope) We consider the elliptope. This is the semialgebraic set

𝑆 = {(𝑥, 𝑦, 𝑧) ∈ R3 | 𝑀 (𝑥, 𝑦, 𝑧) is positive semi-definite},

where 𝑀 (𝑥, 𝑦, 𝑧) is the following 3 × 3-matrix:


1 𝑥 𝑦
 
𝑀 (𝑥, 𝑦, 𝑧) =  𝑥 1 𝑧  .
𝑦 𝑧 1
 
An equivalent formulation is that 𝑆 consists of all points (𝑥, 𝑦, 𝑧) in the cube [−1, 1] 3 such
that the determinant det(𝑀) = 2𝑥𝑦𝑧 − 𝑥 2 − 𝑦 2 − 𝑧2 + 1 is nonnegative. It is the region
bounded by the yellow surface in Figure 14.1. This picture serves as the logo of the Nonlinear
Algebra group at the Max-Planck Institute for Mathematics in the Sciences in Leipzig. The
semialgebraic set 𝑆 happens to be convex. It illustrates several applications of algebraic
geometry. In statistics, the convex set 𝑆 comprises all correlation matrices. In optimization,
it is the feasible region of a semidefinite programming problem; see [133, Chapter 12].
Semidefinite programming is our workhorse for approximating volumes in Section 14.3.
We now compute the volume of the elliptope. We begin parameterizing its boundary
surface (the yellow surface in Figure 14.1). Solving the equation det(𝑀) = 0 for 𝑧 with the
14.1 Calculus and Beyond 177

quadratic formula, we obtain


√︃ √︃
𝑧 = 𝑥𝑦 ± 𝑥 2 𝑦 2 − 𝑥 2 − 𝑦 2 + 1 = 𝑥𝑦 ± (1 − 𝑥 2 ) (1 − 𝑦 2 ) for (𝑥, 𝑦) ∈ [−1, 1] 2 .

The plus sign gives the upper yellow surface and the minus sign gives the lower yellow
surface. The volume of the elliptope 𝑆 is obtained by integrating the difference between the
upper function and the lower function over the square. Hence, the desired volume equals
∫ 1∫ 1 √︃ ∫ 1 √︁ 2
vol(𝑆) = 2 (1 − 𝑥 2 ) (1 − 𝑦 2 ) d𝑥d𝑦 = 2 2
1 − 𝑡 d𝑡 .
−1 −1 −1

The univariate integral on the right gives the area below the semicircle with radius 1. We
know from trigonometry that this area equals 𝜋/2, where 𝜋 = 3.14159265.... We conclude

𝜋2
vol(𝑆) = = 4.934802202...
2
Thus, our elliptope covers about (𝜋 2 /2) / 8 = 61.7 % of the volume of the cube [−1, 1] 3 . ⋄

The number 𝜋 2 /2 we found is an example of a period. It is generally much more difficult


to accurately evaluate such integrals. This challenge has played an important role in the
history of mathematics. Consider the problem of computing the arc length of an ellipse. This
requires us to integrate the reciprocal square root of a cubic polynomial 𝑓 (𝑡). Such integrals
are called elliptic integrals, and they represent periods of elliptic curves. Furthermore, in an
1841 paper, Abel introduced abelian integrals, where 𝑔(𝑡) is an algebraic function in one
variable 𝑡. How to evaluate such an integral? This question leads us to Riemann surfaces
and then to their Jacobians. And, voilà, we arrived at the theory of abelian varieties.
This chapter presents two current paradigms for accurately computing integrals
like (14.3). The first method rests on the theory of 𝐷-modules, that is, on the algebraic
study of linear differential equations with polynomial coefficients. Our volume is found as
a special value of a parametric volume function that is encoded by means of its Picard–
Fuchs differential equation. This method, which tends to appeal to algebraic geometers,
was introduced by Lairez, Mezzarobba, and Safey El Din in [116].
The second approach is due to Lasserre, Henrion, Savorgnan, Tacchi, and Weisser
[86, 169, 170]. At first glance, the approach in Section 14.3 might appeal more to readers
from analysis and optimization. But, we hope that algebraic geometers will find it inter-
esting as well, as∫ it entails plenty of deep algebraic structure. The idea is to consider all
moments 𝑚 𝛼 = 𝑆 x 𝛼 dx of our semialgebraic set 𝑆, where again dx is the Lebesgue mea-
sure, and to use relations among the 𝑚 𝛼 to infer an accurate approximation of 𝑚 0 = vol(𝑆).
That numerical inference rests on semidefinite programming [133, Chapter 12].
178 14 Volumes of Semialgebraic Sets

14.2 D-Modules

In calculus, we learn about definite integrals in order to determine the area under a graph.
Likewise, in multivariable calculus, we examine the volume enclosed by a surface. Here, we
are interested in areas and volumes of semialgebraic sets. When these sets depend on one
or more parameters, their volumes are holonomic functions of the parameters. We explain
what this means and how it can be used for accurate evaluation of volume functions. We
present the method of [116], following the exposition given in [159].
Definition 14.2 The Weyl algebra (cf. [155, 159]) is the quotient of the free C-algebra
generated by 2𝑛 variables 𝑥1 , . . . , 𝑥 𝑛 , 𝜕1 , . . . , 𝜕𝑛 by the ideal generated by 𝜕𝑖 𝑥𝑖 − 𝑥 𝑖 𝜕𝑖 − 1
for 𝑖 = 1, . . . , 𝑛. We denote the Weyl algebra by

𝐷 = C⟨𝑥1 , . . . , 𝑥 𝑛 , 𝜕1 , . . . , 𝜕𝑛 ⟩.

In the definition of the Weyl algebra, the 𝑥𝑖 play the role of the usual variables in calculus.
The 𝜕𝑖 , on the other hand, play the role of partial derivatives. Indeed, if 𝑔 : R𝑛 → R is a
differentiable function, then the product rule yields 𝜕𝑖 (𝑥𝑖 · 𝑔) = 𝑔 +𝑥𝑖 (𝜕𝑖 𝑔). This is precisely
the algebraic relation that we quotient out.
Suppose that 𝑀 is a 𝐷-module. We denote the action of 𝐷 on 𝑀 by

𝑃• 𝑓 for 𝑃 ∈ 𝐷, 𝑓 ∈ 𝑀.

Definition 14.3 Let 𝑀 be a 𝐷-module. The annihilator or annihilating 𝐷-ideal of an


element 𝑓 ∈ 𝑀 is the 𝐷-ideal

Ann𝐷 ( 𝑓 ) B { 𝑃 ∈ 𝐷 | 𝑃 • 𝑓 = 0 } .

In applications, the 𝐷-module 𝑀 is usually a space of infinitely differentiable functions on


a subset of R𝑛 or C𝑛 . Such 𝐷-modules are torsion-free. In the following, we mainly focus
on annihilators that are holonomic 𝐷-ideals.
Definition 14.4 Let 𝑀 be a 𝐷-module and 𝑓 ∈ 𝑀. For instance, 𝑓 could be among the
functions mentioned above. We say that 𝑓 is holonomic if, for each 𝑘 ∈ {1, . . . , 𝑛}, there
is a differential operator
𝑚𝑘
∑︁
𝑃𝑘 = 𝑝 𝑖,𝑘 (x) 𝜕𝑘𝑖 ∈ (𝐷 ∩ C[𝑥1 , . . . , 𝑥 𝑛 , 𝜕𝑘 ])\{0} (14.4)
𝑖=0

that annihilates 𝑓 ; i.e., 𝑃 𝑘 • 𝑓 = 0. Here, the 𝑝 𝑖,𝑘 (x) are polynomials in x = (𝑥1 , . . . , 𝑥 𝑛 ).
If this holds, then we say that Ann𝐷 ( 𝑓 ) is a holonomic 𝐷-ideal.
The term “holonomic function” is due to Zeilberger [179]. Many interesting functions are
holonomic. For instance, holonomic functions in one variable are solutions to ordinary
linear differential equations with rational function coefficients. This includes algebraic
functions, some elementary trigonometric functions, hypergeometric functions, Bessel
functions, period integrals, and many more.
14.2 D-Modules 179

Proposition 14.5 Every rational function is holonomic.

Proof Let 𝑟 be a rational function in x = (𝑥1 , . . . , 𝑥 𝑛 ). It is annihilated by the operator


𝑟 (x)𝜕𝑖 − 𝜕𝑟/𝜕𝑥 𝑖 for 𝑖 = 1, 2, . . . , 𝑛. By clearing denominators in this operator, we obtain
a non-zero differential operator 𝑃𝑖 ∈ C[x] ⟨𝜕𝑖 ⟩ of order 𝑚 𝑖 = 1 that annihilates 𝑟. □
To find holonomic annihilating 𝐷-ideals, it is helpful to use computer algebra.

Example 14.6 Let 𝑟 ∈ Q(𝑥 1 , . . . , 𝑥 𝑛 ) be a rational function. We can compute its annihilator
in Macaulay2 [73] with the built-in command RatAnn. For instance, if 𝑛 = 2 and 𝑟 = 𝑥𝑥21 ,
then we can use the following code
needsPackage "Dmodules"
D = QQ[x1,x2,d1,d2, WeylAlgebra => {x1=>d1,x2=>d2}];
rnum = x1; rden = x2;
I = RatAnn(rnum,rden)

This code fragment shows that 𝑟 = 𝑥1 /𝑥 2 has Ann𝐷 (𝑟) = 𝐷{ 𝜕12 , 𝑥 1 𝜕1 − 1, 𝑥 2 𝜕1 𝜕2 + 𝜕1 }. ⋄

Now, let 𝑀 be a 𝐷-module, 𝑓 ∈ 𝑀, and Ann𝐷 ( 𝑓 ) a holonomic 𝐷-ideal. As in (14.4),


let 𝑚 1 , . . . , 𝑚 𝑛 denote the orders of the differential operators 𝑃1 , . . . , 𝑃𝑛 . Thus, 𝑃 𝑘 is an
operator in 𝜕𝑘 of order 𝑚 𝑘 whose coefficients are polynomials in x. We fix initial conditions
for 𝑓 by specifying the following 𝑚 1 𝑚 2 · · · 𝑚 𝑛 numerical values for a general point x0 ∈ C𝑛 :

(𝜕1𝑖1 · · · 𝜕𝑛𝑖𝑛 • 𝑓 )| x=x0 where 0 ≤ 𝑖 𝑘 < 𝑚 𝑘 for 𝑘 = 1, . . . , 𝑛. (14.5)

The operators 𝑃𝑖 together with the initial conditions in (14.5) specify the function 𝑓 .
Suppose 𝑓 (x) is an algebraic function. This means that there is a polynomial 𝐹 ∈
C[𝑦, 𝑥1 , . . . , 𝑥 𝑛 ] such that 𝑓 satisfies the equation 𝐹 ( 𝑓 , x) = 0. Every algebraic function
𝑓 (x) in 𝑛 variables is holonomic. Koutschan [112] developed practical algorithms for
manipulating holonomic functions. These are implemented in his Mathematica [102]
package HolonomicFunctions [112]. Using the polynomial 𝐹 as its input, this package
can compute a holonomic representation of 𝑓 . The output is a linear differential operator
of lowest degree annihilating 𝑓 . We now show this with an explicit example.

Example 14.7 Let 𝑛 = 1 and consider the algebraic function 𝑦 = 𝑓 (𝑥) that is defined by
1
𝑞(𝑥, 𝑦) = 𝑥 4 + 𝑦 4 + 𝑥𝑦 − 1. (14.6)
100
Its annihilator in 𝐷 can be computed as follows:
<< RISC`HolonomicFunctions`
q = y^4 + x^4 + x*y/100 - 1;
ann = Annihilator[Root[q, y, 1], Der[x]]

This Mathematica code determines an operator 𝑃 of lowest order in Ann𝐷 ( 𝑓 ). We find

𝑃 = 𝑔0 (𝑥) + 𝑔1 (𝑥) 𝜕 + 𝑔2 (𝑥) 𝜕 2 + 𝑔3 (𝑥) 𝜕 3 ,


with coefficients
180 14 Volumes of Semialgebraic Sets

𝑔3 ( 𝑥) = (2𝑥 4 + 1) 2 (25600000000𝑥 12 − 76800000000𝑥 8 + 76799999973𝑥 4 − 25600000000) ,


𝑔2 ( 𝑥) = 6𝑥 3 (2𝑥 4 + 1) (51200000000𝑥 12 + 76800000000𝑥 8 − 307199999946𝑥 4 + 179199999973) ,
𝑔1 ( 𝑥) = 3𝑥 2 (102400000000𝑥 16 +204800000000𝑥 12 +2892799999572𝑥 8
−3507199999444𝑥 4 +307199999953) ,
𝑔0 ( 𝑥) = −3𝑥 (102400000000𝑥 16 + 204800000000𝑥 12 + 1459199999796𝑥 8
−1049599999828𝑥 4 + 51199999993).

This operator is an encoding of the algebraic function 𝑦 = 𝑓 (𝑥) as a holonomic function. ⋄

As discussed above, we specify a holonomic function 𝑓 in 𝑛 variables by a holonomic


system of linear PDEs together with a list of initial conditions. Initial conditions such as
(14.5) are designed to determine the function uniquely inside the linear space Sol(𝐼), where
𝐼 ⊆ Ann𝐷 ( 𝑓 ). For instance, in Example 14.7, we need three initial conditions to specify the
function 𝑓 (x) uniquely inside the 3-dimensional solution space to our operator 𝑃. We could
fix the values at three distinct points, or we could fix the value and the first two derivatives
at one special point. We generalize the canonical representation (14.5) as follows.
Definition 14.8 A holonomic representation of a function 𝑓 is a holonomic 𝐷-ideal 𝐼
contained in the annihilator Ann𝐷 ( 𝑓 ) together with a list of linear conditions that specify 𝑓
uniquely inside the finite-dimensional solution space of holomorphic solutions. Think of
the initial conditions for solutions to differential equations.
The next example shows the role of holonomic functions for metric algebraic geometry.

Example 14.9 (The area of a TV screen) Consider the quartic polynomial 𝑞(𝑥, 𝑦) from
(14.6). We are interested in the semialgebraic set 𝑆 = {(𝑥, 𝑦) ∈ R2 | 𝑞(𝑥, 𝑦) ≤ 0}. This
convex set is a slight modification of a set known in the optimization literature as “the TV
screen”. Our aim is to compute the area of the semialgebraic convex set 𝑆 as accurately
as possible. One can get a rough idea of the area of 𝑆 by sampling. This is illustrated in
Figure 14.2. From the polynomial 𝑞(𝑥, 𝑦) we read off that 𝑆 is contained in the square
defined by −1.2 ≤ 𝑥, 𝑦 ≤ 1.2. We sampled 10000 points uniformly from that square, and
for each sample, we checked the sign of 𝑞. This is a simple instance of the Metropolis–
Hastings sampling algorithm that we discuss in Chapter 15. Points inside 𝑆 are drawn in
blue and points outside 𝑆 are drawn in pink. By multiplying the area (2.4) 2 = 5.76 of the
square with the fraction of the number of blue points among the samples, we learn that the
area of the TV screen is approximately 3.7077.
We now compute the area more accurately using 𝐷-modules. Let pr : 𝑆 → R be the
projection on the 𝑥-coordinate, and consider the length of the fibers of this projection:

𝑣(𝑥) = ℓ(pr−1 (𝑥) ∩ 𝑆).

This length is a holonomic function in the parameter 𝑥. Namely, it satisfies the third-order
differential operator 𝑃 we displayed in Example 14.7. The real roots of the resultant

Res 𝑦 (𝑞, 𝜕𝑞/𝜕𝑦) = 25600000000𝑥 12 − 76800000000𝑥 8


(14.7)
+ 76799999973𝑥 4 − 25600000000
14.2 D-Modules 181

Fig. 14.2: The TV screen is the convex region consisting of the blue points.

are the two branch points 𝑥0 < 𝑥 1 of the map pr. These values of 𝑥0 and 𝑥 1 can be written
in radicals over Q. However, here we take an accurate floating point representation:

𝑥1 = −𝑥0 = 1.00025446585025884547854576664356675008019627615897635 . . .

The desired area equals


vol(𝑆) = 𝑤(𝑥1 ),
∫ 𝑥
where 𝑤(𝑥) = 𝑣(𝑡)𝑑𝑡 is holonomic (see Proposition 14.15 below). One operator that
𝑥0
annihilates 𝑤 is 𝑃𝜕, where 𝑃 ∈ Ann𝐷 (𝑣) is the third-order operator above. To get a
holonomic representation of 𝑤, we also need some initial conditions. Clearly, 𝑤(𝑥0 ) = 0.
Further initial conditions on 𝑤 ′ are derived by evaluating 𝑣 at other points. By √3 plugging
values for 𝑥 into (14.6) and solving for 𝑦, we find 𝑤 ′ (0) = 2 and 𝑤 ′ (±1) = 1/ 100. Thus,
we now have four linear constraints on our function 𝑤, albeit at different points.
Our goal is to determine a unique function 𝑤 ∈ Sol(𝑃𝜕) by incorporating these four
initial conditions, and then to evaluate that holonomic function 𝑤 at the branch point 𝑥1 . To
this end, we proceed as follows. We consider any point 𝑥ord ∈ R at which the differential
operator 𝑃𝜕 is not singular, i.e., the coefficient of the highest order differentiation does
not vanish at 𝑥ord . Using the command local_basis_expansion that is built into the
SAGE [171] package ore_algebra, we compute a basis of local series solutions to 𝑃𝜕 at
the point 𝑥ord . Since that point is nonsingular, that basis has the following form:

𝑠 𝑥ord ,0 (𝑥) = 1 + 𝑂 ((𝑥 − 𝑥 ord ) 4 ), 𝑠 𝑥ord ,1 (𝑥) = (𝑥 − 𝑥 ord ) + 𝑂 ((𝑥 − 𝑥ord ) 4 ),


𝑠 𝑥ord ,2 (𝑥) = (𝑥 − 𝑥 ord ) + 𝑂 ((𝑥 − 𝑥 ord ) 4 ), 𝑠 𝑥ord ,3 (𝑥) = (𝑥 − 𝑥 ord ) 3 + 𝑂 ((𝑥 − 𝑥 ord ) 4 ).
2

Locally at 𝑥ord , our solution is given by a unique choice of four coefficients 𝑐 𝑥ord ,𝑖 , namely

𝑤(𝑥) = 𝑐 𝑥ord ,0 · 𝑠 𝑥ord ,0 (𝑥) + 𝑐 𝑥ord ,1 · 𝑠 𝑥ord ,1 (𝑥) + 𝑐 𝑥ord ,2 · 𝑠 𝑥ord ,2 (𝑥) + 𝑐 𝑥ord ,3 · 𝑠 𝑥ord ,3 (𝑥).
182 14 Volumes of Semialgebraic Sets

At a regular singular point 𝑥rs , complex powers of 𝑥 and log(𝑥) can appear in the local
basis at 𝑥rs . Any initial condition at a point determines a linear constraint on its coefficients.
For instance, 𝑤 ′ (0) = 2 implies 𝑐 0,1 = 2, and similarly for our initial conditions at −1, 1,
and 𝑥0 . One challenge is that the initial conditions pertain to different points. To address
this, we calculate transition matrices that relate the basis above of series solutions at one
point to the basis at another point. These are invertible 4 × 4 matrices.
With the method described above, we find the basis of series solutions at 𝑥1 , along with a
system of four linear constraints on the four coefficients 𝑐 𝑥1 ,𝑖 . These constraints are derived
from the initial conditions at 0, ±1, and 𝑥0 , using the 4 × 4 transition matrices. By solving
these linear equations, we compute the desired function value up to any desired precision:

𝑤(𝑥1 ) = 3.70815994474216228834822556114586537124306581991393470943....

In conclusion, this real number is the area of the TV screen 𝑆 in Figure 14.2 that is defined
by the polynomial 𝑞(𝑥, 𝑦) in (14.6). ⋄

Before we discuss the approach from Example 14.9 in a general setting, let us first study
the structure of the space of holonomic functions. They turn out to have remarkable closure
properties. In the following, let 𝑓 and 𝑔 be functions in x = (𝑥1 , . . . , 𝑥 𝑛 ). For the proof of
the following result, see [159, Proposition 2.3].
Proposition 14.10 Let 𝑓 (x) be holonomic and 𝑔(x) algebraic. Then 𝑓 (𝑔(x)) is holonomic.
While algebraic transformations of holonomic functions are again holonomic by Proposi-
tion 14.10, this is not true for rational functions of holonomic functions. To see this, we
consider holonomic functions in one variable 𝑓 (𝑥). A necessary condition for a meromor-
phic function 𝑓 (𝑥) to be holonomic is that it has only finitely many poles in C.
For a concrete example, we start with the holonomic function sin(𝑥). This is annihilated
by the operator 𝜕 2 + 1. Its reciprocal 𝑓 (𝑥) = sin(1 𝑥) has infinitely many poles, so is not
holonomic. Hence, the class of holonomic functions is not closed under division. It is also
not closed under composition of functions since both 1𝑥 and sin(𝑥) are holonomic.

Proposition 14.11 If 𝑓 , 𝑔 are holonomic functions, then both 𝑓 + 𝑔 and 𝑓 · 𝑔 are holonomic.

Proof For each index 𝑖 ∈ {1, 2, . . . , 𝑛}, there exist non-zero operators 𝑃𝑖 and 𝑄 𝑖 in C[x] ⟨𝜕𝑖 ⟩
which satisfy 𝑃𝑖 • 𝑓 = 𝑄𝑖 • 𝑔 = 0. Set 𝑛𝑖 = order(𝑃𝑖 ) and 𝑚 𝑖 = order(𝑄 𝑖 ). Then, the
C(x)-linear span of the set 𝜕𝑖𝑘 • 𝑓 𝑘=0,...,𝑛𝑖 has dimension ≤ 𝑛𝑖 . Similarly, the C(x)-linear
span of the set {𝜕𝑖𝑘 • 𝑔} 𝑘=0,...,𝑚𝑖 has dimension ≤ 𝑚 𝑖 .
Now consider 𝜕𝑖𝑘 • ( 𝑓 + 𝑔), which we can write as 𝜕𝑖𝑘 • 𝑓 + 𝜕𝑖𝑘 • 𝑔. Therefore, the
C(x)-linear span of {𝜕𝑖𝑘 • ( 𝑓 + 𝑔)} 𝑘=0,...,𝑛𝑖 +𝑚𝑖 has dimension ≤ 𝑛𝑖 + 𝑚 𝑖 . Hence, there exists
a non-zero operator 𝑆𝑖 ∈ C[x] ⟨𝜕𝑖 ⟩ such that 𝑆𝑖 • ( 𝑓 + 𝑔) = 0. Since this holds for all
indices 𝑖, we conclude that the sum 𝑓 + 𝑔 is holonomic.
A similar proof works for the product 𝑓 · 𝑔. For 𝑖 ∈ {1, 2, . . . , 𝑛}, we consider the
set 𝜕𝑖𝑘 • ( 𝑓 · 𝑔) 𝑘=0,1,...,𝑛𝑖 𝑚𝑖 . By applying the product rule, we find that the 𝑛𝑖 𝑚 𝑖 + 1
generators are linearly dependent over the rational function field C(x). Hence, there is a
non-zero operator 𝑇𝑖 ∈ C[x] ⟨𝜕𝑖 ⟩ such that 𝑇𝑖 • ( 𝑓 · 𝑔) = 0. Hence, 𝑓 · 𝑔 is holonomic. □
14.2 D-Modules 183

The proof above gives a linear algebra method for computing an annihilating 𝐷-ideal
for the sum 𝑓 + 𝑔 (resp. the product 𝑓 · 𝑔), starting from such 𝐷-ideals for 𝑓 and 𝑔. The
following example illustrates Proposition 14.11.

Example 14.12 This example is similar to one in [179, Section 4.1]. Consider the univariate
functions 𝑓 (𝑥) = exp(𝑥) and 𝑔(𝑥) = exp(−𝑥 2 ). Their canonical holonomic representations
are 𝐼 𝑓 = ⟨𝜕 − 1⟩ with 𝑓 (0) = 1 and 𝐼𝑔 = ⟨𝜕 + 2𝑥⟩ with 𝑔(0) = 1. We are interested in the
function ℎ = 𝑓 + 𝑔. Its first two derivatives are obtained as follows:

1 1   
 ℎ  
 𝜕 • ℎ  = 1 −2𝑥  · 𝑓 .
 
 2   2
 𝑔
𝜕 • ℎ
1 4𝑥 − 2
 
 
By computing the left kernel of this 3 × 2-matrix, we find that ℎ = 𝑓 + 𝑔 is annihilated by

𝐼 ℎ = ⟨(2𝑥 + 1)𝜕 2 + (4𝑥 2 − 3)𝜕 − 4𝑥 2 − 2𝑥 + 2⟩, with ℎ(0) = 2, ℎ ′ (0) = 1.

For the product 𝑗 = 𝑓 · 𝑔 we have 𝑗 ′ = 𝑓 ′ 𝑔 + 𝑓 𝑔 ′ = 𝑓 · 𝑔 + 𝑓 · (−2𝑥𝑔) = (1 − 2𝑥) 𝑗, so the


canonical holonomic representation of 𝑗 is the 𝐷-ideal 𝐼 𝑗 = ⟨𝜕 + 2𝑥 − 1⟩ with 𝑗 (0) = 1. ⋄

Proposition 14.13 Let 𝑓 be holonomic in 𝑛 variables and 𝑚 < 𝑛. The restriction of 𝑓 to


the coordinate subspace {𝑥 𝑚+1 = · · · = 𝑥 𝑛 = 0} is a holonomic function in 𝑥1 , . . . , 𝑥 𝑚 .

Proof For 𝑖 ∈ {𝑚 + 1, . . . , 𝑛}, we consider the right ideal 𝑥𝑖 𝐷 in the Weyl algebra 𝐷. This
ideal is a left module over

𝐷 𝑚 = C⟨𝑥1 , . . . , 𝑥 𝑚 , 𝜕1 , . . . , 𝜕𝑚 ⟩.

The sum of these ideals with Ann𝐷 ( 𝑓 ) is hence a left 𝐷 𝑚 -module. Its intersection with
𝐷 𝑚 is called the restriction ideal:

(Ann𝐷 ( 𝑓 ) + 𝑥 𝑚+1 𝐷 + · · · + 𝑥 𝑛 𝐷) ∩ 𝐷 𝑚 . (14.8)

By [155, Prop. 5.2.4], this 𝐷 𝑚 -ideal is holonomic and annihilates 𝑓 (𝑥1 , . . . , 𝑥 𝑚 , 0, . . . , 0).□

Proposition 14.14 The partial derivatives of a holonomic function are holonomic.

Proof Let 𝑓 be holonomic and 𝑃𝑖 ∈ C[𝑥] ⟨𝜕𝑖 ⟩\{0} with 𝑃𝑖 • 𝑓 = 0 for all 𝑖. We can write 𝑃𝑖
𝜕𝑓
as 𝑃𝑖 = 𝑃e𝑖 𝜕𝑖 + 𝑎 𝑖 (𝑥), where 𝑎 𝑖 ∈ C[𝑥]. If 𝑎 𝑖 = 0, then 𝑃e𝑖 • 𝜕𝑥𝑖
= 0 and we are done. Assume
𝑎 𝑖 ≠ 0. Since both 𝑎 𝑖 and 𝑓 are holonomic, by Proposition 14.11, there is a non-zero linear
operator 𝑄 𝑖 ∈ C[𝑥] ⟨𝜕𝑖 ⟩ such that 𝑄 𝑖 • (𝑎 𝑖 · 𝑓 ) = 0. Then 𝑄 𝑖 𝑃e𝑖 annihilates 𝜕 𝑓 /𝜕𝑥𝑖 . □
A key fact about 𝐷-modules (see [155, Section 5.5]) is that integration is dual, in the
sense of the Fourier transform, to restriction. Here is the dual to Proposition 14.13:

Proposition 14.15 Let 𝑓 : R𝑛 → C be a holonomic function. Then the definite integral


∫ 𝑏
𝐹 (𝑥1 , . . . , 𝑥 𝑛−1 ) = 𝑓 (𝑥1 , . . . , 𝑥 𝑛−1 , 𝑥 𝑛 ) d𝑥 𝑛
𝑎
184 14 Volumes of Semialgebraic Sets

is a holonomic function in 𝑛 − 1 variables, assuming the integral converges.

By dualizing (14.8), we obtain the following 𝐷 𝑚 -ideal, known as the integration ideal:

Ann𝐷 ( 𝑓 ) + 𝜕𝑚+1 𝐷 + · · · + 𝜕𝑛 𝐷 ∩ 𝐷 𝑚 for 𝑚 < 𝑛.

The expression is Fourier dual to the restriction ideal (14.8). This exchanges 𝑥𝑖 and 𝜕𝑖 . If
𝑚 = 𝑛 − 1, then the integration ideal annihilates the holonomic function 𝐹 above.
Equipped with our tools for holonomic functions, we now return to volumes of semialge-
braic sets, using the method of Lairez, Mezzarobba, and Safey El Din [116]. They compute
this volume by deriving a differential operator that encodes periods of an integral [115]:

Definition 14.16 Let 𝑅(𝑡, 𝑥1 , . . . , 𝑥 𝑛 ) be a rational function and consider the formal integral

𝑅(𝑡, 𝑥1 , . . . , 𝑥 𝑛 ) d𝑥 1 · · · d𝑥 𝑛 . (14.9)

Fix an open subset Ω of either R or C. An analytic function 𝜙 : Ω → C is a period of the


integral (14.9) if, for any 𝑠 ∈ Ω, there exists a neighborhood Ω′ ⊆ Ω of 𝑠 and an 𝑛-cycle
𝛾 ⊂ C𝑛 with the following property: For all 𝑡 ∈ Ω′, the cycle 𝛾 is disjoint from the poles
of 𝑅𝑡 B 𝑅(𝑡, •) and

𝜙(𝑡) = 𝑅(𝑡, 𝑥1 , . . . , 𝑥 𝑛 ) d𝑥 1 · · · d𝑥 𝑛 . (14.10)
𝛾

In the following, we make some assumptions. Let 𝑆 = { 𝑓 ≤ 0} ⊂ R𝑛 be a compact


semialgebraic set, given by 𝑓 ∈ Q[𝑥1 , . . . , 𝑥 𝑛 ]. Furthermore, let pr : R𝑛 → R denote the
projection on the first coordinate. The set of branch points of pr restricted to the zero locus
of 𝑓 is the following subset of the real line, which is assumed to be finite:
 𝜕𝑓
Σ𝑓 = 𝑝 ∈ R | ∃ y = (𝑦 2 , . . . , 𝑦 𝑛 ) ∈ R𝑛−1 : 𝑓 ( 𝑝, y) = 0 and 𝜕𝑥𝑖 ( 𝑝, y) = 0, 𝑖 = 2, . . . , 𝑛 .

The polynomial in the unknown 𝑝 that defines Σ 𝑓 is obtained by eliminating 𝑥 2 , . . . , 𝑥 𝑛 . It


can be represented as a multivariate resultant, generalizing the Sylvester resultant in (14.7).
Fix an open interval 𝐼 in R with 𝐼 ∩ Σ 𝑓 = ∅. For any 𝑥1 ∈ 𝐼, the set 𝑆 𝑥1 B pr−1 (𝑥1 ) ∩ 𝑆
is compact and semialgebraic in (𝑛 − 1)-space. We are interested in its volume. By [116,
Theorem 9], the function 𝑣 : 𝐼 → R, 𝑥 1 ↦→ vol𝑛−1 𝑆 𝑥1 is a period of the rational integral

1 𝑥2 𝜕 𝑓 (𝑥 1 , 𝑥2 , . . . , 𝑥 𝑛 )
d𝑥 2 · · · d𝑥 𝑛 . (14.11)
2𝜋𝑖 𝑓 (𝑥1 , 𝑥2 , . . . , 𝑥 𝑛 ) 𝜕𝑥2
Let 𝑒 1 < 𝑒 2 < · · · < 𝑒 𝐾 be the branch points in Σ 𝑓 and set 𝑒 0 = −∞ and 𝑒 𝐾+1 = ∞. This
Ð
specifies the pairwise disjoint open intervals 𝐼 𝑘 = (𝑒 𝑘 , 𝑒 𝑘+1 ). They satisfy R\Σ 𝑓 = 𝐾𝑘=0 𝐼 𝑘 .
∫𝑡
Fix the holonomic functions 𝑤 𝑘 (𝑡) = 𝑒 𝑣(𝑥1 )𝑑𝑥1 . The volume of 𝑆 then is obtained as
𝑘

∫ 𝑒𝐾 𝐾−1
∑︁
vol(𝑆) = 𝑣(𝑥1 )𝑑𝑥1 = 𝑤 𝑘 (𝑒 𝑘+1 ) .
𝑒1 𝑘=1
14.2 D-Modules 185

How does one compute such a sum? As a period of the rational integral (14.11), the
volume 𝑣 is a holonomic function on each interval 𝐼 𝑘 . A key step is to find an operator 𝑃
in 𝐷 1 = C⟨𝑥1 , 𝜕1 ⟩ that annihilates 𝑣| 𝐼𝑘 for all 𝑘. The product 𝑃𝜕 annihilates the functions
𝑤 𝑘 (𝑥 1 ) for all 𝑘. By imposing sufficiently many initial conditions, we can reconstruct the
functions 𝑤 𝑘 from the operator 𝑃𝜕. Initial conditions that come for free are 𝑤 𝑘 (𝑒 𝑘 ) = 0 for
all 𝑘. Finally, for evaluating the functions 𝑤 𝑘 we use methods for numerical integration.
The differential operator 𝑃 is known as the Picard–Fuchs equation of the period in
question. The following software packages can be used to compute Picard–Fuchs equations:
• HolonomicFunctions by C. Koutschan in Mathematica [102],
• ore_algebra by M. Kauers in SAGE [171],
• periods by P. Lairez in MAGMA [24],
• Ore_Algebra by F. Chyzak in Maple [127].
We now apply this to compute volumes. Starting from the polynomial 𝑓 , we compute
the Picard–Fuchs operator 𝑃 ∈ 𝐷 1 along with suitable initial conditions. For each interval
𝐼 𝑘 we perform the following steps, here described for the ore_algebra package in SAGE:
(i) Using the command local_basis_expansion, compute a local basis of series solu-
tions for the linear differential operator 𝑃𝜕 at various points in [𝑒 𝑘 , 𝑒 𝑘+1 ).
(ii) Using the command op.numerical_transition_matrix, numerically compute a
transition matrix for the series solution basis from one point to another one.
(iii) From the initial conditions, construct linear relations between the coefficients in the
local basis extensions. Using step (ii), transfer them to the branch point 𝑒 𝑘+1 .
(iv) Plug in to the local basis extension at 𝑒 𝑘+1 and thus evaluate the volume of 𝑆 ∩pr−1 (𝐼 𝑘 ).
Using this, we compute the volume of a convex body in 3-space, shown in Figure 14.3.

Fig. 14.3: The quartic bounds the convex region consisting of the gray points.

Example 14.17 (Quartic surface) Fix the quartic polynomial

𝑥 3 𝑦 𝑥𝑦𝑧 𝑦𝑧 𝑧2
𝑓 (𝑥, 𝑦, 𝑧) = 𝑥 4 + 𝑦 4 + 𝑧 4 + − − + − 1, (14.12)
20 20 100 50
186 14 Volumes of Semialgebraic Sets

and consider the set 𝑆 = (𝑥, 𝑦, 𝑧) ∈ R3 | 𝑓 (𝑥, 𝑦, 𝑧) ≤ 0 . Our aim is to compute vol(𝑆).


As in Example 14.9, we get a rough idea by sampling. This is illustrated in Figure 14.3.
Our set 𝑆 is compact, convex, and contained in the cube −1.05 ≤ 𝑥, 𝑦, 𝑧 ≤ 1.05. We
sampled 10000 points uniformly from that cube. For each sample, we checked the sign of
𝑓 (𝑥, 𝑦, 𝑧). By multiplying the volume (2.1) 3 = 9.261 of the cube by the fraction of gray
points among the sampled points, we found that vol(𝑆) ≈ 6.4771. In order to gain a higher
precision, we now compute the volume of our semialgebraic set 𝑆 by means of 𝐷-modules.
Let pr : R3 → R be the projection onto the 𝑥-coordinate. Let 𝑣(𝑥) = vol2 pr−1 (𝑥) ∩ 𝑆
denote the area of the fiber over any point 𝑥 in R. We write 𝑒 1 < 𝑒 2 for the two branch
points of the map pr restricted to the quartic surface { 𝑓 = 0}. They can be computed with
resultants. The projection has 36 complex branch points. The first two of them are real and
therefore are the branch points of pr. We obtain 𝑒 1 ≈ −1.0023512 and 𝑒 2 ≈ 1.0024985.
By [116, Theorem 9], the area function 𝑣(𝑥) is a period of the rational integral

1 𝑦 𝜕 𝑓 (𝑥, 𝑦, 𝑧)
d𝑦d𝑧.
2𝜋𝑖 𝑓 (𝑥, 𝑦, 𝑧) 𝜕𝑦
∫𝑡
We set 𝑤(𝑡) = 𝑒 𝑣(𝑥) d𝑥. The desired 3-dimensional volume equals vol(𝑆) = 𝑤(𝑒 2 ).
1
Using the function periods in MAGMA [24], we compute a differential operator 𝑃 of
order eight that annihilates 𝑣(𝑥). Again, 𝑃𝜕 then annihilates 𝑤(𝑥). One initial condition
is 𝑤(𝑒 1 ) = 0. We obtain eight further initial conditions 𝑤 ′ (𝑥) = vol2 (𝑆 𝑥 ) for points
𝑥 ∈ (𝑒 1 , 𝑒 2 ) by running the same algorithm for the 2-dimensional semialgebraic slices
𝑆 𝑥 = pr−1 (𝑥) ∩ 𝑆. In other words, we make eight subroutine calls to an area measurement
as in Example 14.9. From these nine initial conditions, we derive linear relations of the
coefficients in the local basis expansion at 𝑒 2 . These computations are run in SAGE [171]
as described in steps (i), (ii), (iii) and (iv) above. We find the approximate volume to be

vol(𝑆) ≈ 6.438832480572893544740733895969956188958420889235116976266328923128826
9155273887642162091495583989038294311376088934526903525560097601024171
190804769405534826558114212766135380613959757935305271022089419155701
52158647017087400219438452914068685622775954171509711339913473405961
7632892206072085516332397969163383760070738760107318247752061504714
367250460900923409066377732273390396822296235214963623286613117557
930687544148360721225681053481178760058264738867105810326818911
578448323758536767168707442532146029753762594261578920477859.

All digits in this number are guaranteed to be accurate. For details see [116, Section 4]. ⋄

14.3 SDP Hierarchies

We now present our second method for computing volumes. It is based on a hierarchy
of semidefinite programs (SDP). This is due to Lasserre and his collaborators. See the
articles [86, 169, 170] and references therein.
14.3 SDP Hierarchies 187

As before, the goal is to compute the volume of a compact semialgebraic set 𝑆 ⊂ R𝑛


as accurately as possible. We consider an inclusion of semialgebraic sets 𝑆 ⊂ 𝐵 ⊂ R𝑛 ,
where 𝐵 is compact and serves as a bounding box, like 𝐵 = [−1, 1] 𝑛 .
We assume that the moments of the Lebesgue measure on 𝐵 are known or easy to
compute, i.e., we have access to the values of the integrals
∫ ∫
𝑏𝛼 = 𝛼
x dx = 𝑥1𝛼1 𝑥 2𝛼2 · · · 𝑥 𝑛𝛼𝑛 d𝑥1 d𝑥2 · · · d𝑥 𝑛 for 𝛼 ∈ N𝑛 .
𝐵 𝐵

However, the moments 𝑚 𝛼 of the Lebesgue measure on 𝑆 are unknown:


∫ ∫
𝑚𝛼 = x 𝛼 dx = 𝑥1𝛼1 𝑥 2𝛼2 · · · 𝑥 𝑛𝛼𝑛 d𝑥1 d𝑥2 · · · d𝑥 𝑛 for 𝛼 ∈ N𝑛 . (14.13)
𝑆 𝑆

These moments will be our decision variables. Our aim is to compute 𝑚 0 = vol(𝑆). The
idea is to use the following infinite-dimensional linear program:

Maximize the integral 𝑆 d𝜇, where 𝜇 and 𝜇ˆ range over measures on R𝑛 , where 𝜇 is
supported on 𝑆, 𝜇ˆ is supported on 𝐵, and the sum 𝜇 + 𝜇ˆ is the Lebesgue measure on 𝐵.

The unique optimal solution (𝜇∗ , 𝜇ˆ ∗ ) to this linear program can be characterized as
follows: 𝜇∗ is the Lebesgue∫measure on 𝑆, 𝜇ˆ ∗ is the Lebesgue measure on 𝐵\𝑆, and the
optimal value is vol(𝑆) = 𝑆 d𝜇∗ . This is described in [170, Equation (1)]. The linear
programming (LP) dual is given in [170, Equation (2)].
We state our linear program in terms of the moment sequences m = (𝑚 𝛼 ) and m̂ = ( 𝑚ˆ 𝛼 )
of the two unknown measures 𝜇 and 𝜇. ˆ Namely, we paraphrase our problem as follows:

Maximize 𝑚 0 subject to 𝑚 𝛼 + 𝑚ˆ 𝛼 = 𝑏 𝛼 for all 𝛼 ∈ N𝑛 ,


where m and m̂ are the moment sequences of 𝜇 and 𝜇, ˆ (14.14)
respectively, with 𝜇 supported on 𝑆 and 𝜇ˆ supported on 𝐵.

We arrive at the moment problem, which is the question of how to characterize moments
of measures. This problem has a long history in mathematics, and an exact characteriza-
tion is very difficult. However, in recent years, it has been realized that there are effective
necessary conditions. These involve semidefinite programming formulations in finite di-
mensions, which are built via the localizing matrices we now define.
In the following, we assume for convenience that 𝑆 is defined by a single inequality:
∑︁
𝑆 = {x ∈ R𝑛 | 𝑓 (x) ≥ 0}, where 𝑓 (x) = 𝑐 𝛼 x𝛼. (14.15)
𝛼

The theory works for all semialgebraic sets (14.2). Fix an integer 𝑑that exceeds
 the degree
of 𝑓 . We shall construct three symmetric matrices of format 𝑛+𝑑 𝑑 × 𝑛+𝑑𝑑 whose entries
are linear in the decision variables. The rows and columns of our matrices are indexed by
elements 𝛼 ∈ N𝑛 with |𝛼| = 𝛼1 + · · · + 𝛼𝑛 at most 𝑑. These correspond to monomials x 𝛼
of degree ≤ 𝑑. Our first matrix 𝑀𝑑 (m) has the entry 𝑚 𝛼+𝛽 in row 𝛼 and column 𝛽. Our
second matrix 𝑀𝑑 ( m̂) has the entry 𝑚ˆ 𝛼+𝛽 in row 𝛼 and column 𝛽. Finally, suppose that the
188 14 Volumes of Semialgebraic Sets

polynomial 𝑓 defining 𝑆 has coefficients 𝑐 𝛼 . Then, our third matrix 𝑀𝑑 ( 𝑓 m) has the entry
Í
𝛾 𝑐 𝛾 𝑚 𝛼+𝛽+𝛾 in row 𝛼 and column 𝛽. We consider the following semidefinite program:

Maximize 𝑚 0 subject to 𝑚 𝛼 + 𝑚ˆ 𝛼 = 𝑏 𝛼
for all 𝛼 ∈ N𝑛 with |𝛼| ≤ 𝑑, where the
(14.16)
symmetric matrices 𝑀𝑑 (m), 𝑀𝑑 ( m̂)
and 𝑀𝑑 ( 𝑓 m) are positive semidefinite.

The third matrix can be replaced by 𝑀𝑑′ ( 𝑓 m) where 𝑑 ′ = 𝑑 − ⌈deg( 𝑓 )/2⌉. The objective
function value depends on 𝑑, and it decreases as 𝑑 increases. The limit for 𝑑 → ∞ equals
the volume of 𝑆. Indeed, this sequence of SDP problems is an approximation to (14.14).
The convergence property was proved in [86].
The remainder of this section shows how to solve (14.16) in practice. It is based on
[86, 169, 170]. We discuss an implementation in Mathematica [102]. This material was
developed by Chiara Meroni. We are very grateful to her for allowing us to include it here.
Our point of departure is the following question: given a sequence of real numbers
m = (𝑚 𝛼 ) 𝛼 , does there exist a measure 𝜇 𝑆 supported on the set 𝑆 such that (14.13) holds?
Given 𝑑 ∈ N, let N𝑛𝑑 be the set of 𝛼 ∈ N𝑛 such that |𝛼| = 𝛼1 + · · · + 𝛼𝑛 ≤ 𝑑. We also set
 
deg 𝑓
𝑟 = .
2

The moment matrix and the localizing matrix for our sequence of moments m are
   ∑︁ 
𝑀𝑑 (m) = 𝑚 𝛼+𝛽 and 𝑀𝑑−𝑟 ( 𝑓 m) = 𝑐 𝛾 𝑚 𝛼+𝛽+𝛾 . (14.17)
𝛼,𝛽 ∈N𝑑
𝑛 𝑛 𝛼,𝛽 ∈N𝑑−𝑟
𝛾

𝑛+𝑑  𝑛+𝑑  𝑛+𝑑−𝑟  𝑛+𝑑−𝑟 


The moment matrix has size 𝑑 × 𝑑 . The localizing matrix has size 𝑑−𝑟 × 𝑑−𝑟 .

Proposition 14.18 A necessary condition for a sequence m = (𝑚 𝛼 ) 𝛼 to have a representing


measure supported on 𝑆 is that for every 𝑑 ∈ N the following matrix inequalities hold:

𝑀𝑑 (m) ≽ 0 and 𝑀𝑑−𝑟 ( 𝑓 m) ≽ 0.

This result is a formulation of Putinar’s Positivstellensatz [86, Theorem 2.2]. The positive
semi-definiteness of the moment matrix is a necessary condition for m to have a representing
measure; the inequality with the localizing matrix forces the support of the representing
measure to be contained in 𝑆 = { 𝑓 (x) ≥ 0}.

Example 14.19 Consider the disc 𝑆 = {(𝑥, 𝑦) ∈ R2 | 𝑓 = 1 − 𝑥 2 − 𝑦 2 ≥ 0}. Its moments are
   
Γ 𝛼12+1 Γ 𝛼22+1
𝑚 ( 𝛼1 , 𝛼2 ) = ((−1) 𝛼1 + 1) ((−1) 𝛼2 + 1)  ,
4Γ 12 (𝛼1 + 𝛼2 + 4)

where Γ is the Gamma function. For 𝑑 = 3, the moment and localizing matrices (14.17) are
14.3 SDP Hierarchies 189
𝜋 𝜋
 𝜋 0 4 0 0 0 0 04 0 
 0 𝜋4 0 𝜋
8 0 0 𝜋
0 0 24 0 
𝜋 𝜋 𝜋
4 0 8 0 0 0 0 24 0 0
 
   𝜋2 0 𝜋
12 0 𝜋
0 12 
5𝜋 𝜋
 0 𝜋8 0 64 0 0 𝜋
0 0 64 0  0 12 0 0 0 0 
 𝜋 𝜋 𝜋
  𝜋 𝜋 𝜋 
0 0 0 0 0 24 0 0 0 32 0 0 96
𝑀3 (m) =  4 8
and 𝑀2 ( 𝑓 m) =  120
   
0 0 0 0 0 𝜋
0 0 0 0  0 𝜋
0 12 0 0 .
 24   
𝜋 𝜋 𝜋 0 𝜋
 0 0 0 0 240 64 0 0 64
 0 0 0 96 0 
𝜋 𝜋
0 𝜋8 0  𝜋 0 𝜋 𝜋
4 0 24 0 0 0 0 96 0 0 32
  
 𝜋 𝜋 𝜋
  12 
 0 24 0 64 0 0 0 0 64 0 
5𝜋
 𝜋 𝜋

 0 0 0 0 8 0 64 0 0 64 

These two matrices are symmetric and positive definite. ⋄

We consider the infinite-dimensional linear program (LP) on measures whose optimal


value is the volume of 𝑆 ⊂ 𝐵. The program was stated above. We use the formulation
in [86, Equation 3.1] and [170, Equation 1]:

𝑃: max d𝜇 𝑆 , s.t. 𝜇 𝑆 + 𝜇 𝐵\𝑆 = 𝜇∗𝐵 . (14.18)
𝜇𝑆 , 𝜇𝐵\𝑆

Here, 𝜇 𝑆 is a positive finite Borel measure supported on 𝑆, and 𝜇∗𝐵 is the Lebesgue measure
on 𝐵. The adjective “infinite-dimensional” refers to the fact that we are optimizing over a
set of measures, which is uncountable. Based on the theory of dual Banach spaces, one can
talk about dual convex bodies, and construct a duality theory for infinite-dimensional LPs.
In our case, the dual to the space of positive finite Borel measures is the set of positive
continuous functions. This observation leads to the definition of an LP that is dual to 𝑃:

𝑃∗ : inf 𝛾 d𝜇∗𝐵 , s.t. 𝛾 ≥ 1𝑆 . (14.19)
𝛾

The decision variable 𝛾 is a positive continuous function on 𝐵 and 1𝑆 is the indicator


function of 𝑆. There is no duality gap: the optimal values of (14.18) and (14.19) coincide.
Note that the optimal value of 𝑃∗ is an infimum and not a minimum since we approximate
the discontinuous indicator function 1𝑆 using continuous functions.
The infinite-dimensional LP (14.18) can be approximated by a hierarchy of finite-
dimensional semidefinite programs (SDPs) [117]. The optimal values of the hierarchy
converge monotonically to the optimal value of the LP [86, Theorem 3.2]. There is again a
primal and dual version of the SDPs. In our setting, the primal is

𝑃𝑑 : max 𝑚 0 , s.t. m + m
b = b, 𝑀𝑑 (m) ≽ 0, 𝑀𝑑 ( m
b ) ≽ 0, 𝑀𝑑−𝑟 ( 𝑓 m) ≽ 0. (14.20)
m, m
b

Here m = (𝑚 𝛼 ), m
b = (𝑚
b 𝛼 ), and b = (𝑏 𝛼 ) contains the moments of 𝐵 indexed by 𝛼 ∈ N2𝑑
𝑛 .

This formulation is [170, Equation 3]. The optimal value of 𝑃 𝑑 is an upper bound for
vol(𝑆) since we are optimizing over a larger set. The dual SDP is [86, Equation 3.6],
which is formulated using sums of squares of polynomials. The authors of [86, 169, 170]
implemented the SDPs using GloptiPoly [85]. The next examples are computed with
Mathematica [102]. We are going to include the linear condition m + m b = b inside the
condition on the moment matrix of m b , by imposing directly that 𝑀𝑑 (b − m) ≽ 0.
190 14 Volumes of Semialgebraic Sets

Example 14.20 (TV screen) Consider 𝑆 = {(𝑥, 𝑦) ∈ [−1.2, 1.2] 2 | 𝑓 (𝑥, 𝑦) ≥ 0} ⊂ R2


where 𝑓 = −𝑞 is the quartic in (14.6). This convex set is shown in Figures 14.2 and 14.4.
Recall from Example 14.9 that vol(𝑆) = 3.7081599447....
Let us now try the SDP formulation above, with 𝑑 = 10. The moment matrices 𝑀10 (m)
and 𝑀10 (b − m) have format 66 × 66. For instance, the second matrix looks like

 4−𝑚 (0,0) −𝑚 (0,1) 34 −𝑚 (0,2) −𝑚 (0,3) ···


4 4
 −𝑚 (0,1) 3 −𝑚 (0,2) −𝑚 (0,3) 5 −𝑚 (0,4) ···
 

4 −𝑚 (0,3) 45 −𝑚 (0,4)
𝑀10 (b − m) =  3 −𝑚 (0,2) −𝑚 (0,5) ···
4 4
.
 −𝑚 (0,3) 5 −𝑚 (0,4) −𝑚 (0,5) 7 −𝑚 (0,6) ···
 
 . .. .. .. .. 
 .. . . . .
The localizing matrix 𝑀8 ( 𝑓1 m) has format 45 × 45. Its (𝛼, 𝛽) entry equals
1
𝑚 𝛼+𝛽 − 𝑚 (4,0)+𝛼+𝛽 − 𝑚 (0,4)+𝛼+𝛽 − 𝑚 (1,1)+𝛼+𝛽 .
100
The optimal value of the semidefinite program 𝑃10 is 4.4644647361..., the optimal value
of 𝑃14 is 4.3679560947..., and for 𝑃18 we get 4.3241824171.... These numbers are upper
bounds for the actual volume, as predicted. However, these bounds are far from the truth.⋄
Example 14.21 (Elliptope) Consider 𝑓 (𝑥, 𝑦, 𝑧) = 1 − 𝑥 2 − 𝑦 2 − 𝑧 2 + 2𝑥𝑦𝑧. This defines the
elliptope 𝑆 = {(𝑥, 𝑦, 𝑧) ∈ [−1, 1] 3 | 𝑓 (𝑥, 𝑦, 𝑧) ≥ 0} ⊂ R3 , shown in Figures 14.1 and 14.4.
2
We already know from Example 14.1 that vol(𝑆) = 𝜋2 = 4.934802202.... The upper
bounds computed from the SDP (14.20) for 𝑑 = 4, 8, 12 are respectively 7.3254012963...,
6.6182632506..., and 6.303035372.... These numbers are still pretty bad. ⋄

Fig. 14.4: Left: the TV screen from Example 14.20. Right: the elliptope from Example 14.21.

Examples 14.20 and 14.21 suggest that the convergence of the SDP approximation is
quite slow. To improve this, one uses the method of Stokes constraints. This was introduced
in [169, 170]. We shall now explain it. In the linear program 𝑃∗ (14.19) and in the SDP
hierarchy (14.20), we aim to approximate a piecewise-differentiable function 1𝑆 with con-
tinuous functions (respectively, polynomials). This produces the well-known Gibbs effect,
creating many oscillations near the boundary of 𝑆 in the polynomial solutions of the SDP.
To remedy this, we add linear constraints that do not modify the infinite-dimensional LP
problem but add more information to the finite-dimensional SDP. One concrete way to do
this uses Stokes’ theorem and the fact that 𝑓 vanishes on the boundary 𝜕𝑆 of 𝑆 = { 𝑓 ≥ 0}.
14.3 SDP Hierarchies 191

Let 𝑈 be an open region in R𝑛 such that the Euclidean closure of 𝑈 is our semialgebraic
set 𝑆. Since 𝜕𝑆 is the zero set of a polynomial, it is smooth ∫almost everywhere.
∫ The
classical theorem of Stokes applies. This theorem states that 𝜕𝑆 𝜔 = 𝑆 d𝜔 for any
(𝑛 − 1)-differential form 𝜔 on R𝑛 . One consequence of Stokes’ theorem is Gauss’ formula
∫ ∫
𝑉 (x) · 𝑁 (x) dx = div 𝑉 (x) dx.
𝜕𝑆 𝑆

Here, 𝑉 (x) is a vector field, div denotes the divergence operator, 𝑁 (x) is the unit normal
field of the algebraic variety 𝜕𝑆 that points outwards, and we are integrating against the
standard measures on the respective domains. If the vector field is a scalar field times a
constant vector c ∈ R𝑛 , say 𝑉 (x) = 𝑣(x)c, and if ∇𝑣(x) denotes the gradient of 𝑣 at x, then
∫ ∫ ∫
c· 𝑣(x) 𝑁 (x) dx = div(𝑣(x)c) dx = c · ∇𝑣(x) dx.
𝜕𝑆 𝑆 𝑆

This formula holds because div(𝑣(x)c) = ∇𝑣(x) · c + 𝑣(x) · div(c) and the divergence of a
constant vector is zero. Since this identity holds for every c ∈ R𝑛 , we have
∫ ∫
𝑣(x) · 𝑁 (x) dx = ∇𝑣(x) dx. (14.21)
𝜕𝑆 𝑆

If 𝑣 = 0 on 𝜕𝑆, then the left-hand side of (14.21) is zero. This can be expressed in terms of
measures and distributions, and added to (14.18) and (14.19) as in [170, Equation 17 and
Remark 3]. In our SDP hierarchy, the Stokes constraints are written as follows. Let

𝑣(x) = 𝑓 (x) x 𝛼

for any multiindex 𝛼 ∈ N𝑛 with |𝛼| ≤ 𝑑 + 1 − deg 𝑓 . To remedy the Gibbs effect, we require

∇ 𝑓 (x) x 𝛼 x𝛽 =𝑚𝛽 = 0.

This yields 𝑛 new linear conditions for each 𝛼 as above.


Example 14.22 For the SDP in Example 14.20, the Stokes constraints for a given 𝛼 are:
𝛼1 +1
𝛼1 𝑚 𝛼+(−1,0) − (𝛼1 + 4)𝑚 𝛼+(3,0) − 𝛼1 𝑚 𝛼+(−1,4) − 100 𝑚 𝛼+(0,1) = 0,
𝛼2 +1
𝛼2 𝑚 𝛼+(0,−1) − 𝛼2 𝑚 𝛼+(4,−1) − (𝛼2 + 4)𝑚 𝛼+(0,3) − 100 𝑚 𝛼+(1,0) = 0.

For the SDP in Example 14.21, the Stokes constraints are:


𝛼1 𝑚 𝛼+(−1,0,0) − ( 𝛼1 + 2) 𝑚 𝛼+(1,0,0) − 𝛼1 𝑚 𝛼+(−1,2,0) − 𝛼1 𝑚 𝛼+(−1,0,2) + 2( 𝛼1 + 1) 𝑚 𝛼+(0,1,1) = 0,
𝛼2 𝑚 𝛼+(0,−1,0) − 𝛼2 𝑚 𝛼+(2,−1,0) − ( 𝛼2 + 2)𝑚 𝛼+(0,1,0) − 𝛼2 𝑚 𝛼+(0,−1,2) + 2( 𝛼2 + 1) 𝑚 𝛼+(1,0,1) = 0,
𝛼3 𝑚 𝛼+(0,0,−1) − 𝛼3 𝑚 𝛼+(2,0,−1) − 𝛼3 𝑚 𝛼+(0,2,−1) − ( 𝛼3 + 2) 𝑚 𝛼+(0,0,1) + 2( 𝛼3 + 1) 𝑚 𝛼+(1,1,0) = 0.

Table 14.1 compares the optimal values in (14.20) with and without Stokes constraints. ⋄
As Table 14.1 shows, the convergence with Stokes constraints is much faster than without
them. The intuition is that now, with the (dual) Stokes constraints added to 𝑃∗ (14.19), the
192 14 Volumes of Semialgebraic Sets
without Stokes with Stokes
𝑆 volume 𝑑
max 𝑃𝑑 time max 𝑃𝑑 time
10 4.464464... 0.621093 3.709994... 0.482376
3.708159... 15 4.367956... 3.545369 3.708191... 3.738137
20 4.324182... 14.906281 3.708163... 20.592531
4 7.325401... 0.124392 5.612716... 0.077315
4.934802... 8 6.618263... 7.222441 4.976796... 7.178571
12 6.303035... 696.886298 4.937648... 1105.619231

Table 14.1: The optimal values of (14.20) with and without Stokes constraints for Examples 14.20 and
14.21. The column “max 𝑃𝑑 ” displays the optimal value, whereas the column “time” gives the time, in
seconds, for running the command SemidefiniteOptimization in Mathematica [102].

function we approximate is not just the indicator function of 𝑆. A detailed explanation,


for a variant of the Stokes constraints, is given in [169]. The authors prove that, when
adding these constraints, the optimal solution of the new 𝑃∗ becomes a minimum. This
eliminates any kind of Gibbs effect, and guarantees faster convergence. In [169], the authors
mention that, from numerical experiments, it is reasonable to expect that the original Stokes
constraints and the new Stokes constraints are equivalent, but there is no formal proof yet.
In this chapter, we considered semialgebraic sets (14.1) that are defined by only one
polynomial inequality. This restriction was imposed to simplify the exposition. Two meth-
ods for computing their volumes were presented in Sections 14.2 and 14.3. We did not
offer a comparison between them: this is a topic for future research. Both methods apply to
arbitrary semialgebraic sets. These can be written as finite unions of basic semialgebraic
sets (14.2). In conclusion, computing volumes is important for metric algebraic geometry.

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International
License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and
reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter’s Creative Commons
license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s
Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the
permitted use, you will need to obtain permission directly from the copyright holder.
Chapter 15
Sampling

In this book, we studied the metric geometry of algebraic varieties from an applied and
computational perspective. We now add probability theory into this mix. This chapter is
about sampling from a real variety 𝑋. Asmussen and Glynn [10] underline the importance
of sampling as follows: “Sampling-based computational methods are a fundamental part
of the numerical toolset across an enormous number of different applied domains”.
Section 15.1 connects us to topological data analysis. Here we explain how sampling
can be used to compute topological information about 𝑋. In Section 15.2, we discuss
algorithms for sampling with density guarantees. The workhorse behind this is the ability
to rapidly solve polynomial equations associated with 𝑋, namely intersecting with linear
subspaces and finding ED critical points. In Section 15.3, we introduce Markov kernels on
the variety 𝑋. These specify Markov chains that take steps on the variety 𝑋. While Markov
chains on discrete state spaces are familiar in combinatorics and algebra, now the state
space 𝑋 is continuous. This requires some analysis that may be unfamiliar to our readers.
Markov chains on 𝑋 can be modified with the Metropolis–Hastings algorithm (Algo-
rithm 6), in order to reach a desired stationary distribution. For instance, if 𝑋 is compact, we
could be interested in sampling from the uniform distribution. We will explain how to do
this in Section 15.4. The name Chow in the section title is an allusion to Chow forms. These
encode a variety 𝑋 through its linear sections. In our probabilistic setting, distributions on
𝑋 are represented by distributions on the Grassmannian. This can be viewed as an interpre-
tation of the Chow form for random algebraic geometry. For the resulting class of sampling
algorithms, we propose the acronym CMCMC, short for Chow Markov Chain Monte Carlo.

15.1 Homology from Finite Samples

Let 𝑋 be a real algebraic variety in R𝑛 . Our aim is to compute a finite subset 𝑆 ⊂ 𝑋, which
we call a sample. A sample on a curve is shown in Figure 15.1. The sample 𝑆 yields a
discrete approximation of 𝑋 that can be used to explore properties of the variety.

© The Author(s) 2024 193


P. Breiding et al., Metric Algebraic Geometry, Oberwolfach Seminars 53,
https://doi.org/10.1007/978-3-031-51462-3_15
194 15 Sampling

For instance, if 𝑔 : 𝑋 → R is a function, we can find a lower bound for the optimization
problem maxx∈𝑋 𝑔(x) by computing max∫s∈𝑆 𝑔(s). Or, assuming that 𝑋 has finite volume,
1
𝑔(x)dx by the finite average |𝑆1 | s∈𝑆 𝑔(s),
Í
we can estimate the average value vol(𝑋) x∈𝑋

2.0

1.5

1.0

0.5

0.0

-0.5

-1.0

-1.5
-2 -1 0 1 2 3

Fig. 15.1: A sample of points on the curve 𝑋 = {𝑥 4 + 𝑦 4 − 2𝑥 2 − 2𝑥 𝑦 2 − 𝑦 + 1 = 0}.

In what follows, we use the Euclidean distance 𝑑 (x, y) = ∥x − y∥ on the ambient


space R𝑛 . This means that we consider our variety 𝑋 with an extrinsic metric. The next
definition refers to this extrinsic metric on the variety 𝑋.
Definition 15.1 A finite subset 𝑆 of 𝑋 is called 𝜀-dense in 𝑋 if, for all x ∈ 𝑋, there exists
an s ∈ 𝑆 with 𝑑 (x, s) < 𝜀. If this holds, then we also say that 𝑆 is an 𝜀-sample for 𝑋.
In this section, we are computing random samples on an algebraic variety 𝑋. In this
computation, we can replace 𝑋 by its smooth locus Reg(𝑋) and sample from the manifold
Reg(𝑋). To keep the notation simple, we assume throughout this chapter that the variety
𝑋 is smooth. It is a manifold that is embedded in the Euclidean space R𝑛 .
We first recall a theorem due to Niyogi, Smale, and Weinberger [138]. This gives
conditions for when the homology of 𝑋 can be computed from Ð a finite sample 𝑆. The idea
is to compute the homology of the union of 𝜀-balls 𝑈 = s∈𝑆 𝐵 𝜀 (s) of an 𝜀-sample 𝑆.
The homology groups of a union of balls 𝑈 can be computed from the associated C̆ech
complex. The theorem explains how small 𝜀 must be for this to work.
Ð
Theorem 15.2 Let 𝜀 > 0, let 𝑆 be an 𝜀-sample for √︃ 𝑋, and write 𝑈 = s∈𝑆 𝐵 𝜀 (s) for the
3
union of all 𝜀-balls around all points in 𝑆. If 𝜀 < 20 𝜏(𝑋), where 𝜏(𝑋) is the reach, then
𝑋 is a deformation retract of 𝑈. In this case, the homology of 𝑋 equals the homology of 𝑈.
Proof See [138, Proposition 3.1]. □
Di Rocco, Eklund, and Gäfvert [56] showed that, in Theorem 15.2, the reach 𝜏(𝑋) can
be replaced by the local reach 𝜏(x). For x ∈ 𝑋, the local reach is defined as the quantity

𝜏(x) := sup {𝑟 ≥ 0 | every u ∈ 𝐵𝑟 (x) has a unique closest point on 𝑋 } . (15.1)


15.1 Homology from Finite Samples 195

Thus, the local reach 𝜏(x) is the distance from the point x ∈ 𝑋 to the medial axis Med(𝑋);
cf. Chapter 7. The global reach 𝜏(𝑋) is bounded above by the local reach at each point; in
fact, we have 𝜏(𝑋) = inf x∈𝑋 𝜏(x). Thus, using the local reach instead of the global reach for
upper bounding 𝜀 can make a significant difference. The result from [56] is: If 𝜀 < 54 𝜏(s)
Ð
for all points s in an 𝜀-sample 𝑆 ⊂ 𝑋, then 𝑋 is a deformation retract of 𝑈 = s∈𝑆 𝐵 𝜀 (s).
If we only seek homology for small dimensions, then we can relax the conditions on 𝜀.
We first need the notion of 𝑘-bottlenecks. For a finite subset 𝐵 ⊂ 𝑋, let Γ(𝐵) denote the
subset of points in R𝑛 that are equidistant to all points in 𝐵. This is an affine-linear space.

Definition 15.3 Let 𝐵 = {x1 , . . . , x 𝑘 } ⊂ 𝑋 for 𝑘 ≥ 2. Let 𝐿 𝑖 := x𝑖 + 𝑁x𝑖 𝑋 denote the


affine normal space of 𝑋 at x𝑖 . If 𝐿 1 ∩ · · · ∩ 𝐿 𝑘 ∩ Γ(𝐵) ∩ conv(𝐵) ≠ ∅, we say that 𝐵 is a
𝑘-bottleneck of 𝑋. The width of 𝐵 is

ℓ(𝐵) := inf 𝑑 (x1 , u).


u∈Γ (𝐵)

Intuitively, 𝑘-bottlenecks identify data points u ∈ R𝑛 that have precisely 𝑘 nearest points
on 𝑋. The convexity condition implies that u is in the “middle” of the x𝑖 , and not outside.
For instance, the 2-bottlenecks of 𝑋 are precisely the bottlenecks studied in Section 7.1.
The weak feature size wfs(𝑋) of the variety 𝑋 is the smallest width of a 𝑘-bottleneck:

wfs(𝑋) := min inf { ℓ(𝐵) | 𝐵 is a 𝑘-bottleneck of 𝑋 }.


2≤𝑘 ≤EDdegree(𝑋)

The weak feature size is always greater than or equal to the reach. The reason is that
the exponential map 𝜑 𝜀 in (6.12) cannot be injective when 𝜀 > ℓ(𝐵) for a 𝑘-bottleneck
𝐵 = {x1 , . . . , x 𝑘 }. Indeed, if this holds, then the point u ∈ Γ(𝐵) with ℓ(𝐵) = 𝑑 (x1 , u) has 𝑘
points (x1 , v1 ), . . . , (x 𝑘 , v 𝑘 ) in its fiber under 𝜑 𝜀 .
For the next theorem, we fix 𝜀 > 0 and a finite set 𝑆 ⊂ R𝑛 . We define a two-dimensional
simplicial complex C with vertex set 𝑆 as follows. For x, y ∈ 𝑆, the pair {x, y} is an edge
of C if and only if at least one of the following two metric conditions is satisfied:
1. 𝑑 (x, y) ≤ 2𝜀, or

2. 𝑑 (x, y) ≤ 8𝜀 and there is z ∈ 𝑆 with 𝑑 (x, z) ≤ 2𝜀 and 𝑑 (y, z) ≤ 2𝜀.
We add the triangle with vertices x, y, z ∈ 𝑆 to C if and only if there is an edge between x
and y, between x and z, and between y and z. The result is called Vietoris–Rips complex
(at scale 𝜀). The following was proved in [56].
Theorem 15.4 Let 𝑆 ⊂ 𝑋 be an 𝜀-sample, where 𝜀 < wfs(𝑋). Let C be the Vietoris–Rips
complex above. Then, 𝐻0 (𝑋)  𝐻0 (C) and 𝐻1 (𝑋)  𝐻1 (C).

Remark 15.5 Theorem 15.4 is based on [46, Theorem


Ð 1]. Here, Chazal and Lieutier proved
that, for 𝜀 < wfs(𝑋), the tubular neighborhood x∈𝑋 𝐵 𝜀 (x) is homotopy equivalent to 𝑋.

Topological data analysis is concerned with the homology of a data space 𝑋. One can
try to compute this from an 𝜀-sample. The difficulty is to determine 𝜀 a priori. The input
is some representation of 𝑋. This could be a set of polynomial equations that define 𝑋.
The difficulty lies in the fact that, in order to choose 𝜀 reliably, we need to compute some
196 15 Sampling

invariants of 𝑋, such as the reach 𝜏(𝑋), the local reach 𝜏(s) at various points s ∈ 𝑋, the 𝑘-
bottlenecks and their widths, or the weak feature size wfs(𝑋). All of these are computations
in metric algebraic geometry, based on what was explained in previous chapters.

15.2 Sampling with Density Guarantees

This section presents two sampling algorithms that are guaranteed to compute an 𝜀-sample
in a box. The input is a variety 𝑋 in R𝑛 . Both algorithms compute a sample of 𝑋 ∩ 𝑅, where

𝑅 = [𝑎 1 , 𝑏 1 ] × · · · × [𝑎 𝑛 , 𝑏 𝑛 ] ⊂ R𝑛 .

If 𝑋 is compact, then it is desirable to use a box 𝑅 that contains the variety 𝑋. To compute
such an 𝑅, we first sample a point u ∈ R𝑛 at random. Then, we compute the ED critical
points on 𝑋 with respect to u; i.e., the critical points of the Euclidean distance function
𝑋 → R, x ↦→ 𝑑 (x, u). From this, we infer 𝑟 := maxx∈𝑋 𝑑 (x, u) and set 𝑅 to be the box with
center u and side length 2𝑟. Alternatively, we can maximize and minimize the 𝑛 coordinate
functions over 𝑋. This will furnish a box with optimal values for 𝑎 1 , 𝑏 1 , . . . , 𝑎 𝑛 , 𝑏 𝑛 .
The first sampling algorithm we present is due to Dufresne, Edwards, Harrington, and
Hauenstein [65]. Fix a box 𝑅. The basic idea for sampling from 𝑋 ∩ 𝑅 is to sample points
u ∈ R𝑛 and then to collect the ED critical points with respect to u. The complexity of this
approach therefore depends on the Euclidean distance degree of the variety 𝑋.
The algorithm in [65] works recursively by dividing the edges of the box 𝑅 in half,
thus splitting 𝑅 into 2𝑛 subboxes. In addition, one implements a database D that contains
information about all the regions in 𝑅 that already have been covered by at least one sample
point. Algorithm 4 provides a complete description. Its correctness is proved in [65].
Theorem 15.6 (Theorem 4.4 in [65]) Algorithm 4 terminates with an 𝜀-sample of 𝑋 ∩ 𝑅.
The second algorithm we present is due to Di Rocco, Eklund, and Gäfvert [56]. Their
algorithm is also based on computing ED critical points on 𝑋. But, in addition, it also
adds linear slices to the sampling. We need a few definitions. We set 𝑑 := dim 𝑋.
For every 1 ≤ 𝑘 ≤ 𝑑, denote by T𝑘 the set of subsets of {1, . . . , 𝑛} with 𝑘 elements.
Given 𝑇 = {𝑡1 , . . . , 𝑡 𝑘 } ∈ T𝐾 , we let 𝑉𝑇 ⊆ R𝑛 be the 𝑘-dimensional coordinate plane
spanned by e𝑡1 , . . . , e𝑡𝑘 . For 𝛿 > 0, we consider the grid

𝐺 𝑇 (𝛿) := 𝛿 · (𝑎 1 · e𝑡1 + · · · + 𝑎 𝑘 · e𝑡𝑘 ) | 𝑎 1 , . . . , 𝑎 𝑘 ∈ Z  𝛿 · Z 𝑘 .

Let 𝜋𝑇 : R𝑛 → 𝑉𝑇 be the projection. The affine-linear spaces 𝜋𝑇−1 (𝑔) for 𝑔 ∈ 𝐺 𝑇 (𝛿) specify
the faces of a cubical tessellation with side length 𝛿.
Let 𝐵(𝑋) be the width of the smallest bottleneck of 𝑋. The method from [56] is presented
in Algorithm 5. It takes as input a number 0 < 𝛿 < √1𝑛 min{𝜀, 2𝐵(𝑋)} for the grid size.
Then, the sample is given by
Ø Ø
𝑆 𝛿 := 𝑋 ∩ 𝜋𝑇−1 (𝑔). (15.2)
𝑇 ∈ T𝑑 𝑔 ∈𝐺𝑇 ( 𝛿)
15.2 Sampling with Density Guarantees 197

Algorithm 4: Finding 𝜀-samples by ED optimization in subdivided boxes [65].


Input: A real algebraic variety 𝑋 ⊂ R𝑛 , 𝜀 > 0, and a box 𝑅 = [𝑎1 , 𝑏1 ] × · · · × [𝑎𝑛 , 𝑏𝑛 ].
Output: An 𝜀-sample 𝑆 ⊂ 𝑋 ∩ 𝑅.
1 Initialize 𝑆 = ∅ and D = ∅. The set 𝑆 will contain the sample points. The set D serves as a
database containing balls in R𝑛 that have already been covered in the process of the algorithm.
2 for each subbox 𝑅′ of 𝑅 that is not yet covered do
3 Compute the midpoint u of 𝑅′ .
4 Compute the real ED critical points 𝐸 ⊂ 𝑋 with respect to u and compute
𝑟 := minx∈𝑋 ∥x − u ∥.
5 Add the points in 𝐸 to 𝑆.
6 Add 𝐵𝑟 (u) to D (this open ball does not contain any point in 𝑋, so we do not need to
consider this region any further and can label it as being covered).
7 Add 𝐵 𝜀 (y) for y ∈ 𝐸 to D.
8 if the union of balls in D cover 𝑅′ then
9 Label 𝑅′ and all of its subboxes as covered.
10 else
11 Split 𝑅′ into 2𝑛 smaller subboxes.
12 end
13 end
14 if all subboxes of 𝑅 are labeled as covered then
15 return 𝑆.

Algorithm 5: Find an 𝜀-dense sample with bottlenecks, grids, and ED methods [56].
Input: A real algebraic variety 𝑋 ⊂ R𝑛 , a real number 𝛿 > 0 with 𝛿 < √1𝑛 min{ 𝜀, 2𝐵(𝑋) }, and
a box 𝑅.
Output: An 𝜀-dense sample 𝑆 ⊂ 𝑋 ∩ 𝑅.
1 Initialize 𝑆 𝛿 = ∅ and 𝑆′𝛿 = ∅.
2 Set 𝑑 := dim 𝑋.
3 for 𝑇 ∈ T𝑑 and 𝑔 ∈ 𝐺𝑇 ( 𝛿) do
4 Compute 𝑋 ∩ 𝜋𝑇−1 (𝑔).
5 Add the points in 𝑋 ∩ 𝜋𝑇−1 (𝑔) to 𝑆 𝛿 .
6 end
7 if 𝑑 > 1 then
8 for 1 ≤ 𝑘 < 𝑑 do
9 for 𝑇 ∈ T𝑘 and 𝑔 ∈ 𝐺𝑇 ( 𝛿) do
10 Sample a random point u ∈ R𝑛 .
11 Compute 𝐸 (𝑇 , 𝑔, u), which are the ED critical points on 𝑋 ∩ 𝜋𝑇−1 (𝑔) with respect
to u.
12 Add the points in 𝐸 (𝑇 , 𝑔, u) to 𝑆′𝛿 .
13 end
14 end
15 Set 𝑆 := 𝑆 𝛿 ∪ 𝑆′𝛿 .
16 return 𝑆.

In words, the sample 𝑆 𝛿 consists of the points that are obtained by intersecting the variety 𝑋
with the collection of affine-linear spaces 𝜋𝑇−1 (𝑔) that are indexed by 𝑇 ∈ T𝑑 and 𝑔 ∈ 𝐺 𝑇 (𝛿).
The dimension of 𝜋𝑇−1 (𝑔) equals the codimension of 𝑋. To ensure transversal intersections,
we can always modify 𝐺 𝑇 (𝛿) by a random translation. If 𝑑 = dim 𝑋 > 1, then we compute
198 15 Sampling

an additional sample. First, we pick a random point u ∈ R𝑛 . Denote by 𝐸 (𝑇, 𝑔, u) the ED


critical points on 𝑋 ∩ 𝜋𝑇−1 (𝑔) with respect to u. The additional sample is the set

𝑑−1
Ø Ø Ø
𝑆 ′𝛿 = 𝐸 (𝑇, 𝑔, u). (15.3)
𝑘=1 𝑇 ∈ T𝑘 𝑔 ∈𝐺𝑇 ( 𝛿)

The motivation for this extra sample is that 𝐸 (𝑇, 𝑔, u) contains a point on every connected
component of the variety 𝑋 ∩ 𝜋𝑇−1 (𝑔). The algorithm is summarized in Algorithm 5. It
requires us to compute bottlenecks of 𝑋 in order to specify the input. In the algorithm
itself, ED critical points must be found many times. Here, our Chapter 2 becomes relevant.
Theorem 15.7 (Theorem 4.6 in [56]) Algorithm 5 outputs an 𝜀-sample of 𝑋 ∩ 𝑅.
We conclude this section with a third alternative for obtaining 𝜀-samples. This comes
from the work of Niyogi, Smale, and Weinberger [138], which we already saw in Theo-
rem 15.2. Suppose that the variety 𝑋 is compact, and suppose further that we are able to
sample from the uniform distribution on 𝑋. The algorithm simply consists of sampling 𝑘
i.i.d. points 𝑆 = {x1 , . . . , x 𝑘 } from the uniform distribution on 𝑋.
The result in [138] implies that 𝑆 is an 𝜀-sample with high probability provided 𝑘 is
large enough. More precisely, for a given 0 < 𝛿 < 1, they specify a required sample size 𝑘
such that the probability that 𝑆 is an 𝜀-sample for 𝑋 is at least 1 − 𝛿. That sample size 𝑘
depends on the reach and the volume of the variety 𝑋. The study and computation of these
metric quantities is the main point of this book. We invite the reader to work through the
previous chapters while taking a perspective towards random points, sampling, and its role
in machine learning (cf. Chapter 10). This requires examining probability distributions on
a real algebraic variety. We explain this in the next sections and we present algorithms for
sampling from such probability distributions.

15.3 Markov Chains on Varieties

We will review one popular class of methods for sampling from probability distributions,
namely Markov Chain Monte Carlo (MCMC) methods. When the state space is finite,
this amounts to a random walk on a finite graph. Experts in algebraic statistics [167] are
familiar with MCMC methods that rest on Markov bases. These are used to carry out
Fischer’s Exact Test for conditional distributions; see [167, Chapter 9].
In this section, the situation is different because the state space 𝑋 is continuous. As
before, we assume that 𝑋 is a real algebraic variety in R𝑛 . Now, the description of Markov
chains requires a dose of analysis. In the following discussion, A denotes a 𝜎-algebra
on 𝑋. Think of A as the collection of subsets of 𝑋 that we can assign a measure to. The
elements in A are called measurable sets. If 𝜇 : A → R is a measure and 𝑓 : 𝑋 → R is a
measurable function, then we can integrate 𝑓 against 𝜇. This integral is written as

𝑓 (x) 𝜇(dx) for 𝐴 ∈ A.
𝐴
15.3 Markov Chains on Varieties 199

The Lebesgue measure on 𝑋, which is induced from the ambient R𝑛 , is simply denoted
by dx. If 𝜇 is a probability measure with a probability
∫ density 𝜙, then 𝜇(dx) = 𝜙(x)dx.
For a measurable set 𝐴 ∈ A, let vol( 𝐴) = 𝐴 dx be the volume of 𝐴. Assume that 𝑋
is compact. Then vol( 𝐴) < ∞ and the probability distribution with probability measure
𝜇( 𝐴) := vol( 𝐴)/vol(𝑋) is called the uniform distribution on 𝑋.

Example 15.8 (𝑛 = 2) A sample of i.i.d. (independent and identically distributed) points


from the uniform distribution on the plane curve 𝑋 = {𝑥 4 + 𝑦 4 − 2𝑥 2 − 2𝑥𝑦 2 − 𝑦 + 1 = 0}
is shown in Figure 15.1. It is important that each connected component is covered. ⋄

We next discuss sampling from 𝑋 by using MCMC methods. These methods set up
a Markov process on 𝑋. Let us recall some basic definitions from the theory of Markov
chains; see, e.g., [131, Chapter 3]. In this context, 𝑋 is also called the state space. A Markov
kernel is a map 𝑝 : 𝑋 × A → [0, 1], such that
1. 𝑝(x, · ) is a probability measure for all x ∈ 𝑋;
2. 𝑝( · , 𝐴) is a measurable function for all 𝐴 ∈ A.
A stochastic process x0 , x1 , x2 , x3 , . . . on 𝑋 is a sequence of random points on 𝑋.
A Markov process is a special type of stochastic process. We fix a point x ∈ 𝑋. A
(time-homogeneous) Markov process with starting point x0 = x is the stochastic process
where the probability that the next 𝑘 points lie in certain measurable sets 𝐴1 , . . . , 𝐴 𝑘 is the
following iterated integral over the Markov kernel:

Prob(x 𝑘 ∈ 𝐴 𝑘 , . . . , x1 ∈ 𝐴1 | x0 = x)
∫ ∫
:= ··· 𝑝(x, dy1 ) 𝑝(y1 , dy2 ) · · · 𝑝(y 𝑘−1 , 𝐴 𝑘 ).
y1 ∈ 𝐴1 y 𝑘−1 ∈ 𝐴 𝑘−1

A Markov process satisfies the Markov property: the probability law of the 𝑘-th state only
depends on the position of the (𝑘 − 1)-th state, but not on the earlier states x0 , . . . , x 𝑘−2 .
In the discrete setting [167, Section 1.1], the Markov property is expressed as a con-
ditional probability, where one conditions on x𝑖 = z𝑖 and the z𝑖 are fixed points. In our
continuous setting, this is not possible because it involves conditioning on an event of
probability zero. Instead, one has a more technical description. Let

𝜇 𝑘 (x, · ) : 𝐴 ↦→ Prob(x 𝑘 ∈ 𝐴 | x0 = x) (15.4)

denote the probability law of the 𝑘-th state. Then, the Markov property is

Prob(x 𝑘 ∈ 𝐴 | x 𝑘−1 , . . . , x1 , x0 = x) = Prob(x1 ∈ 𝐴 | x0 = z) = 𝑝(z, 𝐴), where z ∼ 𝜇 𝑘 .

This is found in the textbook by Meyn and Tweedie [131, Proposition 3.4.3]. The left-hand
side is a probability conditioned on the 𝜎-algebra generated by the random variables x𝑖 .
We will not discuss the technical details of the Markov property. Instead, we explain
what it means. If the (𝑘 − 1)-th state x 𝑘−1 is at position z, then the probability of passing
from z to a 𝑘-th state x 𝑘 ∈ 𝐴 is given by the Markov kernel 𝑝(z, 𝐴). As in the discrete
setting, the probability law of the x 𝑘 state only depends on the position of x 𝑘−1 , but not
200 15 Sampling

on the earlier states. Due to its role in the transition from one state to the next state, the
Markov kernel 𝑝 is also called transition probability. Let us now see some examples.
Example 15.9 (Markov Chains in R2 ) For our state space, we take 𝑋 = R2 . We shall
present two examples of Markov Chains in R2 starting at the origin. For the first, we take
𝑝 1 (x, dy) = (2𝜋) −1 · exp(− 21 ∥y∥ 2 ) dy as the kernel. The stochastic process arising from
this passes from the state x ∈ R2 to the next state by sampling a normal vector y in R2 with
covariance matrix the identity and mean value 0. The next state is then y. In particular, the
transition probability is entirely independent of the present state x.
Our second example has the kernel 𝑝 2 (x, dy) = (2𝜋) −1 exp(− 12 ∥x − y∥ 2 ) dy. This is
more interesting than the previous process. In this Markov chain, passing from a state
x ∈ R2 to the next state y works by sampling a normal vector u in R2 with covariance
matrix the identity and mean value 0. The vector u is the step, so the next state is y = x + u.
We can simulate the first 𝑛 = 10 steps in this Markov chain in Julia [20] as follows.
x0 = [0; 0]
states = [];
push!(states, x0);
n = 10
for k in 1:n
x = states[k];
y = x + randn(2);
push!(states, y);
end

Figure 15.2 shows one realization of this chain. ⋄

-1

-2

-3

-4

-4 -3 -2 -1 0 1 2

Fig. 15.2: A sample of the first 10 steps of the Markov chain with transition probability at state x given by
sampling a normal vector in R2 with covariance matrix the identity and mean value x. See Example 15.9.

Our aim is to obtain Markov chains on an arbitrary real variety 𝑋 ⊂ R𝑛 . Suppose that 𝑋
has dimension 𝑑 and degree at least two. We can create a Markov chain on 𝑋 using the
following simple geometric idea. Suppose that chain is in state x ∈ 𝑋. We sample a random
15.3 Markov Chains on Varieties 201

linear space 𝐿 of complimentary dimension 𝑛 − 𝑑 passing through x. Then, we sample a


point uniformly at random from 𝑋 ∩ 𝐿. This is the next state in the Markov chain.

Example 15.10 (Markov Chain on a Surface) Fix 𝑛 = 3 and let 𝑋 be the surface defined
by 𝑧 − 𝑥𝑦 = 0. Given a point x on this surface, we sample the line 𝐿 = {𝐴x = b} by
sampling 𝐴 with Gaussian entries and then setting b = 𝐴x. In addition, we only accept
states in the box 𝑅 = [−8, 8] × [−8, 8] × [−64, 64]. The first few steps in this chain starting
at x0 = (0, 0, 0) are implemented in Julia [20] as follows.
using HomotopyContinuation
@var x y z
f = System([z - x * y], variables = [x; y; z]);
is_in_R(p) = abs(p[1])<8 && abs(p[2])<8 && abs(p[3])<64;
n = 10;
x0 = [0.0; 0.0; 0.0];
states = [x0];
for k in 1:n
p = last(states);
A = randn(2,3); b = A*p;
L = LinearSubspace(A, b);
S = solve(f, target_subspace = L);
points = real_solutions(S);
filter!(is_in_R, points);
push!(states, rand(points));
end

Figure 15.3 shows a realization. We think of steps taken on the surface itself. The arrows
are drawn curvy in order to highlight the nonlinear state space of this Markov chain. ⋄

Fig. 15.3: A few steps of the Markov chain from Example 15.10 on the surface with equation 𝑧 − 𝑥 𝑦 = 0.

Let us now work towards sampling. We will recall results from the survey [153] by
Roberts and Rosenthal. A probability distribution 𝜋 on 𝑋 is called stationary for a Markov
kernel 𝑝 if it satisfies the following linear equation:

𝑝(x, 𝐴) 𝜋(dx) = 𝜋( 𝐴) for all 𝐴 ∈ A. (15.5)
x∈𝑋
202 15 Sampling

The idea of MCMC methods for sampling from a probability distribution 𝜋 is to set up
a Markov process on 𝑋 with stationary distribution 𝜋. The Markov chain starts at x ∈ 𝑋.
We want the probability measure 𝜇 𝑘 (x, ·) of the 𝑘-th state, as defined in (15.4), to converge
to 𝜋 as 𝑘 → ∞. Convergence is measured by the total variation distance. The total variation
distance between two measures 𝜇 and 𝜈 is

𝑑TV (𝜇, 𝜈) := sup |𝜇( 𝐴) − 𝜈( 𝐴)|.


𝐴∈A

Thus, we aim to define a Markov process starting at an initial point x ∈ 𝑋 such that the
distribution of the 𝑘-th state converges to 𝜋 as 𝑘 → ∞; i.e., lim 𝑘→∞ 𝑑TV (𝜋, 𝜇 𝑘 (x, · )) = 0.
The key properties for achieving this are irreducibility and aperiodicity.
Definition 15.11 A Markov chain with kernel 𝑝 is called irreducible if, for all states x ∈ 𝑋
and all measurable sets 𝐴 ∈ A with vol( 𝐴) > 0, there exists 𝑘 ∈ N such that 𝜇 𝑘 (x, 𝐴) > 0.
The interpretation of irreducibility is that all sets with positive volume will eventually
be reached by the Markov chain, and here the chain can start at any point x ∈ 𝑋.
Remark 15.12 The expression vol( 𝐴) in Definition 15.11 refers to the Lebesgue measure.
One can replace the Lebesgue measure with any other measure 𝜈. In that case, one speaks
of 𝜈-irreducible Markov chains.
Definition 15.13 Consider a Markov chain with kernel 𝑝 and suppose that it has a stationary
distribution 𝜋. Let 𝑟 ≥ 2. We call the chain periodic with period 𝑟 if there exist pairwise
disjoint subsets 𝐴1 , . . . , 𝐴𝑟 ∈ A that satisfy the following two conditions for all indices 𝑖:
(a) 𝜋( 𝐴𝑖 ) > 0 and
(b) 𝑝(x, 𝐴𝑖+1 mod 𝑟 ) = 1 for all x ∈ 𝐴𝑖 .
Otherwise, the chain is called aperiodic.
Aperiodicity means that the Markov process does not move periodically between the sets
𝐴1 , . . . , 𝐴𝑟 . The next lemma covers most of the Markov chains that arise from
∫ constructions
in algebraic geometry. Any Markov chain defined by a kernel 𝑝(x, 𝐴) = 𝐴 𝜙(x, y) dy with
positive continuous probability density 𝜙 satisfies the hypothesis of the lemma.
Lemma 15.14 Consider a Markov chain with kernel 𝑝 and stationary distribution 𝜋 that
is absolutely continuous with respect to the Lebesgue measure. Suppose that the kernel is
positive, i.e., we have 𝑝(x, 𝐴) > 0 for all x ∈ 𝑋 and 𝐴 ∈ A with vol( 𝐴) > 0. Then, the
Markov chain on the variety 𝑋 corresponding to 𝑝 is irreducible and aperiodic.
Proof For irreducibility, fix x ∈ 𝑋 and a measurable set 𝐴 ∈ A with vol( 𝐴) > 0. Then,

𝜇1 (x, 𝐴) = Prob(x1 ∈ 𝐴 | x0 = x) = 𝑝(x, 𝐴) > 0.

For aperiodicity, assume that there exist pairwise disjoint 𝐴1 , . . . , 𝐴𝑟 ∈ A with 𝜋( 𝐴𝑖 ) > 0
such that the Markov chain moves periodically between the 𝐴𝑖 . Since 𝜋 is absolutely
continuous with respect to the Lebesgue measure, we also have vol( 𝐴𝑖 ) > 0 for all 𝑖. Fix 𝑖
and let x ∈ 𝐴𝑖 . Then, 𝑝(x, 𝐴𝑖 ) > 0 and so 𝑝(x, 𝐴𝑖+1 mod 𝑟 ) < 1, which is a contradiction. □
15.4 Chow goes to Monte Carlo 203

For an irreducible and aperiodic Markov chain with stationary distribution, we have the
following convergence result [153, Theorem 4]. This is a continuous analogue of the Perron–
Frobenius theorem from linear algebra, which concerns distributions on finite state spaces.

Theorem 15.15 Consider an irreducible and aperiodic Markov chain with kernel 𝑝 and
stationary distribution 𝜋. For almost all x ∈ 𝑋, it converges to 𝜋 in total variation distance:

lim 𝑑TV (𝜋, 𝜇 𝑘 (x, · )) = 0.


𝑘→∞

Theorem 15.15 says that irreducible and aperiodic Markov chains converge to stationary
distributions. See Sullivant’s book [167, Theorem 9.2.3] for the discrete case. The speed
of convergence is called mixing time in the literature. For instance, a basic result on mixing
times of Markov chains with continuous state space is [153, Theorem 8]. Roberts and
Rosenthal [153] attribute this to Doeblin, Doob, and also to Markov.
For Markov chains arising in the context of algebraic varieties, for instance, the one
in Example 15.10 defined by linear sections, it is interesting to study and describe their
stationary distributions. However, it is not even clear whether they exist. In the next section,
we turn the perspective around. Our starting point will be a stationary distribution 𝜋, and
we will set up a Markov chain whose stationary distribution is 𝜋.

15.4 Chow goes to Monte Carlo

The algebraic geometer Wei-Liang Chow obtained his doctoral degree from Leipzig Uni-
versity in 1936. He is famous for fundamental contributions to the intersection theory of
algebraic varieties. The Chow form encodes a variety of dimension 𝑑 by the linear subspaces
of codimension 𝑑 +1 that intersect it. We learn about Chow varieties and Chow polytopes in
the book by Gel’fand, Kapranov, and Zelevinsky [71]. Metric algebraic geometry suggests
that we take a look at objects named after Chow through the probabilistic lens.
In this section, we study the problem of sampling from a variety 𝑋 using the Markov
Chain Monte Carlo (MCMC) paradigm. This involves intersecting 𝑋 with random linear
spaces, whence our pointer to Chow. This gives rise to a class of algorithms, which we
name Chow–Markov Chain Monte Carlo (CMCMC).
Our point of departure is Theorem 15.15. This result has the following algorithmic
consequence. For sampling from a distribution 𝜋, we set up an irreducible and aperiodic
Markov chain with stationary distribution 𝜋. Then, if we let the Markov chain run long
enough, the points in the process will have a probability distribution close to 𝜋. This is the
idea underlying MCMC. The key task is thus to find and implement such a chain. We shall
explain how to find a Markov chain whose stationary distribution is 𝜋. One approach to
verifying that 𝜋 is the stationary distribution is to show that the chain is reversible.

Definition 15.16 A Markov chain with kernel 𝑝 is reversible with respect to 𝜋 if


∫ ∫
𝑝(x, 𝐴) 𝜋(dx) = 𝑝(x, 𝐵) 𝜋(dx) for all 𝐴, 𝐵 ∈ A.
x∈𝐵 x∈ 𝐴
204 15 Sampling

Lemma 15.17 If a Markov chain with kernel 𝑝 is reversible with respect to a probability
distribution 𝜋, then 𝜋 is a stationary distribution for that Markov chain.

Proof We have to check the equation in (15.5). Fix 𝐴 ∈ A. Then


∫ ∫
𝑝(x, 𝐴) 𝜋(dx) = 𝑝(x, 𝑋) 𝜋(dx) = 𝜋( 𝐴),
x∈𝑋 x∈ 𝐴

since 𝑝(x, · ) is a probability measure, so that 𝑝(x, 𝑋) = 1 for all x ∈ 𝑋. □


Lemma 15.17 implies that the Metropolis–Hastings algorithm (see Algorithm 6 below)
creates a Markov chain with stationary distribution 𝜋. We refer to [153, Proposition 2],
and [167, Proposition 9.2.2] for the discrete case.
The Metropolis–Hastings algorithm works for a target distribution 𝜋 that has a density 𝜙.
The basic idea is to take another Markov chain whose kernel 𝑝(x, 𝐴) has a density 𝑞(x, y);
i.e., 𝑝(x, dy) = 𝑞(x, y) dy. The density 𝑞 is called a proposal density. Sampling from the
proposal density creates a random proposal point y, which is either accepted or rejected
depending on how likely it is that the proposal point y was sampled from 𝜋. Notice that in
the algorithm we only need to evaluate 𝜙(y) and 𝑞(x, y) up to scaling.

Algorithm 6: The Metropolis–Hastings algorithm.


Input: A probability measure 𝜋 on 𝑋 with density 𝜙 (y). A Markov kernel 𝑝 (x, 𝐴) on 𝑋 with
density 𝑞 (x, y). A fixed starting point x ∈ 𝑋.
Output: A Markov chain on 𝑋 with stationary distribution 𝜋.
1 Set x0 = x.
2 for 𝑘 = 0, 1, 2, . . . do
3 Sample y ∼ 𝑝 (x 𝑘 , · ).
4 if 𝜙 (x 𝑘 ) = 0 or 𝑞 (x 𝑘 , y) = 0 then
5 Set 𝑤(x 𝑘 , y) = 0
6 else  
𝜙 (y) · 𝑞 (y, x 𝑘 )
7 Compute 𝑤(x 𝑘 , y) = min 1, .
𝜙 (x 𝑘 ) · 𝑞 (x 𝑘 , y)
8 end
9 Sample a Bernoulli random variable 𝛽 ∈ {0, 1} with Prob{𝛽 = 1} = 𝑤(x 𝑘 , y).
10 if 𝛽 = 1 then
11 Set x 𝑘+1 := y.
12 else
13 Return to line 3.
14 end
15 end

Example 15.18 (The Symmetric Metropolis Algorithm) For a symmetric proposal den-
sity 𝑞(x, y) = 𝑞(y, x), the Metropolis–Hastings algorithm (Algorithm 6) is called Symmet-
ric Metropolis Algorithm. For instance, the Markov kernel from Example 15.9 with density
𝑞(x, y) ∝ exp(− 12 ∥x − y∥ 2 ) is symmetric. ⋄
15.4 Chow goes to Monte Carlo 205

Example 15.19 (Random Walks) We speak of a Random–Walk Metropolis–Hastings Al-


gorithm if the proposal density 𝑞(x, y) is a function of the difference x − y. An example for
this is the density from Example 15.9. ⋄

Example 15.20 (Independence Sampler) We call Algorithm 6 an independence sampler


if 𝑞(x, y) does not depend on x. In this case, samples from Algorithm 6 are independent. ⋄

The Metropolis–Hastings algorithm and its variants in the previous examples can be
used for any sample space. We now turn to the setting of algebraic geometry, where our
objects are algebraic varieties.

Example 15.21 (Sampling points that are close to a variety) This follows the work of
Hauenstein and Kahle in [81]. We will see how Algorithm 6 can be used for sampling
points near a variety 𝑋 ⊂ R𝑛 . To this end, choose a box 𝑅 ⊂ R𝑛 and fix 𝜎 2 > 0. Writing
𝑑 ( · , · ) for the Euclidean distance, we consider the probability measure 𝜋 on 𝑅 given by
 
𝜙(u) ∝ exp − 2𝜎1 2 𝑑 (u, 𝑋) 2 .

Sampling from 𝜋 produces points that are likely to be close to 𝑋. Let 𝑋 be the Trott
curve in (2.7) and let the box be 𝑅 = [−2, 2] × [−2, 2]. We implement the Metropolis–
Hasting algorithm in Julia [20] where the proposal density is the standard Gaussian in
𝑞(x, y) ∝ exp(− 12 ∥y∥ 2 ). This is an independence sampler (cf. Example 15.20). First, we
set up the polynomial system for computing 𝑑 (u, 𝑋). We solve it for a general complex
point u that we will use later for running parameter homotopies.
using HomotopyContinuation, LinearAlgebra
@var x[1:2] u[1:2] l
f = 144(x[1]^4+x[2]^4) - 225(x[1]^2+x[2]^2) + 350x[1]^2*x[2]^2 + 81;
df = differentiate(f, x);
F = System([f; df - l .* (x-u)], variables = [x; l], parameters = u);
uC = randn(ComplexF64, 2);
SC = solve(F, target_parameters = uC)

Next, we implement the densities 𝑞 and 𝜙. The variance is chosen to be 𝜎 2 = 1/100. We


start out with a function that is a membership test for the box 𝑅.
is_in_R(p) = abs(p[1])<2 && abs(p[2])<2;
q(u, v) = exp(-1/2 * norm(v)^2);
sigma_sq = 1/100;
function phi(u)
S = solve(F, solutions(SC),
start_parameters = uC,
target_parameters = u,
show_progress = false);
R = map(s -> s[1:2], real_solutions(S));
d = minimum([norm(r - u) for r in R]);
exp(-d^2 / (2*sigma_sq));
end

Finally, we run the Metropolis–Hastings algorithm for 10.000 steps:


206 15 Sampling

n = 10000;
u0 = randn(2);
states = [u0];
for k in 1:n
uk = last(states);
v = randn(2);
if is_in_R(v)
a = min(1, phi(v) * q(v, uk) / (phi(uk) * q(uk, v)));
b = rand();
if a > b; push!(states, v); end
end
end
The result is shown in Figure 15.4. ⋄

1.5 1.5

1.0 1.0

0.5 0.5

0.0 0.0

-0.5 -0.5

-1.0 -1.0

-1.5 -1.5
-1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5

Fig. 15.4: Two samples of points near the Trott curve, generated with the Metropolis–Hastings algorithm,
as explained in Example 15.21. The variance parameters are 𝜎 2 = 1/100 (left) and 𝜎 2 = 1/400 (right).

One difficulty with Algorithm 6 when sampling from a variety 𝑋 is to identify a proposal
distribution with a density. Take, for instance, the Markov chain from Example 15.10, where
the next step x 𝑘+1 ∈ 𝑋 is computed from the current step x 𝑘 by taking a random linear
space 𝐿 through x 𝑘 and sampling uniformly from the points in 𝑋 ∩ 𝐿. It is straightforward
to describe the generation of this random variable. But it is not clear how to compute its
density (or if such a density even exists). In such a scenario, we must prove that the chain is
reversible with respect to 𝜋. A further complication arises when 𝑋 is not connected. In that
case, the proposals must be chosen in a way that no connected component of 𝑋 is missed.
We shall present two approaches to Metropolis–Hastings that do not require the knowl-
edge of a proposal density. The first is the algorithm of Breiding and Marigliano [28], which
uses an independence sampler. Second, we consider the algorithm of Lelièvre, Stoltz, and
Zhang [123], which is based on a random walk. We attach the label CMCMC to both
algorithms, since they are based on linear slicings of the variety 𝑋.
The CMCMC algorithm in [28] rests on a Markov chain in the affine Grassmannian

Gr𝑎 (𝑐, R𝑛 ) = {𝐿 ⊂ R𝑛 | 𝐿 is an affine linear space of dimension 𝑐},


15.4 Chow goes to Monte Carlo 207

where 𝑐 = codim 𝑋. Our next theorem describes the density with which we sample a linear
space 𝐿 ∈ Gr𝑎 (𝑐, R𝑛 ) (for instance, using Algorithm 6). As before, we assume that the
target distribution 𝜋 has a density 𝜙(y). For a pair ( 𝐴, b) ∈ R𝑑×𝑛 × R𝑑 , we define
 
𝑑+1
Γ
√︁
∑︁ 𝜙(x) 1 + ⟨x, 𝑃x x⟩ 2
𝜙( 𝐴, b) := , where 𝛼(x) := 2 (𝑑+1)/2 √ .
x∈𝑋:𝐴x=b
𝛼(x) (1 + ∥x∥ ) 𝜋
𝑑+1

Here, 𝑑 = dim 𝑋 and 𝑃x is the orthogonal projection onto the normal space 𝑁x 𝑋. The
additional factor 𝛼 is related to the change of variables when embedding R𝑛 into the
𝑛-dimensional real projective space.
Theorem 15.22 Let 𝜑( 𝐴, b) be the probability density for which the entries of the pair
( 𝐴, b) ∈ R𝑑×𝑛 ×R𝑑 are i.i.d. standard Gaussian. The following formula defines a probability
density on the affine Grassmannian Gr𝑎 (𝑐, R𝑛 ):

𝜑( 𝐴, b) · 𝜙( 𝐴, b)
𝜓( 𝐴, b) := .
E ( 𝐴,b)∼𝜑 𝜙( 𝐴, b)

The random linear space 𝐿 := {x ∈ R𝑛 | 𝐴x = b} ∈ Gr𝑎 (𝑐, R𝑛 ) for ( 𝐴, 𝑏) ∼ 𝜓 satisfies:


(a) 𝑋 ∩ 𝐿 is finite with probability one.
(b) If we choose x in the finite set 𝑋 ∩ 𝐿 with probability 𝜙(x)/(𝛼(x) · 𝜙( 𝐴, b)), then the
random point x is distributed according to the target density 𝜙 on the variety 𝑋.
Proof See [28, Theorem 1.1]. □
The algorithm in [123] is similar to the Metropolis–Hastings algorithm. The basic idea
is as follows. Suppose we want to sample from a target density 𝜙(y) = exp(−𝑉 (y)).
Here, 𝑉 (y) is a smooth function, called the potential function. Given a point x ∈ 𝑋, we
create a proposal distribution by sampling first in a random tangent direction v ∈ 𝑇x 𝑋 and
then computing the intersection of 𝑋 with the random linear space

𝐿 = x + v + 𝑁x 𝑋 ∈ Gr𝑎 (𝑐, R𝑛 ).

This creates a Markov chain on 𝑋. However, it is not clear how to compute the density for
this random proposal. The authors of [123] prove directly the reversibility of their Markov
chain, so they can apply Lemma 15.17. Algorithm 7 shows a version of their approach.
Remark 15.23 In practice, the random tangent vector v in line 3 of Algorithm 7 can be
sampled as follows. Let 𝑈 ∈ R𝑛×𝑑 be a matrix whose columns form an orthonormal basis
of 𝑇x 𝑋. Such a matrix can be computed with the Gram–Schmidt algorithm. If we sample
u ∈ R𝑑 with i.i.d. 𝑁 (0, 𝜎 2 )-entries, then we can take v = 𝑈u.
The following theorem asserts that Algorithm 7 works correctly. For the proof we refer
to [123, Theorem 1]. The second statement follows from Lemma 15.17.
Theorem 15.24 Algorithm 7 yields a Markov chain on 𝑋 that is reversible with respect to
the desired distribution 𝜋. In particular, the Markov chain has 𝜋 as stationary distribution.
208 15 Sampling

Algorithm 7: The CMCMC algorithm due to Lelièvre, Stoltz, and Zhang.


Input: A probability measure 𝜋 on 𝑋 with a density exp(−𝑉 (y)), where 𝑉 is a smooth function
on 𝑋. A variance parameter 𝜎 2 > 0. A fixed starting point x ∈ 𝑋.
Output: A Markov chain on 𝑋 with stationary distribution 𝜋.
1 Set x0 = x.
2 for 𝑘 = 0, 1, 2, . . . do
3 Draw a random tangent vector v ∈ 𝑇x𝑘 𝑋 by sampling v from the multivariate normal
distribution on 𝑇x𝑘 𝑋 with mean 0 and covariance matrix 𝜎 2 · 𝐼.
4 Set 𝐿 = x 𝑘 + v + 𝑁x𝑘 𝑋.
5 Sample a point y ∈ 𝑋 ∩ 𝐿 uniformly.
6 Compute w ∈ 𝑇y 𝑋 such that x 𝑘 ∈ 𝐾 := y + w + 𝑁y 𝑋.
7 Compute
n o
|𝑋∩𝐿| 1
( ∥w ∥ 2 − ∥v ∥ 2 )

𝑤(x 𝑘 , y) = min 1, |𝑋∩𝐾 | · exp − (𝑉 (y) − 𝑉 (x)) · exp − 2𝜎 2
.
8 Sample a Bernoulli random variable 𝛽 ∈ {0, 1} with Prob{𝛽 = 1} = 𝑤(x 𝑘 , y).
9 if 𝛽 = 1 then
10 Set x 𝑘+1 := y.
11 else
12 Return to line 3.
13 end
14 end

We have now reached the end of this book. Our presentation featured a wide range
of tools and results from computational algebraic geometry that involve metric aspects of
varieties. In addressing problems from applications, we are naturally led to cross paths with
differential geometry, and – in this final chapter – also with probability theory. We learned
that, in order to reliably sample from a variety 𝑋, it is essential to have a solid algebraic
understanding of tools like ED degree, curvature, reach, medial axes, bottlenecks, etc.

Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International
License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and
reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter’s Creative Commons
license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s
Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the
permitted use, you will need to obtain permission directly from the copyright holder.
References

1. Hirotachi Abo, Anna Seigal, and Bernd Sturmfels. Eigenconfigurations of tensors, pages 1–25. 2017.
2. Daniele Agostini, Taylor Brysiewicz, Claudia Fevola, Lukas Kühne, Bernd Sturmfels, and Simon
Telen. Likelihood degenerations. Adv. Math., 414, 2023.
3. Chris Aholt and Luke Oeding. The ideal of the trifocal variety. Math. of Computation, 83, 2012.
4. Chris Aholt, Bernd Sturmfels, and Rekha Thomas. A Hilbert scheme in computer vision. Canadian
Journal of Mathematics, 65, 2011.
5. Yulia Alexandr and Alexander Heaton. Logarithmic Voronoi cells. Algebr. Stat., 12:75–95, 2021.
6. Carlos Améndola, Lukas Gustafsson, Kathlén Kohn, Orlando Marigliano, and Anna Seigal. The
maximum likelihood degree of linear spaces of symmetric matrices. Le Matematiche, 76(2):535–
557, 2021.
7. Carlos Améndola, Kathlén Kohn, Philipp Reichenbach, and Anna Seigal. Invariant theory and scaling
algorithms for maximum likelihood estimation. SIAM Journal on Applied Algebra and Geometry,
5(2):304–337, 2021.
8. Raman Arora, Amitabh Basu, Poorya Mianjy, and Anirbit Mukherjee. Understanding deep neural
networks with rectified linear units. In International Conference on Learning Representations, 2018.
9. Sanjeev Arora, Nadav Cohen, and Elad Hazan. On the optimization of deep networks: Implicit
acceleration by overparameterization. In International Conference on Machine Learning, pages
244–253, 2018.
10. Søren Asmussen and Peter Glynn. Stochastic Simulation: Algorithms and Analysis. Springer, 2007.
11. Pierre Baldi and Kurt Hornik. Neural networks and principal component analysis: Learning from
examples without local minima. Neural networks, 2:53–58, 1989.
12. Jiakang Bao, Yang-Hui He, Edward Hirst, Johannes Hofscheier, Alexander Kasprzyk, and Suvajit
Majumder. Hilbert series, machine learning, and applications to physics. Physics Letters B, 827,
2022.
13. Alfred Basset. An elementary treatise on cubic and quartic curves. Cambridge, Deighton, Bell,
1901.
14. Saugata Basu and Antonio Lerario. Hausdorff approximations and volume of tubes of singular
algebraic sets. Mathematische Annalen, 387:79–109, 2023.
15. Daniel Bates, Paul Breiding, Tianran Chen, Jonathan Hauenstein, Anton Leykin, and Frank Sottile.
Numerical nonlinear algebra. arXiv:2302.08585.
16. Adrian Becedas, Kathlén Kohn, and Lorenzo Venturello. Voronoi diagrams of algebraic varieties
under polyhedral norms. Journal of Symbolic Computation, 120, 2024.
17. Valentina Beorchia, Francesco Galuppi, and Lorenzo Venturello. Eigenschemes of ternary tensors.
SIAM Journal on Applied Algebra and Geometry, 5(4):620–650, 2021.
18. Edgar Bernal, Jonathan Hauenstein, Dhagash Mehta, Margaret Regan, and Tingting Tang. Machine
learning the real discriminant locus. Journal of Symbolic Computation, 115:409–426, 2023.
19. David Bernstein, Anatoliy Kušnirenko, and Askold Hovanskiı̆. Newton polyhedra. Uspehi Mat.
Nauk, 31(3(189)):201–202, 1976.

© The Author(s) 2024 209


P. Breiding et al., Metric Algebraic Geometry, Oberwolfach Seminars 53,
https://doi.org/10.1007/978-3-031-51462-3
210 References

20. Jeff Bezanson, Alan Edelman, Stefan Karpinski, and Viral Shah. Julia: A fresh approach to numerical
computing. SIAM Review, 59:65–98, 2017.
21. Lenore Blum, Felipe Cucker, Michael Shub, and Steve Smale. Complexity and Real Computation.
Springer, 1998.
22. Tobias Boege, Jane Coons, Chris Eur, Aida Maraj, and Frank Röttger. Reciprocal maximum likelihood
degrees of Brownian motion tree models. Le Matematiche, 76(2):383–398, 2021.
23. Viktoriia Borovik and Paul Breiding. A short proof for the parameter continuation theorem.
arXiv:2302.14697.
24. Wieb Bosma, John Cannon, and Catherine Playoust. The Magma algebra system. I. The user language.
J. Symbolic Comput., 24(3-4):235–265, 1997.
25. Madeline Brandt and Madeleine Weinstein. Voronoi cells in metric algebraic geometry of plane
curves. arXiv:1906.11337.
26. Paul Breiding, Sara Kališnik, Bernd Sturmfels, and Madeleine Weinstein. Learning algebraic varieties
from samples. Rev. Mat. Complut., 31(3):545–593, 2018.
27. Paul Breiding, Julia Lindberg, Wern Juin Gabriel Ong, and Linus Sommer. Real circles tangent to 3
conics. Le Matematiche, 78:149–175, 2023.
28. Paul Breiding and Orlando Marigliano. Random points on an algebraic manifold. SIAM Journal on
Mathematics of Data Science, 2(3):683–704, 2020.
29. Paul Breiding, Kristian Ranestad, and Madeleine Weinstein. Critical curvature of algebraic surfaces
in three-space. arXiv:2206.09130.
30. Paul Breiding, Kemal Rose, and Sascha Timme. Certifying zeros of polynomial systems using
interval arithmetic. ACM Trans. Math. Software, 49, 2023.
31. Paul Breiding and Sascha Timme. HomotopyContinuation.jl: A package for homotopy continuation
in Julia. In Mathematical Software – ICMS, pages 458–465. Springer, 2018.
32. Paul Breiding and Nick Vannieuwenhoven. The condition number of Riemannian approximation
problems. SIAM Journal on Optimization, 31:1049–1077, 2021.
33. Joan Bruna, Kathlén Kohn, and Matthew Trager. Pure and spurious critical points: A geometric study
of linear networks. Internat. Conf. on Learning Representations, 2020.
34. Peter Bürgisser. Condition of intersecting a projective variety with a varying linear subspace. SIAM
Journal on Applied Algebra and Geometry, 1:111–125, 2017.
35. Peter Bürgisser and Felipe Cucker. Condition: The Geometry of Numerical Algorithms, volume 349
of Grundlehren der mathematischen Wissenschaften. Springer, 2013.
36. Peter Bürgisser, Felipe Cucker, and Martin Lotz. The probability that a slightly perturbed numerical
analysis problem is difficult. Math. Comput., 77:1559–1583, 2008.
37. Freddy Cachazo, Nick Early, Alfredo Guevara, and Sebastian Mizera. Scattering equations: From
projective spaces to tropical Grassmannians. J. High Energy Phys., (6), 2019.
38. Freddy Cachazo, Bruno Umbert, and Yong Zhang. Singular solutions in soft limits. J. High Energy
Phys., (5), 2020.
39. Dustin Cartwright and Bernd Sturmfels. The number of eigenvalues of a tensor. Linear Algebra and
its Applications, 438(2):942–952, 2013.
40. Jean-Dominique Cassini. De l’Origine et du progrès de l’astronomie et de son usage dans la
géographie et dans la navigation. L’Imprimerie Royale, 1693.
41. Fabrizio Catanese, Serkan Hoşten, Amit Khetan, and Bernd Sturmfels. The maximum likelihood
degree. Amer. J. Math., 128(3):671–697, 2006.
42. Eduardo Cattani, Angelica Cueto, Alicia Dickenstein, Sandra Di Rocco, and Bernd Sturmfels. Mixed
discriminants. Mathematische Zeitschrift, 274, 2011.
43. Türkü Özlüm Çelik, Asgar Jamneshan, Guido Montúfar, Bernd Sturmfels, and Lorenzo Venturello.
Optimal transport to a variety. In Mathematical Aspects of Computer and Information Sciences,
volume 11989 of Lecture Notes in Comput. Sci., pages 364–381. Springer, 2020.
44. Türkü Özlüm Çelik, Asgar Jamneshan, Guido Montúfar, Bernd Sturmfels, and Lorenzo Venturello.
Wasserstein distance to independence models. J. Symbolic Comput., 104:855–873, 2021.
45. Michel Chasles. Aperçu historique sur l’origine et le développement des méthodes en géométrie:
particulièrement de celles qui se rapportent à la géometrie moderne, suivi d’un mémoire de géométrie
sur deux principes généreaux de la science, la dualité et l’homographie. M. Hayez, 1837.
References 211

46. Frédéric Chazal and André Lieutier. The “𝜆-medial axis”. Graphical Models, 67(4):304–331, 2005.
47. Heng-Yu Chen, Yang-Hui He, Shailesh Lal, and Suvajit Majumder. Machine learning Lie structures
& applications to physics. Physics Letters B, 817, 2021.
48. Luca Chiantini, Giorgio Ottaviani, and Nick Vannieuwenhoven. An algorithm for generic and low-
rank specific identifiability of complex tensors. SIAM J. Matrix Anal. Appl., 35(4):1265–1287,
2014.
49. Diego Cifuentes, Corey Harris, and Bernd Sturmfels. The geometry of SDP-exactness in quadratic
optimization. Math. Program., 182:399–428, 2020.
50. Diego Cifuentes, Kristian Ranestad, Bernd Sturmfels, and Madeleine Weinstein. Voronoi cells of
varieties. J. Symbolic Comput., 109:351–366, 2022.
51. Roger Cotes. Harmonia mensurarum. Robert Smith, 1722.
52. David Cox, John Little, and Donal O’Shea. Ideals, Varieties, and Algorithms: An introduction to
computational algebraic geometry and commutative algebra. Undergraduate Texts in Mathematics.
Springer, 2015.
53. Vin de Silva and Lek-Heng Lim. Tensor rank and the ill-posedness of the best low-rank approximation
problem. SIAM J. Matrix Anal. Appl., 30(3):1084–1127, 2008.
54. Michel Demazure. Sur deux problemes de reconstruction. Technical Report 882, INRIA, 1988.
55. James Demmel. On condition numbers and the distance to the nearest ill-posed problem. Numer.
Math., 51(3):251–289, 1987.
56. Sandra Di Rocco, David Eklund, and Oliver Gäfvert. Sampling and homology via bottlenecks. Math.
Comp., 91(338):2969–2995, 2022.
57. Sandra Di Rocco, David Eklund, and Madeleine Weinstein. The bottleneck degree of algebraic
varieties. SIAM J. Appl. Algebra Geom., 4:227–253, 2020.
58. Manfredo do Carmo. Riemannian Geometry. Birkhäuser, 1993.
59. Michael Douglas, Subramanian Lakshminarasimhan, and Yidi Qi. Numerical Calabi-Yau metrics
from holomorphic networks. In Mathematical and Scientific Machine Learning, pages 223–252,
2022.
60. Jan Draisma, Emil Horobeţ, Giorgio Ottaviani, Bernd Sturmfels, and Rekha Thomas. The Euclidean
distance degree of an algebraic variety. Found. Comput. Math., 16:99–149, 2016.
61. Jan Draisma and Jose Rodriguez. Maximum likelihood duality for determinantal varieties. Int. Math.
Res. Not. IMRN, (20):5648–5666, 2014.
62. Simon Du, Wei Hu, and Jason Lee. Algorithmic regularization in learning deep homogeneous
models: Layers are automatically balanced. Advances in Neural Information Processing Systems, 31,
2018.
63. Eliana Duarte, Orlando Marigliano, and Bernd Sturmfels. Discrete statistical models with rational
maximum likelihood estimator. Bernoulli, 27:135–154, 2021.
64. Timothy Duff, Kathlén Kohn, Anton Leykin, and Tomas Pajdla. PLMP – Point-line minimal problems
in complete multi-view visibility. In IEEE/CVF International Conference on Computer Vision, pages
1675–1684, 2019.
65. Emily Dufresne, Parker Edwards, Heather Harrington, and Jonathan Hauenstein. Sampling real
algebraic varieties for topological data analysis. IEEE International Conference on Machine Learning
and Applications, 2019.
66. Alan Edelman and Eric Kostlan. How many zeros of a random polynomial are real? Math. Soc.
Mathematical Reviews, 32:1–37, 1995.
67. Chris Eur, Tara Fife, Jose Samper, and Tim Seynnaeve. Reciprocal maximum likelihood degrees of
diagonal linear concentration models. Le Matematiche, 76(2):447–459, 2021.
68. Shmuel Friedland and Giorgio Ottaviani. The number of singular vector tuples and uniqueness of
best rank-one approximation of tensors. Foundations of Comp. Math., 14(6):1209–1242, 2014.
69. William Fulton. Intersection theory. Springer, 1998.
70. William Fulton, Steven Kleiman, and Robert MacPherson. About the enumeration of contacts.
Algebraic Geometry – Open Problems, 997:156–196, 1983.
71. Israel Gel’fand, Mikhail Kapranov, and Andrei Zelevinsky. Discriminants, Resultants, and Multidi-
mensional Determinants. Birkhäuser, 1994.
72. Alfred Gray. Tubes. Birkhäuser, 2004.
212 References

73. Dan Grayson and Michael Stillman. Macaulay2, a software system for research in algebraic geometry.
available at https://macaulay2.com.
74. Elisenda Grigsby, Kathryn Lindsey, Robert Meyerhoff, and Chenxi Wu. Functional dimension of
feedforward ReLU neural networks. arXiv:2209.04036.
75. Philipp Grohs and Gitta Kutyniok. Mathematical Aspects of Deep Learning. Cambridge University
Press, 2022.
76. Richard Hartley. Projective reconstruction and invariants from multiple images. IEEE Transactions
on Pattern Analysis and Machine Intelligence, 16(10):1036–1041, 1994.
77. Richard Hartley and Fredrik Kahl. Optimal algorithms in multiview geometry. In Asian Conference
on Computer Vision, pages 13–34. Springer, 2007.
78. Richard Hartley and Frederik Schaffalitzky. Reconstruction from projections using Grassmann
tensors. International Journal of Computer Vision, 83(3):274–293, 2009.
79. Richard Hartley and Peter Sturm. Triangulation. Computer Vision and Image Understanding,
68(2):146–157, 1997.
80. Richard Hartley and Andrew Zisserman. Multiple View Geometry in Computer Vision. Cambridge,
2nd edition, 2003.
81. Jonathan Hauenstein and David Kahle. Stochastic exploration of real varieties via variety distribu-
tions. Preprint available at www.nd.edu/~jhauenst/preprints/khVarietyDistributions.
pdf , 2023.
82. Jonathan Hauenstein, Jose Rodriguez, and Bernd Sturmfels. Maximum likelihood for matrices with
rank constraints. J. Algebr. Stat., 5:18–38, 2014.
83. Jonathan Hauenstein and Frank Sottile. Algorithm 921: alphaCertified: Certifying solutions to
polynomial systems. ACM Trans. Math. Software, 38(4), 2012.
84. Kathryn Heal, Avinash Kulkarni, and Emre Can Sertöz. Deep learning Gauss–Manin connections.
Advances in Applied Clifford Algebras, 32(2):24, 2022.
85. Didier Henrion, Jean Bernard Lasserre, and Johan Löfberg. GloptiPoly 3: moments, optimization
and semidefinite programming. Optimization Methods and Software, 24:761–779, 2009.
86. Didier Henrion, Jean Bernard Lasserre, and Carlo Savorgnan. Approximate volume and integration
for basic semialgebraic sets. SIAM Rev., 51(4):722–743, 2009.
87. Otto Hesse. Die cubische Gleichung, von welcher die Lösung des Problems der Homographie von
M. Chasles abhängt. Journal für die reine und angewandte Mathematik, 62, 1863.
88. Anders Heyden and Kalle Åström. Algebraic properties of multilinear constraints. Mathematical
Methods in the Applied Sciences, 20(13):1135–1162, 1997.
89. Nicholas Higham. Accuracy and stability of numerical algorithms. SIAM, 1996.
90. Serkan Hoşten, Amit Khetan, and Bernd Sturmfels. Solving the likelihood equations. Found. Comput.
Math., 5(4):389–407, 2005.
91. Audun Holme. The geometric and numerical properties of duality in projective algebraic geometry.
Manuscripta mathematica, 61:145–162, 1988.
92. Emil Horobeţ and Madeleine Weinstein. Offset hypersurfaces and persistent homology of algebraic
varieties. Comput. Aided Geom. Design, 74, 2019.
93. David Hough. Explaining and Ameliorating the Ill Condition of Zeros of Polynomials. PhD thesis,
University of California Berkeley, 1977.
94. Ralph Howard. The kinematic formula in Riemannian homogeneous spaces. Mem. Amer. Math.
Soc., 106(509), 1993.
95. Petr Hruby, Timothy Duff, Anton Leykin, and Tomas Pajdla. Learning to solve hard minimal problems.
In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5532–5542, 2022.
96. Kun Huang, Robert Fossum, and Yi Ma. Generalized rank conditions in multiple view geometry with
applications to dynamical scenes. In European Conference on Computer Vision, pages 201–216.
Springer, 2002.
97. Zongyan Huang, Matthew England, David Wilson, James Bridge, James Davenport, and Lawrence
Paulson. Using machine learning to improve cylindrical algebraic decomposition. Mathematics in
Computer Science, 13:461–488, 2019.
98. Birkett Huber and Bernd Sturmfels. A polyhedral method for solving sparse polynomial systems.
Math. Comp., 64(212):1541–1555, 1995.
References 213

99. June Huh. The maximum likelihood degree of a very affine variety. Compos. Math., 149(8):1245–
1266, 2013.
100. June Huh. Varieties with maximum likelihood degree one. J. Algebr. Stat., 5:1–17, 2014.
101. June Huh and Bernd Sturmfels. Likelihood geometry. In Combinatorial Algebraic Geometry, volume
2108 of Lecture Notes in Math., pages 63–117. Springer, 2014.
102. Wolfram Research, Inc. Mathematica. Champaign, IL, 2023.
103. Kenji Kawaguchi. Deep learning without poor local minima. Advances in Neural Information
Processing Systems, 29, 2016.
104. Joe Kileel and Kathlén Kohn. Snapshot of algebraic vision. arXiv:2210.11443.
105. Joe Kileel, Matthew Trager, and Joan Bruna. On the expressive power of deep polynomial neural
networks. Advances in Neural Information Processing Systems, 32, 2019.
106. Steven Kleiman. Tangency and duality. In Proceedings 1984 Vancouver Conference in Algebraic
Geometry, pages 163–226. Amer. Math. Soc., 1986.
107. Felix Klein. Eine neue Relation zwischen den Singularitäten einer algebraischen Curve. Math. Ann.,
10(2):199–209, 1876.
108. Kathlén Kohn, Thomas Merkh, Guido Montúfar, and Matthew Trager. Geometry of linear convolu-
tional networks. SIAM Journal on Applied Algebra and Geometry, 6(3):368–406, 2022.
109. Kathlén Kohn, Guido Montúfar, Vahid Shahverdi, and Matthew Trager. Function space and critical
points of linear convolutional networks. arXiv:2304.05752.
110. Eric Kostlan. On the distribution of roots of random polynomials. In From Topology to Computation:
Proceedings of the Smalefest (Berkeley, CA), pages 419–431. Springer, 1993.
111. Eric Kostlan. On the expected number of real roots of a system of random polynomial equations.
In Foundations of Computational Mathematics: Proceedings of the Smalefest (Hong Kong), pages
149–188. World Scientific, 2002.
112. Christoph Koutschan. HolonomicFunctions: A Mathematica package for dealing with multivari-
ate holonomic functions, including closure properties, summation, and integration. available at
www3.risc.jku.at/research/combinat/software/ergosum/RISC/HolonomicFunctions.html.
113. Khazhgali Kozhasov, Alan Muniz, Yang Qi, and Luca Sodomaco. On the minimal algebraic com-
plexity of the rank-one approximation problem for general inner products. arXiv:2309.15105.
114. Kaie Kubjas, Olga Kuznetsova, and Luca Sodomaco. Algebraic degree of optimization over a variety
with an application to 𝑝-norm distance degree. arXiv:2105.07785.
115. Pierre Lairez. Computing periods of rational integrals. Math. Comp., 85(300):1719–1752, 2016.
116. Pierre Lairez, Marc Mezzarobba, and Mohab Safey El Din. Computing the volume of compact
semi-algebraic sets. In Proceedings of the International Symposium on Symbolic and Algebraic
Computation, pages 259–266. ACM, 2019.
117. Jean Bernard Lasserre. Moments, Positive Polynomials and their Applications. Imperial College
Press Optimization Series. Imperial College Press, 2010.
118. Lieven De Lathauwer. Decompositions of a higher-order tensor in block terms - Part II: Definitions
and uniqueness. SIAM J. Matrix Anal. Appl., 30:1033–1066, 2008.
119. Thomas Laurent and James Brecht. Deep linear networks with arbitrary loss: All local minima are
global. In International Conference on Machine Learning, pages 2902–2907, 2018.
120. John Lee. Riemannian Manifolds: Introduction to Curvature. Springer, 1997.
121. John Lee. Introduction to Smooth Manifolds. Springer, 2013.
122. Kisun Lee. Certifying approximate solutions to polynomial systems on Macaulay2. ACM Commu-
nications in Computer Algebra, 53(2):45–48, 2019.
123. Tony Lelièvre, Gabriel Stoltz, and Wei Zhang. Multiple projection MCMC algorithms on submani-
folds. IMA Journal of Numerical Analysis, 2022.
124. Hao Li, Zheng Xu, Gavin Taylor, Christoph Studer, and Tom Goldstein. Visualizing the loss landscape
of neural nets. Advances in Neural Information Processing Systems, 31, 2018.
125. Martin Lotz. On the volume of tubular neighborhoods of real algebraic varieties. Proceedings of the
American Mathematical Society, 143, 2012.
126. Laurent Manivel, Mateusz Michalek, Leonid Monin, Tim Seynnaeve, and Martin Vodička. Complete
quadrics: Schubert calculus for Gaussian models and semidefinite programming. Journal of the
European Mathematical Society, 2023.
214 References

127. Maplesoft, a division of Waterloo Maple Inc. Maple.


128. Laurentiu Maxim, Jose Rodriguez, and Botong Wang. Euclidean distance degree of the multiview
variety. SIAM Journal on Applied Algebra and Geometry, 4:28–48, 2020.
129. Clerk Maxwell. On the description of oval curves, and those having a plurality of foci. Proceedings
of the Royal Society of Edinburgh, 2, 1846.
130. Dhagash Mehta, Tianran Chen, Tingting Tang, and Jonathan Hauenstein. The loss surface of deep
linear networks viewed through the algebraic geometry lens. IEEE Transactions on Pattern Analysis
and Machine Intelligence, 44(9):5664–5680, 2021.
131. Sean Meyn and Richard Tweedie. Markov Chains and Stochastic Stability. Springer, 1993.
132. Mateusz Michalek, Leonid Monin, and Jaroslaw Wiśniewski. Maximum likelihood degree, complete
quadrics, and C∗ -action. SIAM J. Appl. Algebra Geom., 5:60–85, 2021.
133. Mateusz Michalek and Bernd Sturmfels. Invitation to Nonlinear Algebra, volume 211 of Graduate
Studies in Mathematics. American Mathematical Society, 2021.
134. Guido Montúfar, Yue Ren, and Leon Zhang. Sharp bounds for the number of regions of maxout
networks and vertices of Minkowski sums. SIAM Journal on Applied Algebra and Geometry,
6(4):618–649, 2022.
135. Alexander Morgan and Andrew Sommese. Coefficient-parameter polynomial continuation. Applied
Mathematics and Computation, 29(2):123–160, 1989.
136. Gabin Nguegnang, Holger Rauhut, and Ulrich Terstiege. Convergence of gradient descent for learning
linear neural networks. arXiv:2108.02040.
137. Jiawang Nie, Pablo Parrilo, and Bernd Sturmfels. Semidefinite representation of the k-ellipse. In Al-
gorithms in Algebraic Geometry, volume 146 of I.M.A. Volumes in Mathematics and its Applications,
pages 117–132. Springer, 2008.
138. Partha Niyogi, Steve Smale, and Shmuel Weinberger. Finding the homology of submanifolds with
high confidence from random samples. Discrete Comput. Geometry, (39):419–441, 2008.
139. Luke Oeding. The quadrifocal variety. Linear Algebra and its Applications, 512:306–330, 2017.
140. Barrett O’Neill. Elementary Differential Geometry. Elsevier, 2001.
141. Giorgio Ottaviani and Luca Sodomaco. The distance function from a real algebraic variety. Comput.
Aided Geom. Design, 82, 2020.
142. Giorgio Ottaviani, Pierre-Jean Spaenlehauer, and Bernd Sturmfels. Exact solutions in structured
low-rank approximation. SIAM J. Matrix Anal. Appl., 35(4):1521–1542, 2014.
143. Pablo A. Parrilo and Rekha R. Thomas. Sum of Squares: Theory and Applications. Proceedings of
Symposia in Applied Mathematics. American Mathematical Society, 2020.
144. Dylan Peifer, Michael Stillman, and Daniel Halpern-Leistner. Learning selection strategies in Buch-
berger’s algorithm. In International Conference on Machine Learning, pages 7575–7585, 2020.
145. Ragni Piene. Polar classes of singular varieties. In Annales scientifiques de l’École Normale
Supérieure, volume 11, pages 247–276, 1978.
146. Ragni Piene, Cordian Riener, and Boris Shapiro. Return of the plane evolute. Annales de l’Institut
Fourier, 2023.
147. Julius Plücker. Gesammelte wissenschaftliche Abhandlungen, volume 2. BG Teubner, 1895.
148. Sebastian Pokutta and Elias Wirth. Conditional gradients for the approximately vanishing ideal. In
International Conference on Artificial Intelligence and Statistics, 2002.
149. Yang Qi, Pierre Comon, and Lek-Heng Lim. Semialgebraic geometry of nonnegative tensor rank.
SIAM J. Matrix Anal. Appl., 37:1556–1580, 2016.
150. Adityanarayanan Radhakrishnan, Mikhail Belkin, and Caroline Uhler. Overparameterized neu-
ral networks implement associative memory. Proceedings of the National Academy of Sciences,
117(44):27162–27170, 2020.
151. Christophe Raffalli. Distance to the discriminant. arXiv:1404.7253.
152. John Rice. A theory of condition. SIAM J. Numer. Anal, 3:287–310, 1966.
153. Gareth Roberts and Jeffrey Rosenthal. General state space Markov chains and MCMC algorithms.
Probability Surveys, pages 20–71, 2004.
154. Jose Rodriguez and Botong Wang. The maximum likelihood degree of mixtures of independence
models. SIAM J. Appl. Algebra Geom., 1:484–506, 2017.
155. Mutsumi Saito, Bernd Sturmfels, and Nobuki Takayama. Gröbner Deformations of Hypergeometric
Differential Equations, volume 6 of Algorithms and Computation in Mathematics. Springer, 2000.
References 215

156. George Salmon. A Treatise on the Higher Plane Curves. Hodges and Smith, 1852.
157. George Salmon. A Treatise on the Analytic Geometry of Three Dimensions. Hodges, Smith, and
Company, 1865.
158. Muhamad Saputra, Andrew Markham, and Niki Trigoni. Visual SLAM and structure from motion
in dynamic environments: A survey. ACM Computing Surveys (CSUR), 51(2):1–36, 2018.
159. Anna-Laura Sattelberger and Bernd Sturmfels. D-modules and holonomic functions. to appear in:
Varieties, Polyhedra and Computation, EMS Series of Congress Reports, arXiv:1910.01395.
160. Luca Sodomaco. The distance function from the variety of partially symmetric rank-one tensors.
PhD thesis, Universitá degli Studi di Firenze, 2020.
161. Andrew Sommese and Charles Wampler. The Numerical Solution of Systems of Polynomials Arising
in Engineering and Science. World Scientific, 2005.
162. Henrik Stewénius, Frederik Schaffalitzky, and David Nistér. How hard is 3-view triangulation really?
In IEEE International Conference on Computer Vision, pages 686–693, 2005.
163. Rud Sturm. Das Problem der Projectivität und seine Anwendung auf die Flächen zweiten Grades.
Mathematische Annalen, 1(4):533–574, 1869.
164. Bernd Sturmfels. Solving Systems of Polynomial Equations. Number 97 in CBMS Regional Confer-
ences Series. American Mathematical Society, 2002.
165. Bernd Sturmfels and Simon Telen. Likelihood equations and scattering amplitudes. Algebr. Stat.,
12(2):167–186, 2021.
166. Bernd Sturmfels, Sascha Timme, and Piotr Zwiernik. Estimating linear covariance models with
numerical nonlinear algebra. Algebr. Stat., 11:31–52, 2020.
167. Seth Sullivant. Algebraic Statistics, volume 194 of Graduate Studies in Mathematics. American
Mathematical Society, 2018.
168. Gyula Sz.-Nagy. Tschirnhaus’sche Eiflächen und Eikurven. Acta Mathematica Hungarica, pages
36–45, 1950.
169. Matteo Tacchi, Jean Bernard Lasserre, and Didier Henrion. Stokes, Gibbs, and volume computation
of semi-algebraic sets. Discrete Comput. Geom., 69:260–283, 2023.
170. Matteo Tacchi, Tillmann Weisser, Jean Bernard Lasserre, and Didier Henrion. Exploiting sparsity
for semi-algebraic set volume computation. Found. Comput. Math., 22:161–209, 2022.
171. The Sage Developers. SageMath, the Sage Mathematics Software System.
https://www.sagemath.org.
172. Gerald Toomer. Apollonius: Conics Books V to VII: The Arabic Translation of the Lost Greek Original
in the Version of the Banū Mūsā. Springer, 1990.
173. Lloyd Trefethen and David Bau. Numerical Linear Algebra. SIAM, 1997.
174. Alan Turing. Rounding-off errors in matrix processes. The Quarterly Journal of Mechanics and
Applied Mathematics, 1948.
175. Hermann Weyl. On the volume of tubes. Amer. J. Math., 61(2):461–472, 1939.
176. James Wilkinson. Note on matrices with a very ill-conditioned eigenproblem. Numer. Math.,
19:176–178, 1972.
177. Francis Williams, Matthew Trager, Daniele Panozzo, Claudio Silva, Denis Zorin, and Joan Bruna.
Gradient dynamics of shallow univariate ReLU networks. Advances in Neural Information Processing
Systems, 32, 2019.
178. Lior Wolf and Amnon Shashua. On projection matrices P 𝑘 → P2 , 𝑘 = 3, . . . , 6, and their applica-
tions in computer vision. International Journal of Computer Vision, 48:53–67, 2002.
179. Doron Zeilberger. A holonomic systems approach to special functions identities. J. Comput. Appl.
Math., 32(3):321–368, 1990.
180. Liwen Zhang, Gregory Naitzat, and Lek-Heng Lim. Tropical geometry of deep neural networks. In
International Conference on Machine Learning, pages 5824–5832, 2018.
181. Qunjie Zhou, Torsten Sattler, Marc Pollefeys, and Laura Leal-Taixe. To learn or not to learn: Visual
localization from essential matrices. In IEEE International Conference on Robotics and Automation,
pages 3319–3326, 2020.
182. Günter Ziegler. Lectures on Polytopes. Graduate Texts in Math. Springer New York, 1995.

You might also like