Solution (source code)

= Solution

A point $P$ belongs to the <smooth locus of a variety> if its <local ring> $\mathcal O_{X,P}$ is a <regular local ring>, meaning
$$
\boxed{\dim_k(\mathfrak m_P/\mathfrak m_P^2)=\dim\mathcal O_{X,P}.}
$$
Equivalently, the <Zariski tangent space> has the expected local dimension. Over the algebraically closed field, this agrees with smoothness for a reduced variety. In affine coordinates, the <Jacobian criterion> expresses it by the rank of the <matrix> of first <derivatives> of defining equations.