A Zariski Closed subset $W \subseteq A^n$ is called reducible if $W = > W_{1} \cup W_{2}$ where $W_{i} \nsubseteq W$ and $W_{i}$ closed.
Let $W \subseteq A^n$ be closed. Then $W$ is irreducible only if $I(W)$ is a prime ideal.
Sufficiency: Suppose $I(W)$ is not prime. Then $\exists f_{1}, f_{2} \notin I(W)$ such that $f_{1},f_{2} \in W$. Set $W_{1} = W \cap V (f_{1})$ and $W_{2} = W \cap V (f_{2})$.
As $f_{i} \notin I(W)$, $W \nsubseteq V (fi)$, and so $W_{i} \subsetneq W$. Now we must show that $W = W_{1} \cup W_{2}$. Let $a ∈ W$. Assume $a \notin W_{1}$. Then $f_{1}(a) \neq 0$, but $f_{1}(a)f_{2}(a) = 0$, so $f_{2}(a) = 0$, thus $a ∈ W_{2}$.
How can necessity be proved?