1.1. Open and closed sets

$\newcommand{\R}{\mathbb R }$ $\newcommand{\bfa}{\mathbf a}$ $\newcommand{\bfb}{\mathbf b}$ $\newcommand{\bfu}{\mathbf u}$ $\newcommand{\bfx}{\mathbf x}$ $\newcommand{\bfy}{\mathbf y}$ $\newcommand{\ep}{\varepsilon}$

Open, closed, and other subsets of $\R^n$

  1. basic terminology and notation
  2. Interior, boundary, and closure
  3. Open and closed sets
  4. Problems

See also Section 1.2 in Folland's Advanced Calculus.

The most important and basic point in this section is to understand the definitions of open and closed sets, and to develop a good intuitive feel for what these sets are like. This requires some understanding of the notions of boundary, interior, and closure.

In fact, we will see soon that many sets can be recognized as open or closed, more or less instantly and effortlessly. Nonetheless, it is useful to understand the basic concepts.

Some proofs are given here and in the lectures. Some of these may be a little tricky, if you are not used to this kind of thing, and others involve straightforward reasoning using the definitions. Proving theorems about open/closed/etc sets is not a major focus of this class, but these sorts of proofs are good practice for theorem-proving skills, and straightforward proofs of this sort would be reasonable test questions.

basic terminology and notation

Assume that $\bfa\in \R^n$ and that $r>0$. The open ball with centre $\bfa$ and radius $r$ is the set, denoted $B(r, \bfa)$, defined by $$ B(r, \bfa) := \{ \bfx \in \R^n : |\bfx - \bfa|< r\}. $$ We will sometimes say ball instead of open ball.

The sphere with centre $\bfa$ and radius $r$ is the set of points whose distance from $\bfa$ exactly equals $r$: $$ \{ \bfx \in \R^n : |\bfx - \bfa| = r\}. $$

Note that, although sphere and ball are often used interchangeably in ordinary English, in mathematics they have different meanings.

We will write $\bf 0$, in boldface, to denote the origin in $\R^n$.

A set $S\subset \R^n$ is bounded if there exists some $r>0$ such that $S\subset B(r, {\bf 0})$.

A set is unbounded if and only if it is not bounded.

Recall that if $S\subset \R^n$, then the complement of $S$, denoted $S^c$, is the set defined by $$ S^c := \{ \bfx\in \R^n : \bfx \not\in S\}. $$

Interior, boundary, and closure

Assume that $S\subset \R^n$ and that $\bfx$ is a point in $\R^n$.

Imagine you zoom in on $\bfx$ and its surroundings with a microscope that has unlimited powers of magnification. This is an experiment that is beyond the reach of current technology but can be carried out with perfect accuracy in your mind. One of three possibilities must occur:

  1. There is some magnification beyond which, in your view-finder, you see only points that belong to $S$. More precisely, \begin{equation}\label{interior} \mbox{ there exists }\ep>0\mbox{ such that }B(\ep, \bfx)\subset S. \end{equation}

  2. There is some magnification beyond which, in your view-finder, you see only points that do not belong to $S$ (or equivalently, that belong to $S^c$). More precisely, \begin{equation}\label{compint} \mbox{ there exists }\ep>0\mbox{ such that }B(\ep, \bfx)\subset S^c. \end{equation}

  3. None of the above: no matter how much you turn up the magnification, in your view-finder you always see both some points that belong to $S$, and some that do not. More precisely, \begin{equation}\label{boundary} \mbox{ for every }\ep>0, \qquad B(\ep, \bfx)\cap S\ne \emptyset \ \mbox{ and } \ B(\ep, \bfx)\cap S^c\ne \emptyset\ . \end{equation}

We now define interior, boundary, and closure:

Here are some basic properties of the above notions. The proofs are rather straightforward and should be within the abilities of MAT237 students.

Theorem 1. For any $S\subset \R^n$, $$ S^{int} \subset S \subset \bar S. $$ In particular, every point of $S$ is either an interior point or a boundary point.

Proof

To prove that $S^{int}\subset S$, consider an arbitrary point $\bfx \in S^{int}$. By definition of interior, there exists $\ep>0$ such that $B(\ep,\bfx)\subset S$. Since $\bfx\in B(\ep,\bfx)$, it follows that $\bfx\in S$. Since $\bfx$ was an arbitrary point of $S^{int}$, it follows that $S^{int}\subset S$.

