Find an example where a subset $A$ in an infinite metric space $M$ is closed and bounded, but not compact. Let $(M,d)$ be a metric space and $A$ is contained in $M$. Find an example where a subset $A$ in $M$ is closed and bounded, but not compact.
This is my attempt:
Take the closed ball $B_r(0)= \{x \in A : d(x,0)\leq 1\}$. This is bounded and closed by definition but not compact (I think). I was wondering what infinite metric space I need to put this in?
 A: To clarify the discussion in the comments:
Take any infinite set $M$ and define the discrete metric $d$ on $M$ by
$$
d(x,y) = \begin{cases}
1 & \text{if}\ x\ne y, \\
0 & \text{otherwise}.
\end{cases}
$$
The main thing to remember about a set with the discrete metric is that every subset is open. Also, when it comes to sequences, we have the following result.

A sequence $(m_n)_n$ in $M$ converges iff $(m_n)_n$ is eventually constant.

Now the whole space $M$ is closed. It is bounded because for any $m\in M$ the ball centered at $m$ of with radius $2$ covers the whole space $M$.
However it is not compact. We can see this using either version of metric space compactness:
1) The collection $\{\{m\} : m\in M\}$ of singletons consists of open sets and it covers $M$. Since $M$ is infinite, no finite subset of this collection can cover $M$.
2) Alternatively, we can use the notion of sequential compactness (which is equivalent to compactness for metric spaces). Find a countably infinite subset $\{m_1,m_2,\ldots\}$ of $M$. Thus the sequence $(m_n)_n$ in $M$ consists of distinct elements, so any subsequence $(m_{n_k})_k$ of $(m_n)_n$ will also consist of distinct elements.
Since a sequence only converges in the discrete metric if it is eventually constant, we conclude that every subsequence of $(m_n)_n$ does not converge.
A: Consider Usual Euclidean Metric on $M=(0,1)$. Now let $A=M=(0,1)$.
$A$ is closed , bounded , but not compact since the sequence $\{\frac{1}{n}\}_{n \ge 2}$ has not any convergent subsequence. 
