Tutorials › Real Analysis › Open and Closed Sets in R^n

Multivariable Analysis · Tutorial 770 of 1000

Open and Closed Sets in R^n

Use norm balls to recognize open and closed subsets of \(\mathbb{R}^n\), and prove the basic rules governing their unions, intersections, and complements.

Advanced 10 min read

What You'll Learn

  • Define open and closed subsets of \(\mathbb{R}^n\) using norm balls and complements
  • Prove the union and finite-intersection rules for open sets
  • Derive the corresponding intersection and finite-union rules for closed sets
  • Verify openness of rectangles and strict affine half-spaces
  • Verify closedness of closed balls and affine hyperplanes
  • Distinguish closedness from boundedness and from being non-open

From Open Balls to Open Sets

The previous tutorial introduced open balls in \(\mathbb{R}^n\). They provide the local building blocks for describing larger sets: a set is open when each of its points has some ball around it that stays inside the set. This condition is local, so the radius can depend on the point. A single radius that works everywhere is not required.

We use the metric induced by a norm \(\|\cdot\|\) on \(\mathbb{R}^n\), with \(B_r(a;\|\cdot\|)=\{x:\|x-a\|<r\}\). When no norm is specified, take the Euclidean norm \(\|\cdot\|_2\). The topology induced by a norm is the collection of sets that satisfy the open-set condition below. The previous tutorial established that norm balls are open in their induced metric.

Definition: A set \(U\subseteq\mathbb{R}^n\) is open if, for every \(a\in U\), there exists \(r>0\) such that \(B_r(a;\|\cdot\|)\subseteq U\). A set \(F\subseteq\mathbb{R}^n\) is closed if its complement \(\mathbb{R}^n\setminus F\) is open.

The radius in the definition may vary with \(a\). To prove that a set is open, it is enough to take an arbitrary point in the set and find a positive radius around that point that remains inside. To prove that a set is closed, one convenient route is to take an arbitrary point outside it and find a ball around that point that still avoids the set.

Rectangles and Strict Inequalities

An open rectangle in the plane is open because every point inside has a positive margin from each of its four sides. A strict linear inequality gives another useful example. In both cases, the proof exhibits a ball at an arbitrary point rather than relying only on a drawing.

Worked Example: An Open Rectangle

Let \(U=(1,4)\times(-2,3)\subseteq\mathbb{R}^2\), and choose an arbitrary \((x_0,y_0)\in U\). Each of the four quantities \(x_0-1\), \(4-x_0\), \(y_0+2\), and \(3-y_0\) is positive. Set

$$ r=\min\{x_0-1,\ 4-x_0,\ y_0+2,\ 3-y_0\}>0. $$

If \((x,y)\in B_r^{(2)}((x_0,y_0))\), then \(|x-x_0|\leq\|(x,y)-(x_0,y_0)\|_2<r\) and \(|y-y_0|\leq\|(x,y)-(x_0,y_0)\|_2<r\). Since \(r\leq x_0-1\) and \(r\leq4-x_0\), these inequalities imply \(1<x<4\). Since \(r\leq y_0+2\) and \(r\leq3-y_0\), they also imply \(-2<y<3\). Thus \(B_r^{(2)}((x_0,y_0))\subseteq U\). The point was arbitrary, so \(U\) is open.

For a numerical check, \((2,0)\in U\), and the four margins are \(1,2,2,3\), so radius \(1\) works at that point. The point \((1,0)\) is not in \(U\): its first coordinate lies on the excluded side of the strict condition \(1<x<4\).

Worked Example: A Strict Affine Half-Space

Consider \(U=\{(x,y)\in\mathbb{R}^2:2x-y<1\}\). Take any \((x_0,y_0)\in U\), and define its positive margin by \(\delta=1-(2x_0-y_0)>0\). If \(\|(x,y)-(x_0,y_0)\|_2<\delta/(2\sqrt{5})\), then the Cauchy–Schwarz inequality gives

$$ \begin{aligned} 2x-y &=2x_0-y_0+(2,-1)\cdot(x-x_0,y-y_0)\\ &\leq 2x_0-y_0+\sqrt{5}\,\|(x,y)-(x_0,y_0)\|_2\\ &<2x_0-y_0+\frac{\delta}{2}\\ &=1-\frac{\delta}{2}<1. \end{aligned} $$

