Tutorials › Topology (Undergraduate) › Dense Connected Subsets and Their Closures

Connected Spaces · Tutorial 409 of 799

Dense Connected Subsets and Their Closures

See how density lets a connected subset establish connectedness of its ambient space, and how the closure theorem applies in real and Euclidean examples.

Intermediate 10 min read

What You'll Learn

  • State the closure theorem for connected subsets and prove it using separations.
  • Deduce why a space containing a dense connected subset must be connected.
  • Check density and connectedness separately in a subspace of the real line.
  • Find the closure of the graph of the oscillating function in the plane.
  • Verify that a proper dense subset of the plane can be connected.
  • Identify why a dense subset need not itself be connected.

From a Dense Subset to the Whole Space

Connectedness can sometimes be established without analyzing every point of a space directly. The key is to find a connected subset whose closure is the whole space. The closure theorem says that taking a closure preserves connectedness; density then identifies that closure with the ambient space. The argument works in any topological space, including spaces that are not metric.

Recall that a separation of a space \(X\) is a pair of disjoint, nonempty, relatively open subsets whose union is \(X\). A space is connected if it has no separation. A subset is connected when it is connected with its subspace topology. The closure \(\overline{A}\) is the smallest closed set containing \(A\); equivalently, \(x\in\overline{A}\) exactly when every open neighborhood of \(x\) meets \(A\).

Definition: A subset \(A\subseteq X\) is dense in \(X\) if \(\overline{A}=X\). Equivalently, every nonempty open subset of \(X\) intersects \(A\). Density concerns how \(A\) sits in \(X\); it does not by itself assert that \(A\) is connected.

The Closure Theorem and Its Density Consequence

Theorem 1 (Closure theorem for connected sets): If \(A\) is a connected subset of a topological space \(X\), then \(\overline{A}\) is connected, with its subspace topology.

Proof. Suppose, to the contrary, that \(\overline{A}\) has a separation \(U,V\). Thus \(U,V\) are disjoint, nonempty, relatively open subsets of \(\overline{A}\), and \(U\cup V=\overline{A}\). Each of \(U,V\) must meet \(A\). To see this for \(U\), choose \(x\in U\). Since \(U\) is relatively open, there is an open set \(O\subseteq X\) such that \(U=O\cap\overline{A}\). As \(x\in\overline{A}\), the open neighborhood \(O\) of \(x\) intersects \(A\). Since \(A\subseteq\overline{A}\), this gives \(O\cap A\subseteq U\cap A\), so \(U\cap A\ne\varnothing\). The same argument gives \(V\cap A\ne\varnothing\).

The sets \(U\cap A\) and \(V\cap A\) are disjoint and cover \(A\). They are relatively open in \(A\), because \(U\) and \(V\) are relatively open in \(\overline{A}\) and \(A\subseteq\overline{A}\). Both are nonempty, so they form a separation of \(A\). This contradicts the connectedness of \(A\). Therefore \(\overline{A}\) is connected. \(\square\)

Theorem 2 (Dense connected subset criterion): If \(A\subseteq X\) is connected and dense in \(X\), then \(X\) is connected.

Proof. Density means \(\overline{A}=X\). By Theorem 1, \(\overline{A}\) is connected. Substituting \(\overline{A}=X\) shows that \(X\) is connected. \(\square\)

The two hypotheses play different roles. Connectedness of \(A\) ensures that its closure cannot split into two separated pieces; density ensures that there are no points of \(X\) outside that connected closure. The criterion does not say that every dense subset is connected, or that every subset of a connected space is connected.

Worked Example: The Half-Open Interval Is Dense in the Closed Interval

Give \([0,1]\) the subspace topology inherited from \(\mathbb{R}\), and let \(A=[0,1)\) with its subspace topology. We check that \(A\) is dense in \([0,1]\), then use the criterion to establish connectedness of \([0,1]\).

