Closed subset of an affine variety… is it affine?

Preliminaries

So, first of all let me give you the definitions I'm dealing with. Let $k$ be an algebraically closed field, and $\mathbb{A}^n = k^n$.

An affine variety is a closed and irreducible subset of $\mathbb{A}^n$.

Here we endow $\mathbb{A}^n$ with the Zariski topology, so a closed subset is the zero set of an ideal in the polynomial ring $k[x_1,\dots,x_n]$. The irreducibility condition in the definition of affine variety requires that such an ideal is prime.

A k-space is a topological space $X$ together with a sheaf of $k$-algebras $\mathscr{O}_X$. We require that $\mathscr{O}_X$ is a subsheaf of the sheaf of $k$-valued functions on $X$.

An algebraic variety is an irreducible k-space $X$ such that $\exists$ an open cover $X=\bigcup_{i=1}^n U_i$ where each $U_i$ is an affine variety. Moreover we ask the diagonal $\Delta(X)$ to be closed in $X\times X$.

Now we use the term affine variety also for an algebraic variety which is isomorphic as a $k$-space to an affine variety as defined above.

The question

Given a closed subset of an affine variety, is this subset affine?

Remarks

My professor claimed this to be true, and I noticed some people take this fact as granted on this website as well, so I guess this should be true! Nevertheless I don't see why such a closed subset should be irreducible. But the point is: do we really care? My naive understanding of this affine/not affine business is that for an affine variety we can write down something like a global coordinate system (the coordinate ring), while for a general algebraic variety we have just local coordinates, ie we have many affines patched together in a way that cannot be described globally with the usual tools. Hence if a variety is reducible this is not a real obstruction to being affine: we can still find a global coordinate system. The important thing is that all the components lie in the same $\mathbb{A}^n$

As you can see I'm a bit confused... some clarification about these ideas would be really appreciated!

-

This is just a matter of terminology. In both books I have to hand (Hartshorne, and Eisenbud's "Commutative algebra..."), the authors define an 'affine algebraic set' to be any subset of $\mathbb{A}^n$ given by the vanishing of polynomials, and an 'affine algebraic variety' to be an irreducible such set.

What is perfectly clear (and is possibly what 'The question' really asks, given the absence of the word 'variety' at the end) is that any closed subset of an affine algebraic set is again an affine algebraic set.

In practice though, the word 'variety' often seems to be used more generally, without the irreducibility requirement.

-
Thank you very much, I think my confusion was arising exactly from this point! –  Abramo May 16 '13 at 10:54

The union of two points $\{1\} \cup \{2\}$ is a closed subset of $\Bbb{A}^1$ in the Zariski topology but it is obviously not irreducible.

$$X_1 \times \{a_1\} \subseteq X_1 \times X_2$$

is closed. However the fact that $X_1 \times\{ a_1\}$ is irreducible comes from it not being a closed subset, but rather because it is homeomorphic to $X_1$ that is irreducible. Since irreducibility is preserved under homeomorphism thus $X_1$ irreducible implies that the slice $X_1 \times \{a_1\}$ is irreducible and thus affine.

-
Ok, thanks for your further explanation. Nevertheless, Georges argument really reads like "closed in affine is affine". This wrong interpretation of his answer is my fault then, I apologize –  Abramo May 16 '13 at 10:49

It is not true that any closed subset of an affine variety will be an affine variety. In fact, you may have seen that any affine variety $V\subset \mathbb{A}^n$ has a unique reduction into irreducible components; that is, we can write $V = \cup_{i=1}^n V_i$ such that each $V_i$ is irreducible and $V_i \subsetneq V_j$ for $i\neq j$ and this is unique up to reordering of the $V_i.$ If $V$ has 3 irreducible components, then the union of the first two is a closed subset that is not irreducible (it is already reduced into two pieces!).

-
So this answer ( math.stackexchange.com/a/389399/3416 ) , given by a user with more that 44k reputation and which got 6 upvotes, is wrong? –  Abramo May 16 '13 at 10:03
@Abramo No, it is not wrong. I don't understand how you are connecting our two answers. I told you why closed sets of varieties aren't always irreducible, while Georges showed very special closed subsets still are. –  Ragib Zaman May 16 '13 at 10:25
Here's the reason: he says << the subvariety $X1×{a2}⊂X1×X2$ is closed in the affine variety $X1×X2$ and is thus affine >>. It may be that in this particular example the claim holds, but it sounds like a fact that is true in general –  Abramo May 16 '13 at 10:44
@Abramo: Dear Abramo, Georges is using standard terminology, namely that affine is short-hand for affine algebraic set (or affine scheme, in more general settings). This is to constrast the situation with more general kinds of objects, such as projective, quasi-projective, or quasi-affine algebraic sets (or schemes). This terminological axis (with adjectives of the form affine, projective, quasi-affine, quasi-projective) is somewhat orthogonal to the term variety, which is often (but not always) taken to mean irreducible. Georges's remark shouldn't be taken to be making any claim ... –  Matt E May 17 '13 at 1:47
... about the irreducibility, or non-irreducibility, of the set in question. He is simply saying that (essentially by definition) a closed subset of an affine algebraic set is again an affine algebraic set. Regards, –  Matt E May 17 '13 at 1:48