In algebraic geometry and commutative algebra, the **Zariski topology** is a topology which is primarily defined by its closed sets. It is very different from topologies which are commonly used in the real or complex analysis; in particular, it is not Hausdorff.^{[1]} This topology was introduced primarily by Oscar Zariski and later generalized for making the set of prime ideals of a commutative ring (called the spectrum of the ring) a topological space.

The Zariski topology allows tools from topology to be used to study algebraic varieties, even when the underlying field is not a topological field. This is one of the basic ideas of scheme theory, which allows one to build general algebraic varieties by gluing together affine varieties in a way similar to that in manifold theory, where manifolds are built by gluing together charts, which are open subsets of real affine spaces.

The Zariski topology of an algebraic variety is the topology whose closed sets are the algebraic subsets of the variety.^{[1]} In the case of an algebraic variety over the complex numbers, the Zariski topology is thus coarser than the usual topology, as every algebraic set is closed for the usual topology.

The generalization of the Zariski topology to the set of prime ideals of a commutative ring follows from Hilbert's Nullstellensatz, that establishes a bijective correspondence between the points of an affine variety defined over an algebraically closed field and the maximal ideals of the ring of its regular functions. This suggests defining the Zariski topology on the set of the maximal ideals of a commutative ring as the topology such that a set of maximal ideals is closed if and only if it is the set of all maximal ideals that contain a given ideal. Another basic idea of Grothendieck's scheme theory is to consider as *points*, not only the usual points corresponding to maximal ideals, but also all (irreducible) algebraic varieties, which correspond to prime ideals. Thus the **Zariski topology** on the set of prime ideals (spectrum) of a commutative ring is the topology such that a set of prime ideals is closed if and only if it is the set of all prime ideals that contain a fixed ideal.

In classical algebraic geometry (that is, the part of algebraic geometry in which one does not use schemes, which were introduced by Grothendieck around 1960), the Zariski topology is defined on algebraic varieties.^{[2]} The Zariski topology, defined on the points of the variety, is the topology such that the closed sets are the algebraic subsets of the variety. As the most elementary algebraic varieties are affine and projective varieties, it is useful to make this definition more explicit in both cases. We assume that we are working over a fixed, algebraically closed field *k* (in classical geometry *k* is almost always the complex numbers).

First, we define the topology on the affine space formed by the n-tuples of elements of k. The topology is defined by specifying its closed sets, rather than its open sets, and these are taken simply to be all the algebraic sets in That is, the closed sets are those of the form

where

*V*(*S*) =*V*((*S*)), where (*S*) is the ideal generated by the elements of*S*;- For any two ideals of polynomials
*I*,*J*, we have

It follows that finite unions and arbitrary intersections of the sets *V*(*S*) are also of this form, so that these sets form the closed sets of a topology (equivalently, their complements, denoted *D*(*S*) and called *principal open sets*, form the topology itself). This is the Zariski topology on

If *X* is an affine algebraic set (irreducible or not) then the Zariski topology on it is defined simply to be the subspace topology induced by its inclusion into some Equivalently, it can be checked that:

- The elements of the affine coordinate ring act as functions on
*X*just as the elements of act as functions on ; here,*I*(*X*) is the ideal of all polynomials vanishing on*X*. - For any set of polynomials
*S*, let*T*be the set of their images in*A*(*X*). Then the subset of*X*(these notations are not standard) is equal to the intersection with*X*of*V(S)*.

This establishes that the above equation, clearly a generalization of the definition of the closed sets in above, defines the Zariski topology on any affine variety.

Recall that *n*-dimensional projective space is defined to be the set of equivalence classes of non-zero points in by identifying two points that differ by a scalar multiple in *k*. The elements of the polynomial ring are not functions on because any point has many representatives that yield different values in a polynomial; however, for homogeneous polynomials the condition of having zero or nonzero value on any given projective point is well-defined since the scalar multiple factors out of the polynomial. Therefore, if *S* is any set of homogeneous polynomials we may reasonably speak of

The same facts as above may be established for these sets, except that the word "ideal" must be replaced by the phrase "homogeneous ideal", so that the *V*(*S*), for sets *S* of homogeneous polynomials, define a topology on As above the complements of these sets are denoted *D*(*S*), or, if confusion is likely to result, *D′*(*S*).

The projective Zariski topology is defined for projective algebraic sets just as the affine one is defined for affine algebraic sets, by taking the subspace topology. Similarly, it may be shown that this topology is defined intrinsically by sets of elements of the projective coordinate ring, by the same formula as above.

An important property of Zariski topologies is that they have a base consisting of simple elements, namely the *D*(*f*) for individual polynomials (or for projective varieties, homogeneous polynomials) *f*. That these form a basis follows from the formula for the intersection of two Zariski-closed sets given above (apply it repeatedly to the principal ideals generated by the generators of (*S*)). The open sets in this base are called *distinguished* or *basic* open sets. The importance of this property results in particular of its use in the definition of an affine scheme.

By Hilbert's basis theorem and some elementary properties of Noetherian rings, every affine or projective coordinate ring is Noetherian. As a consequence, affine or projective spaces with the Zariski topology are Noetherian topological spaces, which implies that any closed subset of these spaces is compact.

