Schaum's outlines general topology problem $38$ 
Let $\mathcal{T}$ be the topology on the real line $\mathbb{R}$ generated by the class $\mathcal{S}$ of all closed intervals $[a,b]$ where $a$ and $b$ are rational. Determine the closure of each of the following subsets of $\mathbb{R}$: $(a) \ (2,4), \ (b) \ (\sqrt2, 5], \ (c) \ (-3, \pi), \ (d) \ A= \{1, \frac{1}{2}, \frac{1}{3}, \dots \}.$

Hello everyone! This is a problem from Schaum's outlines (general topology) regarding subbases for topologies. I'm trying to work on this one and got stuck already on part $(a)$! What I tried to do is to understand the closed sets on this topology and I found that at least $$[a,b]^c = (- \infty, a) \cup (b, \infty)$$ should be closed.
The closure of $(2,4)$ is now by definition the smallest closed set containing it. So at least $(- \infty, 4) \cup (b, \infty)$ contains this for any $b \ge 4$.
I think I cannot make progress here before I completely understand the closed sets of this topology. Can I have some help understanding those?
 A: The closed intervals with rational endpoints generate a topology including all closed($[a,b]$), with rational endpoints, open($(c,d)$) and half open($(c,b],[a,d)$) intervals, where the closed ends are rational. This you can see be seen by looking at the half open interval $(c,b] = \bigcup_{c<c'<b, c' rational} [c',b]$, similarly you get a half open interval on the other side or an open interval.
And you can also get any ray $(-\infty,b] = \bigcup_{n<b,n\in \mathbb N} [n,b]$, for $b$ rational and similarly $[a,\infty) = \bigcup_{a<n,n\in \mathbb N} [a,n]$ for $a$ rational, so those rays are also open.
This now gives us that (a) $(2,4)$ is closed as $(2,4) = \mathbb R \backslash((-\infty,2]\cup[4,\infty))$.
For (b) we see that its closure in the standard topology would be $[\sqrt 2,5]$ so we can see, because all closed sets in the standard topology are also closed here, that its closure must lie in this set. So either $[\sqrt 2,5]$ is its closure or $(\sqrt 2,5]$ is already closed. But $(\sqrt 2,5]$ cant be closed because then there would have to be a basis element in its complement containing $\sqrt 2$, as our closed intervals only have rational endpoints, any such basis element has to have the form $[a,b]$ for $b>\sqrt 2$ but then $b\in(\sqrt 2,5]$ so our basis element doesn't lie in the complement. Therefor the closure is $[\sqrt 2,5]$.
For (c) by a similar argument as (b) we see that $\pi$ has to lie in its closure, but as in (a) $-2$ doesn't have to lie in its closure, so its closure is $(-2,\pi]$.
And for (d) the closure of $A$ in the standard topology is $A\cup\{0\}$ so it is also closed in our topology and in our topology $(0,1)$ is also closed, so their intersection $A$ is closed.
A: $(2, 4)$ is already closed in this topology.  To see that, recall that the open sets of the topology generated by a subbase are the (arbitrary) unions of finite intersections of subbasic sets.  If you get a sense of what the open sets are then you can also get an idea of what the closed sets look like (by taking complements).
For each $n \in \mathbb{N}$, consider $C_n = [-n, 2]$.  This is a subbasic set in your topology, so it is open.  Thus $C:=\bigcup_{n=1}^{\infty}C_n = (-\infty, 2]$ is open.  Similarly, let $D_n = [4, n]$.  Then $D:=\bigcup_{n=5}^{\infty}D_n = [4, \infty)$ is also open.  Therefore $C \cup D = (-\infty, 2] \cup [4, \infty)$ is open, so $\mathbb{R} \setminus (C \cup D) = (2, 4)$ is closed.
