# If $Y$ is a compact subset of $X$, and $Z\subset Y$, then $Z$ is compact if and only if $Z$ is closed.

Let $(X,d)$ be a metric space.

If $Y$ is a compact subset of $X$, and $Z\subset Y$, then $Z$ is compact if and only if $Z$ is closed.

$(\rightarrow)$

Assume that $Z$ is compact

WTS that $Z$ is closed

Def 1: $Z$ is closed whenever $(x_n)_{n=1}^\infty$ in $Z$ converges to some $x\in Y,$ then we must also have that $x\in Z$

Using our definition we need to show that $x\in Z$

We know that since $(x_n)_{n=1}^\infty \subset Z \subset Y$ then there must exist a subsequence $(x_{n_l})_{n=1}^\infty$ which converges to a value $y$ as $l$ converges to $\infty$. This $y\in Y.$

But we know that $(x_{n_l})_{n=1}^\infty$ converges to $x$ as $l$ converges to $\infty$.

And this means that they value of $y$ is equal to the value of $x$

And since our value of $y$ must be in $Z$ then it means that $x$ is also in $Z$.

Therefore $Z$ is closed

($\leftarrow$)

Assume that $Z$ is closed

WTS that $Z$ is compact

Def 2: $Z$ is compact iff every sequence in $Z$ has at least one convergent subsequence.

Let's take an arbitrary sequence in $Z$ e.g. $(x_n)_{n=1}^\infty \subset Z$

Using our assumption and the Def 1, since $Z$ is closed we know that $x \in Z$

Therefore Z is compact

Can I please get some input on the following proof?

• Do you have to use that definition of compactness? It might be easier to prove the the $\Longleftarrow$ direction using open coverings. – Flowsnake Jan 31 '18 at 5:05
• @Flowsnake No, I don't have to use the def of compactness, I just didn't know how to approach it otherwise – thisisme Jan 31 '18 at 5:07
• Here is a proof using the open coverings definition of compactness. – Flowsnake Jan 31 '18 at 5:08

I like that you included your attempt at a proof. I wanted to give you some feedback. Plenty of correct ideas.

We know that since $(x_n)_{n=1}^\infty \subset Z \subset Y$ then there must exist a subsequence $(x_{n_l})_{n=1}^\infty$ which converges to a value $y$ as $l$ converges to $\infty$. This $y\in Y.$

I'm guessing this is a typo and you meant to say $y \in Z$, but I'm going to mention it just in case. Remember that you are using the compactness of $Z$ here. Since $Z$ is compact, it has a subsequence that converges in $Z$. But you also assumed the sequence converges, and convergent sequences in a metric space have only one subsequential limit. Also note that the compactness of $Y$ isn't needed for this direction of the proof. What you have then shown is that compact subsets of a metric space are closed.

Def 2: $Z$ is compact iff every sequence in $Z$ has at least one convergent subsequence.

The convergent subsequence has to converge to a point in $Z$. Note that any sequence in $Z$ has a convergent subsequence in $Y$ since $Z \subset Y$ and $Y$ is compact. This is a nontrivial part of the definition. What this definition is saying is that compact subsets of a metric space are characterized by the property that every sequence, maybe after first passing to a subsequence, has to eventually cluster around some point in the set

Let's take an arbitrary sequence in $Z$ e.g. $(x_n)_{n=1}^\infty \subset Z.$

Since $(x_n)$ is a sequence in $Z$, and $Z \subset Y$, then $(x_n)$ is also a sequence in $Y$. Since $Y$ is compact, by Def 2 there is a subsequence $(x_{n_k})$ converging to a point $x \in Y$.