Next, consider an arbitrary point $\bfx$ of $S$. Then for every $\ep>0$, both $\bfx \in B(\ep, \bfx)$ and $\bfx \in S$ are true. Hence $B(\ep,\bfx)\cap S\ne \emptyset$ for every $\ep>0$. This says that $\bfx\in \bar S$. Since $\bfx$ was an arbitrary point of $S$, it follows that $S\subset \bar S$.

Finally, the statement that $S\subset \bar S$ says exactly that every point of $S$ is either an interior point or a boundary point, since $\bar S = S^{int}\cup \partial S$. $\qquad \Box$

Theorem 2. For any $S\subset \R^n$, $$ \partial S = \partial (S^c). $$

Proof

First we claim that \begin{equation}\label{cc} (S^c)^c = S. \end{equation}

This is probably familiar from earlier classes, and can be checked by unwinding the definitions: \begin{align} \bfx\in (S^c)^c &\quad\iff\qquad \bfx\not\in S^c = \{ \bfy\in \R^n : \bfy\not\in S\} \nonumber \\ &\quad\iff\qquad\bfx\in S \nonumber \end{align} This proves \eqref{cc}. Next, we use \eqref{cc} to deduce that \begin{align} \bfx \in \partial(S^c) &\iff \ \forall \ep>0, \ \ B(\ep, \bfx)\cap S^c\ne \emptyset \ \mbox{ and } \ B(\ep, \bfx)\cap (S^c)^c\ne \emptyset\ \nonumber \\ &\iff \ \forall \ep>0, \ \ B(\ep, \bfx)\cap S^c\ne \emptyset \ \mbox{ and } \ B(\ep, \bfx)\cap S\ne \emptyset\ \nonumber \\ &\iff \bfx\in \partial S \end{align} This completes the proof. $\qquad \Box$

Some examples

For all of the sets below, determine (without proof) the interior, boundary, and closure of each set. Some of these examples, or similar ones, will be discussed in detail in the lectures.

For some of these examples, it is useful to keep in mind the fact (familiar from calculus) that every open interval $(a,b)\subset \R$ contains both rational and irrational numbers.

Should you practice rigorously proving that the interior/boundary/closure of a set is what you think it is? This will mostly be unnecessary, due to an easy test that we will introduce in Section 1.2.3 that will make this unnecessary, so in general, this kind of proof will rarely be necessary for us, and we do not recommend spending a lot of time on these.

