In mathematics, an open set is a generalization of an open interval in the real line.
In a metric space (a set along with a distance defined between any two points), an open set is a set that, along with every point P, contains 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, an open set is a member 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 subset can be open except 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 notion 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.