6. Topology of the Real Line

Open And Closed Sets

Open and Closed Sets in the Real Line

students, imagine zooming in and out on the real number line like a map 📍. Some sets of numbers seem to have their edges “included,” while others seem to leave the edges out. In Real Analysis, those ideas are formalized as open sets and closed sets. They are basic tools for understanding the topology of the real line, and they appear everywhere later in the course, including limits, continuity, compactness, and convergence.

What you will learn

By the end of this lesson, students, you should be able to:

  • explain what open sets and closed sets mean in $\mathbb{R}$,
  • decide whether a set is open, closed, both, or neither,
  • use examples and counterexamples to justify your reasoning,
  • connect these ideas to limit points and the larger study of topology on the real line.

A good way to think about this topic is that open and closed sets describe how a set behaves near its points. Instead of focusing only on the numbers themselves, we ask how the set looks locally around each number. That local viewpoint is one of the most important ideas in analysis.

Open sets: points with room around them

A set $U \subseteq \mathbb{R}$ is open if every point in $U$ has a little interval around it that stays completely inside $U$. More precisely, for each $x \in U$, there exists $\varepsilon > 0$ such that

$$

$(x-\varepsilon, x+\varepsilon) \subseteq U.$

$$

This means that if you pick any point in the set, you can move a tiny bit left or right without leaving the set. That “wiggle room” is the key idea. 🎯

Example 1: An open interval

The interval $(0,1)$ is open.

Why? If $x \in (0,1)$, then $x$ is strictly between $0$ and $1$. So there is always some small $\varepsilon > 0$ such that both $x-\varepsilon$ and $x+\varepsilon$ still lie between $0$ and $1$. For instance, if $x = \tfrac{1}{2}$, then $\varepsilon = \tfrac{1}{4}$ works because

$$

$\left(\tfrac{1}{4}, \tfrac{3}{4}\right) \subseteq (0,1).$

$$

Example 2: A union of open intervals

The set

$$

$(-2,-1) \cup (3,5)$

$$

is also open. Every point belongs to one of the two open intervals, so each point has its own little interval staying inside the set. Open sets do not need to be a single interval. They can be made of many separated pieces.

Example 3: A set that is not open

The interval $[0,1]$ is not open. The point $0$ belongs to the set, but any interval around $0$ contains negative numbers, and those are not in $[0,1]$. So $0$ does not have a full neighborhood inside the set. The same problem happens at $1$.

This shows an important fact: a set can contain points but still fail to be open because of its boundary points.

Closed sets: sets that contain their boundary behavior

A set $F \subseteq \mathbb{R}$ is closed if its complement $\mathbb{R} \setminus F$ is open. This is the official definition, and it is often the easiest way to test closedness.

There is another very useful viewpoint: a set is closed if it contains all its limit points. We will connect that idea more fully later in the course, but it is helpful to know from the start.

Example 4: A closed interval

The interval $[0,1]$ is closed because its complement

$$

$(-\infty,0) \cup (1,\infty)$

$$

is open.

If you take any number outside $[0,1]$, it lies either to the left of $0$ or to the right of $1$. In either case, you can fit a small interval around it that stays outside $[0,1]$. That is exactly what it means for the complement to be open.

Example 5: Another closed set

The set of integers $\mathbb{Z}$ is closed in $\mathbb{R}$. Its complement is the set of real numbers that are not integers. Around any non-integer real number, there is a tiny interval containing no integers at all, so the complement is open.

This is a good example showing that closed sets do not have to be intervals. They can be scattered points as well.

Example 6: A set that is not closed

The open interval $(0,1)$ is not closed. Its complement is

$$

$(-\infty,0] \cup [1,\infty),$

$$

which is not open, because $0$ and $1$ are included but do not have neighborhoods fully contained in the complement.

Another way to see this is that the points $0$ and $1$ are boundary points missing from the set. A set that leaves out its boundary is often not closed.

Open, closed, both, or neither?

Some sets are open, some are closed, some are both, and some are neither. Understanding these four possibilities is a major skill in Real Analysis. 🔍

A set can be both open and closed