However, except for finite algebraic sets, no algebraic set is ever a Hausdorff space. In the old topological literature "compact" was taken to include the Hausdorff property, and this convention is still honored in algebraic geometry; therefore compactness in the modern sense is called "quasicompactness" in algebraic geometry. However, since every point (*a _{1}*, ...,

Every regular map of varieties is continuous in the Zariski topology. In fact, the Zariski topology is the weakest topology (with the fewest open sets) in which this is true and in which points are closed. This is easily verified by noting that the Zariski-closed sets are simply the intersections of the inverse images of 0 by the polynomial functions, considered as regular maps into

In modern algebraic geometry, an algebraic variety is often represented by its associated scheme, which is a topological space (equipped with additional structures) that is locally homeomorphic to the spectrum of a ring.^{[3]} The *spectrum of a commutative ring* *A*, denoted Spec *A*, is the set of the prime ideals of *A*, equipped with the **Zariski topology**, for which the closed sets are the sets

where *I* is an ideal.

To see the connection with the classical picture, note that for any set *S* of polynomials (over an algebraically closed field), it follows from Hilbert's Nullstellensatz that the points of *V*(*S*) (in the old sense) are exactly the tuples (*a*_{1}, ..., *a _{n}*) such that the ideal generated by the polynomials

Another way, perhaps more similar to the original, to interpret the modern definition is to realize that the elements of *A* can actually be thought of as functions on the prime ideals of *A*; namely, as functions on Spec *A*. Simply, any prime ideal *P* has a corresponding residue field, which is the field of fractions of the quotient *A*/*P*, and any element of *A* has a reflection in this residue field. Furthermore, the elements that are actually in *P* are precisely those whose reflection vanishes at *P*. So if we think of the map, associated to any element *a* of *A*:

("evaluation of *a*"), which assigns to each point its reflection in the residue field there, as a function on Spec *A* (whose values, admittedly, lie in different fields at different points), then we have

More generally, *V*(*I*) for any ideal *I* is the common set on which all the "functions" in *I* vanish, which is formally similar to the classical definition. In fact, they agree in the sense that when *A* is the ring of polynomials over some algebraically closed field *k*, the maximal ideals of *A* are (as discussed in the previous paragraph) identified with *n*-tuples of elements of *k*, their residue fields are just *k*, and the "evaluation" maps are actually evaluation of polynomials at the corresponding *n*-tuples. Since as shown above, the classical definition is essentially the modern definition with only maximal ideals considered, this shows that the interpretation of the modern definition as "zero sets of functions" agrees with the classical definition where they both make sense.

Just as Spec replaces affine varieties, the Proj construction replaces projective varieties in modern algebraic geometry. Just as in the classical case, to move from the affine to the projective definition we need only replace "ideal" by "homogeneous ideal", though there is a complication involving the "irrelevant maximal ideal," which is discussed in the cited article.

- Spec
*k*, the spectrum of a field*k*is the topological space with one element. - Spec ℤ, the spectrum of the integers has a closed point for every prime number
*p*corresponding to the maximal ideal (*p*) ⊂ ℤ, and one non-closed generic point (i.e., whose closure is the whole space) corresponding to the zero ideal (0). So the closed subsets of Spec ℤ are precisely the whole space and the finite unions of closed points. - Spec
*k*[*t*], the spectrum of the polynomial ring over a field*k*: such a polynomial ring is known to be a principal ideal domain and the irreducible polynomials are the prime elements of*k*[*t*]. If*k*is algebraically closed, for example the field of complex numbers, a non-constant polynomial is irreducible if and only if it is linear, of the form*t*−*a*, for some element*a*of*k*. So, the spectrum consists of one closed point for every element*a*of*k*and a generic point, corresponding to the zero ideal, and the set of the closed points is homeomorphic with the affine line*k*equipped with its Zariski topology. Because of this homeomorphism, some authors call*affine line*the spectrum of*k*[*t*]. If*k*is not algebraically closed, for example the field of the real numbers, the picture becomes more complicated because of the existence of non-linear irreducible polynomials. For example, the spectrum of ℝ[*t*] consists of the closed points (*x*−*a*), for*a*in ℝ, the closed points (*x*^{2}+*px*+*q*) where*p*,*q*are in ℝ and with negative discriminant*p*^{2}− 4*q*< 0, and finally a generic point (0). For any field, the closed subsets of Spec*k*[*t*] are finite unions of closed points, and the whole space. (This is clear from the above discussion for algebraically closed fields. The proof of the general case requires some commutative algebra, namely the fact that the Krull dimension of*k*[*t*] is one — see Krull's principal ideal theorem).

The most dramatic change in the topology from the classical picture to the new is that points are no longer necessarily closed; by expanding the definition, Grothendieck introduced generic points, which are the points with maximal closure, that is the minimal prime ideals. The closed points correspond to maximal ideals of *A*. However, the spectrum and projective spectrum are still *T _{0}* spaces: given two points

Just as in classical algebraic geometry, any spectrum or projective spectrum is (quasi)compact, and if the ring in question is Noetherian then the space is a Noetherian space. However, these facts are counterintuitive: we do not normally expect open sets, other than connected components, to be compact, and for affine varieties (for example, Euclidean space) we do not even expect the space itself to be compact. This is one instance of the geometric unsuitability of the Zariski topology. Grothendieck solved this problem by defining the notion of properness of a scheme (actually, of a morphism of schemes), which recovers the intuitive idea of compactness: Proj is proper, but Spec is not.