Search

Search papers and lessons

Open Set

Level 2 · 10 min read

An open set is one in which every point has a small ball around it that stays entirely inside the set, and open sets are the building blocks of continuity.

On this page

  • Colour = topic mix
  • Discrete math
  • ReadReady to readNot yet

TL;DR

An open set is a set UU in a metric space such that every point of UU has a small open ball around it that lies entirely inside UU. Open sets say which points are "safely inside" a region, with room to move in every direction. They solve the problem of defining continuity and limits in a metric space without needing a formula for the functions involved.

Builds on: Metric Space, Set Operations · Leads to: Continuity, Compact Set, Topological Space

Where it's used

Continuity. A Function between two metric spaces is continuous exactly when the preimage of every open set is open. The preimage of a set VV is the set of inputs whose outputs land in VV. This is the modern definition of continuity, and it is the reason mathematicians study open sets first.

Domains of functions. The natural Logarithm ln⁡x\ln x is defined for every x>0x \gt 0, so its domain is the open set (0,∞)(0, \infty) on the real line. The domain has no endpoint belonging to it, and every point has a small interval around it where the function still makes sense. Many results about functions are proved on open domains for this reason.

Compactness and the extreme value theorem. A continuous function on a closed and bounded interval reaches a largest and a smallest value, which is the extreme value theorem. The proof uses compact sets, and their definition is built from open sets: a set is compact when every covering by open sets can be trimmed to a finite covering.

How it works

Take the real line with the ordinary distance d(x,y)=∣x−y∣d(x, y) = |x - y|. The ball of radius rr around xx is the interval of points within rr of xx. To test whether a set UU is open, do this for each point.

  1. Pick a set and a point in it. Let U=(0,2)U = (0, 2), the numbers strictly between 0 and 2, and take the point x=1x = 1. Check: 11 is in UU.

  2. Choose a radius. Try r=0.5r = 0.5. The ball around 1 is B(1,0.5)=(0.5,1.5)B(1, 0.5) = (0.5, 1.5), the numbers within 0.5 of 1. Check: 0.5 and 1.5 are both exactly 0.5 away from 1.

  3. See whether the ball fits inside UU. Every number between 0.5 and 1.5 lies between 0 and 2, so (0.5,1.5)⊆(0,2)(0.5, 1.5) \subseteq (0, 2). Check: the lowest end 0.5 is above 0 and the highest end 1.5 is below 2.

  4. Handle a point near the edge. Take x=1.9x = 1.9. A radius of 0.5 would stick out past 2, so shrink it. With r=0.1r = 0.1 the ball is (1.8,2.0)(1.8, 2.0). Because the ball is open, it does not include 2 itself, so it fits. Check: every point of (1.8,2.0)(1.8, 2.0) is below 2.

  5. Repeat for every point and decide. UU is open when every one of its points passes steps 2 to 4, with a radius chosen separately for each point. Now take V=[0,2]V = [0, 2], which includes the endpoint 2. For x=2x = 2, every ball contains points above 2. For example B(2,0.5)=(1.5,2.5)B(2, 0.5) = (1.5, 2.5) contains 2.252.25, which is not in VV. So VV is not open.

flowchart LR
    A["Pick a point x in U"] --> B["Choose radius r > 0"]
    B --> C{"Does B(x, r) lie inside U?"}
    C -- yes --> D["Next point"]
    C -- no --> E["Shrink r and try again"]
    E --> C
    D --> F["All points pass: U is open"]

The math

Definition: Open ball and open set

Let (X,d)(X, d) be a metric space. The open ball of radius r>0r \gt 0 around a point x∈Xx \in X is

B(x,r)={y∈X:d(x,y)<r}.B(x, r) = \left\{ y \in X : d(x, y) \lt r \right\}.

A set U⊆XU \subseteq X is open when, for every x∈Ux \in U, there is some r>0r \gt 0 with B(x,r)⊆UB(x, r) \subseteq U.

Here ⊆\subseteq means "is contained in": every point of the ball is also a point of UU. The symbol ∈\in means "is an element of".

Step 2 in symbols: the ball around a point

