I am aware of the more standard proof that for $Z \subseteq \mathbb{A}^n(k)$, $\overline Z = V\left(I(Z)\right)$, its closure in the Zariski topology. I was wondering if this result could also be had using the definition of closure in general topology as the intersection of all closed sets containing $Z$.
The proof I imagined was along these lines \begin{align}\overline{Z} &= \displaystyle\bigcap_{C\supseteq Z,\\C \subseteq \mathbb{A}^n \text{ closed}} C \\& = \displaystyle\bigcap_{\mathfrak{a} \subseteq k[x_1, \ldots, x_n],\\\mathfrak{a} \text{ vanishes on } Z} V(\mathfrak{a}) \\ &= V\left(\sum_{\mathfrak{a} \text{ vanishes on } Z} \mathfrak{a}\right) \\&\ldots?\\ &= V\left(\bigcap_{\mathfrak{m} \text{ vanishes on } Z,\\\mathfrak{m} \text{ maximal}} \right) \\ &= V\left(\bigcap_{x \in Z} \mathfrak{m}_x\right) \\&= V(I(X)) \end{align}
Have I messed this up anywhere? If not, what are the missing steps?