# Basis that generates a topology for a connected topological space

Let $X$ be a topological space. (i) We call $X$ connected if there does not exist a pair of disjoint nonempty open sets whose union is $X$. (ii) We call $X$ disconnected if $X$ is not connected. (iii) If $X$ is disconnected, then a pair of disjoint nonempty open sets whose union is $X$ is called a separation of $X$.

I'm trying to get this concept down, so I thought another example would help. Several bases that generate topologies for a connected topological space:
$B=\{\{a\}\ s.t.\ a \in \mathbb{R}\}$ (singletons are connected)
$B=\{(a,b)\ s.t.\ a,b \in \mathbb{R}\}$
$B=\{(-a,a)\ s.t.\ a \in \mathbb{R}\}$

I don't see any pairs of disjoint nonempty open sets whose union equals $X$ from these examples... is this correct?

Remember that the open sets are arbitrary unions of elements of $B$, not just elements of $B$. So while it's pretty easy to see that in all of your examples there do not exist $U,V\in B$ such that $U\cup V=\mathbb{R}$ and $U\cap V=\emptyset$, that doesn't mean there does not exist a separation. Arbitrary unions of elements of $B$ can be pretty complicated!

In fact, your first example is not connected. Every subset of $\mathbb{R}$ is open in this topology, since every set is a union of singleton sets (why?). Can you use this to find a separation for this topology?

Take $U=\{0\}$ and $V=\mathbb{R}\setminus\{0\}$. Then $U\cup V=\mathbb{R}$, $U\cap V=\emptyset$, $U$ and $V$ are nonempty, and $U$ and $V$ are open, so they are a separation. More generally, let $U\subset\mathbb{R}$ be any nonempty proper subset of $\mathbb{R}$ and let $V=\mathbb{R}\setminus U$.

Your second example happens to give a connected topology, but this is very nonobvious and requires a lot of cleverness to prove (the proof uses the completeness of $\mathbb{R}$). So I wouldn't worry about this example for now.

Your third example also gives a connected topology, and this time it is actually not too hard to prove it. See if you can prove it! As a first step, you need to understand what open sets look like, remembering that an open set is a union of elements of $B$, not just a single element of $B$. What can you say about sets that are unions of elements of $B$? (Hint: You might try proving that if $U$ and $V$ are nonempty and both unions of elements of $B$, then they cannot be disjoint.)

Every element of $B$ contains $0$ as an element, and every nonempty open set contains an element of $B$ as a subset. So if $U$ and $V$ are nonempty open sets, $0\in U$ and $0\in V$ so $U\cap V\neq\emptyset$. So there cannot exist any separation. (In fact, every open set is actually equal to a single element of $B$ in this case, but this is harder to prove.)
Your first example gives the discrete topology, which is disconnected for any $X$ (at least, with $|X|>1$). If every point is open, then every set is open, so if you take any $x\in X$ then $X=\{x\}\cup(X\setminus\{x\})$ is a separation of $X$.
Your second example gives the usual topology on $\Bbb{R}$, which is connected.
The third gives a connected topology as well. In fact, in this case $B$ itself is a topology (if you toss in $\varnothing$ and $\Bbb{R}$). No two nonempty open sets in this topology can be disjoint, since they each must contain $0$. Therefore there can't be any separation.