On the real line, d(x,y)=∣x−y∣d(x, y) = |x - y|, so B(1,0.5)={y:∣y−1∣<0.5}=(0.5,1.5)B(1, 0.5) = \{ y : |y - 1| \lt 0.5 \} = (0.5, 1.5). In general B(x,r)=(x−r,x+r)B(x, r) = (x - r, x + r).

Step 3 in symbols: the containment test

For U=(0,2)U = (0, 2) and x=1.9x = 1.9, the ball B(1.9,0.1)=(1.8,2.0)B(1.9, 0.1) = (1.8, 2.0). Every yy in it satisfies 1.8<y<2.01.8 \lt y \lt 2.0, and 2.02.0 is not included, so 0<y<20 \lt y \lt 2 and B(1.9,0.1)⊆(0,2)B(1.9, 0.1) \subseteq (0, 2). The same argument works for any xx in (a,b)(a, b): take r=min⁡(x−a,b−x)r = \min(x - a, b - x), which is positive, and then B(x,r)⊆(a,b)B(x, r) \subseteq (a, b).

Step 4 in symbols: rules for combining open sets

Two facts follow directly from the definition, and they are what make open sets useful: how they behave under intersections and unions.

  • Finite intersections. If U1U_1 and U2U_2 are open and x∈U1∩U2x \in U_1 \cap U_2, pick r1r_1 and r2r_2 from the definition for each set, and let r=min⁡(r1,r2)>0r = \min(r_1, r_2) \gt 0. Then B(x,r)⊆B(x,r1)⊆U1B(x, r) \subseteq B(x, r_1) \subseteq U_1 and likewise for U2U_2, so B(x,r)⊆U1∩U2B(x, r) \subseteq U_1 \cap U_2. The same argument works for any finite number of sets.
  • Arbitrary unions. If x∈⋃αUαx \in \bigcup_\alpha U_\alpha, then x∈Uβx \in U_\beta for some β\beta. The ball around xx inside UβU_\beta is also inside the union, so the union is open. This holds even for infinitely many sets.

Infinite intersections can fail, as the worked examples show.

Worked examples

Example
Example 1: a tiny open interval

Is U=(3,5)U = (3, 5) open in the real line?

  1. Take the point x=4x = 4, which lies in UU.
  2. Choose r=0.5r = 0.5. Then B(4,0.5)=(3.5,4.5)B(4, 0.5) = (3.5, 4.5).
  3. Check the containment: 3<3.53 \lt 3.5 and 4.5<54.5 \lt 5, so every point of the ball lies in (3,5)(3, 5).
  4. The same works for every point, by the formula r=min⁡(x−3,5−x)r = \min(x - 3, 5 - x) from the containment test above.

So (3,5)(3, 5) is open. Check: the ball around 4 with radius 0.5 is inside UU.

Example
Example 2: the standard case, closed and half-open intervals

Compare three sets on the real line: A=[0,1]A = [0, 1], B=[0,1)B = [0, 1), and C=(0,1)C = (0, 1).

  1. CC is open: by Example 1's method, each point xx in (0,1)(0, 1) has r=min⁡(x,1−x)r = \min(x, 1 - x) and B(x,r)⊆CB(x, r) \subseteq C.
  2. AA is not open: the point 00 is in AA, but every ball around 00 contains negative numbers. For r=0.1r = 0.1, B(0,0.1)=(−0.1,0.1)B(0, 0.1) = (-0.1, 0.1) contains −0.05-0.05, which is not in AA.
  3. BB is not open for the same reason at the point 00: the ball (−0.1,0.1)(-0.1, 0.1) contains −0.05-0.05, which is not in [0,1)[0, 1).
  4. The endpoint 11 is not in BB, so it causes no trouble there, but the endpoint 00 does.

Check: CC is open, while AA and BB both fail at the endpoint 00, and AA also fails at 11.

Example
Example 3: a realistic infinite intersection

Each of the sets Un=(0,1+1n)U_n = (0, 1 + \tfrac{1}{n}), for n=1,2,3,…n = 1, 2, 3, \ldots, is open, because each is an open interval. Is their intersection ⋂nUn\bigcap_{n} U_n open?

  1. Find the intersection. A number xx lies in every UnU_n exactly when 0<x<1+1n0 \lt x \lt 1 + \tfrac{1}{n} for all nn.
  2. As nn grows, 1n\tfrac{1}{n} shrinks toward 0, so x≤1x \le 1 is needed, and any xx with 0<x≤10 \lt x \le 1 works.
  3. So ⋂nUn=(0,1]\bigcap_n U_n = (0, 1].
  4. Test the point 11. Any ball around 11 contains 1+r21 + \tfrac{r}{2}, which is above 1.
  5. That number is not in (0,1](0, 1], so the intersection fails the test at 11.

