Let's say we have a metric space
, consisting of a set
of points X, and a function d
) which gives the distance
between any two points x
which are members of X.
A subset V of X is said to be an open set where for any member, v, of V, all the members of X which have a distance from v less than some positive nonzero constant are also members of V
For each v in V, there is some constant, C > 0 such that for all x in X, if d(v, x) < C, then x is also in V.
for all v in V, there exists r > 0 such that BX(v, r) is a subset of V
, r) is an open ball
in X with radius r and centered on v
A closed set in X is just the complement in X of some open set V which is a subset of X.
By convention, the empty set is considered to be open. (We need convention because there are no members of the empty set to apply the condition to.)
X itself is trivially an open set, and, as the complement of the empty set, it is also a closed set.
If we take X as the reals, under the usual topoogy, then the set [0,1] (all the reals between and including 0 and 1) is not open. In a sense, this is because 0 and 1, the greatest lower bound (infimum) and least upper bound (supremum) respectively, are both members of [0,1], which contradicts our requirement for the constant C to be nonzero. In the case of the set (0,1) (just the same as [0,1], except it doesn't contain 0 and 1), we can use the fact that 0 and 1 are not in the set to construct a nonzero C for any point inside the set.
Any subset of X constructed by union or (finite) intersection operations on these open sets is also open, so that you can never get to a set that isn't open by doing unions or (a finite number of) intersections on these sets.
This set of open subsets of X defines the metric topology on X.
If we have other ways of specifying subsets of X which meet this requirement of closure under union and finite intersection, they will define different topologies on it. That is, a way of specifying the open sets is pretty much all you need to define a topology on your collection of points, X. The concept of a topological space is far more general than that of a metric space - it doesn't need to have any distance function that makes sense, for example. Non-metric (or even weirder) spaces may be harder to visualise, since they correspond less well to our normal physical intuitions about "space".