Processing math: 87%
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

8.2: Open and Closed Sets

( \newcommand{\kernel}{\mathrm{null}\,}\)

Topology

It is useful to define a so-called topology. That is we define closed and open sets in a metric space. Before doing so, let us define two special sets.

Let (X,d) be a metric space, xX and δ>0. Then define the open ball or simply ball of radius δ around x as B(x,δ):={yX:d(x,y)<δ}. Similarly we define the closed ball as C(x,δ):={yX:d(x,y)δ}.

When we are dealing with different metric spaces, it is sometimes convenient to emphasize which metric space the ball is in. We do this by writing BX(x,δ):=B(x,δ) or CX(x,δ):=C(x,δ).

Take the metric space R with the standard metric. For xR, and δ>0 we get B(x,δ)=(xδ,x+δ)andC(x,δ)=[xδ,x+δ].

Be careful when working on a subspace. Suppose we take the metric space [0,1] as a subspace of R. Then in [0,1] we get B(0,\nicefrac12)=B[0,1](0,\nicefrac12)=[0,\nicefrac12). This is of course different from \(B_

ParseError: invalid DekiScript (click for details)
Callstack:
    at (Bookshelves/Analysis/Introduction_to_Real_Analysis_(Lebl)/08:_Metric_Spaces/8.02:_Open_and_Closed_Sets), /content/body/div[1]/p[5]/span, line 1, column 1
(0,\nicefrac{1}{2}) = (-\nicefrac{1}{2},\nicefrac{1}{2})\). The important thing to keep in mind is which metric space we are working in.

Let (X,d) be a metric space. A set VX is open if for every xV, there exists a δ>0 such that B(x,δ)V. See . A set EX is closed if the complement Ec=XE is open. When the ambient space X is not clear from context we say V is open in X and E is closed in X.

If xV and V is open, then we say that V is an open neighborhood of x (or sometimes just neighborhood).

Intuitively, an open set is a set that does not include its “boundary.” Note that not every set is either open or closed, in fact generally most subsets are neither.

The set [0,1)R is neither open nor closed. First, every ball in R around 0, (δ,δ) contains negative numbers and hence is not contained in [0,1) and so [0,1) is not open. Second, every ball in R around 1, (1δ,1+δ) contains numbers strictly less than 1 and greater than 0 (e.g. 1\nicefracδ2 as long as δ<2). Thus R[0,1) is not open, and so [0,1) is not closed.

[prop:topology:open] Let (X,d) be a metric space.

  1. [topology:openi] and X are open in X.
  2. [topology:openii] If V1,V2,,Vk are open then kj=1Vj is also open. That is, finite intersection of open sets is open.
  3. [topology:openiii] If {Vλ}λI is an arbitrary collection of open sets, then λIVλ is also open. That is, union of open sets is open.

Note that the index set in [topology:openiii] is arbitrarily large. By λIVλ we simply mean the set of all x such that xVλ for at least one λI.

The set X and are obviously open in X.

Let us prove [topology:openii]. If xkj=1Vj, then xVj for all j. As Vj are all open, there exists a δj>0 for every j such that B(x,δj)Vj. Take δ:=min{δ1,,δk} and note that δ>0. We have B(x,δ)B(x,δj)Vj for every j and thus B(x,δ)kj=1Vj. Thus the intersection is open.

Let us prove [topology:openiii]. If xλIVλ, then xVλ for some λI. As Vλ is open then there exists a δ>0 such that B(x,δ)Vλ. But then B(x,δ)λIVλ and so the union is open.

The main thing to notice is the difference between items [topology:openii] and [topology:openiii]. Item [topology:openii] is not true for an arbitrary intersection, for example n=1(\nicefrac1n,\nicefrac1n)={0}, which is not open.

The proof of the following analogous proposition for closed sets is left as an exercise.

[prop:topology:closed] Let (X,d) be a metric space.

  1. [topology:closedi] and X are closed in X.
  2. [topology:closedii] If {Eλ}λI is an arbitrary collection of closed sets, then λIEλ is also closed. That is, intersection of closed sets is closed.
  3. [topology:closediii] If E1,E2,,Ek are closed then kj=1Ej is also closed. That is, finite union of closed sets is closed.

We have not yet shown that the open ball is open and the closed ball is closed. Let us show this fact now to justify the terminology.

[prop:topology:ballsopenclosed] Let (X,d) be a metric space, xX, and δ>0. Then B(x,δ) is open and C(x,δ) is closed.

Let yB(x,δ). Let α:=δd(x,y). Of course α>0. Now let zB(y,α). Then d(x,z)d(x,y)+d(y,z)<d(x,y)+α=d(x,y)+δd(x,y)=δ. Therefore zB(x,δ) for every zB(y,α). So B(y,α)B(x,δ) and B(x,δ) is open.

The proof that C(x,δ) is closed is left as an exercise.