Therefore \(B_{\delta/(2\sqrt5)}^{(2)}((x_0,y_0))\subseteq U\), and \(U\) is open. The coordinate signs in the dot product matter: the change in \(2x-y\) is \(2(x-x_0)-(y-y_0)\), which is exactly \((2,-1)\cdot(x-x_0,y-y_0)\).

For a direct numerical check, \((0,0)\in U\) with margin \(\delta=1\). If \(\|(x,y)\|_2<1/(2\sqrt5)\), then \(2x-y=(2,-1)\cdot(x,y)\leq\sqrt5\|(x,y)\|_2<1/2<1\). Thus the claimed ball at this point lies in the half-space.

How Open Sets Behave Under Unions and Intersections

The local definition makes unions especially straightforward: a point in a union belongs to at least one of its member sets, so the ball supplied by that set also works for the union. Intersections require more care. For finitely many open sets, take the smallest of the finitely many radii. For infinitely many open sets, there need not be one positive radius that works for all of them.

Theorem (Unions and Finite Intersections of Open Sets): An arbitrary union of open subsets of \(\mathbb{R}^n\) is open. A finite intersection of open subsets of \(\mathbb{R}^n\) is open.

Proof. Let \(\{U_\lambda:\lambda\in\Lambda\}\) be a family of open sets. If the family is empty, its union is \(\varnothing\), which is open because it has no points for which the definition must be checked. Otherwise, take \(x\in\bigcup_{\lambda\in\Lambda}U_\lambda\). Then \(x\in U_{\lambda_0}\) for some index \(\lambda_0\). Since \(U_{\lambda_0}\) is open, there is an \(r>0\) such that \(B_r(x)\subseteq U_{\lambda_0}\). Hence \(B_r(x)\subseteq\bigcup_{\lambda\in\Lambda}U_\lambda\). Every point of the union has such a ball, proving that the union is open.

Now let \(U_1,\ldots,U_m\) be a finite family of open sets. If \(m=0\), the intersection is understood to be \(\mathbb{R}^n\), which is open: for any \(x\in\mathbb{R}^n\), every positive-radius ball centered at \(x\) lies in \(\mathbb{R}^n\). If \(m\geq1\), take \(x\in\bigcap_{j=1}^{m}U_j\). For each \(j\), openness gives \(r_j>0\) such that \(B_{r_j}(x)\subseteq U_j\). Let \(r=\min\{r_1,\ldots,r_m\}\), which is positive because it is the minimum of finitely many positive numbers. Then \(B_r(x)\subseteq B_{r_j}(x)\subseteq U_j\) for every \(j\), so \(B_r(x)\subseteq\bigcap_{j=1}^{m}U_j\). This proves the finite-intersection assertion. \(\square\)

Worked Example: An Infinite Intersection Need Not Be Open

For each positive integer \(m\), let \(U_m=(-1/m,1/m)\subseteq\mathbb{R}\). Each \(U_m\) is open: for any \(x\in U_m\), the radius \(r=\min\{x+1/m,1/m-x\}>0\) gives \((x-r,x+r)\subseteq U_m\). But

$$ \bigcap_{m=1}^{\infty}U_m=\{0\}. $$

Indeed, \(0\) belongs to every interval. If \(x\neq0\), choose a positive integer \(m>1/|x|\). Then \(1/m<|x|\), so \(x\notin(-1/m,1/m)\), and therefore \(x\) is not in the intersection. The singleton \(\{0\}\) is not open in \(\mathbb{R}\), since every ball around \(0\) contains nonzero points. Thus an infinite intersection of open sets need not be open.

Closed Sets and Complement Rules

Closedness is defined through the complement, so the open-set rules immediately give the corresponding closed-set rules. These are often useful when the complement of a set has a simpler description than the set itself.

Theorem (Intersections and Finite Unions of Closed Sets): An arbitrary intersection of closed subsets of \(\mathbb{R}^n\) is closed. A finite union of closed subsets of \(\mathbb{R}^n\) is closed.

Proof. Let \(\{F_\lambda:\lambda\in\Lambda\}\) be closed. By the complement identity, \(\mathbb{R}^n\setminus\bigcap_{\lambda\in\Lambda}F_\lambda =\bigcup_{\lambda\in\Lambda}(\mathbb{R}^n\setminus F_\lambda)\). Each complement on the right is open, so the arbitrary-union theorem shows that the right-hand side is open. Thus the intersection is closed. This includes the empty family: its intersection is \(\mathbb{R}^n\), which is closed because its complement is empty and open.

