= Solution
Use the usual convention that a <variety> is an <irreducible variety>. For a <quasi-projective algebraic set> $T$, its <algebraic dimension> is the supremum of the lengths $r$ of strict chains
$$
T_0\subsetneq T_1\subsetneq\cdots\subsetneq T_r
$$
of nonempty <irreducible closed subsets> of $T$. It is the maximum of the <algebraic dimensions> of its <irreducible components>. On an <affine algebraic set>, the correspondence between <irreducible closed subsets> and <prime ideals> reverses inclusion, so this is the <Krull dimension> of the <coordinate ring>. On a <quasi-projective algebraic set>, it is the supremum of the <Krull dimensions> of the <coordinate rings> of its <affine open subsets>. At a <closed point> $x$, the <Krull dimension> of the <local ring> measures chains through $x$.
Here is a <closed-point dimension lemma for affine domains> that avoids <transcendence degree>. Put $A=k[X]$. By <Noether normalization>, there is a <integral extension>
$$
B=k[z_1,\ldots,z_d]\subset A.
$$
The number of variables is $d$ because <integral extensions preserve Krull dimension> and $\dim B=d$. For any <maximal ideal> $\mathfrak m$ of $A$, its contraction $\mathfrak n$ to $B$ is a <maximal ideal>. Since $k$ is an <algebraically closed field>, $\mathfrak n=(z_1-c_1,\ldots,z_d-c_d)$ has <height of a prime ideal> $d$. The <going-down theorem> applies because $B$ is an <integrally closed domain> and $A$ is a <integral domain>. It lifts a length-$d$ chain below $\mathfrak n$ to one below $\mathfrak m$. Hence
$$
\boxed{\dim A_{\mathfrak m}=\operatorname{ht}\mathfrak m=d.}
$$
The opposite inequality follows from $\dim A=d$.
For the nonempty <open subset> $U$, choose a nonempty <principal open subset> $D(g)\subset U$ and a <closed point> $x\in D(g)$. Every <prime ideal> below $\mathfrak m_x$ avoids $g$, so the preceding chain survives in the <localization> $A_g$. Consequently $\dim D(g)\ge d$. Conversely, any chain of <irreducible closed subsets> in $U$ gives a chain of the same length after taking closures in $X$: intersecting those closures with $U$ recovers the original subsets. Therefore
$$
\boxed{\dim U=\dim X=d.}
$$
For the <principal hypersurface dimension lemma>, let $P$ be a <minimal prime ideal> over $(f)$. Since $f\ne0$ in the <integral domain> $A$, $P\ne(0)$. The <Krull principal ideal theorem> gives $\operatorname{ht}P=1$. Choose a <closed point> $x$ on $V(P)$ lying on none of the other finitely many <irreducible components> of $V(f)$. Such a point exists because those other components cut out proper <closed subsets> of the <irreducible variety> $V(P)$, and <closed points> are dense. Set $R=A_{\mathfrak m_x}$. Then $\dim R=d$ and
$$
\sqrt{fR}=PR.
$$
Write $s=\dim R/fR$. Choose a <system of parameters> $\bar y_1,\ldots,\bar y_s$ in $R/fR$ and lift it to $R$. The <ideal> $(f,y_1,\ldots,y_s)$ has radical equal to the <maximal ideal> of $R$. The <Krull height theorem> yields $d\le s+1$. On the other hand, any chain of <prime ideals> containing $f$ can be extended strictly at the bottom by the zero <prime ideal> of the <integral domain> $R$, giving $s\le d-1$. Thus $s=d-1$. Since $R/PR$ is a <localization> of $A/P$, $\dim A/P\ge d-1$. Extending a chain in $A/P$ by $(0)\subsetneq P$ also gives $\dim A/P\le d-1$. Hence \b[every component has the required dimension]:
$$
\boxed{\dim V(P)=d-1.}
$$
This argument uses <Noether normalization>, <going-down theorem>, and the <Krull height theorem>, never the <dimension from the function field> theorem. Irreducibility is essential: if the word <variety> were instead allowed to mean an arbitrary reducible <affine algebraic set>, neither assertion would hold without extra hypotheses. For example, a disjoint union of an <affine plane> and an <affine line> has an open component of smaller <algebraic dimension>; a function equal to $1$ on the plane and a coordinate on the line has a nonempty zero set of <algebraic dimension> $0$.
Back to article page