Definition:- Let $(X,\mathscr T)$ be a topological space. A basis for $\mathscr T$ is a subcollection $\mathscr B$ of $\mathscr T$ with the property that if $U\in \mathscr T$ then $U=\phi$ or there is a subcollection $\mathscr B'$ of $\mathscr B$ such that $U=\cup \{B:B\in \mathscr B'\}.$
Question:-
A family $\mathscr B$ of subsets of $X$ such that $\mathscr B$ is a basis for the topology $\mathscr T$ on $X$ iff: (1) $X=\{B:B\in \mathscr B\}$,and (2) if $B_1,B_2 \in \mathscr B$ and $x \in B_1 \cap B_2$, then there exists $B\in \mathscr B$ such that $x\in B$ and $B\subset B_1 \cap B_2$.
My attempt:- Assume a family $\mathscr B$ of subsets of $X$ such that $\mathscr B$ is a basis for the topology $\mathscr T$ on $X.$ We know that $X\in \mathscr T.$ We assume that $\mathscr B$ is a basis for the topology $\mathscr T$ on $X.$ there is a subcollection $\mathscr B'$ of $\mathscr B$ such that $X=\cup \{B:B\in \mathscr B'\}\subset \cup \{B:B\in \mathscr B\}\subset X .$ Hence, (1) holds. For proving (2), we have $\mathscr B \subset \mathscr T.$ So, $B_1, B_2\in \mathscr T$. Hence, $B_1 \cap B_2 \in \mathscr T$. So, there exists a subcollection $\mathscr B"$ such that $B_1 \cap B_2=\{B:B\in \mathscr B"\}.$ So there exists $B\in \mathscr B"\subset \mathscr B$ which contains x and contained in $B_1\cap B_2$.
I have problem on proving on the converse.
Assume (1) and (2). $X\in \mathscr T$, $X=\{B:B\in \mathscr B\}$(given). If we need to prove for $A\neq X$ and $A\neq \phi.$ I am not able to proceed further. How do I complete the proof? Please help me.
Suppose that $\mathcal{B}$ obeys (1) and (2).
Then define $\mathcal{T} = \{ \cup \mathcal{B}': \mathcal{B}' \subseteq \mathcal{B}\}$.
Then $\mathcal{T}$ is a topology on $X$: $X \in \mathcal{T}$ because of (1), while $\mathcal{B}' = \emptyset$ (a valid choice, likewise you don't need the $U= \emptyset$ condition in the question), shows that $\emptyset \in \mathcal{T}$.
That $\mathcal{T}$ is closed under finite intersections follows from (2), intersection of two sets suffice; while closedness under unions is trivial (a union of unions of subfamilies is a union of a subfamily...).
And by definition $\mathcal{B}$ is a base for $\mathcal{T}$.
It's not really a converse in the classical sense: if a family $\mathcal{B}$ of subsets of a set $X$ (no topology yet) obeys the conditions (1) and (2), we can define a topology $\mathcal{T}$ that has $\mathcal{B}$ as a base, which is what I did above. The left to right part, which you did, shows that these conditions are necessary to be a base for a topology, as any base for any topology on $X$ obeys them. (But that topology is not mentioned anymore in the conditions; it's abstracted away as it were.)