The set \(A\) is an interval, so it is connected by the connectedness theorem for intervals. Every point of \([0,1)\) belongs to \(A\), hence belongs to its closure in \([0,1]\). For the remaining point \(1\), any open neighborhood of \(1\) in \([0,1]\) contains \((1-\delta,1]\) for some \(\delta>0\). Taking \(\eta=\min(\delta,1)/2\) gives \(0<\eta<\delta\) and \(1-\eta\in[0,1)\); thus the neighborhood meets \(A\). Therefore every point of \([0,1]\) lies in \(\overline{A}\), and \(\overline{A}=[0,1]\).

Theorem 2 now gives that \([0,1]\) is connected. This example uses a proper dense subset: \(A\ne[0,1]\), since \(1\notin A\). The conclusion is about the whole space, not about adding the endpoint to \(A\) by an informal limiting argument.

Check: The only point of \([0,1]\) not already in \(A\) is \(1\), and every relative open neighborhood of \(1\) contains points \(1-\eta\) with \(0<\eta<1\). Hence no point of \([0,1]\) is omitted from the closure.

A Dense Connected Subset in the Euclidean Plane

Worked Example: A Proper Dense Connected Subset of \(\mathbb{R}^2\)

Give \(\mathbb{R}^2\) its Euclidean topology, and let \(\mathbb{Q}\) have its usual meaning as the rational numbers. Consider \(D=(\mathbb{R}\times\mathbb{Q})\cup(\mathbb{Q}\times\mathbb{R})\), with the subspace topology. We verify density and connectedness separately.

Density. Let \((x,y)\in\mathbb{R}^2\), and let \(B((x,y),r)\) be an open Euclidean ball with \(r>0\). By density of \(\mathbb{Q}\) in \(\mathbb{R}\), choose \(q\in\mathbb{Q}\) with \(|q-y|<r\). Then \((x,q)\in\mathbb{R}\times\mathbb{Q}\subseteq D\), and its Euclidean distance from \((x,y)\) is \(\sqrt{(x-x)^2+(q-y)^2}=|q-y|<r\). Thus every open ball meets \(D\), so \(D\) is dense in \(\mathbb{R}^2\).

Connectedness. For each \(q\in\mathbb{Q}\), let \(H_q=\mathbb{R}\times\{q\}\) and \(V_q=\{q\}\times\mathbb{R}\). Each such line is connected: its subspace topology is homeomorphic to the usual topology on the connected space \(\mathbb{R}\). Suppose \(D\) had a separation \(U,V\). A connected subset of \(D\) must lie entirely in one side of this separation: otherwise its intersections with \(U\) and \(V\) would be a separation of that subset. Hence each \(H_q\) and each \(V_q\) lies entirely in one side. For any \(q,r\in\mathbb{Q}\), \(H_q\cap V_r=\{(r,q)\}\), so these two lines meet and must lie in the same side. Every horizontal line \(H_q\) meets every vertical line \(V_r\); consequently all these lines lie in the same side. Their union is \(D\), so the other side is empty, contradicting the definition of a separation. Thus \(D\) is connected.

Since \(D\) is connected and dense, Theorem 2 shows that \(\mathbb{R}^2\) is connected. The subset is proper: \((\sqrt{2},\sqrt{2})\notin D\), because neither coordinate is rational. This argument establishes connectedness of the plane without assuming that a dense subset must equal the space.

Check: In the density calculation the chosen point is \((x,q)\), not an arbitrary point with both coordinates rational; the first coordinate can be exactly \(x\). Its distance is \(|q-y|\), which is strictly less than \(r\), as required for membership in the open ball.

A Closure in the Plane: The Oscillating Graph

Worked Example: The Graph of \(\sin(1/x)\)

