Let $Y\subseteq \mathbb{A}^n$ be algebraic. Assume $Y$ is irreducible.
Put $\mathfrak{p}=I(Y)$ , the ideal of $Y$ in $k[x_1,...,x_n]$.
Is it true that $height (\mathfrak{p})+ dim k[x_1,...,x_n]/\mathfrak{p} = \dim k[x_1,...,x_n]$?
This seems to have been used in a proof in lectures. Though I am not sure how to prove it?
Clearly $\mathfrak{p}$ is prime.
Could some care to elaborate on the intuition behind it please?