The sets $\emptyset$ and $\mathbb{R}$ are both open and closed.

  • $\emptyset$ is open because there are no points that fail the condition.
  • $\mathbb{R}$ is open because every point has a whole interval around it inside $\mathbb{R}$.
  • The complement of $\emptyset$ is $\mathbb{R}$, which is open, so $\emptyset$ is closed.
  • The complement of $\mathbb{R}$ is $\emptyset$, which is open, so $\mathbb{R}$ is closed.

A set that is both open and closed is called clopen.

A set can be neither open nor closed

The set

$$

[0,1)

$$

is neither open nor closed.

  • It is not open because the point $0$ has no interval around it that stays inside the set.
  • It is not closed because $1$ is a limit point of the set, but $1$ is not included.

This type of example is important because it shows that “not open” does not automatically mean “closed,” and “not closed” does not automatically mean “open.”

How to test sets in practice

When students works with open and closed sets, a few strategies make the job easier.

Strategy 1: Test points and neighborhoods

To check whether a set is open, pick a typical point inside the set and ask whether a small interval around it stays inside.

For example, for $(-3,2)$, a point like $x=1$ works well. Since $1$ is not near the endpoints, there is room on both sides.

To check whether a set is not open, it is enough to find one point in the set that fails the neighborhood test. For $[0,1]$, the point $0$ is enough.

Strategy 2: Use complements for closed sets

To prove a set is closed, show that its complement is open.

For example, to prove $[2,7]$ is closed, observe that

$$

\mathbb{R} \setminus [2,7] = (-$\infty$,2) \cup (7,$\infty)$,

$$

which is open.

This method is often simpler than working directly with limit points.

Strategy 3: Use finite and infinite intersections or unions carefully

Open sets are stable under arbitrary unions and finite intersections.

Closed sets are stable under arbitrary intersections and finite unions.

For example, if $U_1$ and $U_2$ are open, then $U_1 \cup U_2$ is open. This explains why a union like

$$

$(-2,-1) \cup (3,5)$

$$

is open.

If $F_1$ and $F_2$ are closed, then $F_1 \cap F_2$ is closed. So

$$

$[0,2] \cap [1,3] = [1,2]$

$$

is closed.

These rules help when sets are built from simpler pieces.

Why open and closed sets matter in the topology of $\mathbb{R}$

Open and closed sets are not just definitions to memorize. They are part of the structure that lets mathematicians study the real line in a precise way. The collection of open sets in $\mathbb{R}$ tells us what it means for a point to be “near” another point. That notion of nearness is the foundation of limits and continuity.

For example, continuity can be described using open sets: a function is continuous if the preimage of every open set is open. Even before that formal idea appears, open sets help explain why tiny changes in input lead to tiny changes in output.

Closed sets are equally important because they capture sets that include their limit behavior. They are closely tied to convergence, limit points, and compactness. Later, when you study compact sets, you will see that closedness is one of the key ingredients in many theorems.

So, students, open and closed sets are not separate from the rest of Real Analysis. They are one of the language systems that make the rest of the subject work.

Conclusion

Open and closed sets describe how subsets of $\mathbb{R}$ behave around their points and boundaries. An open set gives each of its points some breathing room, while a closed set contains its boundary behavior through its complement or its limit points. Some sets are both, some are neither, and many examples can be checked using intervals, complements, and neighborhood reasoning. These ideas are basic, but they are also powerful. They form the entry point to topology on the real line and prepare you for limits, continuity, and compactness.

Study Notes

  • An open set $U \subseteq \mathbb{R}$ satisfies: for every $x \in U$, there exists $\varepsilon > 0$ such that $$(x-\varepsilon, x+\varepsilon) \subseteq U.$$
  • A closed set is a set whose complement is open.
  • Another way to view a closed set is that it contains all of its limit points.
  • Examples of open sets: $(0,1)$, $(-2,-1) \cup (3,5)$.
  • Examples of closed sets: $[0,1]$, $\mathbb{Z}$, $\emptyset$, and $\mathbb{R}$.
  • $\emptyset$ and $\mathbb{R}$ are both open and closed.
  • A set like $[0,1)$ is neither open nor closed.
  • To prove a set is open, test whether every point has a small interval around it inside the set.
  • To prove a set is closed, often the easiest method is to show its complement is open.
  • Open sets and closed sets are central to topology on $\mathbb{R}$ and appear in limits, continuity, convergence, and compactness.

Practice Quiz

5 questions to test your understanding

Open And Closed Sets — Real Analysis | A-Warded