## ChatGPT and Mathematics (III)

GPT-4 was just released. Here’s a preview of what it’s capable of. I tried throwing some mathematics problems at it to check out its capability.

## Problem 1: Cheryl’s Birthday Problem

There’s an infamous logic problem from Singapore’s primary school Olympiad training. Here’s the full problem from the Wikipedia page (quoted verbatim).

And… here’s the output.

That’s correct: the first line of deduction tells us the month is July or August.

Correct!

Ok, but this is a well-known viral problem. Maybe let’s try something a little different.

## Problem 2: Combinatorics

Here’s the problem.

I’d say it’s a decent inter-school level type of problem. Here’s the output:

A little of a bummer, since it incorrectly thought there must be four +1 and four -1 in each row. But the penultimate paragraph is impressive. So maybe a little nudging would help?

Result:

Extremely impressive!

## Problem 3: Construction Problem

Here’s a rather tricky problem. [ Hint: the smallest solution is close to a million. ]

The astute reader immediately sees the problem with this “solution”: 1118 has sum of digits = 11, which is a multiple of 11. I pointed it out; GPT-4 then responded with another 4-digit (wrong) example. I pointed out again and it responded with another wrong example. At this point, I gave up.

To avoid cluttering up the reader’s bandwidth, I won’t be sharing those wrong answers.

## Problem 4: PSLE Coin Problem

This problem from PSLE 2021 again caused some controversy due to its perceived difficult:

Here’s part of the answer I got:

Right at the start it made the wrong assumption: that Helen and Ivan have the same number of 50-cent coins. I pointed this out:

Then GPT-4 realised its mistake:

But it still wouldn’t tell me who has more money. Guess wealth is a sensitive question even for a few dozen bucks.

I nudged it further:

And:

Goal!!

## Problem 5: Group Theory

Here’s one which can be quite tricky if you’re unfamiliar with concrete examples of groups.

Long story short: it tried to come up with three examples, failed, and concluded that such an example is impossible. What impressed me was the diversity of its examples. It tried to use:

1. $\mathbb Z \times \mathbb Z_2$.
2. The free group $F(a,b)$.
3. The dihedral group $D_4$ of order 8.

The astute reader should immediately know why each of these examples fails.

## ChatGPT and Mathematics (II)

This post is only tangentially related to mathematics. As an experiment on AI-assisted learning, I tried to write a web application in Javascript + WebGL. At the start of this experiment, I had some experience with Javascript but absolutely no knowledge of WebGL. My objective was to program a simple interface for manipulating a Rubik’s cube.

Within a few hours, I ended up with this:

Instructions:

• Use the 4 arrow keys to rotate the entire cube.
• Hover your mouse cursor over the white “buttons” and use the mouse scroller to rotate the faces.

The following is a summary of how I picked up some basics of WebGL by constantly polling ChatGPT.

First I needed to know how to draw a cube, so I asked:

Help me write an HTML file using WebGL to display a cube. Allow the reader to vary the viewing angles.

ChatGPT replied with a piece of code to do the above. The resulting code let the user change the orientation of the cube via the 4 arrow keys.

Interestingly, the code also rotated the cube continuously:

var render = function () {
requestAnimationFrame(render);

cube.rotation.x += 0.1;
cube.rotation.y += 0.1;

renderer.render(scene, camera);
};
render();

I did not ask for this functionality but it turned out to be useful later.

My first idea was to have a single cube, with each face partitioned into 3 x 3 squares. But I wasn’t sure how to rotate each face with this geometry. Instead, I decided to have 27 cube objects. Next, I needed to have a different colour for each face. So I asked:

I want a cube with all six sides of different colors.

ChatGPT replied with the appropriate code, but the scene turned out black. So I responded:

I tried it but the cube isn’t appearing.

Happily, ChatGPT managed to point out the problem: it listed four possible causes, and I quickly identified the third one (lack of light source) to be the right one. ChatGPT even amended its original code to add a new light source, and lo and behold, it now worked!

How do I add 3 cubes of the same size in different parts of space?

With the reply, I could create the 27 cubes required to form a Rubik’s cube. But I recalled in many applications, one can form groups of objects for easier manipulation. So:

In WebGL, can I form a composite object comprising of three cubes?

ChatGPT suggested creating multiple THREE.Mesh objects, then putting them together in a THREE.Group object. That was exactly what I wanted.

Now to rotate a face of the cube, I needed to first identify which cubes to rotate. In each case, 9 cubes were chosen out of 27 for rotation. For that I needed the following.

In WebGL how do I access sub objects in a group object?

But ChatGPT didn’t give me what I wanted, because I had for some reason started a new conversation. The reply was ambiguous and unhelpful. So I tried again:

I have a WebGL object named “cubes” of from “THREE.Group()”. How do I access the third element in the list?

Note the grammatical mistake in the first sentence (that was completely unintentional!). Thankfully, ChatGPT correctly interpreted my intentions and gave me the following sample code (together with a rather long explanation and other variants):

let cube = cubes.children[2];


Exactly what I needed. My next thought was to put the 9 cubes in a separate group, then rotate the group. So I asked:

In WebGL, can a single cube belong to two “THREE.Group” objects simultaneously?

ChatGPT replied in the positive so I went about to edit my code, adding the 9 cubes to a separate group for rotation. But then I faced a problem:

In the following WebGL code:

function move1(all_cubes) {
var cube_list = all_cubes.children;
var tmp_group = new THREE.Group();
for(var i = 0; i < cube_list.length; i++) {
console.log(cube_list[i].position);
if (cube_list[i].position.x < -0.99)
}
}

The object “cube_list” had some of its objects removed, when I added them to the object “tmp_group”. Why?

ChatGPT explained that the objects were being removed from the all_cubes group because they were being added to the tmp_group group. I could overcome this by cloning the cube. Finding this too much a chore, I decided against this and just rotated the 9 cubes manually. Next:

How do I rotate a 3D WebGL object with centre of rotation specified by (x, y, z)?

And so on…

## Summary

Thus the general outline seems clear. At each stage I had a mental image of what I wanted to do, broke down the process into specific subtasks, then queried ChatGPT for a very concrete implementation of the said subtask. Other than the above examples, I asked:

• how I could access the mouse scroller in Javascript,
• how I could do animation in WebGL (this took a few tries with different wordings, as each time, ChatGPT would reply with a different approach),
• if I could access the contents of an array produced by a function (yes, elementary question), etc.

Here are some problems I encountered.

• ChatGPT was often down due to heavy usage.

So I had to revert to Google. After one gets used to ChatGPT’s useful replies, Google’s search results seemed frustratingly irrelevant in comparison.

• The reply was sometimes truncated.

This was rare, but fortunately when it happened, the existing reply was sufficiently useful for my purpose. In any case, people have reported we could just type ‘continue’ and ChatGPT would display the remaining response. [ Warning: this does not work for code, arguably the most important case. ]

• The answer worked but it wasn’t satisfactory to me.

For instance, ChatGPT once suggested using the TWEEN library to animate face rotations, but I considered it too much of a hassle. It took a few more queries for me to coax ChatGPT into giving me a solution using ‘render()’. In retrospect, the first reply already provided me a possible approach.

• The answer was in a different context.

Sometimes ChatGPT gave a reply using a gl.* framework, but what I really wanted was the THREE.* framework. This could be solved by further specification (e.g. ‘reformulate the reply for a THREE.Cube object type’).

• The answer just plain didn’t work.

In one instance, ChatGPT gave the following output:

THREE.Quaternion().setFromRotationMatrix(rotationMatrix);

Cubes.forEach(function(cube){
cube.applyMatrix4(rotationMatrix);
cube.position.sub(point);
cube.position.applyMatrix4(rotationMatrix);
cube.quaternion.multiply(rotationQuaternion);
});

which was utterly strange since it performed a rotation, then repeat the rotation about a pivot point, before performing the rotation for a third time (using quaternion representation no less). This could be fixed by simply understanding what’s going on and editing the code on your own.

## Conclusion

I have no illusions about my level of proficiency in WebGL, but this experiment proves that ChatGPT lets us get to a functional level in a remarkably short time.

## The Main Point

ChatGPT is an AI language model that has been making the news recently. There are multiple articles on the internet on what the model is capable of so this will not be the focus of our post. Instead, we wish to consider how ChatGPT can be useful in the context of mathematics.

Now “in the context of mathematics” is rather broad. Broadly speaking, there are three aspects to it:

• learning mathematics (new concepts, techniques etc),
• teaching mathematics,
• researching mathematics.

This post is mostly about the first two cases. Here, we care not for the philosophical implications, future directions, or subtle flaws of the bot. Instead, our main question is:

How can ChatGPT help us, as mathematics practitioners?

## The Query

People have reported getting conceptually deep and insightful answers from ChatGPT in the form of essays. So we ask it, out of curiosity:

Why are compact spaces interesting in point-set topology?

This is the reply we get:

Compact spaces are an important concept in point-set topology because they have many useful properties. For example, every compact space is closed and bounded, which means that all of its points are contained within some finite region of the space. This makes compact spaces well-suited for studying problems in which the points of interest are contained within a bounded region.

Compact spaces also have the property of being “small” in a certain sense. For example, every infinite compact space must contain a “small” infinite subset, meaning that it is possible to find an infinite number of points in the space that are contained within a finite region. This property makes compact spaces a good choice for studying problems in which the size of the space is a consideration.

Finally, compact spaces have the property of being “well-behaved” in many ways. For example, every continuous function defined on a compact space must achieve its maximum and minimum values, which makes them useful for optimization problems. Compact spaces also have many other desirable properties, such as the ability to be approximated by finite sets and the existence of convergent sequences, which makes them a useful tool for studying problems in many different areas of mathematics and physics.

Newcomers to ChatGPT would be impressed by its coherence and flawless grammar. However, if you’d been experimenting with ChatGPT for a while, such an impression fades rather quickly. So to us, at first glance, the above reply by ChatGPT actually seems underwhelming. The statements are ambiguous and ill-defined; a mathematics student who wrote the above in an essay would likely get a bad grade for the report. But since we emphasised the term “at first glance”, there’s more to the story than meets the eye.

## The Critique

First, let us critique the above essay as a teacher would.

1. “…every compact space is closed and bounded” is largely true, if we replace the word “space” with “metric space”. In generic topological spaces, the term bounded does not make sense. Thus the first paragraph is largely sensible.
2. The second paragraph is confusing. If we were to interpret it literally, it seems to be a strictly weaker variant of the first paragraph. Or, does it mean to say “compact spaces are often infinite, despite being contained in a finite region”? This actually brings up a nice contrast: although structurally finite (bounded), a compact set can be infinite, even uncountably so.
3. The third paragraph is not bad. Replace the phrase “every continuous function” with “every real-valued continuous function” and you’re good to go. But it’s not clear what is meant by “approximated by finite sets”. Does it refer to the definition of compact spaces, where every open cover has a finite subcover? Also the part about “existence of convergent sequences” is terribly worded; it should be “every sequence has a convergent subsequence”, which is indeed a critical property of compact sets.

After some editing, we get the following.

Compact spaces are an important concept in point-set topology because they have many useful properties. For example, every compact metric space is closed and bounded, so heuristically the whole set is in a finite region of space. This makes compact spaces well-suited for studying problems where the domain of interest is bounded.

Compact spaces thus can be considered “small”, at least on a structural level. However as a set, it can be infinite, even uncountably so. For example, the closed interval [a, b] under the usual topology is compact, even though it is an uncountably infinite set.

Finally, compact spaces are also “well-behaved” in many other ways. For example, every continuous real-valued function on a compact space must achieve its maximum and minimum values, which makes them useful for optimization problems. Compact spaces can also be “approximated by finite sets”, in the sense that every compact metric space can be covered by finitely many ε-open balls, no matter how small ε>0 is. Also, every sequence in a compact space has a convergent subsequence, so one can imagine compact spaces to be constrained structurally.

It still wouldn’t win any award for best writing, but at least it’s more accurate (or so we’d hope!).

## The Summary