On the other hand, the proof that (spoiler alert for example 1 below) the every point of an open ball is an interior point is fundamental, and you should understand it well.

  1. $\ \ \ $An open ball $B(r,\bfa)$, for $\bfa\in \R^n$ and $r>0$.

    Answer:

    Let us write $S := B(r, \bfa)$. By applying the definitions, we can see that
    $S^{int} = S$
    $\partial S = \{\bfx\in \R^n : |\bfx - \bfa|=r\}$
    and thus $\bar S = S^{int}\cup \partial S = \{\bfx\in \R^n : |\bfx - \bfa| \le r\}$.

    If we want to prove these (not recommended, for the assertion about $\partial S$), we can do so as follows:

    Proof that $S^{int}= S$. We already know from Theorem 1 that $S^{int}\subset S$, so we only have to prove that $S\subset S^{int}$. To do this, we must prove that $\forall \bfx\in S$, condition \eqref{interior} holds. So, pick $\bfx\in S$. Let's define $s := |\bfx-\bfa|$. By definition of $S$, we know that $ s < r $. We claim (motivated by drawing a picture ) that if we define $\ep := r-s$, then $B(\ep, \bfx)\subset S$. To prove it, consider any $\bfy \in B(\ep, \bfx)$. By the triangle inequality, $$ |\bfy-\bfa| = |(\bfy - \bfx) + (\bfx-\bfa)|\le |\bfy-\bfx| +|\bfx-\bfa|< \ep+s $$ since $|\bfx-\bfa| = s$ and $ | \bfy - \bfx | < \ep $ for $\bfy \in B(\ep, \bfx)$. Since we chose $\ep = r-s$, it follows that $\bfy\in B(r,\bfa) = S$. It follows that $B(\ep, \bfx)\subset S$, and hence that $\bfx \in S^{int}$. Since $\bfx$ was an arbitrary point of $S$, this shows that $S\subset S^{int}$.


    The proof that $\partial S = T := \{\bfx\in \R^n : |\bfx - \bfa|=r\}$ is pretty complicated, because there are a lot of details to keep straight. Here are some of them

    • We must prove that $\partial S \subset T$ and that $T\subset \partial S$.

    • $\partial S\subset T$: We already know that if $ |\bfx-\bfa|<r $, then $\bfx\in S^{int}$, and thus $\bfx\not\in \partial S$.

    • Essentially the same argument shows that if $|\bfx-\bfa|>r$, then $\bfx\in (S^c)^{int}$, and thus $\bfx\not\in \partial S$. This completes the proof that $\partial S\subset T$.

    • $T\subset \partial S$: to do this we must consider some $\bfx\in T$, and we must check that that for every $\ep>0$, $B(\ep ,\bfx)$ intersects both $S$ and $S^c$. Thus we consider:

    • $B(\ep ,\bfx)\cap S^c\ne \emptyset$. This is clear, since $\bfx\in T \subset S^c$.

    • $B(\ep ,\bfx)\cap S\ne \emptyset$. This is the hardest point. One way to do it is to specify a point that belongs to both $S$ and $B(\ep, \bfx)$. This can be done by choosing a point $\bfy$ of the form $\bfy = \bfa + t(\bfx - \bfa)$ and then adjusting $t$ suitably. (details omitted)

  2. $\quad S = \{(x,y)\in \R^2 : x>0 \mbox{ and } y\ge 0\}$.

  3. $\quad S = \{ (\frac 1n, \frac 1{n^2}) : n \in \mathbb N \}.$ Here $\mathbb N$ denotes the natural numbers, that is, the set of positive integers.

  4. $\quad S = \{ (x,y)\in \R^2 : y = x^2 \}$.

  5. $\quad S = \{ (x,y,z)\in \R^3 : z > x^2 + y^2 \}$.

  6. $\quad S := \{ x\in (0,1) : x\mbox{ is rational} \}$.

  7. $\quad S = \{ (x,y)\in \R^2 : x\mbox{ is rational } \}$.

  8. $\quad S = \{ \bfx \in \R^3 : 0< |\bfx| < 1, \ |\bfx| \mbox{ is irrational} \}$.

Open and closed sets

Next, two fundamental definitions that w will use repeatedly throughout this class:

We will later see how to instantly recognize many sets as open or closed. see Section 1.2.3 below.

Contrary to what the names open and closed might suggest,

In fact there are many sets that are neither open nor closed. But in this class, we will mostly see open and closed sets. For example,

Here are alternate characterizations of open and closed sets that are often useful in proofs.

Theorem 3. \begin{align} S \mbox{ is open} &\quad \iff \quad \mbox{ every point of $S$ is an interior point} \nonumber \\ &\quad \iff \quad \forall \bfx\in S \ \ \exists \ep >0\mbox{ such that }B(\ep, \bfx)\subset S \nonumber \quad\end{align}

Proof

First, if $S$ is open, then $S = S^{int}$, which certainly implies that $S\subset S^{int}$, or in other words that every point of $S$ is an interior point.

Conversely, assume that every point of $S$ is an interior point, or in other words that $S\subset S^{int}$. We know from Theorem 1 above that $S^{int}\subset S$. Combining these, we conclude that $S=S^{int}$. This completes the proof of the first $\iff$ in the statement of the theorem. The second $\iff$ follows directly from the definition of interior point. $\qquad \Box$

Theorem 4. \begin{align} S \mbox{ is closed} &\quad \iff \quad \mbox{ every boundary point of $S$ belongs to $S$} \nonumber \\ &\quad \iff \quad S^c \mbox{ is open}.\nonumber \quad\end{align}

Proof

By definition, if $S$ is closed, then $S = \bar S = S^{int}\cup \partial S$. This certainly implies that $\partial S\subset S$, or in other words that every boundary point of $S$ belongs to $S$.

Conversely, assume that $\partial S\subset S$. We know from Theorem 1 above that $S^{int}\subset S$. Combining these, we conclude that $\bar S\subset S$. Again using Theorem 1, we recall that $S\subset \bar S$. It follows that $\bar S = S$, and hence that $S$ is closed. This completes the proof of the first $\iff$ in the statement of the theorem.

