To understand definition of basis for a topology and subbasis for a topology Definition 1. If $X$ is a set, a basis for a topology on $X$ is a collection $\mathcal{B}$ of subsets of $X$ (called basis elements) such that
(1) For each $x \in X$, there is at least one basis element $B$ containing $x$.
(2) If $x$ belongs to the intersection of two basis elements $B_{1}$ and $B_{2}$, then there is a basis element $B_{3}$ containing $x$ such that $B_{3} \subset B_{1} \cap B_{2}$.
If $\mathcal{B}$ satisfies these two conditions, then we define the topology $\mathcal{T}$ generated by $\mathcal{B}$ as follows: $A$ subset $U$ of $X$ is said to be open in $X$ (that is, to be an element of $\mathcal{T}$ ) if for each $x \in U$, there is a basis element $B \in \mathcal{B}$ such that $x \in B$ and $B \subset U .$ Note that each basis element is itself an element of $\mathcal{T}$.
Definition 2. A subbasis $S$ for a topology on $X$ is a collection of subsets of $X$ whose union equals $X.$ The topology generated by the subbasis $S$ is defined to be the collection $\mathcal{T}$ of all unions of finite intersections of elements of $S$.
My Question: Can you explain that what is the difference between definition of basis for a topology and subbasis for a topology?
 A: A basis for a topology is a collection of sets $\mathcal{B}$ so that every open set $U$ is a union of elements of $\mathcal{B}.$
A subbasis is a little weaker--every open set is a finite intersection of unions of elements, not necc. a union itself.
For example, the set of all intervals of the form $(a, \infty)$ or $(-\infty, a)$ is a subbasis of $\mathbb{R},$ but it is not a basis.
A: Given any set of subsets of $X$, it can generate a topology, as long as the union of the elements of the set is $X$, this means that a subbase is the minimum you need to have or generate a topology in $X$.
On the other hand, the bases discover the minimum that you need to guarantee that a set of subset of $X$ generates a given topology, this is useful because it is easier to work with the basic elements (those that generate the topology) than to take an open one in general, for example in $\mathbb{R}$, we always talk about open intervals as open and many things are tested on them, and it is rare that someone takes a general open of $\mathbb{R}$ (example of a non-basic open is $(1,2)\cup(4,10)$).
