I would like to be sure abuot correctness proof and example. Could you help me? thank you!
A set $S \subset \mathbb{R}^n$ is compact if and only if $S$ is bounded and closed.
Proof.
$\Rightarrow$
(Compact $\Rightarrow$ closed and bounded.)
Let $S$ be compact (if every open covering admits a finite subcover) To show that $S$ is bounded, suppose that $S$ is unbounded. Then for every $n \in \mathbb{N}$ there is $x_n \in S$ such that $|x_n| > n$. Since $S$ is compact, the sequence $(x_n)$ has a convergent, hence bounded, subsequence $(x_{n_j})$. But $|x_{n_j} | > n_j$ with $n_j \to \infty$ as $j \to \infty$, a contradiction. So $S$ is bounded. \newline To see that $S$ is closed, we take a limit point $x$ of $S$ and a sequence $(x_n)$ with $x_n \in S$ and $x_n \neq x$ for all $n \in \mathbb{N}$ such that $(x_n) \to x$, and show that $x \in S$. The compactness of $S$ implies that there is a subsequence $(x_{n_j} )$ that converges to a point that is in $S$. Since $(x_n) \to x$, then $(x_{n_j} ) \to x$ as well, and so $x \in S$, and $S$ is closed.
$\Leftarrow$
(Compact $\Leftarrow$ closed and bounded.)
Suppose that $S$ is closed and bounded. Let $(x_n)$ be a sequence in $S$. Then there is a convergent subsequence $(x_{n_k} )$. Then by the closeness of $S$, $lim_{k \to \infty} x_{n_k} \in S$. Thus S is compact. The proof is finished.
Example.
Find an example of a bounded and closed set in metric space that is not compact. (Infinite dimension)
The discrete metric $d (x, y)$
Solution.
I.
Notice that any subset of a metric space with the discrete metric is closed and bounded.
Bounded. Let the metric space $(X,d)$ where $d$ is the discrete metric. It is bounded because $d(x, y) \leq 1$ for all $x, y \in X$, but it cannot be covered by a finitely many balls of radius $\frac{1}{2}$.
Closed. Every element is less than or equal to 1, and it is closed as a whole set.
Let $r=\frac{1}{2}$. Then the ball contains only the point itself. Every subset is closed because the complement of an open set is closed.
Not compact.
Since the open cover by singletons admits no finite subcover.
Let $S $ is an infinite subset of $X$, it follows $S$ is an infinite discrete metric space. Consider $G= \{\{k\} | k\in S\}$, which is an open cover of $S$. Clearly, $G$ has no finite subcover. Thus, $S$ is not compact
More generally, any infinite discrete space admits a proper subspace that is closed and bounded, but not compact.