TL;DR
A set in a metric space is closed when its complement, the set of points outside , is open. Equivalently, if a sequence of points in converges, its limit is still in . Closed sets matter because they keep limits from escaping, which is what makes many existence proofs work.
Builds on: Open Set, Set Operations · Leads to: Compact Set, Continuity, Extreme Value Theorem
Where it's used
Finding the largest and smallest values. A continuous function on a closed and bounded interval such as always reaches a largest and a smallest value. The extreme value theorem needs the interval to be closed. On the open interval the function reaches neither its largest value nor its smallest, because the values approach 1 and 0 without ever reaching them.
Solution sets of equations. Take a continuous function and look at the set of inputs where . This set is closed, because its complement, the set where , is open. Engineers use this fact when they describe a safe region by a continuous limit, such as "the pressure stays at or below 3 bar". A sensor reading exactly 3 bar is still safe, so the boundary belongs to the safe set.
Feasible regions in optimisation. An optimisation problem asks for the smallest value of a cost over a set of allowed choices. If the allowed choices form a bounded and closed set in finite dimensions, and the cost is continuous, the best choice is guaranteed to exist. Textbooks state this as a standing assumption before they search for the minimum, and the assumption is checked by showing the allowed set is closed.
How it works
Work on the real line with the ordinary distance . Take the set , the numbers from 1 to 3 including both ends. To decide whether is closed, test its complement for openness.
-
Write down the complement. The points not in are together with . Check: 0.5 is not in , and 3.4 is not in .
-
Pick an outside point and a small ball. Take and radius . The ball is . Check: every number in it is below 1, so none of them is in .
-
Try an outside point on the other side. Take and . The ball is . Check: every number in it is above 3, so again none of them is in .
-
Look hard at the edges. The point 1 belongs to , so it is not part of the complement and needs no test. The point just outside, , has ball with , which lies entirely below 1. Check: the highest number in the ball, 0.95, is still below 1.
-
Conclude. Every point of the complement has a ball lying inside the complement, so the complement is open. Therefore is closed.
Now compare , which leaves out its left end. The point 1 is outside . Any ball around 1 contains numbers slightly above 1, such as , and those are in . So the complement of is not open at 1, and is not closed.
flowchart LR
A["Take a set F"] --> B["Form the complement F^c"]
B --> C["Pick a point x in F^c"]
C --> D{"Is there a ball around x inside F^c?"}
D -- yes --> E["Next point of F^c"]
D -- no --> F["F is not closed"]
E --> C
E --> G["Every point passes: F is closed"]
The math
Let be a metric space and let . The set is closed when its complement is open.
Here means "without": is everything in that is not in . The symbol means "is not an element of".
Step 2 in symbols: the complement
On the real line with , the complement is . A point is in the complement exactly when or .
Step 3 in symbols: the ball test
The complement is open when, for each with or , some radius makes . For and , , and every there satisfies , so it avoids . For and the same argument gives .
Step 4 in symbols: sequences
The same set can be tested with sequences, which is the form many proofs use. is closed exactly when this holds: for every sequence in that converges to a point of , the limit is also in . Take , which lies in for every and converges to 1. The limit 1 is in , as the test requires. For , the sequence still lies in and converges to 1, but 1 is not in , so the test fails.
Step 5 in symbols: combining closed sets
Closed sets follow from open sets through complements, and the rules transfer. If and are closed, then is closed. Its complement is , by De Morgan's laws, and a finite intersection of open sets is open by the rule from Open Set. Likewise an arbitrary intersection of closed sets is closed, because its complement is a union of open sets, and unions of open sets are open.
Worked examples
Is closed in the real line?
- The complement is .
- Take the outside point and radius . Then .
- Check the containment: every number in is above 5, so none is in .
- Take the outside point and radius . Then , and every number in it is below 2.
- The same argument works for any outside point, with radius equal to its distance to the nearest end of .
So is closed. Check: the complement has a working ball at 7 and at 1.
Compare , , and on the real line.
- is closed. The complement is . For take , giving , all below 0. For take , giving , all above 1. Every outside point can be handled the same way.
- is not closed. The point 0 is outside , but every ball around 0 contains a positive number. For , contains , which is in .
- is not closed for the same reason at 0, and also at 1. For , contains , which is in .
Check: only contains both of its endpoints, and it is the only one of the three that is closed.
Let , a continuous function on the real line. Show that is closed.
- The complement is , where .
- Take the outside point . Here , so is in the complement.
- Choose . Then .
- Check the containment: , because . So every number in the ball is above , and is positive there. For example .
- The same reasoning works at every point of the complement: the ball can be as large as the gap between the point and .
Try it: is closed? Answer: no. The point is not in , but the points are in and converge to . Every ball around contains points of , so the complement is not open at .
Common mistakes and tradeoffs
It is tempting to think closed means "shut off" or "has a boundary". In fact a set can be closed and still have many boundary points, and a set can be both open and closed. The whole space and the empty set are both open and closed in any metric space, and is neither. The correct test is the ball test on the complement, not the word.
It is tempting to think closed means finite. In fact contains infinitely many points and is closed. Closed sets can be very large; the finite sets are closed, but they are only one case.
It is tempting to think a set is closed whenever it contains its own "edge" points in a loose sense. In fact the test is exact: a set is closed only when every limit of its points is in the set. The set looks like it has its edges, but its left end 0 is a limit of points in the set and is not in it.
When to use it: when you need a limit of points from the set to stay in the set, for example to guarantee that a minimum or maximum exists. When not to use it: when you are working with a set that has no limit points to worry about, or when a set is not closed and you only need its nearby points. Then the closure, the smallest closed set containing your set, is the right object. Alternative: the complement approach and the sequence approach are equivalent in a metric space. Use whichever is easier for the proof at hand; sequences are often quicker for arguments about limits.
History
Georg Cantor studied closed sets of real numbers in the 1880s while working on series and the foundations of analysis. His examples, including the set that now bears his name, showed that sets of points could be far stranger than intervals, and that closedness was the right property for keeping limits inside. Maurice Fréchet introduced metric spaces in 1906, where a set's closedness is defined from the distance alone. Felix Hausdorff's 1914 book on set theory gave the general definition of a topological space, in which closed sets are the complements of open sets. The definition caught on because it worked both for the real line and for the more abstract spaces that later analysis needed.
Recap
- A metric space has a distance , and the ball is the set of points within of .
- A set is open when every point in it has a ball around it that lies inside the set.
- A set is closed when its complement is open, and this is equivalent to: every limit of a sequence in is in .
- Closed sets are closed under finite unions and arbitrary intersections, by De Morgan's laws and the rules for open sets.
- Read next: Compact Set, which combines closedness with boundedness, and Extreme Value Theorem, which uses closed and bounded intervals to guarantee a largest and a smallest value.
Check yourself
QuestionIs the interval closed in the real line? Justify with the complement.Show answer
No. The point 4 is not in , so it is in the complement. Every ball around 4 contains numbers above 4, such as for , and those numbers are in . So the complement is not open at 4, and the set is not closed.
QuestionCompute the ball on the real line and state whether it lies entirely inside .Show answer
. It does not lie inside , because numbers such as are above 3. So the ball around the endpoint 3 is not inside , which means is not open at 3. That is consistent with it being closed: a closed set is allowed to fail openness at its endpoints, and it is the complement that must pass the ball test.
QuestionWhy does the sequence show that the set is not closed?Show answer
Every term is greater than 2 and at most 3, so every term lies in . The sequence converges to 2, because shrinks to 0. The limit 2 is not in , so the set fails the sequence test, and therefore it is not closed.
QuestionA continuous function on the real line has exactly on the set . Explain in words why must be closed.Show answer
The complement of is the set where . Continuity means nearby inputs give nearby outputs, so if at some point, it stays negative on a small ball around that point. That ball lies in the complement, so the complement is open, and therefore is closed.