Again be careful about what is the ambient metric space. As [0,\nicefrac12) is an open ball in [0,1], this means that [0,\nicefrac12) is an open set in [0,1]. On the other hand [0,\nicefrac12) is neither open nor closed in R.

A useful way to think about an open set is a union of open balls. If U is open, then for each xU, there is a δx>0 (depending on x of course) such that B(x,δx)U. Then U=xUB(x,δx).

The proof of the following proposition is left as an exercise. Note that there are other open and closed sets in R.

[prop:topology:intervals:openclosed] Let a<b be two real numbers. Then (a,b), (a,), and (,b) are open in R. Also [a,b], [a,), and (,b] are closed in R.

Connected sets

A nonempty metric space (X,d) is connected if the only subsets that are both open and closed are and X itself.

When we apply the term connected to a nonempty subset AX, we simply mean that A with the subspace topology is connected.

In other words, a nonempty X is connected if whenever we write X=X1X2 where X1X2= and X1 and X2 are open, then either X1= or X2=. So to test for disconnectedness, we need to find nonempty disjoint open sets X1 and X2 whose union is X. For subsets, we state this idea as a proposition.

Let (X,d) be a metric space. A nonempty set SX is not connected if and only if there exist open sets U1 and U2 in X, such that U1U2S=, U1S, U2S, and S=(U1S)(U2S).

If Uj is open in X, then UjS is open in S in the subspace topology (with subspace metric). To see this, note that if BX(x,δ)Uj, then as BS(x,δ)=SBX(x,δ), we have BS(x,δ)UjS. The proof follows by the above discussion.

The proof of the other direction follows by using to find U1 and U2 from two open disjoint subsets of S.

Let SR be such that x<z<y with x,yS and zS. Claim: S is not connected. Proof: Notice ((,z)S)((z,)S)=S.

A set SR is connected if and only if it is an interval or a single point.

Suppose that S is connected (so also nonempty). If S is a single point then we are done. So suppose that x<y and x,yS. If z is such that x<z<y, then (,z)S is nonempty and (z,)S is nonempty. The two sets are disjoint. As S is connected, we must have they their union is not S, so zS.

Suppose that S is bounded, connected, but not a single point. Let α:=infS and β:=supS and note that α<β. Suppose α<z<β. As α is the infimum, then there is an xS such that αx<z. Similarly there is a yS such that βy>z. We have shown above that zS, so (α,β)S. If w<α, then wS as α was the infimum, similarly if w>β then wS. Therefore the only possibilities for S are (α,β), [α,β), (α,β], [α,β].

The proof that an unbounded connected S is an interval is left as an exercise.

On the other hand suppose that S is an interval. Suppose that U1 and U2 are open subsets of R, U1S and U2S are nonempty, and S=(U1S)(U2S). We will show that U1S and U2S contain a common point, so they are not disjoint, and hence S must be connected. Suppose that there is xU1S and yU2S. We can assume that x<y. As S is an interval [x,y]S. Let z:=inf(U2[x,y]). If z=x, then zU1. If z>x, then for any δ>0 the ball B(z,δ)=(zδ,z+δ) contains points that are not in U2, and so zU2 as U2 is open. Therefore, zU1. As U1 is open, B(z,δ)U1 for a small enough δ>0. As z is the infimum of U2[x,y], there must exist some wU2[x,y] such that w[z,z+δ)B(z,δ)U1. Therefore wU1U2[x,y]. So U1S and U2S are not disjoint and hence S is connected.

In many cases a ball B(x,δ) is connected. But this is not necessarily true in every metric space. For a simplest example, take a two point space {a,b} with the discrete metric. Then B(a,2)={a,b}, which is not connected as B(a,1)={a} and B(b,1)={b} are open and disjoint.

Closure and boundary

Sometime we wish to take a set and throw in everything that we can approach from the set. This concept is called the closure.

Let (X,d) be a metric space and AX. Then the closure of A is the set ¯A:={EX:E is closed and AE}. That is, ¯A is the intersection of all closed sets that contain A.

Let (X,d) be a metric space and AX. The closure ¯A is closed. Furthermore if A is closed then ¯A=A.

First, the closure is the intersection of closed sets, so it is closed. Second, if A is closed, then take E=A, hence the intersection of all closed sets E containing A must be equal to A.

The closure of (0,1) in R is [0,1]. Proof: Simply notice that if E is closed and contains (0,1), then E must contain 0 and 1 (why?). Thus [0,1]E. But [0,1] is also closed. Therefore the closure ¯(0,1)=[0,1].

Be careful to notice what ambient metric space you are working with. If X=(0,), then the closure of (0,1) in (0,) is (0,1]. Proof: Similarly as above (0,1] is closed in (0,) (why?). Any closed set E that contains (0,1) must contain 1 (why?). Therefore (0,1]E, and hence ¯(0,1)=(0,1] when working in (0,).

