In mathematics, open sets are a generalization of open intervals in the real line. In a metric space—that is, when a distance is defined—open sets are the sets that, with every point P, contain all points that are sufficiently near to P (that is, all points whose distance to P is less than some value depending on P).
More generally, one defines open sets as the members of a given collection of subsets of a given set, a collection that has the property of containing every union of its members, every finite intersection of its members, the empty set, and the whole set itself. A set in which such a collection is given is called a topological space, and the collection is called a topology. These conditions are very loose, and allow enormous flexibility in the choice of open sets. For example, every subset can be open (the discrete topology), or no set can be open but the space itself and the empty set (the indiscrete topology).
In practice, however, open sets are usually chosen to provide a notion of nearness that is similar to that of metric spaces, without having a measure of distance defined. In particular, a topology allows defining properties such as continuity, connectedness, and compactness, which were originally defined by means of a distance.
The most common case of a topology without any distance is given by manifolds, which are topological spaces that, near each point, resemble an open set of a Euclidean space, but on which no distance is defined in general. Less intuitive topologies are used in other branches of mathematics; for example, the Zariski topology, which is fundamental in algebraic geometry and scheme theory.
Intuitively, an open set provides a method to distinguish two points. For example, if about one of two points in a topological space, there exists an open set not containing the other (distinct) point, the two points are referred to as topologically distinguishable. In this manner, one may speak of whether two points, or more generally two subsets, of a topological space are "near" without concretely defining a distance. Therefore, topological spaces may be seen as a generalization of spaces equipped with a notion of distance, which are called metric spaces.
In the set of all real numbers, one has the natural Euclidean metric; that is, a function which measures the distance between two real numbers: d(x, y) = |x − y|. Therefore, given a real number x, one can speak of the set of all points close to that real number; that is, within ε of x. In essence, points within ε of x approximate x to an accuracy of degree ε. Note that ε > 0 always but as ε becomes smaller and smaller, one obtains points that approximate x to a higher and higher degree of accuracy. For example, if x = 0 and ε = 1, the points within ε of x are precisely the points of the interval (−1, 1); that is, the set of all real numbers between −1 and 1. However, with ε = 0.5, the points within ε of x are precisely the points of (−0.5, 0.5). Clearly, these points approximate x to a greater degree of accuracy than when ε = 1.
The previous discussion shows, for the case x = 0, that one may approximate x to higher and higher degrees of accuracy by defining ε to be smaller and smaller. In particular, sets of the form (−ε, ε) give us a lot of information about points close to x = 0. Thus, rather than speaking of a concrete Euclidean metric, one may use sets to describe points close to x. This innovative idea has far-reaching consequences; in particular, by defining different collections of sets containing 0 (distinct from the sets (−ε, ε)), one may find different results regarding the distance between 0 and other real numbers. For example, if we were to define R as the only such set for "measuring distance", all points are close to 0 since there is only one possible degree of accuracy one may achieve in approximating 0: being a member of R. Thus, we find that in some sense, every real number is distance 0 away from 0. It may help in this case to think of the measure as being a binary condition: all things in R are equally close to 0, while any item that is not in R is not close to 0.
In general, one refers to the family of sets containing 0, used to approximate 0, as a neighborhood basis; a member of this neighborhood basis is referred to as an open set. In fact, one may generalize these notions to an arbitrary set (X); rather than just the real numbers. In this case, given a point (x) of that set, one may define a collection of sets "around" (that is, containing) x, used to approximate x. Of course, this collection would have to satisfy certain properties (known as axioms) for otherwise we may not have a well-defined method to measure distance. For example, every point in X should approximate x to some degree of accuracy. Thus X should be in this family. Once we begin to define "smaller" sets containing x, we tend to approximate x to a greater degree of accuracy. Bearing this in mind, one may define the remaining axioms that the family of sets about x is required to satisfy.
Several definitions are given here, in an increasing order of technicality. Each one is a special case of the next one.
This generalizes the Euclidean space example, since Euclidean space with the Euclidean distance is a metric space.
A metric space is a topological space, whose topology consists of the collection of all subsets that are unions of open balls. There are, however, topological spaces that are not metric spaces.
A complement of an open set (relative to the space that the topology is defined on) is called a closed set. A set may be both open and closed (a clopen set). The empty set and the full space are examples of sets that are both open and closed.
Open sets have a fundamental importance in topology. The concept is required to define and make sense of topological space and other topological structures that deal with the notions of closeness and convergence for spaces such as metric spaces and uniform spaces.
Every subset A of a topological space X contains a (possibly empty) open set; the maximum (ordered under inclusion) such open set is called the interior of A. It can be constructed by taking the union of all the open sets contained in A.
An open set on the real line has the characteristic property that it is a countable union of disjoint open intervals.
Moreover, a subset is a regular open set if and only if it is preopen and semi-closed. The intersection of an α-open set and a semi-preopen (resp. semi-open, preopen, b-open) set is a semi-preopen (resp. semi-open, preopen, b-open) set. Preopen sets need not be semi-open and semi-open sets need not be preopen.