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 , contain all points that are sufficiently near to (that is, all points whose distance to is less than some value depending on ).
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.

** Motivation **

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: . 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.

** Definitions **

Several definitions are given here, in an increasing order of technicality. Each one is a special case of the next one.

** Euclidean space **

A subset $U$ of the Euclidean -space is ''open'' if, for every point in $U$, there exists a positive real number (depending on ) such that a point in belongs to $U$ as soon as its Euclidean distance from is smaller than . Equivalently, a subset $U$ of is open if every point in $U$ is the center of an open ball contained in $U.$

** Metric space **

A subset ''U'' of a metric space is called ''open'' if, given any point ''x'' in ''U'', there exists a real number ''ε'' > 0 such that, given any point $y\; \backslash in\; M$ satisfying , ''y'' also belongs to ''U''. Equivalently, ''U'' is open if every point in ''U'' has a neighborhood contained in ''U''.
This generalizes the Euclidean space example, since Euclidean space with the Euclidean distance is a metric space.

** Topological space **

A topological space is a set on which a topology is defined, which consists of a collection of subsets that are said to be ''open'', and satisfy the axioms given below.
More precisely, let $X$ be a set. A family $\backslash tau$ of subsets of $X$ is a ''topology'' on $X$, and the elements of $\backslash tau$ are the ''open sets'' of the topology if
* $X\; \backslash in\; \backslash tau$ and $\backslash varnothing\; \backslash in\; \backslash tau\backslash qquad\backslash qquad\backslash qquad$ (both $X$ and $\backslash varnothing$ are open sets)
* $\backslash left\backslash \; \backslash subseteq\; \backslash tau$ then $\backslash bigcup\_\; U\_i\; \backslash in\; \backslash tau\backslash qquad$ (any union of open sets is an open set)
* $U\_1,\; \backslash ldots,\; U\_n\; \backslash in\; \backslash tau$ then $U\_1\; \backslash cap\; \backslash cdots\; \backslash cap\; U\_n\; \backslash in\; \backslash tau\backslash qquad$ (any finite intersection of open sets is an open set)
Infinite intersections of open sets need not be open. For example, the intersection of all intervals of the form $\backslash left(\; -1/n,\; 1/n\; \backslash right),$ where $n$ is a positive integer, is the set $\backslash $ which is not open in the real line.
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.

** Special types of open sets **

** Clopen sets and non-open and/or non-closed sets **