Let us justify the statement that the closure is everything that we can “approach” from the set.

[prop:msclosureappr] Let (X,d) be a metric space and AX. Then x¯A if and only if for every δ>0, B(x,δ)A.

Let us prove the two contrapositives. Let us show that x¯A if and only if there exists a δ>0 such that B(x,δ)A=.

First suppose that x¯A. We know ¯A is closed. Thus there is a δ>0 such that B(x,δ)¯Ac. As A¯A we see that B(x,δ)Ac and hence B(x,δ)A=.

On the other hand suppose that there is a δ>0 such that B(x,δ)A=. Then B(x,δ)c is a closed set and we have that AB(x,δ)c, but xB(x,δ)c. Thus as ¯A is the intersection of closed sets containing A, we have x¯A.

We can also talk about what is in the interior of a set and what is on the boundary.

Let (X,d) be a metric space and AX, then the interior of A is the set A:={xA:there exists a δ>0 such that B(x,δ)A}. The boundary of A is the set A:=¯AA.

Suppose A=(0,1] and X=R. Then it is not hard to see that ¯A=[0,1], A=(0,1), and A={0,1}.

Suppose X={a,b} with the discrete metric. Let A={a}, then ¯A=A and A=.

Let (X,d) be a metric space and AX. Then A is open and A is closed.

Given xA we have δ>0 such that B(x,δ)A. If zB(x,δ), then as open balls are open, there is an ϵ>0 such that B(z,ϵ)B(x,δ)A, so z is in A. Therefore B(x,δ)A and so A is open.

As A is open, then A=¯AA=¯A(A)c is closed.

The boundary is the set of points that are close to both the set and its complement.

Let (X,d) be a metric space and AX. Then xA if and only if for every δ>0, B(x,δ)A and B(x,δ)Ac are both nonempty.

If x¯A, then there is some δ>0 such that B(x,δ)¯Ac as ¯A is closed. So B(x,δ) contains no points of A.

Now suppose that xA, then there exists a δ>0 such that B(x,δ)A, but that means that B(x,δ) contains no points of Ac.

Finally suppose that x¯AA. Let δ>0 be arbitrary. By B(x,δ) contains a point from A. Also, if B(x,δ) contained no points of Ac, then x would be in A^\circ. Hence B(x,\delta) contains a points of A^c as well.

We obtain the following immediate corollary about closures of A and A^c. We simply apply .

Let (X,d) be a metric space and A \subset X. Then \partial A = \overline{A} \cap \overline{A^c}.

Exercises

Prove . Hint: consider the complements of the sets and apply .

Finish the proof of by proving that C(x,\delta) is closed.

Prove .

Suppose that (X,d) is a nonempty metric space with the discrete topology. Show that X is connected if and only if it contains exactly one element.

Show that if S \subset {\mathbb{R}} is a connected unbounded set, then it is an (unbounded) interval.

Show that every open set can be written as a union of closed sets.

a) Show that E is closed if and only if \partial E \subset E. b) Show that U is open if and only if \partial U \cap U = \emptyset.

a) Show that A is open if and only if A^\circ = A. b) Suppose that U is an open set and U \subset A. Show that U \subset A^\circ.

Let X be a set and d, d' be two metrics on X. Suppose that there exists an \alpha > 0 and \beta > 0 such that \alpha d(x,y) \leq d'(x,y) \leq \beta d(x,y) for all x,y \in X. Show that U is open in (X,d) if and only if U is open in (X,d'). That is, the topologies of (X,d) and (X,d') are the same.

Suppose that \{ S_i \}, i \in {\mathbb{N}} is a collection of connected subsets of a metric space (X,d). Suppose that there exists an x \in X such that x \in S_i for all i \in N. Show that \bigcup_{i=1}^\infty S_i is connected.

Let A be a connected set. a) Is \overline{A} connected? Prove or find a counterexample. b) Is A^\circ connected? Prove or find a counterexample. Hint: Think of sets in {\mathbb{R}}^2.

The definition of open sets in the following exercise is usually called the subspace topology. You are asked to show that we obtain the same topology by considering the subspace metric.

[exercise:mssubspace] Suppose (X,d) is a metric space and Y \subset X. Show that with the subspace metric on Y, a set U \subset Y is open (in Y) whenever there exists an open set V \subset X such that U = V \cap Y.

Let (X,d) be a metric space. a) For any x \in X and \delta > 0, show \overline{B(x,\delta)} \subset C(x,\delta). b) Is it always true that \overline{B(x,\delta)} = C(x,\delta)? Prove or find a counterexample.

Let (X,d) be a metric space and A \subset X. Show that A^\circ = \bigcup \{ V : V \subset A \text{ is open} \}.

Contributors and Attributions


This page titled 8.2: Open and Closed Sets is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Jiří Lebl via source content that was edited to the style and standards of the LibreTexts platform.

  • Was this article helpful?

Support Center

How can we help?