[proofplan]
We prove the intersection formula by evaluating at an arbitrary point of [affine space](/page/Affine%20Space) and using that a product in a field is nonzero exactly when both factors are nonzero. Then we prove the basis property by writing an arbitrary Zariski [open set](/page/Open%20Set) as the complement of a common zero locus. If a point lies in that open set, at least one polynomial from the defining family fails to vanish at the point, and its principal open neighbourhood is contained in the original open set.
[/proofplan]
[step:Compute intersections of principal opens pointwise]
Let $R := k[x_1,\ldots,x_n]$ denote the [polynomial ring](/page/Polynomial%20Ring), and let $f,g \in R$. Each polynomial $h \in R$ determines an evaluation function $h: \mathbb A^n_k \to k$ by $p \mapsto h(p)$. For any point $p \in \mathbb A^n_k$,
\begin{align*}
p \in D(f) \cap D(g) \iff f(p) \neq 0 \text{ and } g(p) \neq 0.
\end{align*}
Since $k$ is a field, $f(p) \neq 0$ and $g(p) \neq 0$ if and only if $f(p)g(p) \neq 0$. Because evaluation respects multiplication, $(fg)(p)=f(p)g(p)$. Therefore
\begin{align*}
p \in D(f) \cap D(g) \iff p \in D(fg).
\end{align*}
As this equivalence holds for every $p \in \mathbb A^n_k$, we have $D(f)\cap D(g)=D(fg)$.
[guided]
Let $R := k[x_1,\ldots,x_n]$ be the polynomial ring. For each polynomial $h \in R$, we use the corresponding evaluation function $h: \mathbb A^n_k \to k$, given by $p \mapsto h(p)$.
We want to identify the set $D(f)\cap D(g)$. A point $p \in \mathbb A^n_k$ lies in this intersection exactly when it lies in both principal opens:
\begin{align*}
p \in D(f) \cap D(g) \iff f(p) \neq 0 \text{ and } g(p) \neq 0.
\end{align*}
The field hypothesis is used here. In a field, a product is nonzero exactly when neither factor is zero. Hence
\begin{align*}
f(p) \neq 0 \text{ and } g(p) \neq 0 \iff f(p)g(p) \neq 0.
\end{align*}
Polynomial evaluation is compatible with multiplication, so $(fg)(p)=f(p)g(p)$. Thus
\begin{align*}
f(p)g(p) \neq 0 \iff (fg)(p) \neq 0 \iff p \in D(fg).
\end{align*}
Combining these equivalences gives
\begin{align*}
p \in D(f) \cap D(g) \iff p \in D(fg).
\end{align*}
Because the point $p$ was arbitrary, the two subsets of $\mathbb A^n_k$ are equal.
[/guided]
[/step]
[step:Express every Zariski open set as a union of principal opens]
Let $U \subset \mathbb A^n_k$ be Zariski open. By definition of the affine [Zariski topology](/page/Zariski%20Topology), there is a subset $S \subset R$ such that
\begin{align*}
U = \mathbb A^n_k \setminus V(S),
\end{align*}
where
\begin{align*}
V(S) := \{p \in \mathbb A^n_k : h(p)=0 \text{ for every } h \in S\}.
\end{align*}
We claim that
\begin{align*}
U = \bigcup_{h \in S} D(h).
\end{align*}
Indeed, if $p \in U$, then $p \notin V(S)$, so there exists $h \in S$ such that $h(p)\neq 0$; hence $p \in D(h)$. Conversely, if $p \in D(h)$ for some $h \in S$, then $h(p)\neq 0$, so $p$ is not a common zero of all polynomials in $S$; hence $p \notin V(S)$ and $p \in U$. Therefore every Zariski open set is a union of principal open sets.
[/step]
[step:Verify the basis property]
The collection of principal opens covers $\mathbb A^n_k$ because the constant polynomial $1 \in R$ satisfies
\begin{align*}
D(1)=\mathbb A^n_k.
\end{align*}
The preceding step shows that every open subset of $\mathbb A^n_k$ is a union of principal opens. Therefore, by the definition of a basis for a topology, the collection $\{D(f):f\in R\}$ is a basis for the affine Zariski topology. Together with the intersection identity proved above, this completes the proof.
[/step]