Proceeding in this direction, ChatGPT has the following applications.

1. A lay person can get a rough guide on a deeply related topic, provided said person is willing to take a huge bag of salt with it.
2. An imposter can feign deep knowledge by querying ChatGPT. In its current incarnation, this can indeed hoodwink the general lay person, but it only takes a few seconds for a domain expert to find multiple inaccuracies, poorly worded statements, or even downright falsehoods. [ Needless to say, we do not recommend such a use. ]
3. A domain expert can save time by asking ChatGPT to write a first version of a report before editing it.

In this case, ChatGPT already has a concrete benefit. The “approximate by finite sets” can be a good motivation for the definition of compact sets, which is often uninspired (so what if every open cover has a finite subcover?).

One wonders what the next version of ChatGPT brings.

# Segre Embedding

Throughout this article, k is a fixed algebraically closed field. We wish to construct the product in the category of quasi-projective varieties.

For our first example, let $V\subset \mathbb P^3_k$ be the projective variety defined by the homogeneous equation $T_0 T_3 - T_1 T_2 = 0$. We define maps $\pi_1, \pi_2 : V\to \mathbb P^1_k$ as follows

$\pi_1 : (t_0 : t_1 : t_2 : t_3) \mapsto \begin{cases} (t_0 : t_2), \text{ if } (t_0, t_2) \ne (0, 0), \\ (t_1 : t_3), \text{ if } (t_1, t_3) \ne (0, 0),\end{cases} \\ \pi_2 : (t_0 : t_1 : t_2 : t_3) \mapsto \begin{cases} (t_0 : t_1), \text{ if } (t_0, t_1) \ne (0, 0), \\ (t_2 : t_3), \text{ if } (t_2, t_3) \ne (0, 0).\end{cases}$

Note that the maps are well-defined: if $(t_0, t_2), (t_1, t_3) \ne (0, 0)$ then since $t_0 t_3 = t_1 t_2$ we have $(t_0 : t_2) = (t_1 : t_3)$.

Proposition 1.

The triplet $(V, \pi_1, \pi_2)$ is a product in the category of quasi-projective varieties.

Proof

Let $W\subseteq \mathbb P^n$ be a quasi-projective variety and $\psi_1, \psi_2 : W \to \mathbb P^1$ be morphisms. We will define the corresponding $f : W \to V$ as follows. For each $\mathbf w\in W$, there is an open neighbourhood U of w such that $\psi_1|_U = (F_0 : F_1)$ and $\psi_2|_U = (G_0 : G_1)$ where $F_0, F_1 \in k[T_0, \ldots, T_n]$ are homogeneous of the same degree and either $F_0$ or $F_1$ has no zero in U. Same holds for $G_0, G_1 \in k[T_0, \ldots, T_n]$.

Now define $f : U \to \mathbb P^3$ by $(F_0 G_0 : F_0 G_1 : F_1 G_0 : F_1 G_1)$. Clearly the image of f lies in V so we get a morphism $f: U \to V$. It is easy to see that $\pi_1|_U \circ f = \psi_1|_U$ and $\pi_2|_U \circ f = \psi_2|_U$. Repeating this construction over an open cover of W, we obtain our desired $f:W \to V$. ♦

Using similar techniques, we can show the following.

Proposition 2.

For any $m, n \ge 0$, the product $\mathbb P^n \times \mathbb P^m$ exists in the category of quasi-projective varieties and is a projective variety.

Specifically, the product is the image of the Segre embedding

$\mathbb P^n \times \mathbb P^m \to \mathbb P^{mn + n + m}, \quad (a_0 : \ldots : a_n), (b_0 : \ldots : b_m) \mapsto (a_i b_j)_{0\le i \le n, 0\le j \le m}$,

where the projective coordinates of $\mathbb P^{mn + n + m}$ are indxed by $(i, j)$ with $0\le i \le n$ and $0\le j \le m$.

We denote the image of this map by $\mathbb P^{n, m}$.

Exercise A

Prove that $\mathbb P^{n, m}$ is the closed subspace of $\mathbb P^{mn + n + m}$ defined by

$T_{ij}T_{kl} - T_{il} T_{kj}$ over all $(i, j), (k, l) \in \{0, \ldots, n\} \times \{0 ,\dots, m \}$

# Products of Quasi-Projective Varieties

Proposition 3.

If $W_1 \subseteq \mathbb P^n$ and $W_2\subseteq \mathbb P^m$ are open (resp. closed), so is the image of $W_1\times W_2$ in $\mathbb P^{n,m}$.

In particular, the topology on $\mathbb P^n \times \mathbb P^m$ is at least as fine as the product topology.

Proof

It suffices to prove the case where $W_1\subseteq \mathbb P^n$ and $W_2\subseteq \mathbb P^m$ are open. Pick any $\mathbf w_1 = (a_0 : \ldots : a_n) \in W_1$ and $\mathbf w_2 = (b_0 : \ldots : b_m) \in W_2$; without loss of generality say $a_0, b_0 \ne 0$.

Since $W_1$ is open in $\mathbb P^n$ there exists a homogeneous $F \in k[A_0, \ldots, A_n]$ such that $\mathbf w_1 \in D(F) \subseteq W_1$. Similarly, there exists a homogeneous $G \in k[B_0, \ldots, B_m]$ such that $\mathbf w_2 \in D(G) \subseteq W_2$. Then

$(\mathbf w_1, \mathbf w_2) \in \overbrace{D(A_0 F) \times D(B_0 G)}^{\subseteq W_1 \times W_2} \stackrel \cong \longrightarrow \overbrace{D(T_{00}F(T_{00}, \ldots, T_{n0})G(T_{00}, \ldots, T_{0m})) \cap V}^{\text{open in } W}$

so the image of $W_1 \times W_2$ in V is open. ♦

As in the product of affine varieties, the topology on $\mathbb P^n \times \mathbb P^m$ is in general strictly finer than the product topology. This is already clear in the case mn = 1, since $\mathbb P^1$ has the cofinite topology.

Corollary 1.

The product of two projective (resp. quasi-projective) varieties exists and is projective (resp. quasi-projective).

Note

In the following proof, we say a subset of a topological space is locally closed if it is an intersection of an open subset and a closed subset. Thus every quasi-projective variety (resp. quasi-affine variety) is a locally closed subspace of some $\mathbb P^n_k$ (resp. $\mathbb A^n_k$).

Prove the following properties as a simple exercise:

• an intersection of two locally closed subsets is locally closed;
• if Y is a locally closed subset of X and Z is a locally closed subset of Y then Z is a locally closed subset of X;
• a subset Y of X is locally closed if and only if Y is open in its closure in X.

Proof

If $W_1 \subseteq \mathbb P^n$ and $W_2 \subseteq \mathbb P^m$ are closed (resp. locally closed), so is the image W of $W_1 \times W_2$ in $\mathbb P^{n, m}$ by proposition 3. The projections $\mathbb P^{n,m} \to\mathbb P^n$ and $\mathbb P^{n,m}\to \mathbb P^m$ then restrict to $\pi_1: W \to W_1$ and $\pi_2 : W\to W_2$.

Let  us show that $(W, \pi_1, \pi_2)$ is the product of $W_1$ and $W_2$ in the category of quasi-projective varieties.

If X is any quasi-projective variety and $\psi_1 : X\to W_1$, $\psi_2 : X\to W_2$ are any morphisms then $\psi_1 : X \to \mathbb P^n$ and $\psi_2 : X \to \mathbb P^m$ induce $f : X\to \mathbb P^{n,m}$; the image of f lies in W so we obtain an induced $X\to W$. ♦

Exercise B

1. Let $W \subset \mathbb P^2 \times \mathbb P^1$ be the set of points $((a_0 : a_1 : a_2), (b_0 : b_1))$ satisfying $a_0^2 b_0 - a_1 a_2 b_1 = 0$. Find a set of homogeneous polynomials in $\mathbb P^{2, 1} \subset \mathbb P^5$ which define the image of W.

2. More generally prove that a subset $V \subseteq \mathbb P^{n, m}$ is closed if and only if its corresponding subset $V' \subseteq \mathbb P^n \times \mathbb P^m$ is the set of solutions of some bihomogeneous polynomials

$F(T_0, \ldots, T_n; U_0, \ldots, U_m) = 0$,

i.e. F is homogeneous as a polynomial in $T_0, \ldots, T_n$ as well as $U_0, \ldots, U_m$

# Dimensions

Lemma 1.

For any point $\mathbf v$ in a quasi-projective variety V, there is an open neighbourhood U, $\mathbf v \in U \subseteq V$, which is affine.

Proof

Suppose $V\subseteq \mathbb P^n_k$ is a locally closed subset. Without loss of generality, $\mathbf v \in U_0$ so $\mathbf v$ is contained in $W := U_0 \cap V$, a locally closed subset of $\mathbb A^n$. Now W is open in $\overline W$, its closure in $\mathbb A^n$. By an analogue of proposition 1 here, we can pick a basis of the topological space $\overline W$ in the form of $\{D(f) : f\in k[\overline W]\}$, where

$D(f) = \{ \mathbf w \in \overline W : f(\mathbf w) \ne 0\}.$

Thus for some $f\in k[\overline W]$ we have $\mathbf v \in D(f)\subseteq W$. Now we are done since $D(f)$ is isomorphic to the affine variety with coordinate ring $k[\overline W][T]/(T\cdot f - 1)$. ♦

Exercise C

Prove that if V and W are irreducible quasi-projective varieties, then $V\times W$ is also irreducible. Again, please be reminded that $V\times W$ is not the product topology.

Proposition 4.

if V and W are quasi-projective varieties, then

$\dim (V \times W) = \dim V + \dim W$.

Proof

Suppose V and W are irreducible; by lemma 1 we can pick open affine subsets $U_1 \subseteq V$ and $U_2 \subseteq W$. Then $U_1 \times U_2$ is an open affine subset of the quasi-projective variety $V\times W$, which is irreducible by exercise C. Now

$\dim (V \times W) = \dim (U_1 \times U_2) = \dim U_1 + \dim U_2 = \dim V + \dim W$.

where the first and third equalities follow from proposition 3 here and the second is from proposition 2 here

The general case is left as an exercise (write V and W as unions of irreducible components). ♦

Finally, we consider the dimension of the cone of a projective variety.

Proposition 5.

Let $V\subseteq \mathbb P^n$ be a non-empty closed subset. Then

$\dim (\mathrm{cone} V) = \dim V + 1$.

Proof

Without loss of generality, suppose $V' := U_0 \cap V \ne \emptyset$; by proposition 3 here, $\dim V = \dim V'$ and V’ is a closed subset of $\mathbb A^n$. Also since cone(V’) is open in cone(V) we have $\dim (\mathrm{cone} V) = \dim(\mathrm{cone} V')$. Now there is an isomorphism

$V' \times (\mathbb A^1 - \{0\}) \longrightarrow \mathrm{cone}(V') - \{\mathbf 0\}, \quad ((1 : t_1 : \ldots : t_n), \lambda) \mapsto (\lambda, \lambda t_1, \ldots, \lambda t_n).$

