$S=\{(n,{1\over n}):n\in\mathbb{N}\}$ is closed in $X$? The topological space $X=\mathbb{N}\times \mathbb{Q}$ with subspace topology of $\mathbb{R}^2$ the set $S=\{(n,{1\over n}):n\in\mathbb{N}\}$ is closed in $X$?
$S^c=\phi\times\{{1\over n}\}^c$ right? but I know $\mathbb{Q}$ is neither open nor closed in $\mathbb{R}$, I am confused here, could any one help me to answer this question?
the boundary of $S$ is $\bar{S}\setminus $ int S. as int S is $\phi$ so boundary is $\mathbb{N}\times \mathbb{R}$?
 A: No, that’s clearly not the complement: $\varnothing\times\text{anything}=\varnothing$, but $\left\langle 1,\frac12\right\rangle$, for instance, is clearly in the complement of $S$, which therefore isn’t empty. The complement of $S$ contains everything in $\Bbb N\times\Bbb Q$ that isn’t in $S$, so it’s
$$X\setminus S=\left\{\langle n,q\rangle\in X:q\ne\frac1n\right\}\;.$$
One way to show that $S$ is closed in $X$ is to show that $X\setminus S$ is open. The easiest way to do that is to start with an arbitrary $\langle n,q\rangle\in X\setminus S$ and find an open nbhd of it that’s disjoint from $S$. Note that if $U$ is any open nbhd of $\langle n,q\rangle\in X\setminus S$, it contains one of the form $$\{n\}\times(q-\epsilon,q+\epsilon)$$ for some $\epsilon>0$; if that isn’t immediately clear, you should stop and figure out why it’s true, because it’s crucial. It follows from the definition of the product topology.
The fact that $\Bbb Q$ is neither closed nor open in $\Bbb R$ is irrelevant: everything here is happening, so to speak, in the space $X$, which has as a base for its topology all sets of the form $U\times V$ with $U$ open in $\Bbb N$ and $V$ open in $\Bbb Q$.
Added: A sketch of $X$ might help:
               ·   +   ·   ·   ·  
               ·   ·   ·   ·   ·  
               ·   ·   ·   ·   ·  
               ·   ·   ·   ·   ·  
               ·   ·   +   ·   ·  
               ·   ·   ·   ·   ·  
               ·   ·   ·   +   ·  
               ·   ·   ·   ·   +  
               ·   ·   ·   ·   ·    ...  
               ·   ·   ·   ·   ·  
               ·   ·   ·   ·   ·  
               ·   ·   ·   ·   ·  
               ·   ·   ·   ·   ·  
               ·   ·   ·   ·   ·  
               ·   ·   ·   ·   ·  
               ·   ·   ·   ·   ·  
               0   1   2   3   4 

The dotted vertical line labelled $n$ represents the set $\{n\}\times\Bbb Q$. There are infinitely many such lines, one for each natural number.  The set $S$ looks like the intersection of the graph of $y=\frac1x$ with this subset of the plane; I’ve marked four points of $S$ (in their approximate locations — this isn’t exactly to scale!) with plus signs.
