# A compact subset of a metric space is always closed

I am reading Principles of Mathematical Analysis by Walter Rudin.

In chapter two, it has the following definitions:

A neighborhood of $$p$$ is a set $$N_r(p)$$ consisting of all $$q$$ such that $$d(p,q) \lt r$$, for some $$r \gt 0$$. The number $$r$$ is called the radius of $$N_r(p)$$.

A point p is a limit point of the set $$E$$ if every neighborhood of $$p$$ contains a point $$q \neq p$$ such that $$q \in E$$.

$$E$$ is closed is every limit point of $$E$$ is a point of $$E$$.

By an open cover of a set $$E$$ in a metric space $$X$$ we mean a collection $${G_\alpha}$$ of open subsets of $$X$$ such that $$E \subset \cup_\alpha G_\alpha$$.

A subset $$K$$ of a metric space $$X$$ is said to be compact if every open cover of $$K$$ contains a finite subcover. More explicitly, the requirement is that if $${G_\alpha}$$ is an open cover of K, then there are finitely many indices $$\alpha_1, \ldots, \alpha_n$$ such that $$K \subset G_{\alpha_1} \cup \cdots \cup G_{\alpha_1}$$

I was pretty sure I understood these until I found this theorem:

Theorem $$\;$$ Compact subsets of metric spaces are closed.

I know that the proof involves showing that the complement is open, and I don't have any problems with that, but I found a set that is compact but not closed, at least according to what I understood the definitions to be.

My logic is as follows:

The set $$\{x \in \mathbb R^2 \;|\; |x| \lt 1\}$$ is not closed (any point on the circle surrounding it is a limit point but is not a member), but it is compact (it is a subset of the open set $$\{x \in \mathbb R^2 \;|\; |x| \lt 2\}$$), which contradicts the theorem.

I assume the flaw is in my understanding of the definitions.

• The condition for compactness needs to be true for any open cover of $K$. You've found one finite open (finite) cover of $K.$ Consider, instead, the cover $G_i=N_{1-1/i}(0).$ Then $$\bigcup_{i=1}^{\infty} G_i = K=\{x\mid |x|\leq 1\}$$ but no finite subcover of the $G_i$ covers $K$. – Thomas Andrews Feb 21 at 18:56
• The usual terminology is that a neighborhood of $p$ is a set $N$ such that there exists an open set $U$ with $p\in U\subset N.$ The set $N_r(p)$ is called the open ball of radius $r,$ centered at $p.$..... Many people prefer to write $B(p,r)$ for $N_r(p),$ which is more convenient when $r$ is represented by some complicated expression. – DanielWainfleet Feb 22 at 4:44

That set is not compact. Consider the open sets$$\left\{(x,y)\in\mathbb{R}^2\,\middle|\,\bigl\lVert(x,y)-(1,0)\bigr\rVert>\frac1n\right\},$$with $$n\in\mathbb N$$. These sets form an open cover of your set without a finite subcover.

• Thanks! How can I visualize the set you described? – Shobart Feb 22 at 0:05
• That set is just the complement of a closed open disk centered at $(1,0)$ with radius $\frac1n$. – José Carlos Santos Feb 22 at 0:07

A space $$S$$ is $$T_2$$ (a.k.a. a Hausdorff space) when for any distinct $$x,y\in S$$ there are disjoint open $$U,V \subset S$$ with $$x\in U$$ and $$y\in V.$$

A metric space $$(S,d)$$ is Hausdorff. For if $$x,y$$ are distinct members of $$S,$$ let $$r=d(x,y)/2$$ and let $$U=N_r(x),V=N_r(y).$$ The triangle inequality implies that $$U,V$$ are disjoint.

Theorem: If $$S$$ is Hausdorff and $$T$$ is a compact subset of $$S$$ then $$T$$ is closed. Equivalently, if $$T$$ is not closed then $$T$$ is not compact.

Proof: Suppose $$T$$ is not closed. Take $$y\in \bar T$$ \ $$T.$$ For each $$x\in T$$ let $$U_x, V_x$$ be a disjoint pair of open sets with $$x\in U_x$$ and $$y\in V_x$$. Consider the open cover $$C=\{U_x:z\in T\}$$ of $$T.$$

Suppose $$n\in \Bbb Z^+$$ and $$D=\{U_{x_1},...,U_{x_n}\}$$ is any finite subset of $$C.$$ Then $$N=\cap_{j=1}^nV_{x_j}$$ is an open set containing the point $$y,$$ and $$y\in \bar T,$$ so there exists $$z\in N\cap T.$$

But $$N$$ is disjoint from $$\cup_{j=1}^nU_{x_j}=\cup D,$$ so $$D$$ is not a cover of $$T.$$ ( That is, $$z\in T$$ \ $$\cup D).$$ So $$C$$ is an open cover of $$T$$ with no finite sub-cover.