Is a countable subspace of a metric space closed? Let $(X,d)$ be a metric space and $a_1,a_2,\ldots\in X$. Define $A=\{a_n:n\in\mathbf N\}$. Is $A$ closed in $(X,d)$?
And is $A$ closed when X is a topological space?
 A: No. Consider $a_n = \frac{1}{n}$ and $X= \Bbb{R}$ equipped with the euclidean metric. The set $A$ is not closed because $0$ is a limit point of $A$ such that for no $n$ is $a_n$ ever equal to $0$.
A: Here's an example from functional analysis:
Consider $B[0,1] = \{f: [0,1] \to \mathbb R \mid f \text{ bounded }\}$ with the metric $d(f,g) = \int_{[0,1]} |f(x)-g(x)| dx$. Then we define the following countable subset: $S = \{ f_n (x) \mid n \in \mathbb N_{\geq 2}\} \subset C[0,1] \subset B[0,1] $ where
$$ f_n(x) = 
\begin{cases}
0 & x \in [0, \frac{1}{2}-\frac1n] \\
nx - \frac{n}{2} + 1 & x \in [\frac{1}{2}-\frac1n, \frac{1}{2}]\\
1 & x \in [\frac12, 1]
\end{cases}$$
Then $f_n$ is continuous. Its pointwise limit $f(x)$, which is also its limit with respect to $d(\cdot, \cdot)$,  is the (discontinuous) function that is $0$ on $[0,\frac12)$ and $1$ on $[\frac12,1]$ so the limit of $f_n$ is not in $C[0,1]$ and hence also cannot be in $S$.
Note: 
If you use a different metric, such as for example $d(x,y) = \sup_{x \in [0,1]} |f(x) - g(x)|$,  the pointwise limit $f(x)$ will no longer be a limit of $f_n$ with respect to the metric because the sequence is no longer Cauchy.
A: Let $X$ be an infinite topological space.  Then:
1) If $X$ is discrete, then (all subsets are closed, so) every countably infinite subset is closed.
2) If $X$ is non-discrete, separated and first-countable -- in particular, if $X$ is non-discrete and metrizable -- then there is a non-isolated point $x$ and a sequence $\{x_n\}_{n=1}^{\infty}$ of distinct elements of $X \setminus \{x\}$ converging to $x$.  Thus $A_1 = \{ x_n: n \in \mathbb{Z}^+ \}$ is a countably infinite subset which is not closed, and $A_2 = A_1 \cup \{x\}$ is a countably infinite subset which is closed.  
3) Above the hypothesis of first countability can be somewhat weakened: it is enough to assume instead that $X$ is sequential.  But it cannot be dropped entirely: let $X$ be an uncountable set endowed with the cofinite topology, in which a proper subset is closed if and only if it is finite.  Then $X$ is a separated space which has no countably infinite closed subsets.  
At the moment I am not seeing a clean necessary and sufficient condition on a general topological space for it to admit a countably infinite closed subset.  Maybe someone else can do better?
A: Another example of a countable, non-closed set is $\mathbb{Q}$ inside of $\mathbb{R}$ with the usual topology, since $\mathbb{Q}$ is dense and there are irrational numbers in $\mathbb{R}$.
A: The definition of countably compactness maybe helpful for your question:

$X$ is countably compact, i.e., for every infinite subset $A$ there exists a cluster $a$ of A. 

(Another equivalent definition of countably compactness is this: for every countable open cover $U$ of $X$, there exists finite subcover $V \subset U$ which covers the space $X$.)
So, if $a \in A$, then $A$ is closed in $X$; and if your $A$ does not contain his cluster point, then it is not closed. 

Remark: However, metric space or topological space does not imply countably compactness. it is another topological property. But we have countably compactness = compactness in the metric spaces.