Try it: is (0,1](0, 1] open? Answer: no. The intersection of open sets is not always open when there are infinitely many of them, because it can gain a point, the endpoint 1, that has no ball around it inside the set.

Common mistakes and tradeoffs

It is tempting to think open is the opposite of closed. In fact a set can be both, or neither. The whole space and the empty set are both open and closed in any metric space, and [0,1)[0, 1) is neither. The correct test is the ball test above, not the word.

It is tempting to think an open set has to be large or thick. In fact a single point can be open. In the discrete metric, where d(x,y)=1d(x, y) = 1 for x≠yx \neq y and d(x,x)=0d(x, x) = 0, the ball B(x,12)B(x, \tfrac{1}{2}) is just {x}\{x\}, so every point is open and every set is open.

It is tempting to think one radius must work for the whole set. In fact each point gets its own radius. A radius that works for one point can be too large for a point near the edge, which is why step 4 shrinks it.

When to use it: whenever you need to say that a region has room around each of its points, for example to define continuity, convergence or the domain of a function. When not to use it: when the space has no distance function. Then the same ideas are stated with a collection of open sets directly, which is the Topological Space approach. Alternative: a closed set is the complement of an open set, and some proofs are easier to state in terms of closed sets, but the open-set statement is usually the one that generalises.

History

Georg Cantor's work on sets of real numbers in the late 1800s and Henri Poincaré's work on topology gave mathematicians the first clear need for sets of points that behaved like intervals with no edge. In 1906 Maurice Fréchet introduced metric spaces, in which distance alone defines the open sets. In 1914 Felix Hausdorff's book on set theory gave the general definition of a topological space, using neighbourhoods of points rather than a distance. That approach became standard in analysis, and it made continuity and compactness work for spaces far beyond the real line.

Recap

  • A metric space has a distance dd, and a ball B(x,r)B(x, r) is the set of points within rr of xx.
  • A set is open when every point in it has a ball around it that lies entirely inside the set.
  • Open intervals such as (a,b)(a, b) are open. Sets that include an endpoint, such as [a,b][a, b], are not.
  • Any union of open sets is open, and any finite intersection of open sets is open. Infinite intersections can fail.
  • Read next: Continuity, where open sets define what it means for a function to be continuous, and Compact Set, which is defined in terms of open covers.

Check yourself

QuestionIs the interval (2,7)(2, 7) open in the real line? Justify with a ball.Show answer

Yes. Take x=5x = 5 and r=1r = 1. Then B(5,1)=(4,6)B(5, 1) = (4, 6), and 2<42 \lt 4 and 6<76 \lt 7, so the ball lies inside (2,7)(2, 7). The same method works for every point, so the set is open.

QuestionCompute the open ball B(3,0.25)B(3, 0.25) in the real line, and state whether it contains the point 3.2.Show answer

B(3,0.25)={y:∣y−3∣<0.25}=(2.75,3.25)B(3, 0.25) = \{ y : |y - 3| \lt 0.25 \} = (2.75, 3.25). It contains 3.2, because ∣3.2−3∣=0.2<0.25|3.2 - 3| = 0.2 \lt 0.25.

QuestionWhy is the interval [0,1][0, 1] not open, even though its interior points are fine?Show answer

The problem is the endpoint 0. Every ball around 0 contains negative numbers, which are not in [0,1][0, 1], so no radius works at 0. An open set needs a working ball at every point, and one failing point is enough.

QuestionIn the discrete metric on a set XX, with d(x,y)=1d(x, y) = 1 for x≠yx \neq y and d(x,x)=0d(x, x) = 0, explain why every subset of XX is open.Show answer

Take any point xx in a subset UU. The ball B(x,12)B(x, \tfrac{1}{2}) contains only points at distance less than one half from xx, and the only such point is xx itself, so B(x,12)={x}B(x, \tfrac{1}{2}) = \{x\}. This ball lies inside UU, so UU is open.

Sources