A set might be open, closed, both, or neither. In particular, open and closed sets are not mutually exclusive, meaning that it is in general possible for a subset of a topological space to simultaneously be both an open subset a closed subset. Such subsets are known as . Explicitly, a subset $S$ of a topological space $(X,\; \backslash tau)$ is called if both $S$ and its complement $X\; \backslash setminus\; S$ are open subsets of $(X,\; \backslash tau)$; or equivalently, if $S\; \backslash in\; \backslash tau$ and $X\; \backslash setminus\; S\; \backslash in\; \backslash tau.$
In topological space $(X,\; \backslash tau),$ the empty set $\backslash varnothing$ and the set $X$ itself are always open. These two sets are the most well-known examples of clopen subsets and they show that clopen subsets exist in topological space. To see why $X$ is clopen, begin by recalling that the sets $X$ and $\backslash varnothing$ are, by definition, always open subsets (of $X$). Also by definition, a subset $S$ is called if (and only if) its complement in $X,$ which is the set $X\; \backslash setminus\; S,$ is an open subset. Because the complement (in $X$) of the entire set $S\; :=\; X$ is the empty set (i.e. $X\; \backslash setminus\; S\; =\; \backslash varnothing$), which is an open subset, this means that $S\; =\; X$ is a closed subset of $X$ (by definition of "closed subset"). Hence, no matter what topology is placed on $X,$ the entire space $X$ is simultaneously both an open subset and also a closed subset of $X$; said differently, $X$ is a clopen subset of $X.$ Because the empty set's complement is $X\; \backslash setminus\; \backslash varnothing\; =\; X,$ which is an open subset, the same reasoning can be used to conclude that $S\; :=\; \backslash varnothing$ is also a clopen subset of $X.$
Consider the real line $\backslash R$ endowed with its usual Euclidean topology, whose open sets are defined as follows: every interval $(a,\; b)$ of real numbers belongs to the topology, every union of such intervals, e.g. $(a,\; b)\; \backslash cup\; (c,\; d),$ belongs to the topology, and as always, both $\backslash R$ and $\backslash varnothing$ belong to the topology.
* The interval $I\; =\; (0,\; 1)$ is open in $\backslash R$ because it belongs to the Euclidean topology. If $I$ were to have an open complement, it would mean by definition that $I$ were closed. But $I$ does not have an open complement; its complement is $\backslash R\; \backslash setminus\; I\; =\; (-\backslash infty,\; 0]\; \backslash cup$ which does belong to the Euclidean topology since it is not a union of [[Interval (mathematics)#Including or excluding endpoints|open intervals of the form $(a,\; b).$ Hence, $I$ is an example of a set that is open but not closed.
* By a similar argument, the interval $J\; =\; [0,\; 1]$ is a closed subset but not an open subset.
* Finally, since neither $K\; =\; [0,\; 1)$ nor its complement $\backslash R\; \backslash setminus\; K\; =\; (-\backslash infty,\; 0)\; \backslash cup\; [1,\; \backslash infty)$ belongs to the Euclidean topology (because it can not be written as a union of intervals of the form $(a,\; b)$), this means that $K$ is neither open nor closed.
If a topological space $X$ is endowed with the discrete topology (so that by definition, every subset of $X$ is open) then every subset of $X$ is a clopen subset.
For a more advanced example reminiscent of the discrete topology, suppose that $\backslash mathcal$ is an ultrafilter on a non-empty set $X.$ Then the union $\backslash tau\; :=\; \backslash mathcal\; \backslash cup\; \backslash $ is a topology on $X$ with the property that non-empty proper subset $S$ of $X$ is an open subset or else a closed subset, but never both; that is, if $\backslash varnothing\; \backslash neq\; S\; \backslash subsetneq\; X$ (where $S\; \backslash neq\; X$) then of the following two statements is true: either (1) $S\; \backslash in\; \backslash tau$ or else, (2) $X\; \backslash setminus\; S\; \backslash in\; \backslash tau.$ Said differently, subset is open or closed but the subsets that are both (i.e. that are clopen) are $\backslash varnothing$ and $X.$

** Regular open sets **

A subset $S$ of a topological space $X$ is called a if $\backslash operatorname\; \backslash left(\; \backslash overline\; \backslash right)\; =\; S$ or equivalently, if $\backslash operatorname\; \backslash left(\; \backslash overline\; \backslash right)\; =\; \backslash operatorname\; S,$ where $\backslash operatorname\; S$ (resp. $\backslash operatorname\; S,$ $\backslash overline$) denotes the topological boundary (resp. interior, closure) of $S$ in $X.$
A topological space for which there exists a base consisting of regular open sets is called a .
A subset of $X$ is a regular open set if and only if its complement in $X$ is a regular closed set, where by definition a subset $S$ of $X$ is called a if $\backslash overline\; =\; S$ or equivalently, if $\backslash operatorname\; \backslash left(\; \backslash operatorname\; S\; \backslash right)\; =\; \backslash operatorname\; S.$
Every regular open set (resp. regular closed set) is an open subset (resp. is a closed subset) although in general,One exception if the if $X$ is endowed with the discrete topology, in which case every subset of $X$ is both a regular open subset and a regular closed subset of $X.$ the converses are true.

** Properties **

The union of any number of open sets, or infinitely many open sets, is open. The intersection of a finite number of open sets is open.
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.

** Uses **

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''.
A function $f\; :\; X\; \backslash to\; Y$ between two topological spaces $X$ and $Y$ is if the preimage of every open set in $Y$ is open in $X.$
The function $f\; :\; X\; \backslash to\; Y$ is called if the image of every open set in $X$ is open in $Y.$
An open set on the real line has the characteristic property that it is a countable union of disjoint open intervals.

** Notes and cautions **

** "Open" is defined relative to a particular topology **

Whether a set is open depends on the topology under consideration. Having opted for greater brevity over greater clarity, we refer to a set ''X'' endowed with a topology $\backslash tau$ as "the topological space ''X''" rather than "the topological space $(X,\; \backslash tau)$", despite the fact that all the topological data is contained in $\backslash tau.$ If there are two topologies on the same set, a set ''U'' that is open in the first topology might fail to be open in the second topology. For example, if ''X'' is any topological space and ''Y'' is any subset of ''X'', the set ''Y'' can be given its own topology (called the 'subspace topology') defined by "a set ''U'' is open in the subspace topology on ''Y'' if and only if ''U'' is the intersection of ''Y'' with an open set from the original topology on ''X''." This potentially introduces new open sets: if ''V'' is open in the original topology on ''X'', but $V\; \backslash cap\; Y$ isn't open in the original topology on ''X'', then $V\; \backslash cap\; Y$ is open in the subspace topology on ''Y''.
As a concrete example of this, if ''U'' is defined as the set of rational numbers in the interval $(0,\; 1),$ then ''U'' is an open subset of the rational numbers, but not of the real numbers. This is because when the surrounding space is the rational numbers, for every point ''x'' in ''U'', there exists a positive number ''a'' such that all points within distance ''a'' of ''x'' are also in ''U''. On the other hand, when the surrounding space is the reals, then for every point ''x'' in ''U'' there is positive ''a'' such that all points within distance ''a'' of ''x'' are in ''U'' (because ''U'' contains no non-rational numbers).

** Generalizations of open sets **

Throughout, $(X,\; \backslash tau)$ will be a topological space.
A subset $A\; \backslash subseteq\; X$ of a topological space $X$ is called:

** See also **

*
*
*
*
*
*
*

** Notes **

** References **

** Bibliography **

*
*

** External links **

*
{{Topology
Category:General topology

- if $A\; ~\backslash subseteq~\; \backslash operatorname\_X\; \backslash left(\; \backslash operatorname\_X\; \backslash left(\; \backslash operatorname\_X\; A\; \backslash right)\; \backslash right)$, and the complement of such a set is called .
- , , or if it satisfies any of the following equivalent conditions:
- $A\; ~\backslash subseteq~\; \backslash operatorname\_X\; \backslash left(\; \backslash operatorname\_X\; A\; \backslash right).$
- There exists subsets $D,\; U\; \backslash subseteq\; X$ such that $U$ is open in $X,$ $D$ is a dense subset of $X,$ and $A\; =\; U\; \backslash cap\; D.$
- There exists an open (in $X$) subset $U\; \backslash subseteq\; X$ such that $A$ is a dense subset of $U.$

- if $A\; ~\backslash subseteq~\; \backslash operatorname\_X\; \backslash left(\; \backslash operatorname\_X\; A\; \backslash right)\; ~\backslash cup~\; \backslash operatorname\_X\; \backslash left(\; \backslash operatorname\_X\; A\; \backslash right)$. The complement of a b-open set is called .
- or if it satisfies any of the following equivalent conditions:
- $A\; ~\backslash subseteq~\; \backslash operatorname\_X\; \backslash left(\; \backslash operatorname\_X\; \backslash left(\; \backslash operatorname\_X\; A\; \backslash right)\; \backslash right)$
- $\backslash operatorname\_X\; A$ is a regular closed subset of $X.$
- There exists a preopen subset $U$ of $X$ such that $U\; \backslash subseteq\; A\; \backslash subseteq\; \backslash operatorname\_X\; U.$

- if it satisfies any of the following equivalent conditions:
- Whenever a sequence in $X$ converges to some point of $A,$ then that sequence is eventually in $A.$ Explicitly, this means that if $x\_\; =\; \backslash left(\; x\_i\; \backslash right)\_^$ is a sequence in $X$ and if there exists some $a\; \backslash in\; A$ is such that $x\_\; \backslash to\; x$ in $(X,\; \backslash tau),$ then $x\_$ is eventually in $A$ (that is, there exists some integer $i$ such that if $j\; \backslash geq\; i,$ then $x\_j\; \backslash in\; A$).
- $A$ is equal to its in $X,$ which by definition is the set :$\backslash begin\; \backslash operatorname\_X\; A\; :\&=\; \backslash \; \backslash \backslash \; \&=\; \backslash \; \backslash \backslash \; \backslash end$

- and is said to have if there exists an open subset $U\; \backslash subseteq\; X$ such that $A\; \backslash bigtriangleup\; U$ is a meager subset, where $\backslash bigtriangleup$ denotes the symmetric difference.. * The subset $A\; \backslash subseteq\; X$ is said to have the Baire property in the restricted sense if for every subset $E$ of $X$ the intersection $A\backslash cap\; E$ has the Baire property relative to $E$..
- if $A\; ~\backslash subseteq~\; \backslash operatorname\_X\; \backslash left(\; \backslash operatorname\_X\; A\; \backslash right)$. The complement in $X$ of a semi-open set is called a set. * The (in $X$) of a subset $A\; \backslash subseteq\; X,$ denoted by $\backslash operatorname\_X\; A,$ is the intersection of all semi-closed subsets of $X$ that contain $A$ as a subset.
- if for each $x\; \backslash in\; A$ there exists some semiopen subset $U$ of $X$ such that $x\; \backslash in\; U\; \backslash subseteq\; \backslash operatorname\_X\; U\; \backslash subseteq\; A.$
- (resp. ) if its complement in $X$ is a θ-closed (resp. ) set, where by definition, a subset of $X$ is called (resp. ) if it is equal to the set of all of its θ-cluster points (resp. δ-cluster points). A point $x\; \backslash in\; X$ is called a (resp. a ) of a subset $B\; \backslash subseteq\; X$ if for every open neighborhood $U$ of $x$ in $X,$ the intersection $B\; \backslash cap\; \backslash operatorname\_X\; U$ is not empty (resp. $B\; \backslash cap\; \backslash operatorname\_X\backslash left(\; \backslash operatorname\_X\; U\; \backslash right)$ is not empty).