Is my understanding of the topology generated by a basis correct? I have a theorem in my notes which states that if $X $ is a set with a basis $B$ and if we set $T=\{U\subset X\mid \forall x \in U \exists \beta \in B \text { s.t. } x\in \beta \subset U\}$.
Then $(X,T)$ is a topological space and furthermore $T$ is the topology generated by $B$.
I want to make sure I understand this correctly :
Is it basically saying that if a set $
U$ contained in $X$ has for each element within it a basis set which contains said element then the set is open.
i.e. That open sets in $T$ are unions of basis sets ?
So for example say that we have the basis $B=\{(−q,q)\mid q \in \Bbb Q , q > 0 \}$, which generates a topology in $(\Bbb R,T)$
Then a topology generated by this basis will contain, the empty set , whole set and also unions of sets of the form $(-q,q)$.
So $T=\{\emptyset, \cup(-q,q)|q\in \Bbb Q, q>0 \}$
Is there anything wrong with my understanding and if so would someone mind very much explaining my misunderstanding ?
 A: Unions of symmetric intervals with rational endpoints are precisely symmetric intervals with real endpoints.
Set $\mathcal{F} = \{(-r,r) : r \in \mathbb{R}, r > 0\} \cup \{\emptyset, \mathbb{R}\}$. We claim that $T = \mathcal{F}$.
For every $r > 0$ pick a sequence $(q_n)_n$ of rationals in $(0,r)$ such that $q_n \to q$. Then 
$$(-r,r) = \bigcup_{n \in \mathbb{N}}(-q_n,q_n) \in T$$
so $\mathcal{F} \subseteq T$.
On the other hand, let $U \in T$. If $U \ne \emptyset$, there exists a family $(q_i)_{i\in I}$ in $\mathbb{Q} \cap (0,\infty)$ such that 
$$U = \bigcup_{i\in I}(-q_i, q_i) = \left(-\sup_{i\in I} q_i, \sup_{i\in I}q_i\right) \in \mathcal{F}$$
so $T \subseteq \mathcal{F}$.
A: The definition of a base (basis) $B$ for a topology $T$ on a set $X$ is that $B\subset T$ and $T=\{\bigcup C: C\subset B\}.$
For  any  family $B$ of subsets of $X$ let $$T_B=\{U\subset X: \forall x\in U\,\exists \beta\in B\,(x\in \beta\subset U)\}.$$ 
$(i).$ For any $U\in T_B$ and each $x\in U$ let $b_U(x)=\{\beta\in B: x\in \beta\subset U\}.$ Let $C_U=\cup_{x\in U}\,b_U(x).$ Then $C_U\subset B$ and $U=\bigcup C_U.$
So every member of $T_B$ is equal to the union of  of some $C\subset B.$
$(ii).$For any  $V\subset X$ with $V\not \in T_B$  there exists $x_0\in V$ such that $\forall \beta \in B\;(x_0\in \beta \implies \beta \not \subset V). $ Then for any $C\subset B$ such that  $V\subset \bigcup C,$  there exists $\beta_0\in C$ with $x_0\in \beta_0,$ but $\beta_0\not \subset V.$ That is, $\beta_0\setminus V\ne \emptyset.$ So  $(\bigcup  C)\setminus V\supset \beta_0\setminus V\ne \emptyset ,$ so $\bigcup C\ne V.$
So no $V\subset X$ that is not in $T_B$ is equal to the union of any $C \subset B$.
$(iii).$ By (i) and (ii), $$T_B=\{\bigcup C: C\subset B\}. $$
HOWEVER. $T_B$ might NOT be a topology on $X$ if $B$ is arbitrary.
For example if $X=\Bbb R$ and $B=\{(n,n+2): n\in \Bbb Z\}$ then $(0,2), (1,3)\in T_B$ but $(1,2)=(0,2)\cap (1,3)\not \in T_B$.
We can easily confirm that if $S\subset T_B$ then $\bigcup S\in T_B$. But there are more requirements for a topology.
Conditions $C1$ and $C2$ (below) are necessary and sufficient for a collection $B$ of subsets of $X$  to be a base for a topology on $X.$ 
$C1. \bigcup B=X.$ Because $X$ is a member of any topology  on $X.$
$C2.$ Whenever $\beta_1,\beta_2\in B$ and $x\in \beta_1\cap \beta_2,$ there exists $\beta_3\in B$ such that $x\in \beta_3\subset \beta_1\cap \beta_2.$ This is needed to ensure that if $U_1, U_2\in T_B$    then $U_1\cap U_2\in T_B$ .
Further remarks.
If $\beta_1\cap \beta_2 \in B$ whenever $\beta_1, \beta_2\in B$ then condition $C2$ is met.
If you start with a topology $E$ on $X$  and take some $B\subset E$ that satisfies $C1 , C2,$ then $T_B$ is a topology with $T_B\subset E.$  But it may be that $T_B\ne E$. More work may be  needed to ensure that  some $B\subset E$ is a base for $E.$ As an extreme example let $X=\Bbb R$ and let $E$ be the set of all subsets of $\Bbb R$ and let $B=\{\Bbb R\}$.
$\emptyset$ belongs to any topology and we get $\emptyset \in T_B$ by letting $C=\emptyset \subset B$ and $\emptyset =\bigcup C.$ So it is not necessary for $\emptyset$ to belong to a base.
A topology  $T$ on $X$ is a base for itself. But other bases are useful, as they may be simpler. The usual topology on $\Bbb R$ is an uncountable set but it has a countable base $\{(p,q): p,q \in \Bbb Q\}.$
Note again that if $B$ is a base for a topology $T$ then $B\subset T.$
Some author say "basis". Others say "base". When dealing with a topological vector space (where the vector operations are related to the topology), it can be confusing to use "basis" for (at least) 2 different things. It doesn't help that in English, "bases" is the plural of both "base" and "basis". 
A: Basically, you are correct, but at the end your description of the topology $T$ is not clear. You should say that the elements of $T$ are the empty set togother with all subsets of $\mathbb R$ which can be written as unions of intervals of the type $(-q,q)$, with $q\in\mathbb Q$. Actually, that is the same thing as asserting that$$T=\{\emptyset,\mathbb R\}\cup\left\{(-x,x)\mid x\in(0,\infty)\right\}.$$