Hence $\dim(\mathrm{cone} V') = \dim V' + \dim(\mathbb A^1 - \{0\}) = \dim V' + 1$. ♦

# Serre’s Criterion for Normality

In this section, A denotes a noetherian domain. We will describe Serre’s criterion, which is a necessary and sufficient condtion for A to be normal. In the following section, we will relate the results here to an interesting example from the last article.

Lemma 1.

If A is normal, then for all $a \in A - \{0\}$, we have

$\mathfrak p \in \mathrm{Ass}_A (A/aA) \implies \mathrm{ht} \mathfrak p = 1.$

Note

Since A is a domain, it has only one minimal prime: 0. Hence all associated primes of A/aA have height at least 1. Lemma 1 thus says principal ideals of a normal domain have no embedded primes.

Proof

We need to show $\mathfrak p \in \mathrm{Ass}_A (A/aA)$ has height 1. Pick $b\in A$ such that $b+aA \in A/aA$ has annihilator $\mathrm{Ann}_A (b+aA) = \mathfrak p$, i.e. $(aA : bA) = \mathfrak p$. Since bA is finitely generated, we localize both sides at $\mathfrak p$ to obtain $(aA_{\mathfrak p} : bA_{\mathfrak p}) = \mathfrak m$, the unique maximal ideal of $B := A_{\mathfrak p}$. Thus

$b\mathfrak m \subseteq aB \implies \overbrace{(ba^{-1})}^{\in \mathrm{Frac} A}\mathfrak m \subseteq B$

and $ba^{-1} \not\in B$. We claim that $ba^{-1} \mathfrak m = B$; if not, $ba^{-1} \mathfrak m \subseteq \mathfrak m$ and by the adjugate matrix trick (see proof of proposition 6 here), $ba^{-1}$ is integral over B. This contradicts the fact that B is normal. Hence $\mathfrak m$ is an invertible ideal so B is a dvr, and $\mathrm{ht} \mathfrak p = \dim B = 1$. ♦

Lemma 2.

Suppose for all $\mathfrak p \in \mathrm{Ass}_A (A/aA)$, $a\in A-\{0\}$, we have $\mathrm{ht} \mathfrak p =1$. Then

$A = \bigcap_{\mathrm{ht} \mathfrak p = 1} A_{\mathfrak p}$,

where intersection occurs in $\mathrm{Frac} A$.

Proof

Let $\frac a b \in \text{RHS}$, where $a, b \in A$, $b\ne 0$; we need to show $a \in bA$. Write $bA = \mathfrak q_1 \cap \ldots \cap \mathfrak q_n$ for its primary decomposition with associated primes $\mathfrak p_i = r(\mathfrak q_i)$ all of height 1. For each i we have $\frac a b \in A_{\mathfrak p_i} \implies a \in bA_{\mathfrak p_i}$. But $bA_{\mathfrak p_i} = \mathfrak q_i A_{\mathfrak p_i}$ since all $\mathfrak p_i$ are minimal in $V(aA)$. Thus

$a \in \mathfrak q_i A_{\mathfrak p_i} \cap A = \mathfrak q_i$

by proposition 2 here and $a \in \cap_i \mathfrak q_i = bA$. ♦

Exercise A

Let $A = k[V]$ for an irreducible affine variety V, and $\mathfrak p \subset A$ be a prime ideal with corresponding subvariety $W = V(\mathfrak p) \subset V$. Prove that $A_{\mathfrak p}$ is the set of all rational functions on V which are regular at some point of W.

Note

We already know $A = \cap_{\mathfrak m \text{ max.}} A_{\mathfrak m}$ holds for all domains; geometrically, this means if $f:V \to \mathbb A^1$ (for irreducible V) is regular at each point, then f can be represented by the same polynomial globally. The condition in lemma 2 is notably stronger; geometrically, it says if f is regular on an open dense subset of every codimension 1 subvariety, then it is regular everywhere.

Theorem (Serre’s Criterion).

A noetherian domain $A$ is normal if and only if the following conditions both hold.

1. All $\mathfrak p \in \mathrm{Ass}_A (A/aA)$, for $a\in A-\{0\}$, have height 1.
2. For each $\mathfrak p$ of height 1, $A_{\mathfrak p}$ is a dvr.

When that happens, $A = \cap_{\mathrm{ht} \mathfrak p = 1} A_{\mathfrak p}$.

Note

In the context of algebraic geometry, the first condition says “subvarieties cut out by a single equation have no embedded components” while the second says “the set of singular points has codimension at least 2” (this will be elaborated in later articles). Thus normality can fail in two different ways: hidden (embedded) components or too many singular points.

Proof

(⇒) Condition 1 follows from lemma 1; condition 2 follows from proposition 6 here.

(⇐) By lemma 2, condition 1 gives us $A = \cap_{\mathrm{ht} \mathfrak p = 1} A_{\mathfrak p}$, the final statement. By condition 2, each $A_{\mathfrak p}$ is normal; hence so is A. ♦

# Hartog’s Theorem

Definition.

If V is an affine k-variety, we say V is normal if $k[V]$ is a normal domain.

If $W\subseteq V$ is a non-empty closed subset, corresponding to radical ideal $\mathfrak a \subsetneq k[V]$, the codimension of W in V is $\mathrm{ht} \mathfrak a$.

As a consequence of the above result, we have:

Proposition 1 (Hartog’s Theorem).

Let V be an affine normal k-variety. If $W\subsetneq V$ is a non-empty closed subset of codimension at least 2, then the inclusion $V-W \subseteq V$ induces an isomorphism of coordinate rings

$k[V-W] \cong k[V]$.

Note

Thus, if a rational function f on V is not regular, its “set of irregularity” has codimension 1.

Proof

Suppose $f \in k[V-W]$, considered as a rational function on V. For each $\mathfrak p \subset k[V]$ of height 1, f is regular on $(V-W) \cap V(\mathfrak p) \ne \emptyset$, a dense open subset of $V(\mathfrak p)$. Hence by exercise A, $f\in A_{\mathfrak p}$ and by Serre’s criterion, we have

$f\in \bigcap_{\mathrm{ht} \mathfrak p = 1} A_{\mathfrak p} = A$. ♦

This gives the following generalization of example 7 from the previous article.

Corollary 1.

If $V, W$ are as in proposition 1, then $V-W$ is not an affine variety.

Proof

The inclusion $f : V-W \hookrightarrow V$ induces an isomorphism $f^* : k[V] \to k[V-W]$. If VW were affine, f would also be an isomorphism, which is absurd since f is not surjective. ♦

# Dimensionality

Finally we wish to look at the dimension of a general quasi-projective variety; first we have a general definition.

Definition.

Let X be a non-empty topological space; we consider all chains

$\emptyset \ne Z_0 \subsetneq Z_1 \subsetneq \ldots \subsetneq Z_k \subseteq X$

of irreducible closed subsets of X. The length of the chain is k; the Krull dimension of X (denoted $\dim X$) is the supremum of the lengths of all such chains.

The dimension of a quasi-projective variety is its Krull dimension.

Note that when $X = \mathrm{Spec} A$, the Krull dimension of X is the Krull dimension of A.

Lemma 3.

If Y is a non-empty subspace of X then $\dim Y \le \dim X$.

Proof

Let $Z_0 \subsetneq \ldots \subsetneq Z_k$ be a chain of irreducible closed subsets of Y. Taking their closures in X we have

$\emptyset\ne\overline Z_0 \subseteq \overline Z_1 \subseteq \ldots \subseteq \overline Z_k \subseteq X$.

By proposition 2 here, each $\overline Z_i$ is a closed irreducible subset of X. Furthermore by a general result in point-set topology (see proposition 3 here), the closure of any subset $Z\subseteq Y$ in Y is $\overline Z \cap Y$. Hence $\overline Z_i \cap Y = Z_i$ so $\overline Z_i \ne \overline Z_{i+1}$ for any i. Thus we get a chain of irreducible closed subsets of X of length k. ♦

To proceed, we need the following correspondence.

Proposition 2.

Let U be a non-empty open subset of a topological space X. Then there is a bijective correspondence:

where $\overline{C'}$ is the closure of C’ in X.

Proof

First, $\overline{C'}$ is an irreducible subset of X by proposition 2 here. Next note that $C\cap U$ is a non-empty open subset of C; hence by proposition 1 here $C\cap U$ is irreducible. It remains to show:

$\overline{C \cap U} = C, \quad \overline {C'} \cap U = C'$.

For the first statement, $C\cap U$ is a non-empty open subset of C so it is dense in C. The second statement holds for any closed subset C’ of U as noted above, so we are done. ♦

In particular, we have:

Corollary 2.

Let U and X be as above; if C’ is an irreducible component of U, then $\overline {C'}$ is an irreducible component of X.

Proof

By the correspondence in proposition 2, since C’ is a maximal irreducible closed subset of U, $\overline{C'}$ cannot be properly contained in any irreducible closed subset of X. ♦

Lemma 4.

If $(U_i)$ is an open cover for an irreducible space X, and each $U_i \ne \emptyset$, then $\dim X = \sup \dim U_i$.

Proof

(≥) holds by lemma 3. For (≤), suppose $Z_0 \subsetneq \ldots \subsetneq Z_k$ is a chain of closed irreducible subsets of X. Pick an i such that $U_i \cap Z_0 \ne\emptyset$. By proposition 2 we get a chain of irreducible closed subsets of $U_i$ of length k :

$\emptyset \ne U_i \cap Z_0 \subseteq U_i \cap Z_1 \subseteq \ldots \subseteq U_i \cap Z_k$.

So $\dim U_i \ge k$. ♦

Finally, we have:

Proposition 3.

Let V be a quasi-projective variety. If V is irreducible and W is any non-empty open subset of V, then $\dim W = \dim V$.

In particular, $\dim \mathbb P^n_k = \dim \mathbb A^n_k = n$.

Proof

If V is affine, this follows from proposition 2 here. For the general case, V is an open subset of some projective V’ so it suffices to assume V is projective, i.e. a closed subset of some $\mathbb P^n$.

By lemma 4, for some $0\le i \le n$ we have $\dim V = \dim (U_i \cap V)$. Since $U_i \cap V$ is affine, by what we just showed $\dim (U_i \cap V) = \dim (W\cap U_i\cap V)$. On the other hand $\dim (W\cap U_i \cap V) \le \dim W \le \dim V$ by lemma 3, so equality holds throughout. ♦

# Irreducible Subsets of Projective Space

We wish to consider irreducible closed subsets of $\mathbb P^n_k$. For that we need the following preliminary result.

Lemma 1.

Let $A$ be a graded ring; a proper homogeneous ideal $\mathfrak p \subsetneq A$ is prime if and only if:

$a, b \in A \text{ homogeneous}, ab \in \mathfrak p \implies a \in \mathfrak p \text{ or } b\in\mathfrak p$.

Proof

Suppose $\mathfrak p$ is not prime so there exists $a, b\in A-\mathfrak p$ such that $ab\in \mathfrak p$. Since $a\not\in \mathfrak p$, among all homogeneous components of a pick $a_d$ of maximum degree such that $a_d \not\in\mathfrak p$; similarly pick $b_e$ fo b so $b_e \not\in\mathfrak p$.

The degree-(d+e) component of ab is congruent to $a_d b_e$ mod $\mathfrak p$. Since $\mathfrak p$ is homogeneous we have $a_d b_e \in \mathfrak p$, and by the given condition this means $a_d \in \mathfrak p$ or $b_e \in \mathfrak p$, a contradiction. ♦

Exercise A

Prove that a proper homogeneous ideal $\mathfrak q$ of a graded ring A is primary if and only if

$a, b \in A \text{ homogeneous }, ab\in\mathfrak q \implies a \in \mathfrak q \text{ or } b\in r(\mathfrak q)$.

Proposition 1.

Suppose the closed subset $V\subseteq \mathbb P^n_k$ corresponds to the homogeneous radical ideal $\mathfrak a \subseteq B$, $\mathfrak a \ne B_+$, where $B = k[T_0, \ldots, T_n]$.

Then V is irreducible if and only if $\mathfrak a$ is prime.

Proof

(⇒) Suppose V is irreducible; let $\mathfrak a = I_0(V)$. If $f, g \in B - I_0(V)$ are homogeneous, then $C := V_0(\mathfrak a + fB)$ and $D := V_0(\mathfrak a + gB)$ are closed subsets of $\mathbb P^n_k$ properly contained in V. Since V is irreducible the following shows $fg\not\in\mathfrak a$:

$V \supsetneq C \cup D = V_0(\mathfrak a + fB) \cup V_0(\mathfrak a + gB) = V_0((\mathfrak a + fB)(\mathfrak a + gB)) \supseteq V_0(\mathfrak a + fgB)$.

(⇐) Let $V = V_0(\mathfrak p)$ where $\mathfrak p$ is prime. Let $C, D\subseteq V$ be closed subsets with union V. Now write $C = V_0(\mathfrak a)$ and $D = V_0(\mathfrak b)$ for homogeneous radical ideals $\mathfrak a$ and $\mathfrak b$. Then $V = C\cup D = V_0(\mathfrak a \cap \mathfrak b)$. Since $\mathfrak a\cap \mathfrak b$ is a homogeneous radical ideal, $\mathfrak p = \mathfrak a \cap \mathfrak b$. By exercise B here, $\mathfrak a = \mathfrak p$ or $\mathfrak b = \mathfrak p$. ♦

Corollary 1.

Let $V\subseteq \mathbb P^n_k$ be a non-empty closed subset. Then $V$ is irreducible if and only if $\mathrm{cone}(V)$ is irreducible.

Proof

By proposition 1, V is irreducible if and only if $I_0(V)$ is prime. But $I_0(V) = I(\mathrm{cone}(V))$ (from an exercise here) so the result follows. ♦

# Quasi-projective Varieties

Recall that a projective variety is a closed subset of some $\mathbb P^n_k$.

Definition.

A quasi-projective variety is an open subset of a projective variety.

This merely defines it as a set; we need a geometric structure on it.

First, let $F_0, \ldots, F_m \in k[T_0, \ldots, T_n]$ be homogeneous polynomials of the same degree. If $\mathbf v \in \mathbb P^n$ is such that not all $F_i(\mathbf v) = 0$, then we can define a function on an open subset U of $\mathbb P^n$ containing $\mathbf v$ as follows:

$U \longrightarrow \mathbb P^m,\quad \mathbf v' \mapsto ( F_0(\mathbf v') : F_1(\mathbf v') : \ldots : F_m(\mathbf v') )$.

The map is well-defined: indeed if $F_i(\mathbf v) \ne 0$ we can find an open neighbourhood U of $\mathbf v$ such that $0 \not\in F_i(U)$. Also, if we replace projective coordinates $(t_0 : \ldots : t_n)$ with $(\lambda t_0 : \ldots : \lambda t_n)$, then each $F_i(\lambda t_0, \ldots, \lambda t_n) = \lambda^d F_i(t_0, \ldots, t_n)$ where $d = \deg F_i$ so

\begin{aligned} (F_0(\lambda t_0, \ldots, \lambda t_n) : \ldots : F_m(\lambda t_0, \ldots, \lambda t_n)) &= (\lambda^d F_0(t_0, \ldots, t_n) : \ldots: \lambda^d F_m(t_0, \ldots, t_n)) \\ &= (F_0(t_0, \ldots, t_n) : \ldots : F_m(t_0, \ldots, t_n)).\end{aligned}

We write $(F_0 : \ldots : F_m) : U\to \mathbb P^m$ for the resulting function.

Definition.

Let $V \subseteq \mathbb P^n$ and $W \subseteq \mathbb P^m$ be quasi-projective varieties and $\phi : V\to W$ be a function.

We say $\phi$ is regular at $\mathbf v \in V$ if there is an open neighbourhood U of $\mathbf v$ in V such that

$\phi|_U = (F_0 : \ldots : F_m)$ for some homogeneous $F_i \in k[T_0, \ldots, T_n]$ of the same degree.

We say $\phi$ is regular if it is regular at every $\mathbf v\in V$, in which case we also say $\phi : V\to W$ is a morphism of quasi-projective varieties.

From the above definitions, we obtain the category of all quasi-projective varieties and morphisms between them.

### Example 1

First consider the case where $V\subseteq \mathbb A^n$ and $W\subseteq \mathbb A^m$ are closed subsets.

E.g., let $V\subseteq \mathbb A^3$. A regular map $\phi : V\to \mathbb A^1$ in the earlier sense can be expressed as a polynomial $f(X, Y, Z)$, e.g. take $f = X^3 - Y^2 + 3Z$. Via embeddings $\mathbb A^3 \hookrightarrow \mathbb P^3$ and $\mathbb A^1 \hookrightarrow \mathbb P^1$ taking $(x, y, z) \mapsto (1:x:y:z)$ and $t \mapsto (1:t)$ respectively, f can be written in terms of homogeneous coordinates as

$(T_0 : T_1 : T_2 : T_3) \mapsto (T_0^3 : T_1^3 - T_2^2 T_0 + 3 T_3 T_0^2)$

since it is the homogenization of the map $(\frac{T_1}{T_0}, \frac{T_2}{T_0}, \frac{T_3}{T_0}) \mapsto (\frac{T_1}{T_0})^3 - (\frac{T_2}{T_0})^2 + 3(\frac{T_3}{T_0})$. This generalizes to an arbitrary regular map of closed subsets $\phi : (V\subseteq \mathbb A^n) \to (W \subseteq \mathbb A^m)$.

Conversely we have:

Lemma 2.

Let $\phi :V\to W$ be regular under the new definition. Then there exist polynomials $f_1, \ldots, f_m \in k[X_1, \ldots, X_n]$ which represent $\phi$.

Proof

We will prove this for the case where V is irreducible.

For each of $1\le i\le m$, let $\pi_i : \mathbb A^m \to \mathbb A^1$ be projection onto the i-th coordinate. Then $\pi_i \circ \phi : V \to \mathbb A^1$ is regular under the new definition, and by proposition 2 here (and its preceding discussion) $\pi_i \circ \phi$ can be represented as a polynomial $f_i(X_1, \ldots, X_n)$. Hence we see that

$\phi(\mathbf v) = (f_1 (\mathbf v), \ldots, f_m(\mathbf v))$ for polynomials $f_1, \ldots, f_m \in k[X_1, \ldots, X_n]$. ♦

### Example 2

Take the map $\phi : \mathbb P^1 \to \mathbb P^3$ given by

$\phi : (T_0 : T_1) \mapsto (T_0^3 : T_0^2 T_1 : T_0 T_1^2 : T_1^3)$

Note that the same set of polynomials $(F_0, F_1, F_2, F_3)$ works globally over the whole of $\mathbb P^1$.

### Example 3

Suppose $\mathrm{char} k \ne 2$. Let $V\subset \mathbb P^2$ be the closed subset defined by $T_0^2 = T_1^2 + T_2^2$. We define a map $\phi : V \to \mathbb P^1$ as follows

• Outside the point (1 : 1 : 0), take $(T_0 : T_1 : T_2) \mapsto (T_0 - T_1 : T_2)$.
• Outside the point (1 : -1 : 0), take $(T_0 : T_1 : T_2) \mapsto (T_2 : T_0 + T_1)$.

The map agrees outside those two points since $(T_0 - T_1 : T_2) = (T_2 : T_0 + T_1)$ due to the equality $T_0^2 = T_1^2 + T_2^2$.

# Isomorphisms

Definition.

Consider the category of all quasi-projective k-varieties, with morphisms defined as above. Two such varieties are said to be isomorphic if they are isomorphic in the category.

A quasi-projective variety is said to be

• projective if it is isomorphic to a closed subset of some $\mathbb P^n_k$ (this generalizes the existing definition of projective varieties);
• affine if it is isomorphic to an affine k-variety (closed subspace of some $\mathbb A^n$);
• quasi-affine if it is isomorphic to an open subset of an affine variety.

### Example 4

In example 3 above, we get an isomorphism $\phi : V\to \mathbb P^1$ since we have the reverse map

$\mathbb \psi : \mathbb P^1 \to V, \quad (U_0 : U_1) \mapsto (U_0^2 + U_1^2 : U_1^2 - U_0^2 : 2U_0 U_1)$.

As an exercise, prove that $\phi\circ \psi = 1_{\mathbb P^1}$ and $\psi\circ \phi = 1_V$.

Definition.

The coordinate ring of a quasi-projective variety V is the set

$k[V] := \{ f : V\to \mathbb A^1 : f \text{ regular } \}$,

taken to be a k-algebra via point-wise addition and multiplication:

$f, g : V\to\mathbb A^1 \text{ regular } \implies \begin{cases} (f+g) :V \to \mathbb A^1, \ &\mathbf v \mapsto f(\mathbf v) + g(\mathbf v), \\ (fg) : V\to \mathbb A^1, \ &\mathbf v \mapsto f(\mathbf v)g(\mathbf v). \end{cases}$

Note

As before, a regular map $\phi:V\to W$ of quasi-projective varieties induces a ring homomorphism $\phi^* : k[W] \to k[V]$. By lemma 2, when V is affine $k[V]$ agrees with our earlier version (we proved this in the case where V is irreducible).

### Example 5

For each $g\in GL_{n+1}(k)$, we have an automorphism

$\phi_g : \mathbb P^n_k \longrightarrow \mathbb P^n_k, \quad (t_0 : \ldots : t_n) \mapsto (\sum_{j=0}^n g_{0j} t_j : \ldots : \sum_{j=0}^n g_{nj} t_j).$

Note that $\phi_{gh} = \phi_g \circ \phi_h$ for $g, h \in GL_{n+1}(k)$. Also $\phi_g = 1$ if and only if g is a scalar multiple of the identity matrix, so we get an injective homomorphism $PGL_{n+1}(k) = GL_{n+1}(k)/k^* \hookrightarrow \mathrm{Aut} \mathbb P^n_k$. In fact this is an isomorphism of groups.

E.g. when n = 1, we get the Möbius transformations:

$\left[\begin{pmatrix} a & b \\ c & d \end{pmatrix} \in GL_2 k \right] : (t_0 : t_1) \mapsto (at_0 + bt_1 : ct_0 + dt_1).$

### Example 6

We have an isomorphism between the quasi-affine variety $\mathbb A^1 - \{0\}$ and $V = \{(x,y) \in \mathbb A^2 : xy = 1\}$ via the maps

$\mathbb A^1 - \{0\} \to V, \ x \mapsto (x, \frac 1 x), \quad V \to \mathbb A^1 - \{0\}, \ (x, y) \mapsto x.$

Hence $\mathbb A^1-\{0\}$ is an affine variety even though it is not closed in $\mathbb A^1$. From the isomorphism we also have:

$k[\mathbb A^1 - \{0\}] \cong k[V] = k[X, Y]/(XY - 1) \implies k[\mathbb A^1 - \{0\}] = k[X, \frac 1 X].$

### Example 7

Let $V = \mathbb A^2 -\{(0, 0)\}$. We will show that V is not affine. Indeed consider the injection $\phi : V \hookrightarrow \mathbb A^2$ which induces

$\phi^* : k[X, Y] \cong k[\mathbb A^2] \longrightarrow k[V]$.

The map is injective since V is dense in $\mathbb A^2$. Let us show that it is surjective. Suppose $f \in k[V]$ so that $f: V \to \mathbb A^1$ is regular. Write

$V = U \cup U',$ where $U = (\mathbb A^1 - \{0\}) \times \mathbb A^1, \ U' = \mathbb A^1 \times (\mathbb A^1 - \{0\})$.

By example 6, we have $f|_U \in k[U] \cong k[X, Y, \frac 1 X]$ and $f|_{U'} \in k[U']\cong k[X, Y, \frac 1 Y]$. Since $U, U', U\cap U'$ are all dense in V we have injections $k[V] \to k[U] \to k[U\cap U']$ and $k[V] \to k[U'] \to k[U\cap U']$ so that $f \in k[X, Y, \frac 1 X] \cap k[X, Y, \frac 1 Y]$. It is easy to show that this means $f\in k[X, Y]$.

Hence $\phi$ induces an isomorphism of the coordinate rings $k[\mathbb A^2] \to k[V]$. If V is affine, by proposition 1 here $\phi$ would be an isomorphism of varieties, which is a contradiction since $\phi$ is not surjective.

# Projective Space

Definition.

Let $n\ge 0$. On the set $\mathbb A^{n+1}_k - \{\mathbf 0\}$, we consider the equivalence relation:

$v, w \in \mathbb A^{n+1}_k - \{\mathbf 0\} \implies (v \sim w \iff \exists \lambda \in k-\{0\}, w = \lambda v).$

The projective n-space $\mathbb P^n_k$ is the set of equivalence classes under this relation. An element of $\mathbb P^n_k$ is denoted by $(t_0 : t_1 : \ldots : t_n)$ for any representative $(t_0, \ldots, t_n) \in \mathbb A^{n+1}_k - \{\mathbf 0\}$.

For example $(5 : 2 : 3) = (\frac 1 6 : \frac 1 {15} : \frac 1 {10}) \in \mathbb P^2_{\mathbb C}$.

The above only defines $\mathbb P^n_k$ as a set; we need some geometric structure on it for the concept to be meaningful. Throughout this article we will fix $B = k[T_0, \ldots, T_n]$, which is graded by degree.

Definition.

Suppose $F\in B$ is homogeneous and $\mathbf v = (t_0 : t_1 : \ldots : t_n) \in \mathbb P^n_k$. We write $F(\mathbf v) = 0$ if  $F(t_0, \ldots, t_n) = 0$.

Note that the value $F(\mathbf v)$ is in general not well-defined. Indeed if we have two representatives $(t_0 : \ldots : t_n) = (\lambda t_0 : \ldots :\lambda t_n)$ for $\mathbf v$, then

$F(\lambda t_0, \ldots, \lambda t_n) = \lambda^{\deg f} F(t_0, \ldots, t_n).$

Despite this, $F(\lambda t_0, \ldots, \lambda t_n) = 0$ if and only if $F(t_0, \ldots, t_n) = 0$ so the definition is sensible. As in the case of the affine n-space, we will define a correspondence between ideals of B and subsets of $\mathbb P^n_k$.

Definition.

Let $\mathfrak a\subseteq B$ be a graded ideal. Write

$V_0(\mathfrak a) := \{ \mathbf v \in \mathbb P^n : F(\mathbf v) = 0 \text{ for all homogeneous } F \in \mathfrak a\}$.

For a finite sequence of homogeneous polynomials $F_1, \ldots, F_m$ we also write $V_0(F_1, \ldots, F_m)$ for $V_0(\mathfrak a)$ where $\mathfrak a = (F_1, \ldots, F_m)$.

Also let $D_0(F) := \mathbb P^n_k - V_0(F)$.

Exercise A

Prove the following, for any graded ideals $\mathfrak a, \mathfrak b\subseteq B$ and collection of graded ideals $(\mathfrak a_i)$ of B.

• $\mathfrak a \subseteq \mathfrak b \implies V(\mathfrak a)\supseteq V(\mathfrak b)$.
• If $(F_i)$ is a set of homogeneous generators of $\mathfrak a$, then

$V_0(\mathfrak a) = \{\mathbf v \in \mathbb P^n_k : F_i(\mathbf v) = 0 \text{ for all } i\}$.

• $\cap_i V_0(\mathfrak a_i) = V_0(\sum_i \mathfrak a_i)$.
• $V_0(\mathfrak a) \cup V_0(\mathfrak b) = V_0(\mathfrak a \cap \mathfrak b) = V_0(\mathfrak {ab})$.

In the other direction, we define:

Definition.

Let $V\subseteq \mathbb P^n$ be any subset. Then $I_0(V)$ denotes the (graded) ideal of B generated by:

$\{F \in B \text{ homogeneous } : F(\mathbf v) = 0 \text{ for all } \mathbf v \in V\}$.

In summary, we defined the following maps.

# Zariski Topology of Projective Space

We wish to define the Zariski topology on $\mathbb P^n_k$; for that let us take subsets of $\mathbb P^n$ which can be identified with the affine space $\mathbb A^n$. Fix $0\le i \le n$; let

$U_i = \{ (t_0 : t_1 : \ldots : t_n ) \in \mathbb P^n_k : t_i \ne 0\}.$

Note that for $(t_0 : t_1 : \ldots : t_n) \in U_i$ the same point can be represented by $(\frac{t_0}{t_i} : \frac{t_1}{t_i} : \ldots : \frac{t_n}{t_i})$ where the i-th coordinate is 1. This gives a bijection $\varphi_i : U_i \to \mathbb A^n_k$. E.g. for n = 2, we have:

$\varphi_0 : (x : y : z) \mapsto (\frac y x, \frac z x), \quad \varphi_1 : (x : y : z) \mapsto (\frac x y, \frac z y), \quad \varphi_2 : (x : y : z) \mapsto (\frac x z, \frac y z).$

Note that for any $i\ne j$, the intersection $U_i \cap U_j$ maps to an open subset of $\mathbb A^n_k$ via both $\varphi_i$ and $\varphi_j$. Indeed if i < j then $\varphi_j(U_i\cap U_j) \subset \mathbb A^n_k$ is the set of all $(t_0, \ldots, t_n)$ satisfying $t_i \ne 0$ while $\varphi_i(U_i\cap U_j)\subset \mathbb A^n_k$ is the set of all $(t_0, \ldots, t_n)$ satisfying $t_{j-1} \ne 0$. Hence, the following is well-defined.

Definition.

The Zariski topology on $\mathbb P^n_k$ is defined by specifying every $U_i \subseteq \mathbb P^n$ as an open subset, where $U_i$ obtains the Zariski topology of $\mathbb A^n$ from $\varphi_i: U_i \to \mathbb A^n$.

projective variety is a closed subspace $V\subseteq \mathbb P^n_k$.

First, we have the following preliminary results.

Lemma 1.

For any homogeneous $F \in B$, the set $V_0(F)$ is (Zariski) closed in $\mathbb P^n_k$.

Proof

It suffices to show that $V_0(F) \cap U_i$ is closed in $U_i$ for each $0\le i\le n$. But $V_0(F) \cap U_0 = V(f)$, where $f(X_1, \ldots, X_n) = F(1, X_1, \ldots, X_n) \in k[X_1, \ldots, X_n]$. The same holds for $U_1, \ldots, U_n$. ♦

Definition.

For any $f \in k[X_1, \ldots, X_n]$, let

$F(T_0, \ldots, T_n) := T_0^{\deg f} f(\frac {T_1} {T_0}, \ldots, \frac{T_n}{T_0})$

be its homogenization.

Exercise B

1. Prove that if $f,g\in k[X_1, \ldots, X_n]$, the homogenization of fg is the product of the homogenizations of f and g.

2. Let $F\in k[T_0, \ldots, T_n]$ be the homogenization of a non-constant $f \in k[X_1, \ldots, X_n]$. Then f is irreducible if and only if F is irreducible. [ Hint: you may find lemma 2 here helpful. ]

The Zariski topology on $\mathbb P^n$ is consistent with our earlier notions of closed subsets:

Proposition 1.

A subset $V\subseteq \mathbb P^n_k$ is closed under the Zariski topology if and only if $V = V_0(\mathfrak a)$ for some graded ideal $\mathfrak a \subseteq B$.

Proof

(⇐) Suppose $\mathfrak a = (F_1, \ldots, F_m)$ for some homogeneous $F_i \in B$. Since $V_0(\mathfrak a) = \cap_i V_0(F_i)$, by lemma 1 this is Zariski closed.

(⇒) Let $U= \mathbb P^n_k - V$; it suffices to show that any $\mathbf v \in U$ is contained in $D_0(F)$ for some homogeneous $F \in B$. Now $\mathbf v$ is contained in some $U_i$, say $U_0$ without loss of generality. Hence $\mathbf v \in D(f) \subseteq U \cap U_0$ for some $f \in k[X_1, \ldots, X_n]$. If $\mathbf v = (1, t_1, \ldots, t_n)$, then

$f(t_1, \ldots, t_n) \ne 0 \implies F(\mathbf v) \ne 0 \implies \mathbf v \in D_0(F)$, where F = homogenization of f. ♦

### Example

Let $V\subseteq \mathbb P^2_k$ be the projective variety defined by the homogeneous equation $T_0^2 + T_1^2 = T_2^2$. Then

• $V \cap U_0$ is cut out from $\mathbb A^2_k$ by $1 + y^2 = z^2$;
• $V \cap U_1$ is cut out from $\mathbb A^2_k$ by $x^2 + 1 = z^2$;
• $V \cap U_2$ is cut out from $\mathbb A^2_k$ by $x^2 + y^2 = 1$.

# Cone of Projective Variety

We wish to prove the bijective correspondence between graded radical ideals of B and closed subsets $V\subseteq \mathbb P^n_k$. For that, we can piggyback on existing results for the affine case.

Definition.

Let $C\subseteq \mathbb P^n_k$ be any subset. The cone of C is

$\mathrm{cone}(C) := \{\mathbf v = (x_0, \ldots, x_n) \in \mathbb A^{n+1}_k : \mathbf v = \mathbf 0 \text{ or } (x_0 : \ldots : x_n) \in C\}$.

Note

For any non-empty collection of subsets $C_i \subseteq \mathbb P^n_k$ we have

$\bigcup_i \mathrm{cone}(C_i) = \mathrm{cone}(\cup_i C_i), \quad \bigcap_i \mathrm{cone}(C_i) = \mathrm{cone}(\cap_i C_i).$

Also, we have:

Lemma 2.

If $\mathfrak a \subsetneq B$ is a proper graded ideal then $\mathrm{cone}(V_0(\mathfrak a)) = V(\mathfrak a)$.

In particular, by proposition 1, the cone of a closed $V \subseteq \mathbb P^n_k$ is closed in $\mathbb A^{n+1}_k$.

Proof

Note: if $F\in B$ is non-constant homogeneous, then $\mathrm{cone} V_0(F) = V(F) \subseteq \mathbb A^{n+1}_k$. Now pick a set of homogeneous generators $F_i$ for $\mathfrak a$; each $F_i$ is non-constant so

$\mathrm{cone}(V_0(\mathfrak a)) = \mathrm{cone}(\cap_i V_0(F_i)) = \bigcap_i \mathrm{cone} V_0(F_i) = \bigcap_i V(F_i) = V(\mathfrak a)$.

This completes the proof. ♦

Furthermore we have:

Lemma 3.

A non-empty closed subset $W\subseteq \mathbb A^{n+1}$ is of the form $\mathrm{cone}(V)$ for some closed $V\subseteq \mathbb P^n$ if and only if

$\mathbf v \in W, \lambda \in k \implies \lambda \mathbf v \in W$.

When that happens, we call W a closed cone in $\mathbb A^{n+1}$.

Proof

(⇒) is obvious; for (⇐) clearly W = cone(V) for some subset $C\subseteq \mathbb P^n$. Let $\mathfrak a = I(W)$ so that $V(\mathfrak a) = W$. It remains to show $\mathfrak a$ is graded, for we would get $W = \mathrm{cone}(V_0(\mathfrak a))$ by lemma 2.

Indeed if $f\in \mathfrak a$, write $f = f_0 + \ldots + f_d$ as a sum of homogeneous components. Then for any $\mathbf v \in W$ and $\lambda \in k$ we have $\lambda \mathbf v \in W$ which gives

$0 = f(\lambda \mathbf v) = f_0 (\mathbf v) + \lambda \cdot f_1(\mathbf v) + \ldots + \lambda^d \cdot f_d(\mathbf v).$

Thus $f_0, \ldots, f_d$ vanish for any $\mathbf v \in W$, i.e. $f_0, \ldots, f_d \in \mathfrak a$. ♦

# Projective Nullstellensatz

Thus we have the following correspondences:

The top-left column is a bijection by lemma 3; the bottom row is a bijection by Nullstellensatz. In the proof of lemma 3, we also showed that for a closed cone $W\subseteq \mathbb A^{n+1}_k$, the ideal $I(W)$ is graded. Conversely, if $\mathfrak a\subsetneq k[T_0, \ldots, T_n]$ is graded, $V(\mathfrak a)$ is the (non-empty) solution set of a collection of graded polynomials; hence it is a closed cone too.

Hence we have a bijection between

• closed subsets $V\subseteq \mathbb P^n_k$, and
• proper homogeneous radical ideals $\mathfrak a \subsetneq B = k[T_0, \ldots, T_n]$.

The correspondence takes $V \mapsto I(\mathrm{cone}(V)) =: \mathfrak a$ and so

$\mathrm{cone}(V) = V(\mathfrak a) = \mathrm{cone} (V_0 (\mathfrak a)) \implies V = V_0(\mathfrak a).$

The last piece of the puzzle is the map $I_0$ which takes closed subsets of $\mathbb P^n_k$ to homogeneous ideals of B. As an easy exercise, show that

$V \subseteq \mathbb P^n_k \text{ closed non-empty } \implies I_0(V) = I(\mathrm{cone}(V))$.

However $I_0(\emptyset) = (1)$ so we modify our bijection to:

Theorem (Projective Nullstellensatz).

There is a bijection between:

• closed subsets $V \subseteq \mathbb P^n_k$;
• homogeneous radical ideals $\mathfrak a \subseteq B$ such that $\mathfrak a \ne B_+$ where $B_+ := (T_0, \ldots, T_n)$ is the irrelevant ideal of B.

Exercise C

Prove that if $\mathfrak a \subseteq B$ is a homogeneous ideal then $V(\mathfrak a)$ is empty if and only if $\mathfrak a$ contains a power of $B_+$.

[ Hint: prove that the radical of 𝔞 is either (1) or B+. ]

# Primary Decomposition of Ideals

Definition.

Let $\mathfrak a \subsetneq A$ be a proper ideal. A primary decomposition of $\mathfrak a$ is its primary decomposition as an A-submodule of A:

$\mathfrak a = \mathfrak q_1 \cap \mathfrak q_2 \cap \ldots \cap \mathfrak q_n,$

where each $\mathfrak q_i$ is $\mathfrak p_i$-primary for some prime $\mathfrak p_i \subset A$, i.e. $\mathrm{Ass}_A (A/\mathfrak q_i) = \{\mathfrak p_i\}$.

Here is a quick way to determine if an ideal is primary.

Proposition 1.

A proper ideal $\mathfrak b \subsetneq A$ is $\mathfrak p$-primary for some $\mathfrak p$ if and only if:

$x, y \in A, xy \in \mathfrak b \implies x \in \mathfrak b \text{ or } y\in r(\mathfrak b)$,

in which case $\mathfrak p = r(\mathfrak b)$.

Recall that $r(\mathfrak b)$ is the radical of the ideal $\mathfrak b$.

Proof

(⇒) Suppose $\mathrm{Ass}_A A/\mathfrak b = \{\mathfrak p\}$. By proposition 3 here, the set of zero-divisors (in A) of $A/\mathfrak b$ is $\mathfrak p$. Now if $xy\in \mathfrak b$ and $x\not\in \mathfrak b$, then $y\in A$ is a zero-divisor of $A/\mathfrak b$ so $y\in \mathfrak p$.

To prove that $r(\mathfrak b) = \mathfrak p$, suppose $x^n \in \mathfrak b$; then $x^n \in A$ is a zero-divisor for $A/\mathfrak b$ so $x^n \in \mathfrak p$ and we have $x\in \mathfrak p$. Conversely, if $x\in \mathfrak p$, then since every minimal prime in $V(\mathfrak b)$ is an associated prime of $A/\mathfrak b$ (by proposition 2 here), x is contained in every minimal prime of $V(\mathfrak b)$. By proposition 5 here, $x\in r(\mathfrak b)$.

(⇐) Suppose $\mathfrak b$ satisfies the given condition; we first show that $r(\mathfrak b)$ is prime. Suppose $xy \in r(\mathfrak b)$ and $x\not\in r(\mathfrak b)$. For some n > 0, $x^n y^n \in \mathfrak b$. But $x^n \not \in r(\mathfrak b)$ so by the given condition $y^n \in \mathfrak b$ and $y\in r(\mathfrak b)$.

Let $\mathfrak p = r(\mathfrak b)$; it remains to show $\mathrm{Ass}_A (A/\mathfrak b) = \{\mathfrak p\}$. First, $\mathfrak p$ is the unique minimal element of $V(\mathfrak b)$ so $\mathfrak p \in \mathrm{Ass}_A (A/\mathfrak b)$.

Conversely, it remains to show any zero-divisor of $A/\mathfrak b$ as an A-module lies in $\mathfrak p$. But if $x\in A$ and $y\in A - \mathfrak b$ are such that $xy \in \mathfrak b$, then by the given condition $x \in r(\mathfrak b) = \mathfrak p$. ♦

We thus say a proper ideal $\mathfrak q \subsetneq A$ is primary if:

$x, y\in A, xy \in \mathfrak q\implies x \in \mathfrak q \text{ or } y \in r(\mathfrak q)$.

Note that prime ideals are primary, and by proposition 1, the radical of a primary ideal is prime.

Exercise A

1. Prove that if $f:A\to B$ is a ring homomorphism and $\mathfrak q\subset B$ is a primary ideal, then $f^{-1}(\mathfrak q)$ is a primary ideal of A. Also $r(f^{-1}(\mathfrak q)) = f^{-1}(r(\mathfrak q))$.

2. Prove that for an ideal $\mathfrak a \subseteq A$, there is a bijection between primary ideals of A containing $\mathfrak a$ and primary ideals of $A/\mathfrak a$.

# Primary Decomposition and Localization

Throughout this section $S\subseteq A$ is a fixed multiplicative subset.

Proposition 2.

There is a bijection between:

• primary ideals $\mathfrak q \subset A$ such that $\mathfrak q \cap S = \emptyset$;
• primary ideals $\mathfrak q' \subset S^{-1}A$

Furthermore, if $\mathfrak q$ is in the first set and $\mathfrak p = r(\mathfrak q)$, then

$\mathfrak p\cdot S^{-1}A = r(\mathfrak q \cdot S^{-1}A)$.

Proof

By exercise A.2 above and proposition 3 here, it suffices to show: if $\mathfrak q\subset A$ is primary and $\mathfrak q \cap S = \emptyset$ then

• $\mathfrak q' := \mathfrak q (S^{-1}A)$ is primary, and
• $\mathfrak q' \cap A = \mathfrak q$.

For the first claim, note that $\mathfrak q'$ is a proper ideal since $\mathfrak q \cap S = \emptyset$. Suppose $\frac x s, \frac y t \in S^{-1}A$ satisfy $\frac{xy}{st} \in \mathfrak q'$; then for some $s'\in S$ we have $s'xy \in \mathfrak q$. Since $\mathfrak q \cap S = \emptyset$ no power of s’ is contained in $\mathfrak q$ so

$xy\in \mathfrak q \implies x\in\mathfrak q \text{ or } y\in r(\mathfrak q) \implies \frac x s \in \mathfrak q' \text{ or } \frac y t \in r( \mathfrak q')$.

For the second claim, clearly $\mathfrak q' \cap A \supseteq \mathfrak q$. Conversely let $a\in A$ satisfy $\frac a 1 \in \mathfrak q'$. For some $s\in S$ we have $sa \in \mathfrak q$. As above $s\not\in r(\mathfrak q)$ so $a \in \mathfrak q$. ♦

Finally, we will see later that unlike factorization of ideals in a Dedekind domain, primary decompositions are not unique. However we can still salvage the following.

Proposition 3.

Suppose we have minimal primary decompositions

$\mathfrak a = \mathfrak q_1 \cap \ldots \cap \mathfrak q_n = \mathfrak q'_1 \cap \ldots \cap \mathfrak q'_n$

with $\mathfrak p_i = r(\mathfrak q_i) = r(\mathfrak q_i')$ for each i. If $\mathfrak p_i$ is minimal in $V(\mathfrak a)$ then $\mathfrak q_i = \mathfrak q_i'$.

Proof

We localize $\mathfrak a = \mathfrak q_1 \cap \ldots \cap \mathfrak q_n$ at $\mathfrak p := \mathfrak p_i$. But since $\mathfrak p$ is minimal in $V(\mathfrak a)$, we have

$j\ne i \implies \mathfrak p_j \not\subseteq \mathfrak p \implies \mathfrak q_j \not\subseteq \mathfrak p \implies \mathfrak q_j A_{\mathfrak p} = A_{\mathfrak p}$.

Hence $\mathfrak a A_{\mathfrak p} = \mathfrak q_i A_{\mathfrak p}$. By proposition 2 this gives $\mathfrak q_i = \mathfrak q_i A_{\mathfrak p} \cap A = \mathfrak a A_{\mathfrak p} \cap A$ which is uniquely determined by $\mathfrak a$. ♦

Exercise B

Prove the following.

1. If $\mathfrak a \subseteq A$ is a reduced ideal, then it (i.e. $A/\mathfrak a$) has no embedded primes.

2. If $\mathfrak m\subset A$ is maximal, then $\mathfrak q$ is $\mathfrak m$-primary if and only if $\mathfrak m^n \subseteq \mathfrak q \subseteq \mathfrak m$ for some n > 0.

A power of a prime ideal is not primary in general. E.g. let k be a field and $A =k[X, Y, Z]/(Z^2 - XY)$ with $\mathfrak p = (X, Z) \subset A$, which is prime since

$A/\mathfrak p \cong k[X, Y, Z]/(Z^2 - XY, X, Z) \cong k[Y]$.

Then $\mathfrak p^2$ is not primary because $XY = Z^2 \in \mathfrak p^2$ but $X\not\in \mathfrak p^2$ and $Y\not\in r(\mathfrak p^2) = \mathfrak p$.

# Worked Examples

Throughout this section, k denotes a field.

### Example 1

In an earlier example, we saw that for $A = k[X, Y]$ and $\mathfrak a = (X^2, XY)$, the A-module $A/\mathfrak a$ has two associated primes: (X) and (XY). The following are primary decompositions, both of which are clearly minimal:

$(X^2, XY) = (X) \cap (X^2, XY, Y^2) = (X) \cap (X^2, Y)$.

To check that these ideals are primary:

• $(X)$ is prime and hence primary;
• $(X^2, XY, Y^2) = (X, Y)^2$ is a power of the maximal ideal $(X, Y)$; by exercise B.2 it is primary;
• $(X, Y)^2 \subseteq (X^2, Y) \subseteq (X, Y)$ so $(X^2, Y)$ is primary by exercise B.2.

Note that $(X^2, XY, Y^2) \subsetneq (X^2, Y)$. Geometrically, the k-scheme with coordinate ring $A/\mathfrak a$ looks like the following.

### Example 2

Let $A = k[X, Y, Z]$ with $\mathfrak a = (X - YZ, XY)$. Then

$k[X, Y, Z]/(X - YZ) \cong k[Y, Z], \ X \mapsto YZ \implies k[X, Y, Z]/\mathfrak a \cong k[Y, Z]/(Y^2 Z)$.

We have $(Y^2 Z) = (Y^2) \cap (Z)$, an intersection of primary ideals with $r((Y^2)) = (Y)$ and $r((Z)) = (Z)$. This translates to

$\mathfrak a = (X - YZ, Y^2) \cap (X - YZ, Z) = (X - YZ, Y^2) \cap (X, Z)$

with $r((X - YZ, Y^2)) = (X, Y)$ and $(X, Z)$ is already prime.

### Example 3

Let $A = k[X, Y]$ with $\mathfrak a = (X) \cap (X, Y)^2 \cap (X, Y-1)^2$. Then each of $(X)$, $(X,Y)^2$ and $(X, Y-1)^2$ is primary (the first ideal is prime; the remaining two ideals are powers of a maximal ideal). Hence this gives a primary decomposition of $\mathfrak a$ so its associated primes are $(X)$, $(X, Y)$ and $(X, Y-1)$, with the latter two embedded.

Geometrically, the k-scheme with coordinate ring $A/\mathfrak a$ looks like:

Computing an explicit set of generators for $\mathfrak a$ is not trivial, but it can be done with Buchberger’s algorithm.

Exercise C (from Atiyah & MacDonald, Exercise 4.5)

Let $A = k[X, Y, Z]$ and $\mathfrak p_1 = (X, Y)$, $\mathfrak p_2 = (X, Z)$, $\mathfrak m = (X, Y, Z)$ be ideals of A. Set $\mathfrak a := \mathfrak p_1 \mathfrak p_2$. Prove that

$\mathfrak a = \mathfrak p_1 \cap \mathfrak p_2 \cap \mathfrak m^2$

is a minimal primary decomposition of $\mathfrak a$.

# Prime Composition Series

Throughout this article, A is a noetherian ring and all A-modules are finitely generated.

Recall (proposition 1 here) that if M is a noetherian and artinian module, we can find a sequence of submodules whose consecutive factors are simple modules. Correspondingly we have:

Proposition 1.

For finitely generated M, there exists a sequence of submodules

$0 = M_0 \subsetneq M_1 \subsetneq \ldots \subsetneq M_n = M$

such that each $M_{i} / M_{i-1} \cong A/\mathfrak p_i$ as A-modules for prime ideals $\mathfrak p_i\subseteq A$.

Proof

Assume $M\ne 0$. Since $\mathrm{Ass}_A M \ne \emptyset$ by proposition 3 here, there is an embedding of A-modules $A/\mathfrak p \hookrightarrow M$. If equality holds, we are done. Otherwise, let $M_1$ be the image of the map and repeat with $M/M_1$ to obtain a submodule $M_2/M_1 \cong A/\mathfrak p'$. Repeating this process, this must eventually terminate since we cannot have an infinite ascending chain of submodules $M_0 \subsetneq M_1 \subsetneq M_2 \subsetneq \ldots$. ♦

Corollary 1.

Let $0 = M_0 \subset M_1 \subset \dots \subset M_n = M$ be as in proposition 1 with $M_i / M_{i-1} \cong A/\mathfrak p_i$ for some prime $\mathfrak p_i \subset A$. Then

$\mathrm{Ass}_A M \subseteq \{\mathfrak p_1, \ldots, \mathfrak p_n\}$.

In particular if M is finitely generated then $\mathrm{Ass}_A M$ is finite.

Proof

Repeatedly applying proposition 4 here, we have

$\mathrm{Ass}_A M \subseteq \mathrm{Ass}_A (M_1/M_0) \cup \ldots \cup \mathrm{Ass}_A (M_n / M_{n-1}).$

Since each $\mathrm{Ass}_A M_i/M_{i-1} = \mathrm{Ass}_A (A/\mathfrak p_i) = \{\mathfrak p_i\}$ for each i, we are done. ♦

# Associated Primes and Support

If $\mathfrak p\in \mathrm{Ass}_A M$, then there is a map $A/\mathfrak p \hookrightarrow M$; upon localizing at $\mathfrak p$ we get an A-linear $k(\mathfrak p)\hookrightarrow M_{\mathfrak p}$ and so $M_{\mathfrak p} \ne 0$. Hence we have shown:

Lemma 1.

For any module M, $\mathrm{Ass}_A M \subseteq \mathrm{Supp}_A M$.

For a partial reverse inclusion, we have:

Proposition 2.

If $\mathfrak p$ is a minimal element of $\mathrm{Supp}_A M$ then $\mathfrak p \in \mathrm{Ass}_A M$.

Proof

By proposition 5 here, we have

$\mathrm{Ass}_{A_{\mathfrak p}} M_{\mathfrak p} = \{\mathfrak q A_{\mathfrak p} : \mathfrak q \in \mathrm{Ass}_A M \text{ contained in } \mathfrak p\},$

which is non-empty since $M_{\mathfrak p} \ne 0$. By lemma 1 this set lies in $\mathrm{Supp}_{A_{\mathfrak p}} M_{\mathfrak p}$; but since $\mathfrak p$ is minimal in $\mathrm{Supp}_A M$, by exercise B.2 here $\mathrm{Supp}_{A_{\mathfrak p}} M_{\mathfrak p}$ has exactly one element: $\mathfrak p A_{\mathfrak p}$ so

$\mathrm{Ass}_{A_{\mathfrak p}} M_{\mathfrak p} = \{\mathfrak p A_{\mathfrak p}\}$

so $\mathfrak p \in \mathrm{Ass}_A M$ by proposition 5 here again. ♦

Definition.

If $\mathfrak p \in \mathrm{Ass}_A M$ is not a minimal prime of $\mathrm{Supp}_A M$, we call it an embedded prime of M.

Example

Let k be a field, $A = k[X, Y]$ and $M = k[X, Y]/(X^2, XY)$, considered as an A-module. Note that $\mathrm{Ann}_A M = (X^2, XY)$ with radical $(X)$ so we get (by proposition 1 here)

$\mathrm{Supp}_A M = V(\mathrm{Ann}_A M) = V((X))$.

On the other hand, we claim that $\mathrm{Ass}_A M = \{(X), (X, Y)\}$. Indeed we have:

\begin{aligned} f = Y \in M &\implies \mathrm{Ann}_A f = (X), \\ g = X \in M &\implies \mathrm{Ann}_A g = (X, Y),\end{aligned}

so $(X), (X, Y) \in \mathrm{Ass}_A M$ and $(X, Y)$ is an embedded prime of M.

Conversely, we pick the chain of submodules $0 \subset M_1 \subset M$ with $M_1$ generated by $g = X\in M$. Then $M_1 = (X\cdot A)/(X^2\cdot A + XY\cdot A)$; as shown above, $M_1 \cong A/(X,Y)$. Also $M/M_1 \cong A/(X)$ so by corollary 1

$\mathrm{Ass}_A M \subseteq \{(X), (X,Y)\}$.

Exercise A

Find an A-module M and prime ideals $\mathfrak p_1 \subsetneq \mathfrak p_2 \subsetneq \mathfrak p_3$ with $\mathfrak p_1, \mathfrak p_3 \in \mathrm{Ass}_A M$ but $\mathfrak p_2 \not\in \mathrm{Ass}_A M$.

# Existence of Primary Decomposition

In this section we fix an ambient non-zero A-module M (finitely generated of course) and consider its submodules. For each prime $\mathfrak p \subset A$, take the set $\Sigma(\mathfrak p)$ of all submodules $N\subseteq M$ such that $\mathfrak p \not\in \mathrm{Ass}_A N$. Note that

$0\in \Sigma(\mathfrak p) \implies \Sigma(\mathfrak p) \ne \emptyset$.

Now for each prime $\mathfrak p$, fix a maximal element $E(\mathfrak p) \in \Sigma(\mathfrak p)$.

Lemma 2.

We have $\cap_{\mathfrak p} E(\mathfrak p) = 0$.

Note

If $\mathfrak p\not\in \mathrm{Ass}_A M$ then $E(\mathfrak p) = M$ so the above intersection only needs to be taken over $\mathfrak p\in \mathrm{Ass}_A M$, i.e. a finite number of terms.

Proof

Let $N := \cap_{\mathfrak p} E(\mathfrak p)$. If $N\ne 0$ it has an associated prime $\mathfrak p$. Since $N\subseteq E(\mathfrak p)$ we have $\mathfrak p \in \mathrm{Ass}_A E(\mathfrak p)$, a contradiction. ♦

Lemma 3.

Let $\mathfrak p \in \mathrm{Ass}_A M$. Then $\mathrm{Ass}_A (M/E(\mathfrak p)) = \{\mathfrak p \}$.

Proof

By proposition 4 here, we have $\mathrm{Ass}_A M \subseteq \mathrm{Ass}_A E(\mathfrak p) \cup \mathrm{Ass}_A (M/ E(\mathfrak p))$. Since $\mathfrak p \not\in \mathrm{Ass}_A E(\mathfrak p)$ we have $\mathfrak p \in \mathrm{Ass}_A M/E(\mathfrak p)$. On the other hand if $\mathfrak q \in \mathrm{Ass}_A (M/E(\mathfrak p)) - \{\mathfrak p\}$, then we have an injection $A/\mathfrak q \hookrightarrow M/E(\mathfrak p)$ whose image is of the form $Q/E(\mathfrak p)$. But now

$\mathrm{Ass}_A Q \subseteq \mathrm{Ass}_A E(\mathfrak p) \cup \mathrm{Ass}_A Q/E(\mathfrak p) = \mathrm{Ass}_A E(\mathfrak p) \cup \{\mathfrak q\}$

which does not contain $\mathfrak p$, contradicting maximality of $E(\mathfrak p)$. Hence no such $\mathfrak q$ exists. ♦

Definition.

For an associated prime $\mathfrak p$ of M, a $\mathfrak p$primary submodule of M is an $N\subseteq M$ such that $\mathrm{Ass}_A M/N = \{\mathfrak p\}$.

A primary decomposition of M is an expression

$0 = M_1 \cap M_2 \cap \ldots \cap M_n$

where each $M_i$ is a $\mathfrak p_i$-primary submodule of M.

The decomposition is irredundant if for any $1\le i\le n$, $\cap_{j\ne i} M_j \ne 0$. It is minimal if it is irredundant and all $\mathfrak p_i$ are distinct.

By lemmas 2 and 3, a minimal primary decomposition exists for every non-zero module.

It is not true that in every primary decomposition $0 =\cap_{\mathfrak p} M(\mathfrak p)$, $M(\mathfrak p)$ must be a maximal element of $\Sigma(\mathfrak p)$. We will see an example in the next article.

Exercise B

Prove that if $N_1, N_2 \subseteq M$ are $\mathfrak p$-primary submodules, so is $N_1\cap N_2 \subseteq M$.

Hence given any primary decomposition, we can get a minimal one by first removing the redundant terms then taking the intersection of all $M_i$ with the same corresponding $\mathfrak p_i$.

# Properties of Primary Decomposition

Here, we will discuss properties of a general primary decomposition. Throughout this section we fix:

$0 = M_1 \cap M_2 \cap \ldots \cap M_n$ where $M_i$ is $\mathfrak p_i$-primary in M.

Proposition 3.

Every $\mathfrak p \in \mathrm{Ass}_A M$ must occur among the $\mathfrak p_i$.

Proof

Since $\cap_i M_i = 0$ the canonical map $M\hookrightarrow M/M_1 \oplus \ldots \oplus M/M_n$ is injective. Hence

$\mathrm{Ass}_A M \subseteq \cup_{i=1}^n \mathrm{Ass}_A (M/M_i) = \{\mathfrak p_1, \ldots, \mathfrak p_n\}.$

Proposition 4.

If the primary decomposition is irredundant, then every $\mathfrak p_i$ is an associated prime of M.

Proof

If $\mathfrak p_i \not\in \mathrm{Ass}_A M$ then among the injections $M \hookrightarrow \oplus_j M/M_j$ and $M/M_i \hookrightarrow \oplus_j M/M_j$, we have $M \cap (M/M_i) = 0$ since $\mathrm{Ass}_A M$ and $\mathrm{Ass}_A (M/M_i) = \{\mathfrak p_i\}$ are disjoint. Thus

$M\longrightarrow \oplus_{j\ne i} M/M_j$ is injective

and $\cap_{j\ne i} M_j = 0$, contradicting the condition of irredundancy. ♦

Note

Thus proposition 4 gives us a way to compute $\mathrm{Ass}_A M$: find a primary decomposition and remove terms until it becomes irredundant. However, note that proposition 4 does not require $\mathfrak p_1, \ldots, \mathfrak p_n$ to be distinct.

Corollary 2.

If the primary decomposition is minimal, then

$\mathrm{Ass}_A M = \{\mathfrak p_1, \ldots, \mathfrak p_n\}$

has exactly n elements.

Proof

Apply propositions 3 and 4. ♦

Finally, we define the primary decomposition of submodules.

Defintion.

Let $N\subseteq M$ be a submodule. A primary decomposition of N in M is an expression

$N = M_1 \cap M_2 \cap \ldots \cap M_n$

such that $M_i\subseteq M$ is a $\mathfrak p_i$-primary submodule of M.

Note

A primary decomposition of N in M corresponds bijectively to a primary decomposition of M/N. We say the primary decomposition of N in M is irredundant or minimal if the corresponding primary decomposition of M/N is so.

## Commutative Algebra 58

We have already seen two forms of unique factorization.

• In a UFD, every non-zero element is a unique product of irreducible (also prime) elements.
• In a Dedekind domain, every non-zero ideal is a unique product of maximal ideals.

Here, we will introduce yet another type of factorization, called primary decomposition. The main idea is that in a noetherian ring, every ideal (even the zero ideal) is an intersection of primary ideals. E.g. in $\mathbb Z$, every non-zero ideal is an intersection of $p^m \mathbb Z \subset \mathbb Z$, ideals generated by prime powers.

# Annihilators

Let A be a fixed ring and M be an A-module.

Definition.

The annihilator of $m\in M$ in A is

$\mathrm{Ann}_A m := \{ a \in A : am = 0\}$,

an ideal of A. Similarly, the annihilator of M in A is

$\mathrm{Ann}_A M := \{a \in A : \forall m\in M, am = 0\}$,

also an ideal of A. If $\mathrm{Ann}_A M = 0$, we say M is a faithful A-module.

Note that if $\mathfrak a = \mathrm{Ann}_A M$, then M can be regarded as a faithful $A/\mathfrak a$-module.

Exercise A

1. Given A-submodules $N, P \subseteq M$, let

$(N : P) = \{ a \in A: aP\subseteq N\}$.

State and prove the analogue of proposition 2 here for submodules of M. Observe that we can write the annihilators as

$\mathrm{Ann}_A m = (0 : Am), \quad \mathrm{Ann}_A M = (0 : M).$

Conversely, express $(N: P)$ in terms of annihilators.

2. Prove that $(S^{-1}N : S^{-1}P) = S^{-1}(N : P)$ if P is a finitely generated submodule of M.

In particular if M is finitely generated then

$\mathrm{Ann}_{S^{-1}A} S^{-1}M = S^{-1} (\mathrm{Ann}_A M)$.

# Support of a Module

Definition.

The support of an A-module M is:

$\mathrm{Supp}_A M := \{ \mathfrak p \in \mathrm{Spec} A : M_{\mathfrak p} \ne 0\}.$

Geometrically, these are points in Spec A at which the module does not vanish.

Proposition 1.

If M is a finitely generated A-module, then

$\mathrm{Supp}_A M = V(\mathrm{Ann}_A M).$

In particular, the support of M is a closed subspace of $\mathrm{Spec} A$.

Proof

Let $m\in M$. For $\mathfrak p \in \mathrm{Spec} A$ we have $\frac m 1 \in M_{\mathfrak p}$ is zero if and only if there exists $a \in A - \mathfrak p$ such that $am = 0$, equivalently if there exists $a \in (\mathrm{Ann}_A m) - \mathfrak p$. Hence $\frac m 1 \ne 0$ if and only if $\mathrm{Ann}_A m \subseteq \mathfrak p$.

In the general case, let $m_1, \ldots, m_n$ generate M as an A-module. Then

\begin{aligned} M_{\mathfrak p} \ne 0 &\iff \text{for some } i,\ \tfrac {m_i} 1 \in M_{\mathfrak p} \text{ is not zero } \\ &\iff \text{for some } i,\ \mathfrak p \supseteq \mathrm{Ann}_A m_i \\ &\iff \mathfrak p \supseteq \cap_i \mathrm{Ann}_A m_i = \mathrm{Ann}_A M.\end{aligned}

For the last equivalence, recall that $\mathfrak p$ contains $\mathfrak a \cap \mathfrak b$ if and only if it contains either $\mathfrak a$ or $\mathfrak b$. ♦

Proposition 2.

If $0 \to N \to M \to P \to 0$ is a short exact sequence of A-modules, then $\mathrm{Supp}_A M = (\mathrm{Supp}_A N) \cup (\mathrm{Supp}_A P)$.

If N, P are finitely generated A-modules, then

$\mathrm{Supp}_A (N\otimes_A P) = (\mathrm{Supp}_A N) \cap (\mathrm{Supp}_A P)$.

Note

Philosophically, if we imagine the first case as NP  and the second case as N × P, then the result says $N_{\mathfrak p} + P_{\mathfrak p} = 0$ if and only if both terms are zero whereas $N_{\mathfrak p} \times P_{\mathfrak p} = 0$ if and only if at least one term is zero.

Proof

Let $\mathfrak p \subset A$ be prime.

For the first claim, we have a short exact sequence $0 \to N_{\mathfrak p} \to M_{\mathfrak p} \to P_{\mathfrak p} \to 0$ and it follows that $M_{\mathfrak p} = 0$ if and only if $N_{\mathfrak p} = P_{\mathfrak p} = 0$.

For the second claim, we have

$(N \otimes_A P)_{\mathfrak p} = N_{\mathfrak p} \otimes_{A_{\mathfrak p}} P_{\mathfrak p}$

If $N_{\mathfrak p} = 0$ or $P_{\mathfrak p} = 0$, clearly the RHS is zero. Conversely if both are non-zero, since they are finitely generated $A_{\mathfrak p}$-modules, Nakayama’s lemma gives $k(\mathfrak p) \otimes_A N = N_{\mathfrak p}/\mathfrak p N_{\mathfrak p} \ne 0$ and $k(\mathfrak p) \otimes_A P \ne 0$. But these are vector spaces over $k(\mathfrak p)$ so we have

$k(\mathfrak p) \otimes_A N \otimes_A P = [k(\mathfrak p) \otimes_A N] \otimes_{k(\mathfrak p)} [k(\mathfrak p) \otimes_A P] \ne 0 \implies (N\otimes_A P)_{\mathfrak p} \ne 0.$

Exercise B

1. Let $f:M\to N$ be a homomorphism of finitely generated A-modules; prove that $\mathrm{Supp} f = \{\mathfrak p \in \mathrm{Spec} A : f_{\mathfrak p} \ne 0\}$ is a closed subset of Spec A.

2. Prove: if $S\subseteq A$ is multiplicative then

\begin{aligned} \mathrm{Supp}_{S^{-1}A} S^{-1}M &= (\mathrm{Supp}_A M) \cap (\mathrm{Spec} S^{-1}A) \\ &= \{ \mathfrak p (S^{-1}A) : \mathfrak p \in \mathrm{Supp}_A M, \mathfrak p \cap S = \emptyset\}. \end{aligned}

# Associated Primes

Definition.

Let $\mathfrak p \subset A$ be a prime ideal. We say $\mathfrak p$ is associated to the A-module M if $\mathfrak p = \mathrm{Ann}_A m$ for some $m\in M$.

Let $\mathrm{Ass}_A M$ be the set of prime ideals of A associated to M.

Note

We have: $\mathfrak p \in \mathrm{Ass}_A M$ if and only if there is an injective A-linear map $A/\mathfrak p \hookrightarrow M$. Observe that if the annihilator of $m \in M$ is $\mathfrak p$, then so is that of any non-zero multiple of m; this follows immediately from the definition of prime ideals.

Next suppose M is an $A/\mathfrak a$-module; we can compute both $\mathrm{Ass}_A M$ and $\mathrm{Ass}_{A/\mathfrak a} M$. There is a bijection

$\mathrm{Ass}_A M \cong \mathrm{Ass}_{A/\mathfrak a} M, \quad \mathfrak p \mapsto \mathfrak p/\mathfrak a \subset A/\mathfrak a$.

In particular, we can compute $\mathrm{Ass} (A/\mathfrak a)$ by considering $A/\mathfrak a$ as an A-module or a module over itself. The above shows that there is effectively no difference.

Proposition 3.

Suppose A is noetherian. The union of all associated primes of M is its set of zero-divisors

$\{a \in A : am = 0 \text{ for some } m \in M, m\ne 0\}$.

In particular, any non-zero A-module M has an associated prime.

Proof

Fix an $a\in A$ and $m' \in M - \{0\}$ such that $am' = 0$; we need to show a is contained in an associated prime of M.

So let $\Sigma$ be the set of ideals of A containing a of the form $\mathrm{Ann}_A m$ for $m \in M-\{0\}$. Since A is noetherian and $\mathrm{Ann}_A m' \in \Sigma$, there is a maximal $\mathfrak p \in \Sigma$. We will show $\mathfrak p$ is prime; first write $\mathfrak p = \mathrm{Ann}_A m_0$ for some $m_0 \in M-\{0\}$.

Pick $b,c\in A$ such that $bc\in \mathfrak p$ and $b \not\in \mathfrak p$. Since $bm_0 \ne 0$, we have $\mathfrak a := \mathrm{Ann}_A (bm_0) \in \Sigma$. And since $\mathfrak a \supseteq \mathfrak p$, by maximality of $\mathfrak p$ we have $\mathfrak a = \mathfrak p$ so since $bc m_0 = 0$ we have $c\in \mathfrak a = \mathfrak p$. ♦

Henceforth, A denotes a noetherian ring. However, we do not assume all modules are finitely generated at first.

# Properties of Associated Primes

Proposition 4.

Let $0\to N \to M \to P \to 0$ be a short exact sequence of A-modules. Then

$\mathrm{Ass}_A N \subseteq \mathrm{Ass}_A M \subseteq \mathrm{Ass}_A N \cup \mathrm{Ass}_A P.$

Proof

We may assume $N\subseteq M$ is a submodule and $P = M/N$. The first containment in the claim is obvious. For the second, suppose we have an A-linear map $f : A/\mathfrak p \hookrightarrow M$.

If $(\mathrm{im } f )\cap N \ne 0$, then any non-zero $m\in (\mathrm{im }f) \cap N$ has annihilator $\mathfrak p$ so $\mathfrak p \in \mathrm{Ass}_A N$. If $(\mathrm{im } f)\cap N = 0$, then composing $A/\mathfrak p \stackrel f\to M \to M/N$ is still injective, so $\mathfrak p \in \mathrm{Ass}_A (M/N)$. ♦

Corollary 1.

We have $\mathrm{Ass}_A (M \oplus N) = \mathrm{Ass}_A M \cup \mathrm{Ass}_A N$.

Proof

Follows immediately from proposition 4. ♦

Next, we show that taking the set of associated primes commutes with localization.

Proposition 5.

Let $S\subseteq A$ be a multiplicative subset. Then

\begin{aligned} \mathrm{Ass}_{S^{-1}A} (S^{-1}M) &= \mathrm{Ass}_A M \cap \mathrm{Spec} S^{-1}A \\ &= \{\mathfrak p S^{-1}A : \mathfrak p \in \mathrm{Ass}_A M, \ \mathfrak p \cap S = \emptyset\}.\end{aligned}

Proof

(⊇) If $A/\mathfrak p \hookrightarrow M$ and $\mathfrak p \cap S = \emptyset$, then localization at S gives an A-linear map $S^{-1}A/(\mathfrak p S^{-1}A) \hookrightarrow S^{-1}M$.

(⊆) Suppose we have an $S^{-1}A$-linear map $(S^{-1}A)/\mathfrak q \hookrightarrow S^{-1}M$ where $\mathfrak q \subset S^{-1}A$ is prime. By theorem 1 here, we can write $\mathfrak q = \mathfrak p S^{-1}A$ for some prime $\mathfrak p \subset A$ such that $\mathfrak p \cap S = \emptyset$. Now in the injection $(S^{-1}A)/\mathfrak p(S^{-1}A) \hookrightarrow S^{-1}M$ we let $\frac m s$ be the image of 1. It remains to show: there exists $t\in S$ such that $\mathrm{Ann}_A (tm) = \mathfrak p$.

For each $a\in \mathfrak p$, we have $\frac{am}s = 0$ in $S^{-1}M$ so that $s'am = 0$ in M for some $s'\in S$, i.e. $a \in \mathrm{Ann}_A (s'm)$. Pick a generating set $a_1, \ldots, a_n$ of $\mathfrak p$; then for each i there exists $s_i' \in S$ with $a_i \in \mathrm{Ann}_A (s_i' m)$. Then $t := s_1' \ldots s_n'$ satisfies $\mathfrak p \subseteq \mathrm{Ann}_A (tm)$.

Conversely if $a\in \mathrm{Ann}_A (tm)$ then $atm = 0$ so $\frac{at}1 \in S^{-1}A$ lies in the annihilator of $\frac m s$, i.e. in $\mathfrak q$. Then $at \in \mathfrak q \cap A = \mathfrak p$; since $\mathfrak p \cap S = \emptyset$ we have $a\in \mathfrak p$. ♦