Doubt in Hartshorne's algebraic geometry book I'm studying by myself Algebraic Geometry and I didn't understand this part in the Hartshorne's book:

I know that every polynomial $f$ in $\mathfrak a$ is written as $f=g_1f_1+\ldots + g_rf_r$, where $g_i\in A$, but I can't go further, I need help.
Thanks in advance.
 A: The key is to prove $Z(f,g) = Z(f)\cap Z(g).$ The result then follows by applying this result inductively. 
If $x\in Z(f,g)$ then $f(x)=0$ and $g(x)=0$ so $x\in Z(f)$ and $x\in Z(g)$ so $x\in Z(f)\cap Z(g).$ The reverse direction has similar ideas. 
Just a comment: I would not recommend studying (especially self study) algebraic geometry for the first time from Hartshorne. Chapter 1 of Hartshorne is really a quick crash course that quickly goes through the material of an entire book. He mentions this in the preface and really intends the reader has seen this material before elsewhere, but he provides it for revision. I would recommend going through Fulton's "Algebraic Curves" (freely available online) or Reid's "Undergraduate Algebraic Geometry" before you read Hartshorne. 
A: $Z(S)= Z( <S>)$, where $<S>$ is the ideal generated by $S$. This is easy to show by showing containment both ways (i.e. $x\in Z(S)$, then for $g \in <S>,g=f_1s_1+ \dots+ f_ns_n $ we have $g(x)= f_1(x)s_1(x)+\dots+f_n(x)s_n(x)=0$, since $x\in Z(S)$ etc). This is enough since any ideal is always equal to an ideal generated by finitely many polynomials (by Noetherian), which is enough for [H]'s claim $(Z(S)=Z( <S>)=Z(<f_1,\dots,f_n>)=Z(f_1\dots,f_n))$.
