I'm trying to work out some examples to help understand the map between subsets of affine space and ideals of the polynomial ring.
Here is the notation I am using: Let $k$ be an algebraically closed field, we define $A=k[x_1,\ldots,x_n] $. Let $\mathbb{A}^n$ be the affine $n$-space over $k$. For a subset $Y\subset \mathbb{A}^n$ we define the $I(Y)=\{f \in A \, | \, f(p)=0 \,\, \forall p \in Y\}$.
I am trying to figure out what happens when $Y=\{a_1,\ldots,a_s\}$. It is clear that for $Y=\{a\}$, $I(Y)=\{f \in A \, | \, f(a)=0\}=(x_1-a,\ldots,x_n-a)$. There is a proposition in Hartshorne that states $I(Y_1 \cup Y_2)=I(Y_1)\cap I(Y_2)$. Setting $Y_i=\{a_i\}$ this should help us calculate $I(Y)$.
Is there an easy way to calculate $(x_1-a_1,\ldots,x_n-a_1)\cap(x_1-a_2,\ldots,x_n-a_2)$? Looking at the easier case $(x_1-a,x_2-a)\cap(x_1-b,x_2-b)$ seems to be equal to $((x_1-a)(x_1-b),(x_1-a)(x_2-b),(x_2-a)(x_1-b),(x_2-a)(x_2-b))$.
I'll do $n=2$. Write $I_1=(x-a,y-a)$ and $I_2=(x-b,y-b)$ where $a\ne b$. Then $I_1+I_2=A=k[x,y]$ as $I_1$ and $I_2$ are distinct and maximal. But $I_1+I_2 =(1)$ entails that $I_1\cap I_2=I_1I_2$. Therefore $$I_1\cap I_2=((x-a)(x-b),(x-a)(y-b),(y-a)(x-b),(y-a)(y-b)).$$
One can reduce this a bit. Note $x-y=(x-a)-(y-a)\in I_1$ and likewise $x-y\in I_2$. So $$I_1\cap I_2=((x-a)(x-b),(x-a)(y-b),(y-a)(x-b),(y-a)(y-b),x-y).$$ Maybe this doesn't seem like progress, but $(x-a)(y-b)\in((x-a)(x-b),x-y)$ so that $$I_1\cap I_2=((x-a)(x-b),(y-a)(x-b),(y-a)(y-b),x-y).$$ If we continue along this path, we get $$I_1\cap I_2=((x-a)(x-b),x-y).$$
The systematic method of finding intersections of ideals in polynomial rings is to use Groebner bases.