The metrizable space may be not locally compact My text book said: 

Not every metrizable space is locally compact. 

And it lists a counterexample as following: The subspace $Q=\{r: r=\frac pq; p,q \in Z\}$ of $R$ with usual topology, i.e., $Q$ is the set of all rationals. It said: for any open ball of any point $r \in Q$, the closure is not compact. I can't understand this sentence. Why the closures of the open balls are not compact. 
Could anybody help me to understand this sentence. Thanks ahead:)
 A: Let $I$ be any nontrivial interval, and $r$ be an irrational number in $I$. We want to show that $I\cap\mathbb{Q}$ is not compact in $\mathbb{Q}$. Let $O_n=(-\infty,r-1/n)\cap\mathbb{Q}$ and $U_n=(r+1/n,\infty)\cap\mathbb{Q}$. Show that $$\{O_n:n\in\mathbb{N}\}\cup\{U_n:n\in\mathbb{N}\}$$ is an open cover without finite subcover.
A: Another possibility: A topological space is locally compact iff it is open in its compactifications (a compactification of a topological space $X$ is a compact topological space $Y \supset X$ such that $X$ is dense in $Y$). 
But $\overline{\mathbb{R}}$ is a compactification of $\mathbb{Q}$ and $\mathbb{Q}$ is not open in $\overline{\mathbb{R}}$ (in fact, the interior of $\mathbb{Q}$ is empty).
A: If you are interested, $\pi$-Base (an online version of Steen and Seebach's Counterexamples in Topology) provides some more examples of metrizable spaces that are not locally compact. You can view the search result to learn more about these spaces.
Baire Space
$C[0,1]$ 
Cantor's Leaky Tent
Cantor's Teepee
Discrete Rational Extension of the Reals
Duncan's Space
Evenly Spaced Integer Topology
Hilbert Space
Metrizable Tangent Disc Topology
Miller's Biconnected Set
Nested Rectangles
The Irrational Numbers
The p-adic Topology on the Integers
The Post Office Metric
The Radial Metric
The Rational Numbers
Topologist's Sine Curve
Wheel Without Its Hub
$\mathbb{Z}^\mathbb{Z}$
