Question about the equivalence relation of irreducible algebraic subset Following is the proposition: an algebraic set $X \subset \mathbb{A}^n$ is irreducible if and only if $I(X)$ is a prime and a question  
And I want to ask is that why $I(X)=I(X_1)\cap I(X_2) $ holds on $(\Leftarrow) $ part. I can only justify $ I(X) \subset I(X_1) \cap I(X_2) $.  My thought is based on the definition of ideal $ I(X) = \left \{ f \in K[x_1,...x_n] : f(p)=0, \forall p \in X (\subset \mathbb{A}^n ) \right \}  $. My main idea --it seems to be wrong-- is by putting $ X=X_1 \cup X_2 = (X \setminus X_1) \cup (X_1 \cap X_2) \cup (X \setminus X_2) $ Then if $f \in I(X)$, then at least $f(p)=0, \forall p \in X_1\cap X_2 $, which implies $f(p)=0, \forall p \in X_1 $ and $f(p)=0, \forall p \in X_2 $. Hence, $I(X) \subset I(X_1) \cap I(X_2) $.
But, $(\supset)$ is clearly impossible when going reversely from $f \in I(X_1) \cap I(X_2) $.
Anyway, I have no clue why this equality holds... Clearly, I approached the set theory logic but did not use that $X$ is an algebraic set and $I(X)$ is a radical ideal since it is a prime ideal.

Denote $I(X_1)=I,I(X_2)=J,I(X)=P$. Clearly, $IJ\subset P$. The claim now follows from the following exercise: if $IJ\subset P$ where $P$ is a prime ideal, then one of $I,J$ is contained in $P$.
