Compalggeom
Compalggeom
Geometry
Thomas Markwig
Fachbereich Mathematik
Technische Universität Kaiserslautern
August 2010
Contents
1 Introduction 1
A) Robotics 2
B) Elliptic curve cryptography 3
C) Coding theory 3
D) Chip design 4
E) Sudoku 4
F) Exercises 5
6 Projective varieties 64
A) The projective n-space 64
B) Projective algebraic varieties 65
C) The projective Nullstellensatz 66
D) Regular functions and morphisms on projective algebraic varieties 67
E) The Hilbert polynomial of a projective algebraic variety 68
F) The Theorem of Bézout 70
References 91
http://de.wikipedia.org/wiki/Stewart Platform
as well as the first image in Figure 6. The second image in Figure 6 can be found
on the web page:
http://www.physikinstrumente.de/de/produkte/primages.php?sortnr=700800
http://static.howstuffworks.com/gif/microprocessor-athlon-64.jpg
Finally the image in Figure 10 was taken from the web page:
http://en.wikipedia.org/wiki/Sudoku
1
1 Introduction
f1 (x1 , . . . , xn ) = 0
..
.
fk (x1 , . . . , xn ) = 0
32x21 − 2097152x11 9
2 + 1441792x2 x1 − x23 = 0
− 360448x72 + 39424x52
x22 − x33 = 0
− 1760x32 + 22x2 − 1 = 0
The first case to consider would be n = k = 1, that is, we have a single polynomial
f = am · xm + am−1 · xm−1 + . . . + a1 · x + a0
and we are looking for the roots of that polynomial. In theory, this is not too hard
to deal with. There are at most n roots, and if the base field is algebraically closed
2
like C, then there are exactly n roots counted with the appropriate multiplicity.
However, it is very hard in practise to find any of the roots.
The second case to consider would have n and k arbitrary, but the polynomials are
all linear, i.e. they are of the form
fi = ai1 · x1 + . . . + ain · xn + bi .
Then the solution set is an affine vector space, and it is even easy to compute using
the Gauß algorithm.
In general, life is much more difficult and much more interesting as already the above
examples show. Before introducing the theory we want to mention some applications
where such polynomial systems of equations come up naturally.
A) Robotics
A frequently used robotic system is the hexapod (see Figure 5). A platform is
connected to six legs via rotational joints. The length of the legs can be varied
in order to adjust the position of the platform in space. Note that one has three
translational and three rotational directions of movement, that is one has six degrees
of freedom, and fixing the length of the six legs one thus expects to fix the position
of the platform. Robots using this basic scheme are used in many applications, e.g.
for flight simulators or in micro surgery (see Figure 6). To deduce the length of the
legs needed in order to achieve a given position one has to solve a system of eight
polynomial equations, one of which is shown in Figure 7.
2x40 + 4x20 x21 + 2x41 + 4x20 x22 + 4x21 x22 + 2x42 + 4x20 x23 + 4x21 x23
+ 4x22 x23 + 2x43 − 2x20 x2 y0 − 2x21 x2 y0 − 2x32 y0 − 2x20 x3 y0
− 2x21 x3 y0 − 2x22 x3 y0 − 2x2 x23 y0 − 2x33 y0 + x20 y20 + x21 y20
+ x22 y20 + x23 y20 + 2x20 x2 y1 + 2x21 x2 y1 + 2x32 y1 − 2x20 x3 y1
− 2x21 x3 y1 − 2x22 x3 y1 + 2x2 x23 y1 − 2x33 y1 + x20 y21 + x21 y21
+ x22 y21 + x23 y21 + 2x30 y2 − 2x20 x1 y2 + 2x0 x21 y2 − 2x31 y2
+ 2x0 x22 y2 − 2x1 x22 y2 + 2x0 x23 y2 − 2x1 x23 y2 + x20 y22 + x21 y22
+ x22 y22 + x23 y22 + 2x30 y3 + 2x20 x1 y3 + 2x0 x21 y3 + 2x31 y3
+ 2x0 x22 y3 + 2x1 x22 y3 + 2x0 x23 y3 + 2x1 x23 y3 + x20 y23 + x21 y23
+ x22 y23 + x23 y23 + 4x0 x2 + 4x1 x2 − 4x0 x3 + 4x1 x3
7
− 2x1 y0 + 2x0 y1 − 2x3 y2 + 2x2 y3 − 2
=0
Equations like
y2 z − x · x − 12 · z · (x − z) = 0
define elliptic curves in the projective plane (see Figure 8). They carry in a natural
way the structure of an abelian group, that is, one can add and subtract points on
the curve from each other. If the base filed K over which one considers the solutions
is finite, then these groups are very well suited as alphabets for cryptographical
methods, and they are widely used nowadays. Note that, while it is easy to add a
point P several times to itself, e.g. P + P + P = 3 · P, it is very hard to find P if
you are given the result 3 · P. One says, that it is very hard to compute the discrete
logarithm.
C) Coding theory
Also for coding theory one can use projective curves over a finite field K. However,
this time one considers the global sections of a divisor on the curve and its image
under the map evaluating the sections at n fixed points. This gives a subspace of
Kn which serves as the code and has pretty good properties. These ideas go back to
Goppa.
4
Figure 8. A visualisation of y2 z − x · x − 21 · z · (x − z) = 0
D) Chip design
A modern micro processor chip contains several layers of electrical circuits with
millions of transistors, resistors and capacitors. The functionality of certain units of
such an electrical circuit within itself and with other units leads eventually to systems
of partial differential equations. These can be treated symbolically as polynomial
equations which one uses in a preprocessing step before applying numerical methods.
Certain properties of the circuits can thus be predicted by pure simulation and
computations without actually building the chip (see Figure 9).
E) Sudoku
A Sudoku is a scheme of digits as in Figure 10. One should fill the table by digits
in such a way that in each row, in each column and in each block each of the nine
digits 1, . . . , 9 occurs precisely once.
Let us now associate coordinates x1 , . . . , x81 to each of the 81 squares and consider
the set of pairs
B = {(i, j) | 1 ≤ i < j ≤ 81, xi and xj are in the same row, column or block}.
For i = 1, . . . , 81 we define
9
Y
Fi = xi − k,
k=1
and for (i, j) ∈ B we set
Fi − Fj
Gij = .
xi − xj
Then the Fi and the Gij are polynomials. Moreover, a1 , . . . , a81 is a feasible solution
for a sudoku if and only if it is a solution of the system of equations
F) Exercises
Exercise 1.1
How do the solution sets in R2 of the following equations look like?
a. y − x2 = 0.
b. y − x4 + 1 = 0.
c. y2 − x2 = 0.
d. x2 − y3 = 0.
e. y2 − x2 − x3 = 0.
f. (x2 + y2 )3 − 4x2 y2 = 0.
Exercise 1.2
How do the solution sets in R3 of the following systems of equations look like?
a. x2 − y3 = 0.
b. z − x2 − y2 = 0.
c. z2 − x2 − y2 = 0.
d. z2 − x2 − y2 = 0 and z2 − 1 = 0.
e. xz = 0 and yz = 0.
f. x2 + y2 + z2 − 1 = 0.
Studying solution sets of systems of polynomial equations does not in general mean
that we want to write down all solutions. That is in general impossible even if the
number is finite which in general is not the case. Instead we want to study the
structure of these sets, properties such as its dimension or if it decomposes into
several components or how it looks locally at some point. The latter is important if
one wants to control parameters which allow to travel along the solution set without
fearing any sudden and instable behaviour. In this section we will introduce the
basic notions needed to deal with the theory of the solution sets of finite systems of
polynomial equations, called affine algebraic varieties.
We will always choose whatever field is best for the purpose at hand!
A) Basic definitions
• x = (x1 , . . . , xn ),
• α = (α1 , . . . , αn ) ∈ Nn ,
• xα = xα1 1 · · · xαnn ,
• |α| = α1 + . . . + αn .
The number
!
X
deg aα · x α = sup |α| aα 6= 0 ∈ N ∪ {−∞}
α
P
is the degree of the polynomial α aα · x α .
f + g, r · f ∈ I ∀ f, g ∈ I, r ∈ K[x].
Idea of the proof: One proves the statement by induction on the number n of
variables. We set R = K[x1 , . . . , xn−1 ] and consider the polynomials in K[x] = R[xn ]
as polynomials in the variable xn with coefficients in R. Given an ideal I in K[x]
the ideal J in R generated by the leading coefficients of the elements in I is finitely
generated by induction. That is, there are finitely many polynomials f1 , . . . , fk ∈ I
such that there leading coefficients generate J. If d is an upper bound for the degree
of these polynomials, then one can show by some kind of division with remainder
that I is generated by f1 , . . . , fk together with the finite generating set of the ideal
h1, xn , x2n , . . . , xd−1
n iR ∩ J in R.
Example 2.6
It is easy to see that the set
B) Gröbner bases
Remark 2.7
Suppose we are given a system of polynomials f1 , . . . , fk and we are interested in
their vanishing set X = V(f1 , . . . , fk ). Remark 2.4 then says that we may replace the
given set of generators of I = hf1 , . . . , fk i by any other set of generators of I without
changing the vanishing set X. The idea is now to change to a set of generators which
reveals more information on the vanishing set.
xα > xβ =⇒ xα · xγ > xβ · xγ ∀ γ ∈ Nn .
10
That is, the ordering is compatible with the obvious semi group structure on Mon(x).
A monomial ordering is called global if 1 < xα for all α 6= 0, and it is called local if
1 > xα for all α 6= 0.
Example 2.9 (Monomial orderings on Mon(x))
On Mon(x) = {xn | n ∈ N} there are exactly two monomial orderings defined by
either
xn > xm ⇐⇒ n > m
or
xn > xm ⇐⇒ n < m.
The first one is global, the second one is local.
Example 2.10 (Global monomial orderings)
a. Define the global lexicographical ordering >lp on Mon(x) by xα >lp xβ if
∃ i ∈ {1, . . . , n} : α1 = β1 , . . . , αi−1 = βi−1 , and αi > βi .
b. Define the global degree reverse lexicographical ordering >dp on Mon(x) by
xα >dp xβ if
deg xα > deg xβ ,
or deg xα = deg xβ , but then
∃ i ∈ {1, . . . , n} : αn = βn , . . . , αi+1 = βi+1 , and αi < βi .
c. E.g., x21 >lp x1 x32 , but x1 x32 >dp x21 .
Definition 2.11 (Leading monomial)
P
Let > be a monomial ordering on Mon(x) and 0 6= f = d|α|=0 aα · xα ∈ K[x].
a. lm> (f) = max xα | aα 6= 0 is the leading monomial of f w.r.t. >.
b. lc> (f) = aα , if lm> (f) = xα , is the leading coefficient of f w.r.t. >.
c. lt> (f) = lc> (f) · lm> (f) is the leading term of f w.r.t. >.
For the sake of completeness we define
lm> (0) := 0, lt> (0) := 0, lc> (0) := 0.
Example 2.12
We consider Mon(x, y) with the lexicographical respectively the degree reverse lex-
icographical ordering and the polynomial f = 2x2 + 5xy3 − y, then
lm>lp (f) = x2 , lc>lp (f) = 2, lt>lp (f) = 2x2 ,
while
lm>dp (f) = xy3 , lc>dp (f) = 5, lt>dp (f) = 5xy3 .
Remark 2.13 (Singular)
Below you find the Singular commands for the last example. It is important to
note that in Singular one always has to specify the polynomial ring one is working
with. The command
11
ring r=0,(x,y),dp;
does so. It attributes the name r to the ring, specifies the base field to be the
rational numbers by stating the characteristic to be 0, introduces the indeterminates
x and y, and finally specifies the ordering to be dp, i.e. the global degree reverse
lexicographical ordering. The remaining parts should be more or less self explaining.
SINGULAR /
A Computer Algebra System for Polynomial Computations / version 3-1-1
0<
by: G.-M. Greuel, G. Pfister, H. Schoenemann \ Feb 2010
FB Mathematik der Universitaet, D-67653 Kaiserslautern \
> ring r=0,(x,y),dp;
> poly f=3*x^2+5*x*y^3-y;
> leadmonom(f);
xy3
> leadcoef(f);
5
> lead(f);
5xy3
f = q · g + r.
f = q1 · g1 + . . . qk · gk + r (1)
12
Example 2.16
If I = hx − 1, y − 1i and > is any global monomial ordering on Mon(x, y), then
G = {x − 1, y − 1} is a Gröbner basis of I since L> (I) = hx, yi.
Gröbner bases are good generating systems, as the following proposition shows.
Proposition 2.17 (Ideal membership test)
Let I be an ideal in K[x], G = {g1 , . . . , gk } ∈ K[x] and > a monomial ordering.
Example 2.18
Let I = hx − y2 , x + y2 i and consider the lexicographical ordering >lp on Mon(x, y).
Then
y2 = 0 · (x − y2 ) + 0 · (x + y2 ) + y2
is a standard representation with r = y2 6= 0, however
1 1
y2 = · (x + y2 ) − · (x − y2 ) ∈ I.
2 2
2 2
This shows that G = {x − y , x + y } is not a Gröbner basis of I.
Example 2.19 (Ideal membership and syzygies)
Suppose we want to find a standard representation of the polynomial f = x4 + y4
with respect to G = {x − 1, y − 1} and to >dp on Mon(x, y). The command
reduce(f,I);
gives us the remainder r. And in the Singular code below we see, how the command
syz can be used to find q1 and q2 .
The last column of the matrix that we get, has a −1 as its last entry. Thus the
entries above are q1 = x3 + x2 + x + 1 in the first row and q2 = y3 + y2 + y + 1 in
the second row. This comes from the fact that each column (a1 , a2 , a3 ) represents
polynomials such that
a1 · (x − 1) + a2 · (y − 1) + a3 · (f − r) = 0.
One calls such a vector (a1 , a2 , a3 ) a syzygy of the polynomials x − 1, y − 1, f − r.
Idea of the proof: If V(I) is finite and fi is the polynomial that has all the i-th
coordinates of points in V(I) as zero, then one expects some power of fi in I.
Remark 2.21
We now want to explain how one can easily compute I ∩ K[xi ] using Gröbner bases.
Reorder the variables x1 , . . . , xn in such a way, that xi is the last one and call the
new variables y1 , . . . , yn . Then compute a Gröbner basis G of I with respect to the
lexicographical ordering on Mon(y1 , . . . , yn ). There will be at least one polynomial
in G which only depends on the variable yn = xi , and among those only depending
on that variable the one of lowest degree will be a generator of I ∩ K[xi ].
There is actually a simple Singular command, eliminate, which allows to com-
pute the generators directly. We will come back to this command further down.
We could have computed the generator of I ∩ K[x] by eliminating the variable y with
the aid of the command eliminate:
One can also try to approximate the solutions if they are not rational using the
command solve from the library solve.lib. A library is loaded using the command
LIB as in the following example.
D) Hilbert’s Nullstellensatz
Remark 2.25
Since fn (p) = 0 if and only if f(p) = 0, for any ideal I ✂ K[x] we have
√
V(I) = V I .
Thus, every affine algebraic variety is the vanishing set of a radical ideal.
Moreover, it is obvious that
√
I ⊆ I V(I) .
Exercise 2.26
√
Find a maximal ideal I ✂ R[x] such that I 6= I V(I) and such that I is not of the
form hx − ai.
Something like this cannot happen for K = C. There life is much better as the
following theorem states.
Theorem 2.27 (Hilbert’s Nullstellensatz)
Let K be an algebraically closed field.
b. The maximal ideals in K[x] are precisely the ideals of the form
mp = hx1 − p1 , . . . , xn − pn i
for p = (p1 , . . . , pn ) ∈ AnK . Thus there is a one-to-one correspondence
1:1
AnK −→ Max(K[x]) : p = (p1 , . . . , pn ) 7→ mp = hx1 − p1 , . . . , xn − pn i.
Proof: One first shows that if K[x]/m is a field then dimK (K[x]/m) is finite using
results from commutative algebra on finite ring extensions and localisation. In
particular K[x]/m is an algebraic extension of K, but if K is algebraically closed then
K[x]/m must coincide with K, i.e. the map
K −→ K[x]/m : a 7→ a
18
is an isomorphism. Thus, there is some ai ∈ K such that xi ≡ ai (mod m), and hence
m = hx1 − a1 , . . . , xn − an i. For part a. one then shows that
\ \ √
I(V(I)) = I(V(p)) = mp = I,
p∈V(I) p∈V(I)
i.e. the radical of I is already the intersection of all maximal ideals containing I.
Remark 2.30
It is straight forward to see that for ideals I, J ✂ K[x] we have
One can compute the intersection of two ideals in Singular using the command
intersect. In the following example we compute an ideal defining the union of a
double cone and a line (see Figure 11).
Figure 13. The affine algebraic variety V(xz, yz) = V(z) ∪ V(x, y).
Remark 2.36
It is easy to see that affine algebraic varieties X, Y ⊆ AnK satisfy
X$Y ⇐⇒ I(X) % I(Y).
We then call X a subvariety of Y.
This motivates the following definition of the dimension of an affine algebraic variety.
Definition 2.37 (Dimension)
Let X ⊆ AnK be an affine algebraic variety and I ✂ K[x] an ideal.
a. The dimension of X is one less than the maximal length of a strictly descending
chain of irreducible subvarieties of X, i.e.
dim(X) = max{d | X ⊇ X0 % X1 % . . . % Xd , Xi irred. aff. alg. var.}.
b. The Krull dimension dim(R) of a ring R is one less than the maximal length
of a strictly ascending chain of prime ideals in R. Thus the Krull dimension
of K[x]/I is
dim(K[x]/I) = max{d | I ⊆ P0 $ P1 $ . . . $ Pd , Pi ∈ Spec(K[x])}.
c. We call the ring K[X] = K[x]/ I(X) the coordinate ring of X.
Proposition 2.38 (Dimension)
If X ⊆ AnK is an affine algebraic variety and K is algebraically closed, then
dim(X) = dim K[X] = max{dim(K[x]/P) | P ∈ Ass(I)}.
The dimension of X is the maximum of the dimensions of its irreducible components.
If the equality in c. holds, we call V(I) a complete intersection and we say that V(I)
has the expected dimension.
Idea of the proof: One shows by induction on k that a prime ideal which is min-
imal such that it contains polynomials f1 , . . . , fk contains no chain with more than
k + 1 prime ideals. The hard part is the case k = 1. But then Hilbert’s Nullstellen-
satz shows that the dimension of K[x] is at most n since the maximal ideals are all
generated by n polynomials, and there is also a chain with n + 1 prime ideals
h0i $ hx1 i $ hx1 , x2 i $ . . . $ hx1 , x2 , . . . , xn i.
Example 2.40
The dimension of X = V(xz, yz) = V(z) ∪ V(x, y) is
dim(X) = max{dim V(z), dim V(x, y)}
= max{dim K[x, y, z]/hzi, dim K[x, y, z]/hx, yi = max{2, 1} = 2.
Remark 2.41 (How to compute the dimension.)
The dimension of K[x]/I can easily be computed as “dim(I)” with Singular using
the command dim. The reason for that is that for any global monomial ordering >
dim K[x]/I = dim K[x]/L> (I) ,
and since the latter is a monomial ideal one only has to check how many variables at
most are algebraically independent modulo the monomial generators. That is rather
simple. Note, that Singular simply computes the leading terms of the generators
and proceeds with these. Thus the ideal I should already be given by a Gröbner
basis.
E.g. in the following example the ideal I defines a curve in space, for which three
equations are needed. It is an example of an irreducible affine algebraic variety
which is not a complete intersection.
> dim(groebner(J));
1
> LIB "primdec.lib";
> size(minAssGTZ(I));
1
By the last command we show that I has only one associated prime ideal, which
shows that V(I) is irreducible. One can indeed easily compute that I is prime. (See
Figure 14.)
Figure 14. A space curve drawn on a shadow of the surface V(y2 − xz).
G) Exercises
Exercise 2.42
Let M, N ⊆ K[x].
Exercise 2.43
Show that the monomial orderings in Example 2.9 are global monomial orderings.
Exercise 2.45
Show that the monomial orderings in Example 4.9 are local monomial orderings.
Exercise 2.46
Find an example of a monomial ordering which is neither local nor global.
Exercise 2.47
Compute the leading monomial and the leading coefficient of the polynomial f =
x31 x2 − 4x1 x52 + x21 − x22 with respect to >lp , >dp , >ls , and >ds by hand and using
Singular. (For the definition of >ls and >ds see Example 4.9).
Exercise 2.48
Compute a standard representation of the polynomial f = x2 yz2 + 3z3 with respect
to g1 = x2 y + y, g2 = z2 − x and the ordering >dp using Singular.
Exercise 2.49
Compute the leading ideal of I = hx3 y + 2x, x2 yz + 3xy, z3 − x2 i with respect to >dp
with Singular.
Exercise 2.50
Check with Singular if the polynomial x3 y4 − 3yz2 − x2 z is contained in the ideal
I = hx3 y + 2x, x2 yz + 3xy, z3 − x2 i.
Exercise 2.51
Show that the set of solutions of
x2 + y2 − 8 = x2 − y2 = 0
is finite and compute the solutions with the aid of minAssGTZ as well as with the aid
of solve. Moreover, find a non-zero polynomial in I∩K[x] for I = hx2 +y2 −8, x2 −y2 i.
Exercise 2.52
Consider the three plane curves Ci in A2C given by the equations fi = 0, i = 1, 2, 3,
where
f1 = y2 − 5x2 − x3 , f2 = x4 + y4 − 2, respectively f3 = y2 + 5x2 + x3 .
How many intersection points do C1 and C2 respectively C1 and C3 have? How many
of these points are real? You may use Singular for the computations. Verify the
real points by drawing the curves using surf.
Exercise 2.53
Factorize the polynomial f = −x2 y4 z − xy5 z − xy4 z2 + x4 yz + x3 y2 z + x3 yz2 + 2x2 y3 +
2xy4 + 2xy3 z − 2x4 − 2x3 y − 2x3 z using Singular.
Exercise 2.54
Show that V(I) is finite if and only if dimK K[x]/I is finite.
Exercise 2.55
√
Find a maximal ideal I ✂ R[x] such that I 6= I V(I) and such that I is not of the
form hx − ai.
25
Exercise 2.56
Compute the vanishing ideal of intersection of V(x2 − y3 ) and V(x − y2 ) in C[x, y]
using Singular.
Exercise 2.57
Prove that V(I · J) = V(I ∩ J) = V(I) ∪ V(J) for ideals I, J ✂ K[x].
Exercise 2.58
p
Show that I(X) = I(X) for any X ⊆ AnK .
Exercise 2.59
Let X be the union of the three coordinate axes in A3C . Compute the vanishing ideal
of X in K[x, y, z]. Is X a complete intersection?
Exercise 2.60
Consider the surface V(f) ⊂ A3C defined by the polynomials f = x2 + y2 + xyz and
consider the planes Hc = V(x − c) ⊂ A3C for c ∈ C arbitrary. Determine I(Xc ) for
Xc = Hc ∩ V(f).
Exercise 2.61
Compute the irreducible components of V(x3 + x2 y + x2 z − xyz − y2 z − yz2 ) and
visualise them with surfex.
Exercise 2.62
Compute first the vanishing ideal of X = V(x2 −z, xy−z2 )∩V(x+y+z) and compute
then its irreducible components. Visualise the irreducible components with surfex
and compute their dimension. What is the dimension of X?
Exercise 2.63
Consider the ideal I generated by the 2 × 2-minors of the matrix
!
x0 x1 x2 x3 x4
A=
x5 x6 x7 x8 x9
in C[x0 , . . . , x9 ] and the variety X = V(I). Compute the dimension of X. You may
use the Singular command minor.
Exercise 2.64
Let X = V yz2 − yz, xz2 − xz, xyz + xz − y2 z − yz, y3 z − yz ⊆ A3C . Compute the
irreducible components of the variety X as well as the dimension of X and of each
of its irreducible components.
26
Affine algebraic varieties carry more structure than mere sets. They are topologi-
cal spaces with additional structure. In this section we first introduce the Zariski
topology on affine algebraic varieties, and then we want to study morphisms between
affine algebraic varieties, i.e. maps which respect their structure. For that we intro-
duce first the notion of regular functions, i.e. admissible maps on open subsets of
affine algebraic varieties which take values in the base field K. They will locally be
given as rational functions. The regular functions are the additional structure, and
they are gathered in the so called structure sheaf. A morphism then should respect
these regular functions via composition. One of the main results will be that only
polynomial maps do so.
Exercise 3.5
If f ∈ K[x] we call Xf = X \ V(f) a basic open subset of X. Show that every open
subset of X is a union of finitely many basic open subsets. One says that the basic
open subsets form a basis of the Zariski topology.
Exercise 3.6
Let X be an irreducible affine algebraic variety and U ⊆ X a non-empty open subset
of X. Then U is dense in X, i.e. its topological closure is all of X.
We will consider all algebraic varieties as topological spaces w.r.t. the Zariski
topology. We write K = K to indicate that K is algebraically closed.
B) Regular functions
Exercise 3.8
If X = V(x1 x2 − x3 x4 ) ⊂ A4C and U = X \ V(x1 , x3 ) then the function
x2
x3
, if x3 6= 0,
f : U −→ C : (x1 , x2 , x3 , x4 ) 7→ x4
x1
, if x1 6= 0
f : X 7→ K : p 7→ f(p)
on an affine algebraic variety X, and two polynomials f and g define the same
function on X if their difference is in I(X). One may thus in a natural way identify
the elements of the coordinate ring of X with regular functions on X.
It turns out that indeed there are no other regular functions on all of X.
Theorem 3.10 (Global regular functions)
Let X be an affine algebraic variety and K = K, then OX (X) = ∼ K[X] as K-algebras.
In particular, every global regular function is globally defined by a polynomial.
28
Idea of the proof: Considering the elements in K[X] as regular functions gives an
injective K-algebra homomorphism from K[X] to OX (X). It remains to show that
every regular function on X is globally given by a polynomial. For that we note that
for any given regular function f : X −→ K there is a finite covering of X by basic
open subsets Xh1 , . . . , Xhk such that f coincides on Xhi with a quotient hgii . But then
hh1 , . . . , hk i + I(X) = K[x] and thus
k
X
1≡ fi · hi (mod I(X)),
i=1
C) Morphisms
ϕ
ϕ−1 (U) /U
❋❋
❋❋
❋❋
ϕ (f)=f◦ϕ ❋❋❋
∗ f
#
K
We denote by Mor(X, Y) the set of morphisms from X to Y. A morphism is an
isomorphism if it is bijective and its inverse in a morphism as well.
X −→ Am
K : p 7→ f1 (p), . . . , fm (p)
by just taking the fi as component functions. This works since composing a rational
function with a polynomial gives a rational function.
The following theorem states that actually this is the only way to get a morphism.
Theorem 3.16 (Morphisms are polynomial maps.)
If X ⊆ AnK and Y ⊆ Am
K are affine algebraic varieties and K = K, then the pull-back
is a bijection.
In particular, if ϕ : X → Y is a morphism, then the components of ϕ are polynomials.
Idea of the proof: The inverse map is given by assigning to a K-algebra homo-
morphism ψ : K[Y] −→ K[X] the morphism X −→ Y with component functions
ψ(y1 ), . . . , ψ(ym ) ∈ K[X].
There are also predefined maps which can be accessed by the commands imap and
fetch. imap works like the identity and does not change anything, fetch simply
maps the i-th variable of the domain of definition to the i-th variable of the new
ring. For more details on how to use these one should consult the manual.
projection to the x-axis is A1K \ {0}. However, it is never far from being a variety and
it is safe to compute its topological closure, i.e. the smallest affine algebraic variety
in which it is contained. This can be done as follows.
If X = V(I) ⊆ AnK is an affine algebraic variety then the closure of πn,m (X) in Am
K is
πn,m (X) = V I ∩ K[x1 , . . . , xm ] .
That is, we can compute the closure of the image of an affine algebraic variety under
a projection by intersecting a defining ideal with a subalgebra. This can be done
by computing a Gröbner basis similar to Remark 2.21 using the concept of block
orderings. In Singular one can instead use the built-in command eliminate which
computes the intersection of an ideal with a subalgebra by eliminating the variables
one wants to get rid of.
The example shows that if we project the space curve V(I) to the yz-plane we get
a curve with the equation y5 − z4 = 0 (see Figure 15).
It actually is an affine algebraic variety, namely the one defined by the ideal
hf1 , . . . , fk , y1 − g1 , . . . , ym − gm i ✂ K[x1 , . . . , xn , y1 , . . . , ym ]
if X = V(f1 , . . . , fk ) and ϕ = (g1 , . . . , gm ).
32
and we can thus compute the closure of the image of ϕ as the projection of the
graph of ϕ.
E.g. consider the morphism
1 − t2 2t
ϕ: A1R −→ A2R : t 7→ ,
1 + t2 1 + t2
and its graph
1 − t2 2t
Graph(ϕ) = t, ϕ(t) t ∈ R = t, , t∈R .
1 + t 2 1 + t2
The graph of ϕ is a curve in space which lies on the surface of a cylinder. The
coordinates in space are given by t, x and y, and the axis of the cylinder is the
t-axis. If we project the curve into the xy-plane we get a circle. This is the image
of the morphism. The morphism, its graph and the projection are displayed in
Figure 16.
Graph(ϕ)
y
π3,1
t
x
Example 3.23
If we consider the plane curve X = V(y2 − x2 − x3 ), the so called Newton node, and
the map ϕ : A2K −→ A2K : (x, y) 7→ (x − 1, x + y), then we can compute ϕ(X):
on the whole of AnK when the morphism is nearly everywhere injective and its image
is closed. We then say that ϕ parametrises its image.
E.g. the morphism
ϕ : A1K −→ A3K : t 7→ t3 , t4 , t5
E) Exercises
Exercise 3.25
If f ∈ K[x] we call Xf = X \ V(f) a basic open subset of X. Show that every open
subset of X is a union of finitely many basic open subsets. One says that the basic
open subsets form a basis of the Zariski topology.
Exercise 3.26
Let X be an irreducible affine algebraic variety and U ⊆ X a non-empty open subset
of X. Then U is dense in X, i.e. its topological closure is all of X.
Exercise 3.27
Show that any two non-empty open subsets of AnK have a non-empty intersection.
34
Exercise 3.28
If X = V(x1 x2 − x3 x4 ) ⊂ A4C and U = X \ V(x1 , x3 ) then the function
x2
x3
, if x3 6= 0,
f : U −→ C : (x1 , x2 , x3 , x4 ) 7→ x4
x1
, if x1 6= 0
is well-defined and regular. However, it is impossible to write f as a quotient of two
polynomials on the whole of U!
Exercise 3.29
Let U = A2C \ V(y3 − y2 , y2 + y − 2). Are all regular functions on U globally given
by rational functions? If so, explain why, if not, give a counter example.
Exercise 3.30
Show that a regular function is continuous w.r.t. the Zariski topology.
Exercise 3.31
Let X ⊆ AnK be an affine algebraic variety with irreducible decomposition X =
X1 ∪ . . . ∪ Xk and let f ∈ K[x]. Show that the residue class of f is a zero-divisor in
K[X] if and only if f vanishes identically on some Xi .
Exercise 3.32
Let K be algebraically closed and U = A2K \ {0}. Show that OX (U) = K[x, y], i.e.
each regular function on U extends to a regular function on all of A2K .
Exercise 3.33 (Bijective morphisms need not be isomorphisms.)
Show that the morphism ϕ : A1C −→ A2C : t 7→ (t2 , t3 ) is bijective onto its image
Y = V(x3 − y2 ), but it is not an isomorphism, since the pull back
ϕ∗ : C[Y] = C[x, y]/hx3 − y2 i −→ C[t] : x 7→ t2 , y 7→ t3
is not surjective — t is not in its image.
Exercise 3.34
Let K be algebraically closed. Show that V(y − x2 ) ⊆ A2K is isomorphic to A1K .
Exercise 3.35
Which of the following algebraic sets are isomorphic?
A1C V(xy) ⊆ A2C V(x2 + y2 ) ⊆ A2C
V(x2 − y3 ) ⊆ A2C V(y − x2 , z − x3 ) ⊆ A3C .
Exercise 3.36
Define in Singular a the map
ϕ : Q[x, y] −→ Q[a, b, c] : x 7→ a2 − bc, y 7→ abc − 2
and compute the image of f = x2 − y2 .
Exercise 3.37
Compute the image of the morphism A2K −→ A3K : (s, t) 7→ (s, t, s2 +t2 ) and visualise
it with surfex.
35
Exercise 3.38
Compute the image of the morphism A2K −→ A3K : (s, t) 7→ (t2 − st, s2 − st, t2 − s2 )
and visualise it with surfex.
Exercise 3.39
Consider the variety X from exercise 2.63 and compute the vanishing ideal of its
projection under π10,7 .
Exercise 3.40
Let g1 , . . . , gm ∈ K[x]. Show that the topological closure of the image of
ϕ : AnK −→ Am
K : p 7→ (g1 (p), . . . , gk (p))
The next theorem shows that the elements in K[X]mp are precisely the germs of
regular functions at p.
Theorem 4.3 (The local ring of X at p)
∼ K[X]m .
Let X be an affine algebraic variety over K = K and p ∈ X, then OX,p = p
Example 4.4
The local ring of affine n-space at the origin is
∼ K[x]hx ,...,x i = f
OAnK ,0 = 1 n f, g ∈ K[x], g(0) 6= 0 .
g
Definition 4.5
Let X be an affine algebraic variety with irreducible components X1 , . . . , Xk and let
p ∈ X. We define the dimension of X locally at p as
dim(X, p) = max{dim(Xi ) | p ∈ Xi }
Idea of the proof: When localising at p all components which do not pass through
p are lost.
Example 4.7
Consider X = V(xz, yz) = V(z) ∪ V(x, y) and p = (0, 0, 1) ∈ V(x, y). Since only the
component V(x, y) contains p the dimension of X locally at p is 1. Moreover,
since after localising at hx, y, z − 1i the element z becomes a unit. The ring on the
right hand side has also dimension one. (See Figure 18.)
Remark 4.11
If X is an affine algebraic variety, p ∈ X and mp is the maximal ideal of the local
ring K[X]mp of X at p, then mp /m2p is a finite dimensional K-vector space generated
by x1 − p1 , . . . , xn − pn , so that
dimK mp /m2p ≤ n.
Example 4.14
Consider the affine algebraic variety X = V(x2 + y2 − z) and p = (1, 0, 1).
In the Singular code above we have loaded the library poly.lib to have the
command substitute at hand which allows to substitute values for the variables
x, y and z all at once. Moreover, we have used the command jacob in order to
compute the Jacobian matrix of the generators of I and we have used the command
syz in order to compute generators of the kernel of the Jacobian matrix. In Figure
19 we have translated the tangent space by the point p, and we have marked p by
a small green sphere.
Idea of the proof: The dimension of mp /m2p is by Nakayama’s Lemma the minimal
number of generators of mp and by Krull’s Principle Ideal Theorem this is an upper
bound for the length of a chain of prime ideals ending at mp , which is the dimension
of K[X]mp .
One expects of course that the tangent space to a geometric object has the same
dimension as the object itself. That is the regular behaviour, everything else is
irregular or singular.
Definition 4.16 (Regular and singular points)
Let X be an affine algebraic variety and p ∈ X. We call p regular if dim(X, p) =
dimK Tp (X), i.e. the dimension of X locally at p coincides with the dimension of the
tangent space to X at p. Otherwise we call p singular or a singularity, and that
means that dim(X, p) < dimK Tp (X). We denote by Reg(X) all regular points of X
and by Sing(X) all singular points of X.
Remark 4.17
If f1 , . . . , fk generate I(X) and f = (f1 , . . . , fk ), then p is regular if and only if
dim(X, p) = dimK Tp (X) = n − rank Df(p) .
This can be generalised even if we do not know that the fi generate the vanishing
ideal of X.
Theorem 4.18 (Jacobian Criterion)
Let X = V(f1 , . . . , fk ) ⊆ AnK with K = K and f = (f1 , . . . , fk ).
Then p ∈ X is regular if and only if
dim(X, p) ≥ n − rank Df(p) .
Idea of the proof: Choose polynomials g1 , . . . , gl such that the vanishing ideal is
I(X) = hf1 , . . . , fk , g1 , . . . , gl i. Setting F = (f1 , . . . , gl ) we have by definition
dimK Tp (X) = n − rank DF(p) ≤ n − rank Df(p) .
Corollary 4.19 (Jacobian Criterion for hypersurfaces)
If X = V(f) ⊆ AnK with K = K is a hypersurface and f ∈ K[x] is squarefree, then p
is a singular point of X if and only if
∂f ∂f
f(p) = (p) = . . . = (p) = 0.
∂x1 ∂xn
42
Idea of the proof: The hypersurface X has dimension n − 1 locally at each point,
so that a point on X is singular if and only if the Jacobian matrix of f at p has rank
zero, i.e. all partial derivatives vanish at p. That p ∈ X requires f(p) = 0.
Corollary 4.20 (The regular locus is open and dense in X.)
If X is an affine algebraic variety, then Reg(X) is open and dense in X.
In particular, Sing(X) is an affine algebraic variety.
Idea of the proof: Let I(X) = hf1 , . . . , fk i and f = (f1 , . . . , fk ). That the rank of
the Jacobian matrix Df(p) is smaller than a certain value can be expressed by the
vanishing of certain minors of the matrix. Thus Sing(X) has these minors and the
fi as equations.
Example 4.21
Newton’s node X = V(y2 − x2 − x3 ) ⊆ A2K is an irreducible curve and has thus
dimension one locally at each point. The singular points are thus those points on
the curve where the rank of the Jacobian is zero, i.e. where the Jacobian vanishes.
Thus the origin p = (0, 0) is the only singular point of X, i.e. it is the only point
where we have difficulties to say what the tangent line should be (see Figure 20).
Example 4.22
Consider the affine algebraic variety X = V(x2 − y3 + z2 , z − y2 ) ⊆ A2K . We want to
compute the dimension of X as well as its singular locus.
43
We have first checked that X is indeed an irreducible space curve. Then we defined
the Jacobian matrix of the given two equations, which is a 2 × 3-matrix. The
Jacobian Criterion says that a point p is singular if and only if the rank of the
Jacobian matrix is strictly smaller than n − dim(X, p) = 3 − 1 = 2. That is the case
if and only if the 2 × 2-minors of the Jacobian vanish. Thus the singular locus of X is
an algebraic variety which has the two equations in I together with the 2 × 2-minors
of the Jacobian as entries. We computed this ideal as JJ above. Then we computed
the associated primes of JJ, and it turns out, that the irreducible space curve X has
only the origin as singular point (see Figure 22).
Singular offers a short cut for the computation of JJ via the command slocus
from the library sing.lib.
Idea of the proof: If the curves X and Y meet transversally at p then f and g
generate the maximal ideal in K[x, y]mp .
Example 4.25
We can again compute the intersection multiplicity. For that we should move the
point p in question to the origin, since we want to compute in K[x, y]hx,yi .
E.g. we can compute the intersection multiplicity of the circle X = V(x2 + y2 − 1)
and the line Y = V(x − 1) at the intersection point p = (1, 0) as follows, where the
command vdim computes the vector space dimension of the K[x, y]hx,yi modulo the
given ideal:
multp (X ∩ Y) = 2,
and the line meets the circle non-transversally, which is not surprising since it is the
tangent line to the circle at this point.
Example 4.27
The multiplicity of V(f) at the origin is easy to compute with Singular via the
command mult, but one has to use a local ordering, since one should rather think
of f as a power series (see also Remark 4.29).
Idea of the proof: We consider just the case that Y = V(y) and p = (0, 0). From
the definition it is clear that
multp (f) · multp (y) = multp (f) ≤ multp f(x, 0) .
Moreover, for m = multp f(x, 0) we have
f(x, 0) = xm · u
for some unit u ∈ K[x]hxi , so that
multp (X ∩ Y) = dimK K[x, y]hx,yi /hf, yi
= dimK K[x, y]hx,yi /hf(x, 0), yi
= dimK K[x]hxi /hf(x, 0)i
= dimK K[x]hxi /hxm i = m.
It thus follows
multp (f) · multp (y) ≤ m = multp (X ∩ Y).
F) Local parametrisations
series ring. Thus, as long as we start with polynomial generators we can compute
in the power series ring K[[x, y]].
There is, however, one remarkable difference between the rings K[x, y]hx,yi and
K[[x, y]]. A polynomial f which is irreducible in K[x, y]hx,yi may very well decompose
into several irreducible factors in K[[x, y]]. These are then called the branches of the
plane curve locally at the origin. E.g. the polynomial f = y2 − x2 − x3 is irreducible
in R[x, y]hx,yi , but it decomposes in R[[x, y]] as
√ √
f= y−x· 1+x · y+x· 1+x
√
since 1 + x can be expanded into a power series using the Taylor formula. This
reflects the fact that in a small Euclidean neighbourhood of the origin the curve
V(y2 − x2 − x3 ) has two components, its branches (see Figure 23).
Figure 23. A plane curve with two branches locally at the origin
For the example of the curve given by f = y2 − x2 − x3 compute two branches and
their local parametrisations up to order 2. If we want to have a parametrisation up
a higher order we can extend the Hamburger-Noether expansion by the command
extdevelop.
Idea of the proof: Let us prove the statement in the case where V(g) is a line.
We may assume that g = y − ax so that
hf, gi = hf(x, ax), y − axi ✁ K[[x, y]].
If we now apply the coordinate transformation
∼
=
ϕ : K[[x, y]] −→ K[[x, y]] : x 7→ x, y 7→ y − ax
we see that
K[[x, y]]/hf, gi =K[[x, y]]/hf(x, ax), y − axi
∼
=K[[x, ∼ K[[x]]/hf(x, ax)i.
y]]/hf(x, ax), yi =
Note that t 7→ (t, at) is a primitive parametrisation of V(g) and if m = ordt (f(t, at))
is the order of f(t, at), then
f(x, ax) = xordx (f(x,ax)) · u = xm · u
for some unit u ∈ K[[x]], so that
K[[x]]/hf(x, ax)i = K[[x]]/hxm i.
But then
multp V(f) ∩ V(g) = dimK K[[x, y]]/hf, gi
= dimK K[[x]]/hxm i = m = ordt f(t, at)
as required.
Example 4.32 (Intersection multiplicities and local parametrisations)
Let f = x2 − 2xy + y2 − x − y, g = y2 − x2 − x3 and p = (0, 0).
> XY=param(HNE[2]);
> ord(substitute(f,x,XY[1],y,XY[2]));
2
> vdim(std(ideal(f,g)));
3
The computation shows that the first branch of g gives order 1 and the second
branch of g gives order 2 so that the intersection multiplicity of f and g in the origin
is 1 + 2. This was verified by computing the intersection multiplicity directly.
G) Exercises
Exercise 4.33
Let X = V(I) ⊆ A3C where
I =hx2 y + xy2 + xyz − xz2 − yz2 − z3 ,
x3 + 2x2 y + xy2 + x2 z + xyz − xz2 − yz2 − z3 − xz − yz − z2 ,
x2 z2 + xyz2 + xz3 − xyz − y2 z − yz2 i.
Show that the points p = (0, 0, 0) and q = (0, 1, 0) are contained in X and compute
the dimension of X locally at these points.
Exercise 4.34
Consider the space curve X given by the parametrisation
A1C −→ A3C : t 7→ (t3 , t4 , t5 ).
Compute the tangent space of X at the point (1, 1, 1). Visualise the space curve and
the tangent line at (1, 1, 1) with surfex.
Exercise 4.35
Check if the origin is a singular point of the variety X in Exercise 4.33.
Exercise 4.36
Compute the singular locus Sing(X) for X = V(x2 − y3 , x − y2 − z2 + 1).
51
Exercise 4.37
Compute for the following polynomials f and g the intersection multiplicity of X =
V(f) and Y = V(g) at p = (0, 0):
a. f = x3 + 4xy4 and g = x + y.
2
b. f = x2 + y2 + 3x2 y − y3 and g = x + 2y.
2
c. f = x2 + y2 + 3x2 y − y3 and g = y.
2
d. f = x2 + y2 + 3x2 y − y3 and g = y − x2 .
2
e. f = x2 + y2 + 3x2 y − y3 and g = y2 − x.
2
f. f = x2 + y2 + 3x2 y − y3 and g = y2 − x2 .
L1 ∩ L2 = {(1, 0)},
L3 = V(x − y + 1)
do not intersect at all, they are parallel. This distinction is rather unsatisfactory,
L1 L3
L1
L2
and projective geometry is a way to get around this problem by adding points, as
we say, at infinity.
P = (p0 : p1 : p2 ) = {λ · p | λ ∈ K} ∈ P2K
^ 2K in affine 3-space
Figure 26. The plane E=A
Each point P = (p0 : p1 : p2 ) ∈ P2R is a line through the origin in affine 3-space. The
line intersects E if and only if it is not contained in the xy-plane. Let us denote the
set of lines in the xy-plane by
P1K = {(p0 : p1 : 0) | (p0 , p1 ) 6= (0, 0)}
and call it the line at infinity, then with Uz = P2K \ P1K =E
^ we have
P2R =
^ Uz ∪· P1K = ^ A2K ∪· P1K .
^ E ∪· P1K =
Thus P2K is the affine plane together with some additional points — we will explain
in Example 5.9, why we call P1K a line.
Definition 5.5
A projective plane curve is the zero locus
V(F) = {P ∈ P2K | F(P) = 0} ⊂ P2K
of a non-constant homogeneous polynomial F ∈ K[x, y, z] \ K. If F is squarefree we
call deg(F) the degree of the projective plane curve and denote it by deg(V(F)).
Note that by abuse of notation we have used the same notation for the surface
V(F) = {p ∈ A3K | F(p) = 0} ⊂ A3K
which we call the cone over the corresponding projective curve. It should always be
clear from the context what V(F) actually means.
Moreover, any two planes EL and EL ′ in affine 3-space through the origin intersect
in a line Q through the origin. Translating this to the projective plane means that
any two lines L and L ′ in the projective plane intersect in a point Q. There are no
parallel lines as in the affine plane! The defect of the affine plane is resolved. (See
Figure 28.)
P2K = Ux ∪ Uy ∪ Uz ,
that is they form an open cover of the projective plane. We call Ux , Uy and Uz the
affine charts of P2K , and whenever we want to study a local property of the projective
plane or of projective curves at a point P, we can restrict to an affine chart which
contains the point P. But then we are in the affine setting and the affine theory
as explained in Section 4 applies. In particular, we can talk of tangent spaces, of
singularities and of intersection multiplicities multP (X ∩ Y) for two projective plane
curves X and Y at a point P ∈ X ∩ Y.
57
This is, however, somewhat unsatisfactory since one expects to see a curve, i.e. a
one dimensional object, rather than a surface. One can now intersect this surface
with the plane E in order to see a curve (see Figure 30.), but that would only be
the affine part of the curve, which again is somewhat unsatisfactory.
Figure 30. The affine cone and part of the curve V(xyz + x2 y − y3 )
In the following remark we explain how we can actually visualise the global picture.
Remark 5.12 (The sphere as a model for visualising P2R )
Any line through the origin meets the unit sphere in exactly two antipodal points.
We may thus identify the projective plane P2R with sets of antipodal pairs of points
on the unit-sphere. Moreover, the points on the upper hemisphere (omitting the
equator) are in one-to-one correspondence with the points in E=U ^ z , i.e. with the
points in the affine part of the projective plane, and the equator is the line at infinity,
where we have to identify antipodal points (see Figure 31).
This allows us to visualise a projective curve like V(xyz + x2 y − y3 ) ⊆ P2R (see
Figure 32). The affine plane curve in Figure 30 consists of a line and two branches
of a hyperbola. If we compare this to the curve in the upper hemisphere in Figure 32,
58
Figure 31. The unit sphere with the equator and a pair of antipodal points
we find there as well the line an the two branches of the hyperbola. However, the
line intersects the equator in two antipodal points which have to be identified, that
is, the open ends of the line are closed up by a point. Similarly, the two branches
of the hyperbola intersect the equator in two sets of antipodal points which means
that one end of one of the branches is connected to one end of the other branch.
Topologically the hyperbola thus becomes an ellipse. Altogether this reflects the fact
that projective curves or more generally projective algebraic varieties are compact.
The following theorem counts the number of intersection points of two projective
plane curves with multiplicity and claims that the result does only depend on the
degree of the two curves.
Theorem 5.13 (Bézout)
Let X and Y be two projective plane curves without a common component and K = K,
then X
multP (X ∩ Y) = deg(X) · deg(Y).
P∈X∩Y
In particular, X and Y must intersect.
Idea of the proof: Let us prove the statement in the special case where Y = V(y)
is the x-axis and X ∩ Y has no point on the line at infinity. We thus have deg(Y) = 1
and if X = V(F) for some squarefree homogeneous polynomial F, then
deg(X) = deg(F) = deg(f) = deg f(x, 0)
59
and that the polynomial f(x, 0) ∈ K[x] factorises into linear factors
ϕ : x 7→ x + ci , y 7→ y
so that
Y
f(x, 0) 7→ f(x + ci , 0) = c · xmi · (x + ci − cj )mj .
j6=i
Example 5.14
Let us consider the two plane quadrics
Ct = V x2 + t · y2 − z2 ⊂ P2R
and
C ′ = V 4xy − z2 ⊂ P2R ,
where the parameter t varies in the interval [1, 4]. In order to compute the points
of intersection of Ct and C ′ we insert z2 = 4xy into the equation x2 + t · y2 − z2 = 0.
This leads to
x2 + t · y2 − 4xy = 0,
60
or alternatively
(x − 2y)2 = (4 − t) · y2 .
Taking square roots on both sides we get two solutions
√
x = 2 ± 4 − t · y.
and taking square roots on both sides gives the four solutions
√
q
z = ± 8 ± 4 4 − t · y.
Note that only for t < 4 the points are pairwise different. If t = 4 then the points
P1 and P2 coincide as do the points P3 and P4 . That means we only get two points
of intersection. Note also that in the latter case the tangents to C4 and C ′ in P1
coincide and the same holds in P3 . The common tangent of C4 and C ′ in P1 is
V(4x + 8y − 16z). The intersection multiplicity of C4 and C ′ in P1 as well as in P3 is
two, so that the statement of the Theorem of Bézout works out in this case as well
even though the base field R is not algebraically closed. (See Figure 33.)
Idea of the proof: The lines through the point p are actually a P1K . By the The-
orem of Bézout each of these lines L intersects X in exactly one further point, since
X
d = deg(X) · deg(L) = multP (X ∩ L) + multQ (X ∩ L)
P6=Q∈X∩L
and multP (X∩L) ≥ multP (X) = d−1. Thus we can associate to the line L (considered
as a point in P1K ) this additional intersection point. That gives the parametrisation.
Remark 5.16
We can actually compute a parametrisation as above using the following Singular
procedure if P = (0 : 0 : 1).
ynumerator=ynumerator*s^(d-deg(ynumerator));
denominator=denominator*s^(d-deg(denominator));
return(list(string(xnumerator),string(ynumerator),string(denominator)));
}
example
{ "EXAMPLE:";echo = 2;
ring RING=0,(x,y,z),lp;
poly F=x3+y3-3xyz;
parametrisiere(F);
}
If we apply the procedure to the Newton node V(y2 z − x2 z − x3 ) we get the following
parametrisation.
F) Exercises
Exercise 5.17
Check the Theorem of Bézout for the projective plane curves V(F) and V(G) with
F = y2 z − x · (x − z) · (x − 2z)
and
G = y2 + 2x2 − 2xz.
Visualise both curves and their intersection in the sphere model of the projective
plane.
Exercise 5.18
Compute a parametrisation of the projective plane curve
Exercise 5.19
Find more examples of plane curves of degree d with one singular point of multi-
plicity d − 1 and compute parametrisations for these.
Exercise 5.20
Let V(F) be a projective plane curve and let P be a regular point on V(F). Show
that the projective closure of the tangent line of V(F) at P is
∂F ∂F ∂F
V (P) · x + (P) · y + (P) · z .
∂x ∂y ∂z
64
6 Projective varieties
In this section we want to generalise the results from Section 5 to arbitrary projective
varieties. We will not be able to treat this Section in the lectures of this summer
school, however. Consider it as an additional reading which may complete the
picture on basic facts about algebraic geometry introduced throughout this course.
we see that
^ nK ∪· PKn−1
PnK =A
is a disjoint union of a copy of affine n-space and of projective n − 1-space.
The latter is often called the affine cone over the corresponding projective algebraic
variety, and one has to understand from the context which one is meant.
Since the intersection and the sum of homogeneous ideals is again homogeneous the
Zariski topology generalises to projective n-space.
Proposition 6.10 (Zariski topology on PnK )
The collection of all projective algebraic varieties in PnK is a topology.
Remark 6.11
Given a polynomial f ∈ K[x0 , . . . , xi−1 , xi+1 , . . . , xn ] of degree d we define its ho-
mogenisation with respect to xi as
fhi = xdi · f xx0i , . . . , xi−1
xi
, xi+1
xi
, . . . , xn
xi
∈ K[x0 , . . . , xn ]
Proposition 6.12
a. If I is an ideal in K[x0 , . . . , xi−1 , xi+1 , . . . , xn ] and X = V(I) ⊆ AnK , then the
topological closure of φi (X) in PnK is the vanishing set of Ihi .
b. If I is a homogeneous ideal in K[x0 , . . . , xn ] and X = V(I) ⊆ PnK , then φ−1
i (X) =
d n
V(Ii ) ⊆ AK .
Corollary 6.13
The affine charts φi : AnK ֒→ PnK are continuous.
Remark 6.14
The ideals hx0 , . . . , xn i and K[x] are both homogeneous radical ideals and their pro-
jective vanishing set is empty. But this is the only ambiguity of this sort when
considering a projective version of Hilbert’s Nullstellensatz. Note that any homoge-
neous ideal which is not the whole ring is contained in the ideal hx0 , . . . , xn i.
Analogously to the affine case we can define a homogeneous vanishing ideal
for a subset X ⊆ PnK , and I(X) will be a radical ideal. Moreover, we call the graded
K-algebra
K[x]/I(X)
the coordinate ring of the projective algebraic variety X, if X is a projective algebraic
variety.
Remark 6.16
One defines the notion of irreducibility for projective algebraic varieties analogous
to the same notion for affine algebraic varieties, and it turns out that a projective
algebraic variety is irreducible if and only if its vanishing ideal is prime. Also, the
associated prime ideals of I(X) give the irreducible components of X as in the affine
case. The dimension of a projective algebraic variety can be defined analogously to
that of an affine algebraic variety, and if K = K then dim(X) = dim K[X] − 1, i.e. the
dimension of the variety coincides with that of its coordinate ring minus one. The
minus one reflects the fact that a point in projective space is line in affine space.
Example 6.22
The analogous statements for affine algebraic varieties is wrong, as the image of
V(xy − 1) ⊆ A2K under the projection to the x-axis is not closed in A1K .
I[3]=x2-wy
> hilbPoly(I);
1,3
> dim(groebner(I));
2
We first compute the ideal of the image of the parametrisation in the ring
K[w, x, y, z, s, t] and we then map with the command fetch to the ring K[w, x, y, z].
There we compute the Hilbert polynomial and get
3 1
HPX = · t + = 3t + 1.
1! 1!
This shows in particular that X = V(I) is a curve in projective 3-space of degree
3. We finally verified that the dimension is 1 by computing the dimension of the
coordinate ring which should be one more than the dimension of the projective
algebraic variety.
In the projective case one passes to some affine chart which contains the point.
Example 6.32
Intersecting V(wz − xy) with V(w3 + x3 + y3 + z3 ) in P3C we get a space curve of
degree 6.
[4]:
1
[3]:
[1]:
(-0.88699321-i*0.12160413)
[2]:
(4.27719681-i*3.52651968)
[3]:
(5.19189141+i*1.945666)
[4]:
1
73
This short introduction to the computer algebra system Singular does not claim
to be complete. It introduces step by step basic structures and commands in Singu-
lar. The introduction is not written in a strictly systematic manner. Therefore, for
a systematical and complete documentation of Singular, we refer to the manual
[DGPS10]. Anyone wishing to install Singular on their personal computer can
find the sources and the installation instructions on the Singular home page:
http://www.singular.uni-kl.de
1) First steps
• Singular input and output as well as set words will be written in typewriter
face, e.g. exit; oder help.
• The symbol 7→ starts Singular output, e.g.:
int i=5;
i;
7→ 5
• Square brackets mark the parts of the syntax which are optional, that is, can
be left out. E.g.
pmat(M[,n]);
The above command, a procedure of the library matrix.lib is used to show
a matrix M as a formatted matrix. The optional parameter n defines the width
of the columns. If this is missing, a standard value will be used.
• Keys are also shown in typewriter face, such as:
n (press the key n),
RETURN (press the enter key),
CTRL-P (press the control key and P simultaneously).
1.2 Starting and terminating Singular. Obviously, the first question is, how does
one start the programme and how can it be terminated? Singular is started by
using the command
Singular
The semicolon tells the computer that the input is to be interpreted and, if this is
successful, be carried out. The programme comes up with a result (possibly an error
notification) followed by a new input prompt. Should the user forget the semicolon,
Singular shows this with an input prompt ., in words a dot, and enables further
inputs, such as the missing semicolon. In this way it is possible to stretch longer
commands over several lines.
1.3 The online help help. The next most important information after the start
and terminate commands is how to find help. Here Singular offers the command
help, or in short ?. Using the command help followed by a Singular command,
a Singular function or procedure name or a Singular library, information to
the respective objects are shown. For the libraries one receives a list of the proce-
dures contained therein, for commands, functions and procedures their purpose is
explained as well as their syntax and one gets examples.
Examples:
help exit;
help standard.lib;
help printf;
By default an internet browser will be opened and the help will be displayed. Via
self–explanatory buttons the entire handbook is available.
1.4 Interrupt Singular. Under Unix–like operating systems and under Windows,
it is possible, via the key combination CTRL-C, to force an interruption in Singular.
Singular reacts with an output of the currently performed command and awaits
further instructions. The following options are available:
a Singular carries out the current command and returns then to top level,
c Singular carries on,
q the programme Singular is terminated.
1.6 Procedures. The user can create new commands in Singular. These are called
procedures. The syntax of a procedure is fairly simple:
proc PROCEDURENAME [PARAMETERLIST]
{
PROCEDUREBODY
}
For PROCEDURENAME, any not otherwise resevered sequence of letters can be used.
The types and names of the arguments which are passed on to the procedure are
laid down in the PARAMETERLIST. The PARAMETERLIST should be encased in round
brackets. The PROCEDUREBODY contains a sequence of Singular code. If the proce-
dure is to return a result, the result should be stored in a variable result and the
procedure should terminate with the command return(result);.
An example is more useful than thousands of words:
proc permcol (matrix A, int c1, int c2)
{
matrix B=A;
B[1..nrows(B),c1]=A[1..nrows(A),c2];
B[1..nrows(B),c2]=A[1..nrows(A),c1];
return(B);
}
The procedure permcol should exchange two columns of a matrix. For this three
arguments are necessary. The first argument of name A is of type matrix, the two
following arguments c1 and c2 are of type int. Singular instructions follow and
the result is stored in the variable B of type matrix, which is then returned with
return(B);. This means, in particular, that the result of the procedure is of type
matrix.
76
A procedure can be invoked by entering the procedure name, followed by the argu-
ments in round brackets. E.g.
LIB "matrix.lib"; LIB "inout.lib";
ring r=0,(x),lp;
matrix A[3][3]=1,2,3,4,5,6,7,8,9;
pmat(A,2);
7→ 1 2 3
4 5 6
7 8 9
matrix B=permcol(A,2,3);
pmat(B,2);
7→ 1 3 2
4 6 5
7 9 8
Variables, which are defined within a procedure, are only known there and may,
therefore, have the same name as objects which are defined outside the procedure.
1.7 Libraries. To make procedures available for more than one Singular session,
it makes sense to store them in files, which can be loaded as Singular libraries.
The library names always have the ending .lib. Libraries are read into Singular
through the command LIB followed by library name enclosed in ", such as
LIB "123456.lib";
(Library names should, if possible, only consist of eight letters, to guarantee com-
patibility with systems such as Dos!) If they are not builtin Singular libraries,
then they should be in the subdirectory from which Singular is started.
Of course, a library must conform to certain syntax rules, and procedures, which
are stored in libraries, should be extended by two explanatory additions. We show
this in an example:
////////////////////////////////////////////////////////////////////
version="1.0";
info="
LIBRARY: linalgeb.lib FIRST STEPS IN LINEAR ALGEBRA
AUTHOR: Thomas Markwig, email: [email protected]
PROCEDURES:
permcol(matrix,int,int) permutes columns of the matrix
permrow(matrix,int,int) permutes rows of the matrix
";
////////////////////////////////////////////////////////////////////
LIB "inout.lib";
77
////////////////////////////////////////////////////////////////////
proc permcol (matrix A, int c1, int c2)
"USAGE: permcol(A,c1,c2); A matrix, c1,c2 positive integers
RETURN: matrix, A being modified by permuting column c1 and c2
NOTE: space for important remark
can be stretched over several lines
EXAMPLE: example permcol; shows an example"
{
matrix B=A;
B[1..nrows(B),c1]=A[1..nrows(A),c2];
B[1..nrows(B),c2]=A[1..nrows(A),c1];
return(B);
}
example
{
"EXAMPLE:";
echo = 2;
ring r=0,(x),lp;
matrix A[3][3]=1,2,3,4,5,6,7,8,9;
pmat(A);
pmat(permcol(A,2,3));
}
.
.
.
If a double slash // in a line appears, the rest of the line is interpreted as a comment
and ignored.
The first section is the head of the library. The first line contains the reserved
name version, through which the version number of the library is fixed. General
information to the library follows the reserved name info.
It should be noted that under the item PROCEDURES: all procedure names are listed
with a one-line description.
Singular shows this part when the help command is called on the library, that is
help linalgeb.lib;
It should also be noted that strings are allocated to version and info by means of
the sign of equality, =, so that the " are just as necessary as the semicolon at the
end of the line!
Section two serves the loading of further libraries, whose procedures one wants to
use. As an example, the library inout.lib is loaded, whose procedure pmat is used
in the example part of the procedure permcol.
78
In the third section the procedures follow one by one. (It should be noted that the
command proc always has to be at the start of a new line!)
It is recommended that the Syntax in section 1.6 is extended by two sections for
procedures. A commentary block can be inserted between the procedure head and
body, enclosed in ", which contains certain key words followed by the relative infor-
mation. Under USAGE: should be shown how the command is invoked and of which
type the arguments are. RETURN: should contain information on the type of the
return value and, if necessary, further information. NOTE: is used to show important
comments to the procedure, its use, etc. EXAMPLE: shows how an example of the use
of the procedure can be displayed in Singular. The commentary block contains
the information which is shown when the help command is called for the procedure,
e.g. through
help permcol;
The second additional section at the end of the procedure is initiated through the
reserved name example, followed by a section in curly brackets which contains the
Singular code. The aim is to show an example for the operation of the procedure
which explains its use to the user. The user obtains the example by entering example
PROCEDURENAME;.
1.8 Write to files / read from files. The command write offers the possibility to
store the values of variables or any string in a file. For this, the variable values are
converted to strings. The following lines store variable values, resp. a string, in the
file hello.txt:
int a=5;
int b=4;
write("hello.txt",a,b);
write("hello.txt","This is Singular.");
Several variables or strings can be stored at a time, separated by commas. The
value of each variable is written in a separate line.
Data contained in a file can be read in by the command read. They are, however,
interpreted as strings, e.g.
read("hello.txt");
7→ 5
4
This is Singular.
Should Singular code, which is read in from a file, be recognised as such, then the
read command must be passed on to the command execute. If the file hello.txt
contains the following lines,
4*5-3;
6/3;
79
execute(read("hello.txt"));
leads to the following Singular output:
7→ 17
2
A short form for execute(read(...)) is <, e.g.
< "hello.txt";
monitor("hello.txt","io");
The option "io" causes input as well as output to be stored. The omission of one
of the letters leads to only the input or only the output being stored. The option
monitor is very helpful when working on an operating system on which Singular
is instable.
Please note that monitor opens a file, but does not terminate it. This can be done
by the following input:
monitor("");
At the first glance it might seem as though the matrices im and m are identical. For
Singular that is not the case as they are of different types!
int i=1;
or later,
int i;
.
.
.
i=2;
3.2 Loops. There are two types of loops, the for and the while loop.
The for loop is used typically, if a command sequence is to be performed several
times and the number of times is known beforehand. E.g.
int s=0;
int i;
for (i=1; i<=10; i=i+1)
{
s=s+i;
}
The command sequence in curly brackets are the commands executed when passing
the loop. The commands in round brackets determine how often the loop is to be
passed. The first entry fixes the control variable and is here of type int; the second
entry shows the termination condition, i.e. the loop is passed through as long as this
condition is fulfilled; the third entry fixes how the control variable should change in
each passage. The example computes the sum of the first ten natural numbers.
while loops are used, when the number of passages is not a priori clear. E.g.
int s=10000;
int i=1;
while (s > 50)
{
i=i*i;
s=s-i;
}
Again the command sequence is shown in curly brackets, whilst the termination
conditions are shown in round brackets. As long as these show the value TRUE, the
loop is performed.
The termination condition is checked before the first entry into the loop.
82
3.5 Some further operators in Singular. As we have already seen, the operators
may depend on the data types.
boolean: For boolean variables, the connecting operators and and or as well as
the negating operator not are defined.
not ((1==0) or (1!=0));
7→ 0
int: For integers the operations +, - and * are entirely clear. ^ means raising
to some power
int i=4;
i^3;
7→ 64
The commands div and mod are more difficult, whereby the first is synonymous
to /. If, for two integers, a division with remainder is performed, then mod
supplies the remainder, and div the result without remainder. E.g. 7 = 2∗3+1,
also
7 div 3;
7→ 2
7 mod 3;
7→ 1
83
list: The following operators are given for the data type list.
+ Combines the elements of two lists.
delete Deletes an element from a list, delete(L,3) deletes the third
element of the list L.
insert Inserts an element into a list. insert(L,4) inserts the ele-
ment 4 at the start of the list L, insert(L,4,2) inserts four
into into the second position.
matrix: The operators +, - and * are available with their obvious meaning. We
show, by examples, how single entries of a matrix, resp. whole lines or columns
of a matrix, can by accessed:
matrix m[2][3]=1,2,3,4,5,6;
print(m);
7→ 1,2,3,
4,5,6
m[1,2];
7→ 2;
m[1,1..3];
7→ 1 2 3
m[1..2,3];
7→ 3 6
Singular has a quite notable arsenal of functions available, which are, in part,
integrated in the Singular core, in part made available via libraries. We only wish
to show a small selection of function names, which are useful for computations in
linear algebra. Information on their syntax can be found via help or in the manual.
4.1 Functions which are connected to the data type matrix. ncols, nrows,
print, size, transpose, det, as functions in the core of Singular. Fur-
thermore there are the functions of the library matrix.lib, in particular
permrow, permcol, multrow, multcol, addrow, addcol, concat, unitmat,
gauss row, gauss col, rowred, colred. Also the function pmat from the library
inout.lib is interesting.
4.2 Functions which are connected to the data type int. random, gcd, prime as
functions in the core of Singular.
There are many editors in which Singular procedures and libraries can be written.
On Unix or similar systems the editor emacs (oder Xemacs) should be considered, as
it simplifies the entered code through using coloured highlighting of the key words,
and they offer many options which simplify editing and error correction.
84
There is another reason for the recommendation to use Emacs. Singular can be
started in a special Emacs mode, as ESingular. This means that first the editor
Emacs is started and then inside Emacs the programme Singular. The advantage
is that apart from the full functionality of the editor Emacs for editing files, a bunch
of further options can be made available, which simplify the use — in particular for
the inexperienced user, for whom pulldown menu buttons are available. By calling
ESingular --emacs=xemacs
it is possible to fix the version of Emacs which is to be used, in this case Xemacs.
6) Exercises
Exercise A.1
Write a procedure binomi, which reads in two natural numbers n and k and returns
the binomial coefficient nk . (Convention, if k < 0 or k > n, then nk = 0.)
Exercise A.2
Write a procedure squaresum, which reads in the natural number n and returns the
sum of the square numbers 12 , 22 , 32 , . . . , n2 .
Exercise A.3
Write a procedure minimum, which reads in a vector of natural numbers and returns
the minimum of the numbers.
Exercise A.4
Write a procedure rowsumnorm, maximumnorm and q eukl norm, which read in a
(m × n) matrix A of real numbers and calculate
a. the row summmation norm of A (i.e. maxi=1,...,m Σnj=1 |Aij | ),
b. the maximum norm of A (i.e. max |Aij | i = 1, . . . , m, j = 1, . . . , n ), respec-
tively
c. the square of the euclidian norm of A (i.e. Σi,j |Aij |2 ).
Use the function abs from the library linalg.lib for the absolute value.
7) Solutions
}
else
{
int i;
int denominator,nominator1,nominator2 = 1,1,1;
for (i=1;i<=n;i++)
{
denominator = denominator * i;
}
for (i=1;i<=k;i++)
{
nominator1 = nominator1 * i;
}
for (i=1;i<=n-k;i++)
{
nominator2 = nominator2 *i;
}
return (denominator / (nominator1 * nominator2));
}
}
example
{
"Example:";
echo = 2;
binomi(5,2);
binomi(7,5);
}
for (i=1;i<=n;i++)
{
result = result + i*i;
}
return (result);
}
}
example
{
"Example:";
echo = 2;
squaresum(3);
squaresum(5);
}
minimum(iv);
}
{
r = r + abs(A[i,j]) * abs(A[i,j]);
}
}
return (r);
}
example
{
"Example:";
echo = 2;
ring r=real,x,lp;
matrix A[3][2]=-3,-2,-1,3,-4,2;
print(A);
q eukl norm(A);
ring r=0,x,lp;
matrix B[3][2]=-7,0,0,3,-4,2;
print(B);
q eukl norm(B);
}
The programme surfex (see [HL08]) offers a graphical interface to visualise algebraic
surfaces in 3-space and curves on such surfaces. One can either start surfex directly
or one can invoke it from within a Singular session. If you should want to invoke
surfex from within Singular then you have to load the library surfex.lib first.
The Singular command to plot a surface would then be plotRot. We demonstrate
this with for the polynomial f = x2 − y2 · (t2 − y).
SINGULAR /
A Computer Algebra System for Polynomial Computations / version 3-1-2
0<
by: W. Decker, G.-M. Greuel, G. Pfister, H. Schoenemann \ Oct 2010
FB Mathematik der Universitaet, D-67653 Kaiserslautern \
> ring r=0,(t,x,y),dp;
> poly f=x^2-y^2*(t^2-y);
> LIB "surfex.lib";
> plotRot(f);
The command plotRot starts the programme surfex and opens three new windows
(see Figure 34). The leftmost window contains the equation of the surface as well
as most of the control buttons to direct the programme; the upper right window
90
allows to rotate the surface and to zoom in and out; the third window displays the
surface.
If you start surfex from within Singular your Singular session is interrupted
as long as surfex is running. In order to continue in Singular you have to shut
down surfex. Moreover, you should be aware that your Singular variables will
be renamed, so that the first variable becomes x, the second y and the third z. In
the above example the variable t becomes x, x becomes y and y becomes z. The
polynomial x2 − y2 · (t2 − y) is thus transformed into y2 − z2 · (y2 − z).
As mentioned above one can use surfex in order to cut two surfaces and to draw
the intersection curve on one of the two surfaces. We show this for the surface
V(y2 − z2 · (y2 − z)) and the plane V(x − 1). In Figure 35 we added besides the
polynomial y2 − z2 · (y2 − z), that could already be seen in Figure 34 the polynomial
x − 1 by using the button add eqn. Both polynomials can be seen in the third part
of the control window, and both surfaces are displayed in the left part of Figure 36.
There you can also see the intersection curve in black. In order to produce this we
have used the button add curve. By this we got the option to choose some numbers
in the fourth part of the control window. We chose the numbers 1 and 2. This means
that on the surface given by the polynomial f1 the intersection curve that we get
by intersecting this surface with the surface given by the polynomial f2 should be
drawn. In the right part of Figure 36 only the surface V y2 − z2 · (y2 − z) and the
intersection curve can be seen. This is achieved by removing the hook in front of
the polynomial x − 1 in the control window of surfex (see Figure 35). For further
details on the use of surfex we refer to the manual [HL08] and to the surfex web
page:
http://www.surfex.algebraicsurface.net
91
Figure 35. The intersection of V y2 − z2 · (y2 − z) and V(x − 1)
Figure 36. The intersection of V y2 − z2 · (y2 − z) and V(x − 1)
References
[CLO97] David Cox, John Little, and Donal O’Shea, Ideals, varieties, and algorithms, 2nd ed.,
Springer, 1997.
[DGPS10] Wolfram Decker, Gert-Martin Greuel, Gerhard Pfister, and Hans Schönemann,
Singular 3-1-1 — A computer algebra system for polynomial computations,
Tech. report, Centre for Computer Algebra, University of Kaiserslautern, 2010,
http://www.singular.uni-kl.de.
[Eis96] David Eisenbud, Commutative algebra with a view toward algebraic geometry, Graduate
Texts in Mathematics, no. 150, Springer, 1996.
[Gat03] Andreas Gathmann, Algebraic geometry, Lecture Notes, 2003.
[GP08] Gert-Martin Greuel and Gerhard Pfister, A Singular introduction to commutative
algebra, 2nd ed., Springer, 2008.
92