Equivalent definitions of a base From Wikipedia:

Given a topological space $(X, \tau)$, a base for the topology $\tau$ is a family $\mathcal{B} \subseteq \tau$ of open sets such that every open set of the topology can be represented as the union of some subfamily of $\mathcal{B}$.


Equivalently, a family $\mathcal{B}$ of subsets of $X$ is a base for the topology $\tau$ if and only if $\mathcal{B} \subseteq \tau$ and for every open set $U$ in $X$ and point $x\in U$ there is some basic open set $B \in \mathcal{B}$ such that $x \in B \subseteq U$.

Question: Why are the above definitions of a base equivalent?
 A: Suppose $\mathcal{B}$ is a base under definition 1. Consider some $x \in U$ where $U$ is open. Then write $U = \bigcup Z$, where $Z$ is a subfamily of $\mathcal{B}$. Since $x \in U$, there exists some $B \in Z$ such that $x \in B$. Then $B \subseteq \bigcup Z = U$, and thus $x \in B \subseteq U$. Furthermore, $B \in Z \subseteq \mathcal{B}$, so $B \in \mathcal{B}$.
For the other direction, I claim that $U = \bigcup \{B \in \mathcal{B} \mid B \subseteq U\}$. Clearly, we have $\bigcup \{B \in \mathcal{B} \mid B \subseteq U\} \subseteq U$. Now consider an arbitrary $x \in U$. Then there exists $B \in \mathcal{B}$ such that $x \in B \subseteq U$. Then $X \in \bigcup \{B \in \mathcal{B} \mid B \subseteq U\}$. So $U \subseteq \bigcup \{B \in \mathcal{B} \mid B \subseteq U\}$.
A: Suppose definition $1$ holds for $\mathcal{B} \subseteq \tau$, and we have an open $U \in \tau$. By definition $1$, there exists a family of open set $\{B_\alpha : \alpha \in \Lambda\} \subseteq \mathcal{B}$, where $\Lambda$ is an index set, such that
$$U = \bigcup_{\alpha \in \Lambda} B_\alpha. \tag{$\star$}$$
Given any point $x \in U$, by definition of the union, there exists an $\alpha \in \Lambda$ such that $x \in B_\alpha$. So,
$$x \in B_\alpha \subseteq \bigcup_{\alpha \in \Lambda} B_\alpha = U.$$
Thus, $B_\alpha$ is the "$B$" in definition 2, and so definition 2 holds.
Conversely, let's suppose definition 2 holds, and we have $U \in \tau$. We wish to show that $U$ can be written as a union of (open) sets in $\mathcal{B}$. That is, we need to find an index set $\Lambda$ and basic open sets $B_\alpha \in \mathcal{B}$ for all $\alpha \in \Lambda$ such that $(\star)$ holds.
In this case, we are going to take $\Lambda$ to be the set $U$ itself! For each $\alpha \in U$, definition $2$ states that we can find a set $B_\alpha \in \mathcal{B}$ such that $\alpha \in B_\alpha \subseteq U$. I claim that, with these choices of $B_\alpha$, $(\star)$ holds (completing the proof).
We know that $B_\alpha \subseteq U$ for all $\alpha \in \Lambda = U$, by construction. Therefore, taking the union of all such subsets will still result in a subset, i.e.
$$\bigcup_{\alpha \in \Lambda} B_\alpha \subseteq U.$$
On the other hand, if we take any $x \in U$, then $x \in B_x$, by construction, and $B_x$ is a subset of the union $\bigcup_{\alpha \in \Lambda} B_\alpha$. Thus, $(\star)$ holds, and we are done.
A: $(1)\implies (2)$: pick $x,U$ as in $(2)$. $U$ is a union of open sets, and one of these must contain $x$.
$(2)\implies (1)$: Let $U$ be any open set as in $(1)$, for each $x\in U$, there is an $x\in B_x\subseteq U$ such that $B_x\in \mathcal{B}$. Then forall $p\in U$, $p\in B_p\subseteq\bigcup_{x\in U}B_x= U$.
Loosely speaking, it is a standard trick to treat an open set as the union of the family of open sets around all of its points that are guaranteed from the openness condition. These form a cover, because we have one open set for each point, and their union is contained inside of the open set because each one is.
