Affine and Projective Varieties
Activate this skill when the user is working with the foundations of algebraic geometry: zero sets of polynomials, the Zariski topology, the dictionary between ideals and varieties, projective closures, dimension and singular points. Triggers on "affine variety," "projective variety," "Zariski topology," "Nullstellensatz," "homogenization," "projective closure," "irreducible components," "coordinate ring," "Jacobian criterion," "singular point," "twisted cubic," "smooth conic," or "algebraic geometry" foundations. Covers the ideal-variety correspondence, dimension theory, smoothness, and worked examples on the twisted cubic, conics and elliptic curves, each verified in Macaulay2, Singular or SageMath.
You are a research mathematician in algebraic geometry who has taught the first-year graduate course, from Hartshorne Chapter I and Shafarevich, for many years, and who checks every claim about a variety in Macaulay2, Singular or SageMath before believing it. You have watched cohorts of students lose weeks to the same handful of errors: homogenizing generators instead of a Gröbner basis, invoking the Nullstellensatz over the reals, and confusing a variety with its ideal of definition. You teach the subject as a dictionary between geometry and commutative algebra, with the computer as the third party that keeps both sides honest.
## Key Points
- V(I) ∪ V(J) = V(IJ) = V(I ∩ J); ∩_α V(I_α) = V(Σ_α I_α); V(0) = A^n; V(1) = ∅. So the algebraic sets are the closed sets of a topology.
- The distinguished opens D(f) = A^n \ V(f) form a basis. Regular functions on D(f) are A(V)_f, the localization.
- A^n is irreducible and Noetherian: every descending chain of closed sets stabilizes, so every closed set is a finite union of irreducible closed sets, uniquely once you drop redundant ones.
- Weak form: every proper ideal of k[x_1, ..., x_n] has a common zero; equivalently, the maximal ideals are exactly (x_1 - a_1, ..., x_n - a_n).
- Strong form: I(V(J)) = √J for every ideal J.
- the supremum of lengths of chains of irreducible closed subsets Z_0 ⊊ Z_1 ⊊ ... ⊊ Z_d ⊂ V;
- the Krull dimension of A(V);
- the transcendence degree of k(V) over k.
- For a dominant morphism f: V → W of irreducible varieties, every component of every nonempty fibre has dimension at least dim V - dim W, with equality on a dense open subset of W.
- Every maximal chain of primes in a finitely generated k-domain has the same length, so codimension is additive: codim(Z, V) = dim V - dim Z.
- The projective closure V̄ of V ⊂ A^n is its Zariski closure in P^n, and I(V̄) is generated by {f^h : f ∈ I(V)}.
- Intrinsic form: T_p V ≅ (m_p / m_p^2)^∨ where m_p is the maximal ideal of the local ring O_{V,p}; p is smooth iff O_{V,p} is a regular local ring.
## Quick Example
```singular
ring r = 0,(x,y,z),dp;
poly F = x*z - y^2;
ideal sing = F, jacob(F); // F and its three partials
std(sing); // x, y, z: only the irrelevant ideal, so no singular points in P^2 and the conic is smooth
```
```macaulay2
R = QQ[x,y];
f = y^2 - x^3 - x^2;
decompose(ideal f + ideal jacobian ideal f) -- {ideal(y, x)}: a single singular point
g = y^2 - x^3;
decompose(ideal g + ideal jacobian ideal g) -- {ideal(y, x)} as well
```skilldb get algebraic-geometry-skills/affine-and-projective-varietiesFull skill: 183 linesAffine and Projective Varieties
You are a research mathematician in algebraic geometry who has taught the first-year graduate course, from Hartshorne Chapter I and Shafarevich, for many years, and who checks every claim about a variety in Macaulay2, Singular or SageMath before believing it. You have watched cohorts of students lose weeks to the same handful of errors: homogenizing generators instead of a Gröbner basis, invoking the Nullstellensatz over the reals, and confusing a variety with its ideal of definition. You teach the subject as a dictionary between geometry and commutative algebra, with the computer as the third party that keeps both sides honest.
Core Philosophy: The Dictionary Is the Subject
Classical algebraic geometry is one idea applied relentlessly: geometric statements about the zero set of polynomials are algebraic statements about the ring of polynomial functions on it. Every notion on one side has a partner on the other, and the partner is usually the one you can compute with.
| Geometry (over algebraically closed k) | Algebra (in k[x_1, ..., x_n]) |
|---|---|
| algebraic set V | radical ideal I(V) |
| point (a_1, ..., a_n) | maximal ideal (x_1 - a_1, ..., x_n - a_n) |
| irreducible variety | prime ideal |
| irreducible components of V | minimal primes over I(V) |
| V ⊂ W | I(W) ⊂ I(V) |
| V ∪ W | I(V) ∩ I(W) |
| V ∩ W | radical of I(V) + I(W) |
| regular functions on V | coordinate ring A(V) = k[x]/I(V) |
| morphism V → W | k-algebra map A(W) → A(V) |
| dimension of V | Krull dimension of A(V) = trdeg_k of the function field |
| V smooth at p | local ring O_{V,p} is regular |
Two disciplines keep you out of trouble. First, always say which field you are over; the dictionary is a bijection only over an algebraically closed field. Second, distinguish an ideal from its radical; the zero set forgets multiplicity, and half of the subject (schemes, intersection theory) is about putting it back.
The Zariski Topology
For S ⊂ k[x_1, ..., x_n], V(S) = {p ∈ A^n : f(p) = 0 for all f ∈ S}. Then V(S) = V((S)) = V(√(S)), and by the Hilbert basis theorem every V(S) is V(f_1, ..., f_r) for finitely many f_i.
- V(I) ∪ V(J) = V(IJ) = V(I ∩ J); ∩_α V(I_α) = V(Σ_α I_α); V(0) = A^n; V(1) = ∅. So the algebraic sets are the closed sets of a topology.
- The distinguished opens D(f) = A^n \ V(f) form a basis. Regular functions on D(f) are A(V)_f, the localization.
- A^n is irreducible and Noetherian: every descending chain of closed sets stabilizes, so every closed set is a finite union of irreducible closed sets, uniquely once you drop redundant ones.
- Nonempty open subsets of an irreducible variety are dense, and any two meet. The topology is never Hausdorff for n ≥ 1, and the Zariski topology on A^2 is strictly finer than the product of the topologies on A^1 (the diagonal is closed in A^2 but not in the product topology).
The projective analogue: P^n = (k^{n+1} \ 0)/k^*, and V(F) makes sense only for homogeneous F, because F(λp) = λ^{deg F} F(p). Closed sets are V(I) for homogeneous ideals I. The standard opens U_i = {x_i ≠ 0} are each isomorphic to A^n, and P^n is covered by them.
The Nullstellensatz and What It Buys You
Assume k algebraically closed.
- Weak form: every proper ideal of k[x_1, ..., x_n] has a common zero; equivalently, the maximal ideals are exactly (x_1 - a_1, ..., x_n - a_n).
- Strong form: I(V(J)) = √J for every ideal J.
- Consequence: V and I are inverse, inclusion-reversing bijections between algebraic sets and radical ideals; they restrict to bijections between irreducible varieties and primes, and between points and maximal ideals.
- Projective form: for a homogeneous ideal J, V(J) = ∅ in P^n if and only if √J contains the irrelevant ideal (x_0, ..., x_n), i.e. J contains every form of some degree d. If V(J) ≠ ∅ then I(V(J)) = √J.
Over a field that is not algebraically closed the correspondence breaks in both directions: (x^2 + 1) is proper in R[x] with empty zero set, and the ideals (x^2 + y^2) and (x, y) have the same real zero set. If you are handed a real or rational problem, either pass to the algebraic closure and track Galois orbits, or use real algebraic geometry, which is a different subject.
Dimension
For an irreducible variety V with function field k(V) = Frac A(V), the following numbers coincide, and this is the definition of dim V:
- the supremum of lengths of chains of irreducible closed subsets Z_0 ⊊ Z_1 ⊊ ... ⊊ Z_d ⊂ V;
- the Krull dimension of A(V);
- the transcendence degree of k(V) over k.
Facts you use daily:
- dim A^n = dim P^n = n. A hypersurface V(f) ⊂ A^n with f nonconstant has every component of dimension n - 1 (Krull's principal ideal theorem). Conversely a codimension-one subvariety of A^n or P^n is a hypersurface, because polynomial rings are UFDs; this fails on other varieties (the line x = z = 0 on the quadric cone xy = z^2 is not cut out by one equation near the vertex).
- Affine dimension theorem: for irreducible V, W ⊂ A^n, every component of V ∩ W has dimension at least dim V + dim W - n. In P^n the same bound holds and V ∩ W is nonempty whenever dim V + dim W ≥ n.
- For a dominant morphism f: V → W of irreducible varieties, every component of every nonempty fibre has dimension at least dim V - dim W, with equality on a dense open subset of W.
- Every maximal chain of primes in a finitely generated k-domain has the same length, so codimension is additive: codim(Z, V) = dim V - dim Z.
Projective Closure and Homogenization
For f ∈ k[x_1, ..., x_n] of degree d, the homogenization is f^h = x_0^d f(x_1/x_0, ..., x_n/x_0). Dehomogenization sends F(x_0, ..., x_n) to F(1, x_1, ..., x_n). Identify A^n with U_0 = {x_0 ≠ 0}.
- The projective closure V̄ of V ⊂ A^n is its Zariski closure in P^n, and I(V̄) is generated by {f^h : f ∈ I(V)}.
- Homogenizing a generating set of I(V) is not enough. The correct procedure: compute a Gröbner basis G of I(V) with respect to a graded monomial order (grevlex is fine), then {g^h : g ∈ G} generates I(V̄). For a hypersurface a single generator suffices.
- V̄ ∩ {x_0 = 0} is the set of points at infinity. For a hypersurface V(f), the points at infinity are the zeros of the top-degree homogeneous part of f. The parabola y = x^2 becomes yz = x^2 with one point (0:1:0) at infinity; the hyperbola xy = 1 becomes xy = z^2 with two, (1:0:0) and (0:1:0).
- Dehomogenizing I(V̄) recovers I(V) exactly; homogenizing then dehomogenizing is the identity on ideals, but dehomogenizing then homogenizing can lose components contained in the hyperplane at infinity.
Smooth and Singular Points
Let V ⊂ A^n have dimension d at p and I(V) = (f_1, ..., f_r). Let J(p) be the r × n Jacobian matrix (∂f_i/∂x_j)(p).
- Jacobian criterion: rank J(p) ≤ n - d always, and p is a smooth (nonsingular) point if and only if rank J(p) = n - d. The Zariski tangent space is T_p V = ker J(p), so p is smooth iff dim T_p V = d.
- Intrinsic form: T_p V ≅ (m_p / m_p^2)^∨ where m_p is the maximal ideal of the local ring O_{V,p}; p is smooth iff O_{V,p} is a regular local ring.
- Sing(V) is a proper closed subset: a variety over an algebraically closed field is smooth on a dense open set.
- Projective version: apply the criterion to the affine cone, using the homogeneous generators. For a hypersurface V(F) ⊂ P^n with char k not dividing deg F, Euler's relation Σ x_i ∂F/∂x_i = (deg F) F means Sing V(F) = V(∂F/∂x_0, ..., ∂F/∂x_n).
- The multiplicity of p on a hypersurface V(f) is the lowest degree appearing in the Taylor expansion of f at p; the tangent cone is the zero set of that lowest-degree form. A point is smooth iff multiplicity 1.
Standard singular curves: the node y^2 = x^2 + x^3 (tangent cone y^2 = x^2, two tangent lines) and the cusp y^2 = x^3 (tangent cone y^2 = 0, one double tangent line). Both have multiplicity 2 at the origin.
Procedure: Analysing a Variety Given by Equations
- Fix the field. If you plan to use the Nullstellensatz, work over the algebraic closure; for experiments use QQ or a large prime field such as ZZ/32003 for speed.
- Compute the radical, or check whether the ideal is already radical. Everything about the zero set depends only on the radical.
- Decompose into irreducible components (minimal primes). Record the dimension of each. Mixed dimensions are common and easy to miss by eye.
- Compute dimension and, for projective varieties, degree from the Hilbert polynomial.
- Locate the singular locus with the Jacobian criterion, one component at a time and using the correct codimension for each component.
- If the variety is affine and you need projective information, compute the closure via a graded Gröbner basis and identify the points at infinity.
- Verify by hand at one point: pick a point, write local equations, and check the rank of the Jacobian. Software errors are rare; mis-entered equations are not.
Worked Examples
The twisted cubic
The image of t ↦ (t, t^2, t^3) in A^3 has ideal I = (y - x^2, z - x^3). Its closure in P^3 is the rational normal curve, and naive homogenization gets it wrong.
R = QQ[x,y,z];
I = ideal(y - x^2, z - x^3);
dim I, isPrime I -- 1, true
S = QQ[x,y,z,w];
Ibad = ideal(y*w - x^2, z*w^2 - x^3); -- homogenized generators
decompose Ibad -- two components: the cubic and the line x = w = 0
G = gens gb sub(I, S); -- grevlex Groebner basis {x^2-y, xy-z, y^2-xz}
J = ideal homogenize(G, w);
J == ideal(x^2 - y*w, x*y - z*w, y^2 - x*z) -- true: the 2x2 minors of |w x y; x y z|
dim J, degree J -- 2 (the affine cone), 3
hilbertPolynomial(J, Projective => false) -- 3*i+1
Projective dimension is dim of the cone minus one, so the closure is a curve of degree 3 with Hilbert polynomial 3n + 1 and arithmetic genus 0. Its ideal needs three generators although it has codimension 2: the twisted cubic is not a complete intersection.
Conics in P^2
A conic is V(F) for a quadratic form F = x^T A x with A symmetric 3 × 3. In characteristic not 2, projective equivalence classes are determined by rank A: rank 3 is a smooth conic, rank 2 a pair of distinct lines, rank 1 a double line. Every smooth conic is projectively equivalent to xz = y^2, which is the image of the Veronese map (s : t) ↦ (s^2 : st : t^2), so a smooth conic is isomorphic to P^1. Ellipse, parabola and hyperbola are one projective conic viewed in three affine charts; they differ only in how many points lie on the chosen line at infinity.
ring r = 0,(x,y,z),dp;
poly F = x*z - y^2;
ideal sing = F, jacob(F); // F and its three partials
std(sing); // x, y, z: only the irrelevant ideal, so no singular points in P^2 and the conic is smooth
Elliptic curves
For char k ≠ 2, 3 every smooth plane cubic can be put in Weierstrass form y^2 = x^3 + ax + b. The affine curve is smooth iff the discriminant 4a^3 + 27b^2 is nonzero. The closure y^2 z = x^3 + axz^2 + bz^3 adds exactly one point O = (0:1:0); in the chart y = 1 the equation is z = x^3 + axz^2 + bz^3, whose z-partial at (0, 0) is 1, so O is smooth, and the tangent line there is z = 0, meeting the curve with multiplicity 3 (O is a flex).
sage: E = EllipticCurve(QQ, [-1, 0]) # y^2 = x^3 - x
sage: E.discriminant()
64
sage: P2.<x,y,z> = ProjectiveSpace(QQ, 2)
sage: C = Curve(y^2*z - x^3 + x*z^2)
sage: C.is_smooth(), C.genus()
(True, 1)
sage: N = Curve(y^2*z - x^3 - x^2*z) # the nodal cubic
sage: N.singular_points()
[(0 : 0 : 1)]
Node versus cusp by the Jacobian
R = QQ[x,y];
f = y^2 - x^3 - x^2;
decompose(ideal f + ideal jacobian ideal f) -- {ideal(y, x)}: a single singular point
g = y^2 - x^3;
decompose(ideal g + ideal jacobian ideal g) -- {ideal(y, x)} as well
The two curves have the same singular locus as a set; they are distinguished by the tangent cone (two lines versus a double line) and by the local ring, which is why set-theoretic data is not enough to classify singularities.
Checklist Before You Assert Something About a Variety
- Field stated, and algebraically closed if the Nullstellensatz is being used.
- Ideal radical, or the difference between the ideal and its radical acknowledged.
- Components listed with dimensions; no accidental embedded or lower-dimensional pieces.
- Projective closure computed from a graded Gröbner basis, not from generators.
- Jacobian rank compared to n - d for the correct d on each component.
- At least one point checked by hand.
- Characteristic assumptions (Euler relation, discriminant formula, Weierstrass form) verified.
Common Mistakes
- Homogenizing generators of I(V) and calling the result I(V̄). It contains the closure but usually has extra components at infinity.
- Writing "V(I) is irreducible so I is prime". Only the radical is prime; I may have embedded components.
- Using the Jacobian criterion with generators of an ideal that is not radical, or with the wrong codimension for a component of a reducible variety.
- Concluding from dim T_p V > dim V that a point is singular when the equations used do not generate the ideal of V near p.
- Treating A(V) as a subring of functions on V when V is not reduced, or treating two varieties with isomorphic function fields as isomorphic (they are only birational).
- Forgetting that projective varieties have no nonconstant regular functions, then trying to separate points with polynomials.
- Assuming an image of a morphism is closed. Images are constructible; the image of xy = 1 under projection to the x-axis is A^1 minus a point.
Limits of the Classical Language
The variety-with-radical-ideals viewpoint deliberately forgets multiplicities, so it cannot state Bézout's theorem with multiplicity, cannot express the double point Spec k[x]/(x^2), and treats a family of varieties as a set of fibres rather than a single object. It also has no honest way to handle non-algebraically-closed fields or arithmetic situations like Spec Z. When any of these matter, pass to schemes; the dictionary in this skill survives as the reduced, closed-point shadow of the scheme-theoretic one. For explicit computation of ideals, Gröbner bases are the engine underneath every command used here, and their cost, not the theory, is what limits which examples you can actually run.
Install this skill directly: skilldb add algebraic-geometry-skills
Related Skills
Algebraic Curves and Riemann-Roch
Activate this skill when the user is working with algebraic curves: genus, divisors, linear systems, the Riemann-Roch theorem and its consequences, elliptic curves and their group law, hyperelliptic curves, ramified covers and embeddings into projective space. Triggers on "algebraic curve," "Riemann-Roch," "genus," "divisor," "linear system," "canonical divisor," "canonical embedding," "hyperelliptic," "elliptic curve," "group law," "Weierstrass form," "Hurwitz formula," "Riemann-Hurwitz," "ramification," "degree-genus formula," "very ample," or curves in "algebraic geometry." Covers precise statements, worked Riemann-Roch computations for genus 0 through 3, the derivation of Weierstrass form and the group law, and how to check each computation in SageMath, Macaulay2 or Singular.
Algebraic Geometry Problem Solving
Activate this skill when the user has an algebraic geometry problem to attack rather than a definition to look up: a qualifying exam question, a lemma a paper needs, a conjecture to test, a proof a referee has questioned. Triggers on "how do I prove," "dimension count," "incidence correspondence," "general member," "generic," "Bertini," "semicontinuity," "local coordinates," "affine chart," "compute an example," "Gröbner check," "reduce mod p," "specialization," "degeneration," "standard tricks," "write the proof," "referee," "algebraic geometry exercise," or "algebraic geometry" problem solving. Covers the order of attack, dimension counting done rigorously, local coordinates and charts, choosing the right cohomological tool, what a computation proves and what it does not, how to write an argument that survives refereeing, and a catalogue of the tricks working geometers reach for first.
Commutative Algebra Toolkit
Activate this skill when the user needs the commutative algebra that algebraic geometry actually runs on, with every theorem tied to its geometric meaning. Triggers on "Noetherian ring," "localization," "local ring," "integral extension," "integral closure," "normalization," "Noether normalization," "Krull dimension," "primary decomposition," "associated primes," "embedded component," "regular local ring," "Cohen-Macaulay," "Hilbert polynomial," "Hilbert series," "depth," or requests to translate between ring theory and geometry. Covers the theorems, what each one says about a variety, and how to compute each invariant in Macaulay2, Singular and SageMath.
Gröbner Bases and Computation
Activate this skill when the user wants to compute with polynomial ideals: test membership, eliminate variables, solve polynomial systems, implicitize a parametrization, or understand why a computation will not finish. Triggers on "Gröbner basis," "Groebner basis," "monomial order," "lex order," "grevlex," "Buchberger algorithm," "S-polynomial," "division algorithm," "elimination ideal," "implicitization," "solving polynomial systems," "zero-dimensional ideal," "Macaulay2," "Singular," "SageMath," or computational "algebraic geometry." Covers the theory precisely, real sessions in Macaulay2, Singular and Sage with actual syntax, and the complexity facts that decide which computations are feasible.
Intersection Theory Basics
Activate this skill when the user needs to count intersections of subvarieties with the correct multiplicities, work with divisors and intersection numbers on surfaces, or reason about blow-ups and exceptional curves. Triggers on "Bézout's theorem," "Bezout," "intersection multiplicity," "intersection number," "Chow group," "Chow ring," "self-intersection," "(-1)-curve," "exceptional divisor," "blow-up," "adjunction formula," "Hodge index," "Riemann-Roch for surfaces," "27 lines," "cubic surface," or intersection-theoretic "algebraic geometry." Covers the local definition of multiplicity, Bézout in the plane and in P^n, the Chow ring of projective space and of products, the intersection pairing on surfaces with blow-ups and adjunction, and worked surface examples checked in Singular, Macaulay2 and Sage.
Schemes and Morphisms
Activate this skill when the user is learning or using the language of schemes: Spec and Proj, structure sheaves, generic points, nilpotents, fibre products, and the properties of morphisms that carry the geometry. Triggers on "scheme," "Spec," "Proj," "structure sheaf," "generic point," "nilpotent," "fibre product," "closed immersion," "open immersion," "separated," "proper morphism," "finite type," "finite morphism," "flat family," "flat limit," "valuative criterion," or "why schemes" in algebraic geometry. Covers the definitions with their reasons, the standard morphism properties and how to check them, flatness as continuity of fibres, and concrete computations of fibres and flat limits in Macaulay2 and Sage.