Next, since $\partial S = \partial S^c$ and every point of $S^c$ belongs either to $(S^c)^{int}$ or $\partial(S^c)$, \begin{align} S\mbox{ is closed } &\iff \partial S \subset S \iff \partial (S^c) \subset S \nonumber \\ &\iff \mbox{ no point of $S^c$ is a boundary point } \iff S^c\mbox{ is open}.\nonumber \end{align} This completes the proof. $\qquad \Box$

Some examples

  1. Every open ball $B(r,\bfa)$ is an open set. Although this sounds obvious, to prove that it is true we must use the definitions of open ball and open set.

  2. The above definitions (open ball, open set, closed set ...) all make sense when $n=1$, that is, for subsets of $\R$. In this case,

  3. What is an example of a set $S\subset \R^n$ that is both open and closed? Can you think of two different examples of sets with this property? How about three?

  4. What is an example of a set $S\subset \R^n$ that is neither open nor closed?

Problems

Basic skills

Determine (without proof) the interior, boundary, and closure of the following sets.

Determine (without proof) whether the sets are bounded or unbounded

Determine (without proof) whether the following sets are open, closed, neither, or both.

  1. $\quad S = \{ \bfx \in \R^n : |\bfx|<1\}$.

  2. $\quad S = \{(x,y)\in \R^2 : x>0 \mbox{ and } y\ge 0\}$.

  3. $\quad S = \{ (\frac 1n, \frac 1{n^2}) : n \in \mathbb N \},$ where $\mathbb N$ denotes the natural numbers

  4. $\quad S = \{ (x,y)\in \R^2 : y = x^2 \}$.

  5. $\quad S = \{ (x,y,z)\in \R^3 : z > x^2 + y^2 \}$.

  6. $\quad S := \{ x\in (0,1) : x\mbox{ is rational} \}$.

  7. $\quad S = \{ (x,y)\in \R^2 : x\mbox{ is rational } \}$.

  8. $\quad S = \{ \bfx \in \R^3 : 0< |\bfx| < 1, \ |\bfx| \mbox{ is irrational} \}$.

  9. $\quad S = \{ \bfx \in \R^n : |\bfx| = 2^{-j} \mbox{ for some }j\in {\mathbb N}\}$.

Questions about basic concepts. This could mean questions completely unlike the ones below but at a similar level of difficulty.

  1. Can a set be both open and closed at the same time?

  2. Must a set be either open or closed?

  3. Can a set be both bounded and unbouded at the same time?

  4. Must a set be either bounded or unbounded?

Less basic

  1. Prove that if $A, B$ are open subsets of $\R^n$ then $A\cup B$ and $A\cap B$ are open.

  2. Deduce from problem 1 above and de Morgan's laws that if $A, B$ are closed subsets of $\R^n$ then $A\cup B$ and $A\cap B$ are closed.
    Reminder: De Morgan's laws state that $(A\cup B)^c = A^c \cap B^c$ and $(A\cap B)^c = A^c \cup B^c$.

  3. If $A_1, A_2, \ldots$ is a sequence of subsets of $\R^n$, then we define $$ \cup_{j\ge 1} A_j := \{ \bfx\in \R^n : \exists j \ge 1\mbox { such that }\bfx\in A_j \}. $$ Prove that if $A_j$ is open for every $j$, then so is $\cup_{j\ge 1} A_j $.

  4. If $A_1, A_2, \ldots$ is a sequence of subsets of $\R^n$, then we define $$ \cap_{j\ge 1} A_j := \{ \bfx\in \R^n : \bfx\in A_j \mbox{ for all }j\ge 1 \}. $$

  5. Is it true that if $A_j$ is closed for every $j$, then $\cup_{j\ge 1} A_j$ must be closed?
    It may be relevant to note that $\big(\cup_{j\ge 1} A_j\big)^c = \cap_{j\ge 1} A_j^c$.

  6. Assume that $A$ is a nonempty open subset of $\R$, and let $$ S := \{ (x,0) : x\in A \} \subset \R^2. $$ Is $S$ open, closed, or neither? Prove that your answer is correct.

  7. Assume that $A_1$ and $A_2$ are nonempty open subsets of $\R$, and let $$ S := \{ (x,y) : x\in A_1, y\in A_2 \} \subset \R^2. $$ Is $S$ open, closed, or neither? Prove that your answer is correct.

$\Leftarrow$  $\Uparrow$  $\Rightarrow$