For a finite family \(F_1,\ldots,F_m\), the complement of their union is \(\mathbb{R}^n\setminus\bigcup_{j=1}^{m}F_j =\bigcap_{j=1}^{m}(\mathbb{R}^n\setminus F_j)\). Each complement is open, and a finite intersection of open sets is open. Therefore the complement of the union is open, so the union is closed. When \(m=0\), the union is empty, which is closed because its complement \(\mathbb{R}^n\) is open. \(\square\)

Worked Example: A Closed Ball

Fix a center \(a\in\mathbb{R}^n\) and \(R\geq0\). Consider the set \(F=\{x:\|x-a\|\leq R\}\). To show it is closed, take an arbitrary point \(x\notin F\), so \(s=\|x-a\|>R\). Set \(\varepsilon=(s-R)/2>0\). If \(\|y-x\|<\varepsilon\), the triangle inequality applied to \(x-a=(x-y)+(y-a)\) gives

$$ \|y-a\|\geq\|x-a\|-\|y-x\|>s-\varepsilon=\frac{s+R}{2}>R. $$

Thus \(B_\varepsilon(x)\) lies entirely outside \(F\). Every point of the complement has a ball contained in the complement, so the complement is open and \(F\) is closed. This proof also covers \(R=0\), in which case \(F=\{a\}\).

For example, \(F=\{(x,y):(x-1)^2+(y+1)^2\leq4\}\) is the Euclidean closed ball centered at \((1,-1)\) with radius \(2\). The point \((4,-1)\) is outside because its distance from the center is \(3>2\); the argument above supplies a neighborhood of that point disjoint from the ball.

Affine Hyperplanes and Common Pitfalls

A level set of a nonzero linear functional is another important closed set. The argument below verifies closedness directly: points outside the hyperplane have a positive margin in the value of the functional, and a sufficiently small ball cannot erase that margin.

Worked Example: A Closed Affine Hyperplane

Let \(a\in\mathbb{R}^n\) be nonzero and \(c\in\mathbb{R}\). Define \(H=\{x\in\mathbb{R}^n:a\cdot x=c\}\). Take \(x_0\notin H\), so \(\delta=|a\cdot x_0-c|>0\). If \(\|x-x_0\|_2<\delta/(2\|a\|_2)\), then Cauchy–Schwarz yields

$$ \begin{aligned} |a\cdot x-c| &\geq |a\cdot x_0-c|-|a\cdot(x-x_0)|\\ &\geq \delta-\|a\|_2\|x-x_0\|_2\\ &>\frac{\delta}{2}>0. \end{aligned} $$

Consequently \(a\cdot x\neq c\) throughout this ball, so the ball is contained in \(\mathbb{R}^n\setminus H\). The complement is open, and \(H\) is closed. In the plane, the set \(\{(x,y):2x-y=1\}\) is such a hyperplane, with \(a=(2,-1)\) and \(c=1\).

Several distinctions are worth keeping in view. First, “closed” does not mean “not open.” Both \(\varnothing\) and \(\mathbb{R}^n\) are open and closed: each is the complement of the other. Second, closed does not mean bounded. For example, the hyperplane just considered is unbounded and closed. Third, neither property is automatic for every set. In \(\mathbb{R}\), the interval \([0,1)\) is neither open nor closed: it is not open because no ball around \(0\) stays in the interval, and it is not closed because its complement \((-\infty,0)\cup[1,\infty)\) is not open at \(1\).

A useful practical rule is to match the proof to the definition. For openness, start with a point inside and control a ball around it. For closedness, start with a point outside and keep a ball in the complement. Strict inequalities commonly provide a positive margin for the first argument; non-strict norm bounds commonly lend themselves to the second. The strictness of the ball condition matters: a bound that only gives distance at most \(R\) would not show that a point lies outside a closed ball of radius \(R\).

Check Your Understanding

Use the definitions and results in this tutorial to answer each question.

  1. Why does the proof that finite intersections of open sets are open use a minimum of finitely many radii?
  2. Is an arbitrary union of closed sets necessarily closed? Explain using the complement rules.
  3. For the set \(\{(x,y):x+3y<4\}\), what vector represents the change in the left-hand side when \((x,y)\) changes?
  4. Why is \(\{x\in\mathbb{R}^n:\|x-a\|\leq R\}\) closed even though its defining inequality is non-strict?
  5. Give an example of a set in \(\mathbb{R}\) that is both open and closed, and one that is neither.