Tutorials › Real Analysis › Open Versus Closed

Topology of the Real Line · Tutorial 239 of 1000

Open Versus Closed

Learn how openness and closedness impose different local and limiting conditions, and why no proper nonempty subset of the real line has both properties.

Intermediate 9 min read

What You'll Learn

  • Distinguish the neighborhood condition for openness from the limit condition for closedness
  • Identify sets that are open, closed, both, or neither
  • Prove that every open subset of the real line has no isolated points
  • Use a supremum argument to classify sets that are both open and closed
  • Test interval endpoints to determine openness and closedness

Two Different Ways a Set Can Behave

The previous tutorial used examples and the Sequential Characterization of Closed Sets to test whether a set contains the limits of its convergent sequences. Openness asks a different question: does every point of the set have a whole neighborhood that stays inside the set? These are distinct conditions. A set can be open without being closed, closed without being open, both, or neither.

Recall that \(U\subseteq\mathbb{R}\) is open if, for each \(x\in U\), there is an \(r>0\) such that \(B_r(x)\subseteq U\). A set \(F\subseteq\mathbb{R}\) is closed if it contains the limit of every convergent sequence of its points. The Sequential Characterization of Closed Sets says this is equivalent to closedness in the usual sense.

Takeaway: Openness is a condition at each point in a set: a sufficiently small ball around that point stays in the set. Closedness is a condition on limits: a limit of points in the set must also belong to it. Neither condition, by itself, implies the other.

This distinction is easy to lose when looking only at familiar intervals. Open intervals are open but not closed, while closed intervals are closed but not open when they have distinct endpoints. The endpoint behavior explains these examples, but the distinction applies to arbitrary subsets of the real line as well.

Comparing the Four Possibilities

The empty set and the whole real line each satisfy both conditions. The empty set has no points that could violate the definition of openness, and every sequence of its points is vacuously covered by the closedness condition. Every ball around a real number is contained in \(\mathbb{R}\), and every real limit belongs to \(\mathbb{R}\). The other two possibilities are illustrated by intervals and will be proved in the examples below.

OpennessClosednessExample
YesYes\(\mathbb{R}\)
YesNo\((-4,2)\)
NoYes\([-1,3]\)
NoNo\([0,2)\)

Worked Example: An Open Interval That Is Not Closed

Let \(U=(-4,2)\). It is open: if \(x\in U\), both \(x+4\) and \(2-x\) are positive. Taking \(r=\min\{x+4,2-x\}/2\) gives \(r>0\), and every \(y\in B_r(x)\) still satisfies \(-4<y<2\). Thus \(B_r(x)\subseteq U\).

To see that \(U\) is not closed, consider \(x_n=-4+1/n\), where \(n\) is a positive integer. Since \(0<1/n\leq1\), we have \(-4<x_n\leq-3<2\), so \(x_n\in U\). But

$$ |x_n-(-4)|=\frac{1}{n}\longrightarrow 0, $$

so \(x_n\to-4\), and \(-4\notin U\). The Sequential Characterization of Closed Sets therefore shows that \(U\) is not closed. The omitted endpoint supplies a limit that the interval does not contain.

Worked Example: A Closed Interval That Is Not Open

Let \(F=[-1,3]\). The theorem that closed intervals are closed, established in “Closed Sets,” shows that \(F\) is closed. It is not open: for any \(r>0\), the point \(y=-1-r/2\) satisfies \(|y-(-1)|=r/2<r\), so \(y\in B_r(-1)\), but \(y\notin F\). Consequently, no ball centered at \(-1\) is contained in \(F\), as openness would require.

This test at a single endpoint is enough to disprove openness. A set is open only when the neighborhood condition holds at every one of its points. By contrast, the closedness of \(F\) concerns limits of sequences from anywhere in the interval, not just the endpoints.

Worked Example: A Set That Is Neither

Consider \(E=[0,2)\). It is not open because \(0\in E\), but for every \(r>0\), the point \(-r/2\) belongs to \(B_r(0)\) and does not belong to \(E\). Thus no ball around \(0\) stays inside \(E\).

It is not closed either. For each positive integer \(n\), set \(x_n=2-1/n\). Then \(1\leq x_n<2\), so \(x_n\in E\), while

$$ |x_n-2|=\frac{1}{n}\longrightarrow0. $$

Hence \(x_n\to2\), but \(2\notin E\). The set fails the neighborhood test at its included endpoint and the limit test at its omitted endpoint.

Open Sets Have No Isolated Points

A point \(x\in E\) is called an isolated point of \(E\) if some ball around \(x\) contains no other point of \(E\); in other words, there is an \(r>0\) such that \(B_r(x)\cap E=\{x\}\). The definition of an open set rules out this behavior on the real line.

Theorem (Open Sets Have No Isolated Points): If \(U\subseteq\mathbb{R}\) is open, then none of its points is isolated in \(U\).

