In mathematics, a set S with a metric d defined on it is said to be "open" if
∀ x ∈ S, ∃ ε > 0 such that d(x, y) < ε ⇒ y ∈ S

or, with plain English pipelinks,
∀ x ∈ S, ∃ ε > 0 such that d(x, y) < ε ⇒ y ∈ S

or, to put it another way,
For every point x in S, there is a positive number ε such that every point that is less than a distance ε from x is also in S.

In simpler words, regardless of how close to the "edge" of S we place x, we can draw a tiny "circle" around it which is wholly within S. This definition only fails if no such ε can be found. For example, the set

{ (x, y) ∈ R2 : x ≥ 0 }

does not fit this definition. In this case, there is no way to draw a circle around a point with x=0 without part of it overlapping the edge and going outside of the set, regardless of how small we make the circle's radius.

In topological spaces, which are generalizations of metric spaces, the definition of an open set is correspondingly expanded. A topological space (X, T) is defined as a set X together with a collection T of subsets of X which obey certain laws. These subsets are defined as open sets. If X has a metric defined on it then the definition takes on the meaning given above.

A set is defined as closed if its complement is open. A set may be simultaneously open and closed (e.g. R, the set of real numbers), but needn't necessarily be either open or closed! (e.g. (0,1])