In geometry, topology, and related branches of mathematics, a closed set is a set whose complement is an open set. In a topological space, a closed set can be defined as a set which contains all its limit points. In a complete metric space, a closed set is a set which is closed under the limit operation.
In a topological space, a set is closed if and only if it coincides with its closure. Equivalently, a set is closed if and only if it contains all of its limit points.
This is not to be confused with a closed manifold.
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 set A in a space X, 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.