In a topological space, a set is closedif and only if it coincides with its closure. Equivalently, a set is closed if and only if it contains all of its limit points. Yet another equivalent definition is that a set is closed if and only if it contains all of its boundary points. This is not to be confused with a closed manifold.
Properties of closed sets
A closed set contains its own boundary. In other words, if you are "outside" a closed set, you may move a small amount in any direction and still stay outside the set. Note that this is also true if the boundary is the empty set, e.g. in the metric space of rational numbers, for the set of numbers of which the square is less than 2.
In fact, given a set X and a collection F of subsets of X that has these properties, then F will be the collection of closed sets for a unique topology on X. The intersection property also allows one to define the closure of a setA in a spaceX, which is defined as the smallest closed subset of X that is a superset of A. Specifically, the closure of A can be constructed as the intersection of all of these closed supersets. Sets that can be constructed as the union of countably many closed sets are denoted Fσ sets. These sets need not be closed.
The unit interval is closed in the metric space of real numbers, and the set ∩ Q of rational numbers between 0 and 1 is closed in the space of rational numbers, but ∩ Q is not closed in the real numbers.
Some sets are neither open nor closed, for instance the half-open interval 0,1) in the real numbers.
Some sets are both open and closed and are called [clopen sets.
The set of integersZ is an infinite and unbounded closed set in the real numbers.
If X and Y are topological spaces, a function f from X into Y is continuous if and only if preimages of closed sets in Y are closed in X.
More about closed sets
In point set topology, a set A is closed if it contains all its boundary points. The notion of closed set is defined above in terms of open sets, a concept that makes sense for topological spaces, as well as for other spaces that carry topological structures, such as metric spaces, differentiable manifolds, uniform spaces, and gauge spaces. An alternative characterization of closed sets is available via sequences and nets. A subset A of a topological space X is closed in X if and only if every limit of every net of elements of A also belongs toA. In a first-countable space, it is enough to consider only convergent sequences, instead of all nets. One value of this characterization is that it may be used as a definition in the context of convergence spaces, which are more general than topological spaces. Notice that this characterization also depends on the surrounding space X, because whether or not a sequence or net converges in X depends on what points are present in X. Whether a set is closed depends on the space in which it is embedded. However, the compact Hausdorff spaces are "absolutely closed", in the sense that, if you embed a compact Hausdorff spaceK in an arbitrary Hausdorff space X, then K will always be a closed subset of X; the "surrounding space" does not matter here. Stone-Čech compactification, a process that turns a completely regular Hausdorff space into a compact Hausdorff space, may be described as adjoining limits of certain nonconvergent nets to the space. Furthermore, every closed subset of a compact space is compact, and every compact subspace of a Hausdorff space is closed. Closed sets also give a useful characterization of compactness: a topological space X is compact if and only if every collection of nonempty closed subsets of X with empty intersection admits a finite subcollection with empty intersection. A topological space X is disconnected if there exist disjoint, nonempty, open subsets A and B of X whose union is X. Furthermore, X is totally disconnected if it has an open basis consisting of closed sets.