Open and Closed Sets
What You’ll Learn
Section titled “What You’ll Learn”In this lesson you’ll learn what open and closed mean on the real line, why they are not opposites, what a limit point is, and how closedness relates to sequences. This vocabulary is what the next lesson’s compactness result is stated in.
The Concept
Section titled “The Concept”Neighbourhoods
Section titled “Neighbourhoods”For and , the -neighbourhood of is
Everything in this lesson is phrased in terms of these. “Near ” always means “inside some neighbourhood of .”
Open sets
Section titled “Open sets”is open if for every there is with .
Every point of an open set has room to wiggle: you can move a little in either direction and stay inside.
is open. Given , take , the distance to the nearer end. Note depends on and shrinks as you approach an endpoint - but it’s always positive, which is all that’s required.
is not open, because the point 0 has no room: every neighbourhood of 0 contains negative numbers.
Properties: arbitrary unions of open sets are open, and finite intersections of open sets are open. Infinite intersections can fail, and the standard example is
a single point, which is not open. The word “finite” is load-bearing.
Closed sets
Section titled “Closed sets”is closed if is open.
The most important thing here: open and closed are not opposites.
- is open, not closed.
- is closed, not open.
- is neither.
- and are both.
“Not open” does not mean closed. Sets called both open and closed are sometimes called clopen, and on the real line only and are - a fact equivalent to being connected.
Limit points
Section titled “Limit points”is a limit point of if every neighbourhood of contains a point of other than itself.
The exclusion matters. Without it every point of would trivially qualify.
For the limit points are all of . Both endpoints are limit points despite not belonging to - that’s the whole point of the notion.
For , the only limit point is 0. Each is isolated: a small enough neighbourhood catches no other member of .
A point of that is not a limit point is isolated. The set consists entirely of isolated points and has no limit points at all, which makes it closed.
The sequential characterization
Section titled “The sequential characterization”This is the version you’ll actually use.
is closed whenever and , we have .
A closed set contains the limits of its own convergent sequences. Closedness is closure under taking limits, which is where the name comes from.
That immediately explains why is not closed: and . The set leaks a limit.
It also explains why closedness keeps appearing as a hypothesis. Any argument that constructs a point as a limit needs the limit to stay in the set, and closed is exactly that guarantee.
Closure
Section titled “Closure”The closure is together with all its limit points. It is the smallest closed set containing .
. And , because every real is a limit of rationals - the density result from the completeness lesson, restated topologically.
is closed exactly when .
A set that is closed with empty interior
Section titled “A set that is closed with empty interior”The Cantor set is built by removing middle thirds from forever. What remains is closed, contains no interval at all, is uncountable, and has total length 0.
It’s worth knowing that such an object exists, because it is the standing reminder that “closed” and “small” and “big” are independent properties. Intuition built on intervals does not survive here.
Worked Examples
Section titled “Worked Examples”Example 1: Prove is open.
Solution. Let , so . Take
If then and , so . ∎
is the distance to the nearer endpoint, and it depends on . Points near an end get a small ; that’s fine, since positivity is all that’s needed.
Example 2: Prove is closed, two ways.
Solution 1 (complement). , a union of two open intervals, hence open. So is closed. ∎
Solution 2 (sequences). Let with . Since for all , the order limit theorem gives . Likewise gives . So . ∎
The second proof is where the order limit theorem earns its place: weak inequalities survive limits, which is exactly what closedness of a closed interval needs.
Example 3: Show is neither open nor closed.
Solution. Not open. The point 0 has no room: every contains negative numbers not in the set.
Not closed. The sequence lies in and converges to 1, which is not in the set.
Neither. ∎
Example 4: Find the limit points of .
Solution. 0 is a limit point. Any neighbourhood contains for , by the Archimedean property, and those points differ from 0.
No point of is a limit point. For a fixed , the nearest other elements are and , at positive distance, so a small enough neighbourhood isolates it.
No other point. Any has positive distance to the set.
So the only limit point is 0, and . Since , is not closed; adding 0 makes it closed.
Example 5: An infinite intersection of open sets.
Solution. Let , each open.
Their intersection is : clearly is in every , and any fails to be in once , which happens by the Archimedean property.
is not open - no neighbourhood of 0 is contained in a single point. So infinite intersections of open sets need not be open, which is why the axiom says finite.
Dually, infinite unions of closed sets need not be closed: .
Example 6: Is open, closed, or neither?
Solution. Not open. Every neighbourhood of a rational contains irrationals, since the irrationals are dense. So no rational has room to wiggle inside .
Not closed. The truncations of are rationals converging to .
Neither. And : the closure of the rationals is everything.
is a good stress test, because it is dense yet contains no interval, and it fails both definitions for different reasons.
Example 7: Is closed?
Solution. Yes. is the union of the open intervals over all integers , and a union of open sets is open. So is closed.
By sequences: a convergent sequence of integers must eventually be constant, since distinct integers are at least 1 apart, so its limit is that integer and lies in .
has no limit points at all. Having no limit points makes closedness automatic, since there is nothing to fail to contain.
Real-World Applications
Section titled “Real-World Applications”Feasible regions in optimization. A constraint defines a closed set; defines an open one. This is not pedantry: closedness is exactly what lets you conclude an optimum is attained rather than merely approached, which is why solvers care whether a constraint is strict.
Numerical tolerance and stability. Open sets are where small perturbations are safe. A parameter sitting strictly inside a stability region has room to wiggle; one on the boundary does not, and the difference is open versus closed.
Image processing. Morphological operations, opening and closing, take their names directly from this topology, and boundary detection is computing the difference between a set and its interior.
Machine learning decision boundaries. A classifier’s decision regions are typically open, with the boundary a measure-zero set where the label is ambiguous. Points near the boundary are exactly those with little wiggle room, which is why they are the ones adversarial examples target.
Control theory. A system is robustly stable when its parameters lie in the interior of the stability region, since manufacturing tolerance moves them slightly. Designing to the boundary is designing to fail.
Domain of definition. A function’s natural domain is often open, such as on , and open domains are exactly where you can differentiate, since a derivative needs limits from both sides.
Retrying will remove your ✅ checkmark until you pass again.