= Singular locus
{title2=$\operatorname{Sing}(X)$}
For a <variety> $X$ over a <perfect field>, the singular locus is the closed complement of its <smooth locus>. It consists exactly of <points> whose <local rings> are not <regular local rings>.<The Stacks project>[Lemma 33.25.8, tag 0B8X]{ref}
A <normal variety> in this setting has no singular <points> of codimension zero or one. Its generic local rings are fields, and its codimension-one local rings are one-dimensional Noetherian normal domains, hence <discrete valuation rings> and therefore regular. Any singular locus of a normal variety thus has codimension at least two.
Over an imperfect field, the nonsmooth locus and the nonregular locus can differ. For $k=\mathbb F_p(s)$, the scheme $X=\operatorname{Spec}k[u]/(u^p-s)$ is the spectrum of a field and is regular. After <base change> adjoining a $p$th root of $s$, its defining equation becomes a $p$th power, so it is not smooth over $k$. The perfect-field qualifier is therefore essential when using normality to exclude nonsmooth <points>.
Back to article page