In \(\mathbb{R}^2\), let \(G=\{(x,\sin(1/x)):0<x\leq1\}\). We determine its closure and use it to obtain another connected subset of the plane. The map \(f:(0,1]\to\mathbb{R}^2\), \(f(x)=(x,\sin(1/x))\), is continuous, and \((0,1]\) is an interval. The earlier theorem that continuous images of connected spaces are connected therefore shows that \(G=f((0,1])\) is connected.

We claim that \(\overline{G}=G\cup(\{0\}\times[-1,1])\). In a metric space, a point is in the closure of a set exactly when it is the limit of a sequence from that set. If \((x_n,\sin(1/x_n))\) converges to \((a,b)\), then \(x_n>0\) gives \(a\geq0\), and \(-1\leq\sin(1/x_n)\leq1\) gives \(-1\leq b\leq1\). If \(a>0\), continuity of \(x\mapsto\sin(1/x)\) at \(a\) gives \(b=\sin(1/a)\), so \((a,b)\in G\). If \(a=0\), the limit is on \(\{0\}\times[-1,1]\). This proves that the closure is contained in the claimed set.

For the reverse inclusion, \(G\subseteq\overline{G}\) by definition. Take any \(b\in[-1,1]\), and choose \(\theta\in[-\pi/2,\pi/2]\) with \(\sin\theta=b\). For \(n\in\mathbb{N}\), set \(t_n=2\pi n+\theta\) and \(x_n=1/t_n\). Since \(t_n\geq 2\pi-\pi/2=3\pi/2>1\), we have \(0<x_n<1\); also \(x_n\to0\) and \(\sin(1/x_n)=\sin(t_n)=b\). Thus \((x_n,\sin(1/x_n))\to(0,b)\), proving \((0,b)\in\overline{G}\). The claimed closure follows.

Theorem 1 now shows that \(\overline{G}\) is connected. In particular, the vertical segment \(\{0\}\times[-1,1]\) added at \(x=0\) does not create a separation of the closure, even though the graph oscillates through all values between \(-1\) and \(1\) as \(x\) approaches \(0\).

A Common Pitfall: Density Does Not Imply Connectedness

A tempting but invalid inference is: “\(\overline{\mathbb{Q}}=\mathbb{R}\), and \(\mathbb{R}\) is connected, so \(\mathbb{Q}\) is connected.” The closure theorem has the direction “connected set implies connected closure”; it does not say that a subset of a connected space is connected, or that connectedness of a closure passes back to the original set.

Indeed, \(\mathbb{Q}\) is dense in \(\mathbb{R}\), but it is disconnected in its subspace topology. The sets \(A=\mathbb{Q}\cap(-\infty,\sqrt{2})\) and \(B=\mathbb{Q}\cap(\sqrt{2},\infty)\) are disjoint, nonempty, and cover \(\mathbb{Q}\), since \(\sqrt{2}\notin\mathbb{Q}\). Each is relatively open in \(\mathbb{Q}\), being the intersection of \(\mathbb{Q}\) with an open ray in \(\mathbb{R}\). They form a separation. The error is not in the calculation of the closure; it is in reversing a one-way implication.

Takeaway: To use density to prove connectedness of \(X\), first establish that the dense subset \(A\) is connected in its subspace topology. Then the closure theorem gives connectedness of \(X=\overline{A}\). Density alone is insufficient.

Check Your Understanding

For each question, distinguish the connectedness of a subset from the connectedness of its closure.

  1. In the subspace \(X=[-1,1]\) of \(\mathbb{R}\), is \((-1,1)\) dense? What connectedness conclusion follows?
  2. Which step in the proof of the closure theorem ensures that both sides of a proposed separation of \(\overline{A}\) meet \(A\)?
  3. Explain why \(\mathbb{Q}\) does not provide a dense connected subset of \(\mathbb{R}\), even though it is dense.
  4. For the graph \(G\) above, why must the first coordinate of every point in \(\overline{G}\) be nonnegative?
  5. In the plane example, why does the intersection of a horizontal rational-coordinate line and a vertical rational-coordinate line matter to the separation argument?