I have the following homework question:
Let $X \subseteq \mathbb{A}^n$ be an irreducible algebraic subset, and let $\mathbb{K}$ be algebraically closed. Show that every maximal ideal in $\mathbb{K}[X]$ determines a unique point $p \in \mathbb{A}^n$ with $p \in X$.
I've tried a proof along the following lines. Let $M$ be a maximal ideal of $\mathbb{K}[X]$. Then there is a corresponding maximal ideal in $\mathbb{K}[x_1, \dots ,x_n]$, which must be of the form $\langle x_1 - p_1, \dots x_n - p_n \rangle$ for some $p=(p_1, \dots,p_n) \in \mathbb{A}^n$ by the Nullstellensatz. Then $p$ must be in $X$, since otherwise $M$ would be empty, contradicting the definition of a maximal ideal (obviously, some details have been omitted).
However, this doesn't make use of the fact that $X$ is irreducible, leading me to believe that I'm missing something. Am I working along the right lines? Where have I gone wrong?