I'm new to working with varieties, and the statement mentioned below is left as an exercise, but I'm having some difficulty trying to prove it.
Let $R=K[x_1,...,x_n]$. If $X=X_1\cup ... \cup X_n$, then $I(X)=I(X_1)\cap ...\cap I(X_n)$, where $X,X_1,...,X_n$ are varieties. Here $I(X):=\{f\in R|f(a_1,...,a_n)=0, \space\forall (a_1,...,a_n)\in X\}$. Also, if $X_i$ are all irreducible varieties, then would that imply that $I(X_i)$ are primary?
Recall and write out everything in detail, there is not much to prove.
$I(X)$ is the set of all $f$ such that $f(a)= 0$ for all $a \in X$. So in particular for such an $f$ one has $f(a)=0$ for all $a\in X_1$, simply as $X_1 \subset X$, and $f \in I(X_1)$.
The same is true for every $X_i$ so $f \in I(X_i)$ for all $i$. This it is in the intersection for all $I(X_i)$.
Conversely, if $f$ is in the intersection. Then $f(a)= 0$ for all $a \in X_i$, and this for all $i$, which is the same as saying it is true for all $a \in \cup X_i$. Thus $f \in I(X)$.