# 5.2: Standard Topology of the Real Line

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$

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

$$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\id}{\mathrm{id}}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\kernel}{\mathrm{null}\,}$$

$$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$

$$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$

$$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

$$\newcommand{\vectorA}[1]{\vec{#1}} % arrow$$

$$\newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow$$

$$\newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vectorC}[1]{\textbf{#1}}$$

$$\newcommand{\vectorD}[1]{\overrightarrow{#1}}$$

$$\newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}$$

$$\newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}}$$

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\avec}{\mathbf a}$$ $$\newcommand{\bvec}{\mathbf b}$$ $$\newcommand{\cvec}{\mathbf c}$$ $$\newcommand{\dvec}{\mathbf d}$$ $$\newcommand{\dtil}{\widetilde{\mathbf d}}$$ $$\newcommand{\evec}{\mathbf e}$$ $$\newcommand{\fvec}{\mathbf f}$$ $$\newcommand{\nvec}{\mathbf n}$$ $$\newcommand{\pvec}{\mathbf p}$$ $$\newcommand{\qvec}{\mathbf q}$$ $$\newcommand{\svec}{\mathbf s}$$ $$\newcommand{\tvec}{\mathbf t}$$ $$\newcommand{\uvec}{\mathbf u}$$ $$\newcommand{\vvec}{\mathbf v}$$ $$\newcommand{\wvec}{\mathbf w}$$ $$\newcommand{\xvec}{\mathbf x}$$ $$\newcommand{\yvec}{\mathbf y}$$ $$\newcommand{\zvec}{\mathbf z}$$ $$\newcommand{\rvec}{\mathbf r}$$ $$\newcommand{\mvec}{\mathbf m}$$ $$\newcommand{\zerovec}{\mathbf 0}$$ $$\newcommand{\onevec}{\mathbf 1}$$ $$\newcommand{\real}{\mathbb R}$$ $$\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}$$ $$\newcommand{\laspan}[1]{\text{Span}\{#1\}}$$ $$\newcommand{\bcal}{\cal B}$$ $$\newcommand{\ccal}{\cal C}$$ $$\newcommand{\scal}{\cal S}$$ $$\newcommand{\wcal}{\cal W}$$ $$\newcommand{\ecal}{\cal E}$$ $$\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}$$ $$\newcommand{\gray}[1]{\color{gray}{#1}}$$ $$\newcommand{\lgray}[1]{\color{lightgray}{#1}}$$ $$\newcommand{\rank}{\operatorname{rank}}$$ $$\newcommand{\row}{\text{Row}}$$ $$\newcommand{\col}{\text{Col}}$$ $$\renewcommand{\row}{\text{Row}}$$ $$\newcommand{\nul}{\text{Nul}}$$ $$\newcommand{\var}{\text{Var}}$$ $$\newcommand{\corr}{\text{corr}}$$ $$\newcommand{\len}[1]{\left|#1\right|}$$ $$\newcommand{\bbar}{\overline{\bvec}}$$ $$\newcommand{\bhat}{\widehat{\bvec}}$$ $$\newcommand{\bperp}{\bvec^\perp}$$ $$\newcommand{\xhat}{\widehat{\xvec}}$$ $$\newcommand{\vhat}{\widehat{\vvec}}$$ $$\newcommand{\uhat}{\widehat{\uvec}}$$ $$\newcommand{\what}{\widehat{\wvec}}$$ $$\newcommand{\Sighat}{\widehat{\Sigma}}$$ $$\newcommand{\lt}{<}$$ $$\newcommand{\gt}{>}$$ $$\newcommand{\amp}{&}$$ $$\definecolor{fillinmathshade}{gray}{0.9}$$

In this section, we will introduce the notions of open, closed, compact, and connected as they pertain to subsets of the real numbers. These properties form the underpinnings of a branch of mathematics called topology (derived from the Greek words tópos, meaning ‘place, location’, and ology, meaning ‘study of’). Topology, sometimes called “rubber sheet geometry," is concerned with properties of spaces that are invariant under any continuous deformation (e.g., bending, twisting, and stretching like rubber while not allowing tearing apart or gluing together). The fundamental concepts in topology are continuity, compactness, and connectedness, which rely on ideas such as “arbitrary close" and “far apart". These ideas can be made precise using open sets.

Once considered an abstract branch of pure mathematics, topology now has applications in biology, computer science, physics, and robotics. The goal of this section is to introduce you to the basics of the set-theoretic definitions used in topology and to provide you with an opportunity to tinker with open and closed subsets of the real numbers. In Section 8.5, we will revisit these concepts and explore continuous functions.

For this entire section, our universe of discourse is the set of real numbers. You may assume all the usual basic algebraic properties of the real numbers (addition, subtraction, multiplication, division, commutative property, distribution, etc.). We will often refer to an element in a subset of real numbers as a point.

Definition 5.53. A set $$U$$ is called an open set if for every $$x \in U$$, there exists a bounded open interval $$(a,b)$$ containing $$x$$ such that $$(a,b)\subseteq U$$.

It follows immediately from the definition that every open set is a union of bounded open intervals.

Problem 5.54. Determine whether each of the following sets is open. Justify your assertions.

1. $$(1,2)$$
2. $$(1,\infty)$$
3. $$(1,2)\cup (\pi,5)$$
4. $$[1,2]$$
5. $$(-\infty,\sqrt{2}]$$
6. $$\{4,17,42\}$$
7. $$\{\frac{1}{n}\mid n\in \mathbb{N}\}$$
8. $$\{\frac{1}{n}\mid n\in \mathbb{N}\}\cup \{0\}$$
9. $$\mathbb{R}$$
10. $$\mathbb{Q}$$
11. $$\mathbb{Z}$$
12. $$\emptyset$$

As expected, every open interval (i.e., intervals of the form $$(a,b)$$, $$(-\infty,b)$$, $$(a,\infty)$$, or $$(-\infty,\infty)$$) is an open set.

Theorem 5.55. Every open interval is an open set.

However, it is important to point out that open sets can be more complicated than a single open interval.

Problem 5.56. Provide an example of an open set that is not a single open interval.

Theorem 5.57. If $$U$$ and $$V$$ are open sets, then

1. $$U\cup V$$ is an open set, and
2. $$U\cap V$$ is an open set.

According to the next two theorems, the union of arbitrarily many open sets is open while the intersection of a finite number of open sets is open.

Theorem 5.58. If $$\{U_{\alpha}\}_{\alpha\in\Delta}$$ is a collection of open sets, then $$\bigcup_{\alpha\in\Delta} U_{\alpha}$$ is an open set.

Consider using induction to prove the next theorem.

Theorem 5.59. If $$\{U_{i}\}_{i=1}^n$$ is a finite collection of open sets for $$n\in \mathbb{N}$$, then $$\bigcap_{i=1}^n U_{i}$$ is an open set.

Problem 5.60.Explain why we cannot utilize induction to prove that the intersection of infinitely many open sets indexed by the natural numbers is open.

Problem 5.61. Give an example of each of the following.

1. A collection of open sets $$\{U_{\alpha}\}_{\alpha\in\Delta}$$ such that $$\bigcap_{\alpha\in\Delta} U_{\alpha}$$ is an open set.
2. A collection of open sets $$\{U_{\alpha}\}_{\alpha\in\Delta}$$ such that $$\bigcap_{\alpha\in\Delta} U_{\alpha}$$ is not an open set.

According to the previous problem, the intersection of infinitely many open sets may or may not be open. So, we know that there is no theorem that states that the intersection of arbitrarily many open sets is open. We only know for certain that the intersection of finitely many open sets is open by Theorem 5.59.

Definition 5.62. Suppose $$A\subseteq \mathbb{R}$$. A point $$p\in \mathbb{R}$$ is an accumulation point of $$A$$ if for every bounded open interval $$(a,b)$$ containing $$p$$, there exists a point $$q \in (a,b)\cap A$$ such that $$q\neq p$$.

Notice that if $$p$$ is an accumulation point of $$A$$, then $$p$$ may or may not be in $$A$$. Loosely speaking, $$p$$ is an accumulation point of a set $$A$$ if there are points in $$A$$ arbitrarily close to $$p$$. That is, if we zoom in on $$p$$, we should always see points in $$A$$ nearby.

Problem 5.63. Consider the open interval $$I=(1,2)$$. Prove each of the following.

1. The points $$1$$ and $$2$$ are accumulation points of $$I$$.
2. If $$p\in I$$, then $$p$$ is an accumulation point of $$I$$.
3. If $$p<1$$ or $$p>2$$, then $$p$$ is not an accumulation point of $$I$$.

Theorem 5.64. A point $$p$$ is an accumulation point of the intervals $$(a,b)$$, $$(a,b]$$, $$[a,b)$$, and $$[a,b]$$ if and only if $$p\in [a,b]$$.

Problem 5.65. Prove that the point $$p=0$$ is an accumulation point of $$A=\{\frac{1}{n}\mid n \in \mathbb{N}\}$$. Are there any other accumulation points of $$A$$?

Problem 5.66. Provide an example of a set $$A$$ with exactly two accumulation points.

Consider using Theorems 5.51 and 5.52 when proving the next result.

Theorem 5.67. If $$p\in\mathbb{R}$$, then $$p$$ is an accumulation point of $$\mathbb{Q}$$.

Definition 5.68. A set $$A\subseteq \mathbb{R}$$ is called closed if $$A$$ contains all of its accumulation points.

Problem 5.69. Determine whether each of the sets in Problem 5.54 is closed. Justify your assertions.

The upshot of Parts (i) and (l) of Problems 5.54 and 5.69 is that $$\mathbb{R}$$ and $$\emptyset$$ are both open and closed. It turns out that these are the only two subsets of the real numbers with this property. One issue with the terminology that could potentially create confusion is that the open interval $$(-\infty, \infty)$$ is both an open and a closed set.

Problem 5.70. Provide an example of each of the following. You do not need to prove that your answers are correct.

1. A set that is open but not closed.
2. A set that is closed but not open.
3. [prob:open vs closed last] A set that neither open nor closed.

Another potentially annoying feature of the terminology illustrated by Problem 5.70 is that if a set is not open, it may or may not be closed. Similarly, if a set is not closed, it may or may not be open. That is, open and closed are not opposites of each other.

The next result justifies referring to $$[a,b]$$ as a closed interval.

Theorem 5.71. Every interval of the form $$[a,b]$$, $$(-\infty,b]$$, $$[a,\infty)$$, or $$(-\infty,\infty)$$ is a closed set.

Theorem 5.72. Every finite subset of $$\mathbb{R}$$ is closed.

Despite the fact that open and closed are not opposites of each other, there is a nice relationship between open and closed sets in terms of complements.

Theorem 5.73. Let $$U\subseteq \mathbb{R}$$. Then $$U$$ is open if and only if $$U^C$$ is closed.

Theorem 5.74. If $$A$$ and $$B$$ are closed sets, then

1. $$A\cup B$$ is a closed set, and
2. $$A\cap B$$ is a closed set.

The next two theorems are analogous to Theorems 5.58 and 5.59.

Theorem 5.75. If $$\{A_{\alpha}\}_{\alpha\in\Delta}$$ is a collection of closed sets, then $$\bigcap_{\alpha\in \Delta} A_{\alpha}$$ is a closed set.

Theorem 5.76. If $$\{A_{i}\}_{i=1}^n$$ is a finite collection of closed sets for $$n\in \mathbb{N}$$, then $$\bigcup_{i=1}^n A_{i}$$ is a closed set.

Problem 5.77. Provide an example of a collection of closed sets $$\{A_{\alpha}\}_{\alpha\in\Delta}$$ such that $$\bigcup_{\alpha\in \Delta} A_{\alpha}$$ is not a closed set.

Problem 5.78. Determine whether each of the following sets is open, closed, both, or neither.

1. $$\displaystyle V=\bigcup_{n=2}^{\infty} \left(n - \frac{1}{2},n\right)$$
2. $$\displaystyle W=\bigcap_{n=2}^{\infty} \left(n - \frac{1}{2},n\right)$$
3. $$\displaystyle X=\bigcap_{n=1}^{\infty} \left(-\frac{1}{n}, \frac{1}{n}\right)$$
4. $$\displaystyle Y=\bigcap_{n=1}^{\infty} \left(-n, n\right)$$
5. $$Z=(0,1)\cap \mathbb{Q}$$

Problem 5.79. Prove or provide a counterexample: Every non-closed set has at least one accumulation point.

We now introduce three special classes of subsets of $$\mathbb{R}$$: compact, connected, and disconnected.

Definition 5.80. A set $$K\subseteq\mathbb{R}$$ is called compact if $$K$$ is both closed and bounded.

It is important to point out that there is a more general definition of compact in an arbitrary topological space. However, using our notions of open and closed, it is a theorem that a subset of the real line is compact if and only if it is closed and bounded.

Problem 5.81. Determine whether each of the following sets is compact. Briefly justify your assertions.

1. $$[0,1)\cup [2,3]$$
2. $$[0,1)\cup (1,2]$$
3. $$[0,1)\cup [1,2]$$
4. $$\mathbb{R}$$
5. $$\mathbb{Q}$$
6. $$\mathbb{R}\setminus\mathbb{Q}$$
7. $$\mathbb{Z}$$
8. $$\{\frac{1}{n}\mid n\in\mathbb{N}\}$$
9. $$[0,1]\cup\{1+\frac{1}{n}\mid n\in\mathbb{N}\}$$
10. $$\{17,42\}$$
11. $$\{17\}$$
12. $$\emptyset$$

Problem 5.82. Is every finite set compact? Justify your assertion.

The next theorem says that every nonempty compact set contains its greatest lower bound and its least upper bound. That is, every nonempty compact set attains a minimum and a maximum value.

Theorem 5.83. If $$K$$ is a nonempty compact subset of $$\mathbb{R}$$, then $$\sup(K),\inf(K)\in K$$.

Definition 5.84. A set $$A\subseteq \mathbb{R}$$ is disconnected if there exists two disjoint open sets $$U_1$$ and $$U_2$$ such that $$A\cap U_1$$ and $$A\cap U_2$$ are nonempty but $$A\subseteq U_1\cup U_2$$ (equivalently, $$A=(A\cap U_1)\cup(A\cap U_2)$$). If a set is not disconnected, then we say that it is connected.

In other words, a set is disconnected if it can be partitioned into two nonempty subsets such that each subset does not contain points of the other and does not contain any accumulation points of the other. Showing that a set is disconnected is generally easier than showing a set is connected. To prove that a set is disconnected, you simply need to exhibit two open sets with the necessary properties. However, to prove that a set is connected, you need to prove that no such pair of open sets exists.

Problem 5.85. Determine whether each of the sets in Problem 5.81 is is connected or disconnected. Briefly justify your assertions.

Theorem 5.86. If $$a\in\mathbb{R}$$, then $$\{a\}$$ is connected.

The proof of the next theorem is harder than you might expect. Consider a proof by contradiction and try to make use of the Completeness Axiom.

Theorem 5.87. Every closed interval $$[a,b]$$ is connected.

It turns out that every connected set in $$\mathbb{R}$$ is either a singleton or an interval. We have not officially proved this claim, but we do have the tools to do so. Feel free to try your hand at proving this fact.

This page titled 5.2: Standard Topology of the Real Line is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Dana Ernst via source content that was edited to the style and standards of the LibreTexts platform.