Proof. Let \(x\in U\). Since \(U\) is open, there is an \(r>0\) such that \(B_r(x)\subseteq U\). Let \(\varepsilon>0\) be arbitrary, and choose \(t=\min\{r,\varepsilon\}/2\). Then \(t>0\), \(t<r\), and \(t<\varepsilon\). The point \(y=x+t\) is distinct from \(x\), and \(|y-x|=t<r\), so \(y\in B_r(x)\subseteq U\). Also, \(|y-x|=t<\varepsilon\). Thus every ball around \(x\), however small, contains a point of \(U\) other than \(x\). Therefore \(x\) is not isolated in \(U\). Since \(x\) was arbitrary, \(U\) has no isolated points. \(\square\)

This theorem is specific to the real line, where there are always other real numbers arbitrarily near \(x\). It does not say that a closed set has no isolated points. For example, a singleton is closed, and its one point is isolated. The property of being open and the property of being closed should therefore not be understood as opposite ends of a single scale.

Worked Example: A Closed Set with an Isolated Point

Let \(F=\{\sqrt{2}\}\). It is closed because it is finite, by the result about complements of finite sets from “Examples of Open Sets.” Its only point is isolated: for any \(r>0\), the intersection \(B_r(\sqrt{2})\cap F\) is exactly \(\{\sqrt{2}\}\).

The set is not open. Given any \(r>0\), the point \(y=\sqrt{2}+r/2\) satisfies \(|y-\sqrt{2}|=r/2<r\), so \(y\in B_r(\sqrt{2})\), but \(y\notin F\). This agrees with the theorem: an open set cannot have an isolated point.

The Only Sets That Are Both Open and Closed

The examples above include sets that are both open and closed: \(\varnothing\) and \(\mathbb{R}\). In fact, there are no others. The proof uses the order structure of the real line. If a nonempty proper set and its outside both had the neighborhood protection given by openness, a supremum would identify a point where that protection fails.

Theorem (Only the Empty Set and \(\mathbb{R}\) Are Both Open and Closed): If \(A\subseteq\mathbb{R}\) is both open and closed, then \(A=\varnothing\) or \(A=\mathbb{R}\).

Proof. Suppose, to the contrary, that \(A\) is both open and closed, nonempty, and not equal to \(\mathbb{R}\). Choose \(p\in A\) and \(q\notin A\). If \(p>q\), replace \(A\) by \(-A=\{-x:x\in A\}\), and replace \(p,q\) by \(-p,-q\). Reflection preserves openness because it takes balls to balls of the same radius: \(B_r(-x)=\{-y:y\in B_r(x)\}\). It preserves closedness as well, since the negatives of a convergent sequence converge to the negative of its limit. We may therefore assume \(p<q\).

The set \(S=A\cap[p,q]\) is nonempty because \(p\in S\), and it is bounded above by \(q\). Let \(c=\sup S\). For every positive integer \(n\), the number \(c-1/n\) cannot be an upper bound for \(S\), since it is strictly less than the least upper bound \(c\). Choose \(s_n\in S\) with \(c-1/n<s_n\leq c\). It follows that \(0\leq c-s_n<1/n\), so \(s_n\to c\). Each \(s_n\) belongs to \(A\), and \(A\) is closed. The Sequential Characterization of Closed Sets gives \(c\in A\).

If \(c=q\), then \(q\in A\), contradicting the choice of \(q\). If \(c<q\), openness of \(A\) at \(c\) gives an \(r>0\) with \(B_r(c)\subseteq A\). Choose \(t=\min\{r,q-c\}/2\), which is positive and less than both \(r\) and \(q-c\). Then \(c+t\in B_r(c)\subseteq A\), and \(p\leq c<c+t<q\), so \(c+t\in S\). This contradicts that \(c\) is an upper bound for \(S\). Both possibilities lead to contradictions. Hence no nonempty proper subset of \(\mathbb{R}\) can be both open and closed. Since \(\varnothing\) and \(\mathbb{R}\) do satisfy both definitions, the theorem follows. \(\square\)

How to Choose the Right Test

When deciding whether a particular set is open or closed, use the condition that matches the question. To disprove openness, it is enough to find one point of the set for which every ball contains a point outside it. To disprove closedness, it is enough to find a convergent sequence of points in the set whose limit lies outside it. Conversely, proving either property requires checking its condition for all relevant points or sequences.

A frequent pitfall is to infer closedness from the word “closed interval,” or openness from the word “open interval,” without checking what happens at endpoints. Another is to suppose a set must be one or the other. The interval \([0,2)\) is a direct counterexample: it is neither. Finally, the theorem about sets that are both open and closed is not an assertion that openness and closedness are opposites. The empty set and the whole line have both properties, and the two properties have different definitions and different tests.

Check Your Understanding

Use the neighborhood definition of openness and the sequential characterization of closedness to answer the following questions.

  1. What neighborhood condition must hold at every point of an open set?
  2. Which sequence shows that \((-4,2)\) is not closed, and what point is its limit?
  3. Why does a ball of any positive radius around \(-1\) contain a point outside \([-1,3]\)?
  4. Why can an open subset of \(\mathbb{R}\) have no isolated points?
  5. What role does the supremum of \(A\cap[p,q]\) play in proving that a nonempty proper subset cannot be both open and closed?