How to show that $(-\sqrt 2,\sqrt 2)\cap\mathbb Q$ is not compact in $\mathbb Q$ even though it's closed and bounded in $\mathbb Q$.
Second part is easy. Please help me to show that $(-\sqrt 2,\sqrt 2)\cap\mathbb Q$ is not compact.
How to show that $(-\sqrt 2,\sqrt 2)\cap\mathbb Q$ is not compact in $\mathbb Q$ even though it's closed and bounded in $\mathbb Q$.
Second part is easy. Please help me to show that $(-\sqrt 2,\sqrt 2)\cap\mathbb Q$ is not compact.
On
Heine-Borel theorem holds in $\mathbb{R}$, not in subspaces thereof. If a subspace $A$ of the metric space $X$ is compact (with the relative topology), then it is closed in $X$, because any sequence in $A$ has a cluster point. So, if a sequence in $A$ converges to some $x\in X$, and $x\notin A$, the sequence has no cluster point in $A$, hence $A$ is not compact.
Since $(-\sqrt{2},\sqrt{2})\cap\mathbb{Q}$ is not closed in $\mathbb{R}$, it is not compact. Just consider an increasing sequence of rational numbers converging to $\sqrt{2}$.
We assume the standard topology on $\mathbb{Q}$. As julien and David pointed out some possible ways to prove that the set is not compact. In fact using the denseness of $\mathbb{Q}$ in $\mathbb{R}$, that the Intersection of any non trivial intervall (one which does have more than $1$ element) with $\mathbb{Q}$ can't be compact in $\mathbb{Q}$. The main idea is using that you can find for every irrational number a sequence of rational numbers converging to it (for example take the decimal expansion).
For a metric space we know that a set is compact if every sequence does have a convergent subsequence. And a sequence which converges to an irrational number in $\mathbb{R}$ won't converge in $\mathbb{Q}$.
The exercise itself refers to the Theorem of Heine Borel which states that in $\mathbb{R}^n$ which states that the compact sets are the closed and bounded one.