Find a metric space X and a subset K of X which is closed and bounded but not compact. 
Find a metric space $X$ and a subset $K$ of $X$ which is closed and bounded but not compact.

I can find a metric space $X$ like the below.

Let $X$ be an infinite set. For $p,q\in X$, define $d(p,q)=\begin{cases}1,&\text{if $p\ne q$}\\0,&\text{if $p=q$}\end{cases}$

Then, with the metric space above, I can find a subset $K$ of $X$, which is a ball which centre is $x$ and radius is $1$.
I know this is closed(since it has no limit points) and bounded.

(I'm confused again... I think $X$ is not an infinite set. Isn't the above triangle the metric space $X$?)
Some helps will be really appreciated!
Thank you! 
 A: HINT: Let $\langle X,d\rangle$ be the metric space that you described in the problem. For any $x\in X$, the open ball $B(x,1)=\{y\in X:d(x,y)<1\}=\{x\}$ is compact: it’s just the singleton set $\{x\}$. However, the closed ball $\overline{B}(x,1)=\{y\in X:d(x,y)\le 1\}$ is very different: $\overline{B}(x,1)=X$ for each each $x\in X$. (Why?) This shows that $X$ itself is a closed, bounded set in $X$
Consider $\{B(x,1):x\in X\}$. This is an open cover of $X$. Does it have a finite subcover? Is $X$ compact?
A: Hint: Just let $X = K$.  Argue why $X$ is not compact.
A: What you're being given is called a discrete space $(X,d)$; where $d(x,y)=[x=y]$ ($[P]=1$ if $P$ is true, $0$ otherwise) is called the discrete metric. Note the set $X$ is assumed to be infinite. For instance, it can be $\Bbb N$, $\Bbb R$.
One can see that every singleton is an open set, since $\{x\}=B(x,1/2)$, say. What can you say about the compact sets in $X$, then? Is $X$ compact? Hint Note $X$ can be covered by singletons. 
Spoilers 
$(1)$ $X$ is closed, being the ambient space. It is bounded: $X\subset B(x,r)$ for any $x\in X$ whenever $r\geq 1$.
$(2)$ Suppose $F\subseteq X$ is compact. Then $F$ is finite. Reason: cover $F$ by singletons. The existence of a finite cover implies $F$ is itself finite. 
$(3)$ Suppose $F\subseteq X$ is finite. Then $F$ is compact. Reason: Suppose $\mathscr C=\{C_\alpha\}_{\alpha\in A}$ covers $A$. Write $F=\{x_1,\ldots,x_m\}$. Since $F\subseteq \bigcup \mathscr C$ there must exist for each $i=1,2,\ldots,m$ an index $\alpha_{i}$ such that $x_i\in C_{\alpha_i}$, so $\mathscr C_0=\{C_{\alpha_i}:i=1,\ldots,m\}$ is a finite subcover.
Conclusion: $F\subseteq X$ is compact if and only if it is finite. Note that $(3)$ always holds in any (topolgical,metric) space, while $(2)$ certainly doesn't: $[a,b]$ is compact in $\Bbb R$ with the usual metric.
A: If $X$ is an infinite-dimensional Banach space (over $\mathbb{R}$ or $\mathbb{C}$, either way) then the (closed) unit ball $B_1(X)$ is closed and bounded but not compact in the norm topology.  See for instance http://planetmath.org/compactnessofclosedunitballinnormedspaces for a proof of this fact.
A: Take the reals, change the metric to $d(x,y)=\min(|x-y|,1)$. The topology is unchanged, so your favourite closed but not compact stays closed, not compact, but is now bounded.
