Here is Theorem 2.41 in the book Principles of Mathematical Analysis by Walter Rudin, 3rd edition:
If a set $E$ in $\mathbb{R}^k$ has one of the following three properties, then it has the other two:
(a) $E$ is closed and bounded.
(b) $E$ is compact.
(c) Every infinite subsets of $E$ has a limit point in $E$.
The tricky part of the proof is proving that (c) implies (a). Here's my proof:
We need to show that (c) implies (a).
Suppose that every infinite subset of $E$ has a limit point in $E$. We show that then $E$ is both closed and bounded.
Suppose, if possible, that the set $E$ is unbounded. Then there exists a point $x_1 \in E$ such that $\vert x_1 \vert >1$, for otherwise the set $E$ would be contained in the unit closed ball about the origin in $\mathbb{R}^k$.
Using the same reasoning, we can find a point $x_2 \in E$ such that $$\vert x_2 \vert > 1 + \max \left( 2, \vert x_1 \vert \right).$$
Having chosen the point $x_{n-1}$ (where $n \geq 3$), we can choose a point $x_n \in E$ such that $$\vert x_n \vert > 1 + \max \left( n , \vert x_1 \vert, \ldots, \vert x_{n-1} \vert \right).$$ Otherwise, the set $E$ would be contained in a closed ball of radius equal to $1 + \max \left(n, \vert x_1 \vert, \ldots, \vert x_{n-1} \vert \right)$ and centered at the origin.
We have thus inductively chosen a sequence $\{x_n \}_{n \in \mathbb{N}}$ of distinct points of $E$ such that, for each $n \in \mathbb{N}$, we have $\vert x_n \vert > n$ and $\vert x_n \vert > \vert x_i \vert$ for all $i \in \{\ 1, \ldots, n-1 \ \}$.
Let us define the set $S$ as $$S \colon= \{ \ x_n \ \colon \ n \in \mathbb{N} \ \}.$$ This set $S$ is an infinite subset of $E$. We show that this set $S$ has no limit points in $\mathbb{R}^k$ and hence no limit points in $E$.
For any $m, n \in \mathbb{N}$ such that $n > m$, we have $$\vert x_n - x_m \vert \geq \vert x_n \vert - \vert x_m \vert \geq 1 + \max \left( n, \vert x_1 \vert, \ldots, \vert x_{n-1} \vert \right) - \vert x_m \vert \geq 1.$$ Thus it follows that, for any $m, n \in \mathbb{N}$ such that $n \neq m$, the inequality $\vert x_n - x_m \vert \geq 1$ holds.
So if some point $x \in \mathbb{R}^k$ were a limit point of $S$, then there would be infinitely many values $n \in \mathbb{N}$ such that $$\vert x_n - x \vert < \frac 1 4,$$ and for any two (distinct) such points $x_m$ and $x_n$ of $S$, we would have $$\vert x_m - x_n \vert \leq \vert x_m - x \vert + \vert x_n - x \vert < \frac 1 4 + \frac 1 4 = \frac 1 2,$$ which contradicts what we have shown above about the distance between any two distinct points of $S$.
So the set $S$, though an infinite subset of $E$, fails to have a limit point in $\mathbb{R}^k$ and hence in $E$.
Therefore, the set $E$ must be bounded.
Next, suppose that $E$ is not closed. Then $E$ has a limit point $x_0 \in \mathbb{R}^k - E$. Since $x_0$ is a limit point of $E$, every neighborhood of $x_0$ contains a point of $E$ distinct from the point $x_0$ itself (in fact infinitely many points of $E$).
Thus, there is a point $x_1 \in E$ such that $$0 < \vert x_1 - x_0 \vert < \frac 1 2.$$ Again there is a point $x_2 \in E$ such that $$0 < \vert x_2 - x_0 \vert < \min \left( \vert x_1 - x_0 \vert, \frac 1 3 \right).$$ Assuming that the point $x_{n-1}$ (where $n \geq 3$) has been chosen, we can choose a point $x_n \in E$ such that $$0 < \vert x_n - x_0 \vert < \min \left( \vert x_1 - x_0 \vert, \ldots, \vert x_{n-1} - x_0 \vert, \frac{1}{n+1} \right).$$
Thus we have recursively defined a sequence $\{x_n \}_{n\in\mathbb{N}}$ of points of $E$ for which $x_n \neq x_m$ for all $m, n \in \mathbb{N}$ such that $m \neq n$ and also $$0 < \vert x_n - x_0 \vert < \frac 1 n \ \mbox{ for all } \ n \in \mathbb{N}.$$ Let us define the set $S$ as follows: $$S \colon= \left\{ \ x_n \ \colon \ n \in \mathbb{N} \ \right\}.$$ This set $S$ is an infinite subset of $E$.
We show that $x_0$ is the only limit point of $S$. That is, we show that $x_0$ is a limit point of $S$ but no other point $y$ of $\mathbb{R}^k$ can be a limit point of $S$.
Let $\delta$ be any positive real number. Then, by the archimedean property of $\mathbb{R}$, we can find $n_\delta \in \mathbb{N}$ such that $$n_\delta > \frac 1 \delta,$$ and so, for all $n \in \mathbb{N}$ such that $n \geq n_\delta$, we have $$0 < \vert x_n - x_0 \vert < \frac{1}{n+1} < \frac 1 n \leq \frac 1 n_\delta < \delta,$$ which implies that $x_0$ is indeed a limit point of $S$.
Now if $y \in \mathbb{R}^k$ and $y \neq x_0$, then $\vert y - x_0 \vert > 0$. So we can find a positive integer $N$ such that $$N > \frac{2}{\vert y -x_0 \vert}.$$ So, for every $n\in \mathbb{N}$ such that $n \geq N$, we have $$ 0 < \vert x_n - x_0 \vert < \frac{1}{n} \leq \frac 1 N < \frac{\vert y - x_0 \vert}{2}$$ and hence, for every $n\in \mathbb{N}$ such that $n \geq N$, we have $$\vert x_n - y \vert \geq \vert y - x_0 \vert - \vert x_n - x_0 \vert > \vert y - x_0 \vert - \frac{\vert y - x_0 \vert}{2} > \frac{\vert y - x_0 \vert}{3}. $$ So if we take a positive real number $\epsilon$ such that $$0 < \epsilon < \frac{1}{2} \min \left( \vert x_1 - y \vert, \ldots, \vert x_N - y \vert, \frac{\vert y - x_0 \vert}{3} \right),$$ then there is no point of set $S$ that lies in the neighborhood of the point $y$ of radius $\epsilon$, other than the point $y$ itself if $y \in S$; that is, $$S \cap \left( N_\epsilon (y) - \{ y \} \right) = \emptyset,$$ which implies that the point $y$ cannot be a limit point of the set $S$.
But $y$ was any point of $\mathbb{R}^k$ other than the point $x_0$. Therefore, $x_0$ is the only limit point of the set $S$.
But $x_0 \not\in E$ by our assumption.
Thus we have found an infinite subset $S$ of $E$ such that no point of $E$ is a limit point of $S$. The only limit point of $S$, namely the point $x_0$, (which is also a limit point of the set $E$ by our assumption) does not belong to $E$.
So if every infinite subset of the set $E \subset \mathbb{R}^k$ were to have a limit point in $E$, then the set $E$ must be closed and bounded.
How good is the above proof? Is there any way I can improve it?
What if we replace $\mathbb{R}^k$ by an arbitrary metric space?
Would part (c) of Theorem 2.41 in Baby Rudin still imply (a)? Or vice versa?