Skip to content
Tutorials Center
My learning

Topics

Lesson 8 of 36 Β· Metric Spaces

Open and Closed Sets in Metric Spaces

Define open and closed sets with metric balls, learn the union and intersection rules, and see limit points and isolated points through runnable examples.

Now that we have balls, we can define open and closed sets in any metric space. The definitions are the same ones you met on the real line, with "interval" replaced by "ball". The rules you discover here are the rules that topology will take as its axioms.

Open sets

Let (X, d) be a metric space. A subset U βŠ† X is open if for every x ∈ U there is some r > 0 with B(x, r) βŠ† U. In words: from every point of U you can move a little in any direction without leaving U.

Three observations come immediately.

  1. βˆ… and X are open.
  2. Every open ball is open (shown in Open and Closed Balls).
  3. A set is open exactly when it is a union of open balls. Each point has a ball around it inside the set, and the union of all those balls is the whole set.

Theorem. In any metric space, (a) any union of open sets is open, and (b) any finite intersection of open sets is open.

Proof sketch. (a) A point in the union belongs to one of the sets, which contains a ball about it; that ball lies in the union. (b) If x lies in U₁, …, Uβ‚™, pick radii r₁, …, rβ‚™ with B(x, rα΅’) βŠ† Uα΅’ and take r = min rα΅’. The minimum of finitely many positive numbers is positive, and B(x, r) lies in every Uα΅’. ∎

The word finite in (b) is essential, as the intervals (βˆ’1/n, 1/n) showed on the real line. Intersect all of them and you get , a set that is not open.

Closed sets

A subset F βŠ† X is closed if its complement X \ F is open. Using De Morgan's laws, the theorem above flips:

  • any intersection of closed sets is closed;
  • any finite union of closed sets is closed;
  • βˆ… and X are closed.

A set can be open, closed, both, or neither. In ℝ, the interval (0, 1) is open only, [0, 1] is closed only, [0, 1) is neither, and ℝ is both. In a discrete metric space every set is both open and closed.

Limit points, a more concrete view of closed

A point p is a limit point (or accumulation point) of a set A if every ball around p contains a point of A other than p. A point of A that is not a limit point of A is an isolated point: some ball around it contains no other point of A.

Theorem. A set is closed if and only if it contains all of its limit points.

The reason: if a limit point p were outside the closed set F, then p would lie in the open complement, so some ball around p would avoid F. That contradicts p being a limit point of F.

A handy computing tool is the distance from a point to a set, d(x, A) = inf { d(x, a) : a ∈ A }. A point is in the closure of A exactly when d(x, A) = 0. For the set A = {1, 1/2, 1/3, 1/4, …} the point 0 is at distance 0 from A, yet 0 βˆ‰ A, so A is not closed.

Python A set that is missing its limit point

Press Run (or Ctrl + Enter) to see the result here.

Program input Β· what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The truncation to finitely many terms is a computer stand-in for the infinite set: the smallest distance can be made smaller than any positive number by taking more terms.

An example with isolated points

Look at S = {0} βˆͺ {1/n : n β‰₯ 1} as a metric space with the usual distance. Each point 1/n is isolated: its nearest neighbors are 1/(nβˆ’1) and 1/(n+1), so the ball of radius 1/(n(n+1)) around 1/n contains no other point of S (the gap to 1/(n+1) is 1/(n(n+1)), and the gap to 1/(nβˆ’1) is larger). Hence each {1/n} is an open subset of S.

But is not open in S. Any ball around 0 contains 1/n for large n. So S has open points 1/n and a point 0 that is the limit of them.

Python Isolated points and a limit point

Press Run (or Ctrl + Enter) to see the result here.

Program input Β· what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The first lines show the isolation radii shrinking like 1/(n(n+1)) toward the limit point, which is why can never have a ball of positive radius with no other points. The truncated set has a smallest term, so its 0 looks isolated; in the true infinite set it is not.

Interior, closure, boundary

These three operations summarize how a set A sits inside X.

  • The interior of A is the union of all open sets contained in A: the points with a ball inside A.
  • The closure of A is the intersection of all closed sets containing A: A together with its limit points.
  • The boundary of A is the closure minus the interior.

For A = (0, 1) βˆͺ {2} in ℝ: the interior is (0, 1), the closure is [0, 1] βˆͺ {2}, and the boundary is {0, 1, 2}. We study these in general topological spaces in Closed Sets, Closure and Interior.

Check your understanding

Quick check Β· 4 questions

of 4 answered You scored / 4 Β· perfect!

  1. 1. Which statement about open sets in a metric space is true?

    Arbitrary unions of open sets are open; only intersections need to be finite.
  2. 2. The set {1/n : n = 1, 2, 3, ...} in the real line is not closed. Which point shows this?

    0 is a limit point of the set but does not belong to it. A closed set must contain all its limit points.
  3. 3. In a metric space with the discrete metric, which sets are open?

    Each point x has the ball B(x, 1/2) = {x}, so every set is a union of single points, hence open.
  4. 4. What are the interior, closure and boundary of A = (0, 1) in the real line?

    The set is open so its interior is itself; its closure adds the two endpoints, which form the boundary.

Summary

  • A set is open if every point has a ball inside it; closed if its complement is open.
  • Unions of open sets are open; finite intersections of open sets are open. Dually for closed sets.
  • A set is closed exactly when it contains all its limit points.
  • Isolated points are points with a ball containing no other point of the set.
  • Interior, closure and boundary describe how a set sits in the space.

Next: Convergence and Completeness