# Compactness of a set in a metric space

Let $X$ be a metric space, and $A\subset X$. Show that $\bar A$ is compact iff for every sequence in $A$ there exists a subsequence that converges to a point in $X$. I showed the "forward" direction, but am stuck showing the reverse.

Let $(x_n)\subset \bar A$ be a sequence. if $A$ is closed, then $A=\bar A$ and if a sequence in a closed set converges, it converges to an element of the set. But by assumption every sequence in $A$ has a convergent subsequence (to an element in $A$), and the result follows.

Thing is, what happens if $A$ is not closed? Choose a sequence in $\bar A$ such that every element of the sequence is not in $A$, i.e. $(x_n)\subset\partial A \setminus A$. What guarantees us that it has a convergent subsequence? Thanks!

• Notice that the clause after the "iff" says "for every sequence in $A$...". It does not say "for every sequence in $\overline A$..." as you seem to have read it. – Lee Mosher Dec 10 '16 at 14:29
• I'm not sure what you refer your comment to, but this is indeed the problem. I said that if A is closed then the result follows immediately, but if not I don't understand how the fact that every sequence in A converges to $x \in X$ helps, since I can choose a sequence in $\bar A$, which I want to show is compact, that is entirely not in $A$. – Yoni Dec 10 '16 at 14:40

To prove the reverse direction, assume we know that every sequence in $$A$$ has a convergent subsequence. Let's say your method for proving compactness of $$\overline A$$ is to start with a sequence $$(x_n)$$ in $$\overline A$$ and show that it has a convergent subsequence.
The strategy is to replace the sequence $$(x_n)$$ with a closely related sequence $$(y_n)$$ in $$A$$. Using that $$x_n \in \overline A$$, pick $$y_n \in A \cap B(x_n,2^{-n})$$. From the assumption, some subsequence of $$(y_n)$$ converges to a point $$p$$. Since $$(y_n)$$ is a sequence in $$A$$, it follows that $$p \in \overline A$$. For any $$\epsilon>0$$, the ball $$B(p,\epsilon/2)$$ contains infinitely many terms of the sequence $$y_n$$. In particular there exists arbitrarily large values of $$n$$ such that $$y_n \in B(p,\epsilon/2)$$ and $$2^{-n} < \epsilon/2$$, and so $$x_n \in B(p,\epsilon)$$. This shows that some subsequence of $$(x_n)$$ converges to $$p$$.
• U r welcome. Also I wanted to know that if $p \in \bar A$ then every open ball centered at p will contain infinite elements of $A$. Why does it contain infinite elements of $(y_n)$ – Gitika Oct 19 at 15:44
• Because, as stated, some subsequence of $(y_n)$ converges to the point $p$. – Lee Mosher Oct 19 at 15:52
• Oh okay okay..Could you please explain why $x_n$ is in B(p,$\epsilon$)? – Gitika Oct 19 at 16:02
Hint: if $(x_n)\subset \overline A$, we can find a sequence $(y_n) \subset A$ such that for all $n$, $d(x_n,y_n)\le 1/n$.