[step:Represent the smooth locus by a Jacobian rank condition]
Let
\begin{align*}R:=k[x_1,\dots,x_n]\end{align*}
be the [polynomial ring](/page/Polynomial%20Ring), and let
\begin{align*}I(X)\trianglelefteq R\end{align*}
be the vanishing ideal of $X$. Since $X$ is irreducible, $I(X)$ is prime. Choose generators
\begin{align*}I(X)=(f_1,\dots,f_r)\end{align*}
with $f_i\in R$ for each $1\le i\le r$. Let
\begin{align*}d:=\dim X\end{align*}
and set
\begin{align*}c:=n-d.\end{align*}
For each point $p\in X$, define the Jacobian matrix at $p$ by
\begin{align*}J_p:=\left(\frac{\partial f_i}{\partial x_j}(p)\right)_{1\le i\le r,\ 1\le j\le n}.\end{align*}
If $c=0$, then $\dim X=n$. Since $I(X)$ is a prime ideal of $k[x_1,\dots,x_n]$ of height $n-\dim X=0$, it follows that $I(X)=(0)$, so $X=\mathbb A_k^n$. Affine space is smooth at every point, hence $X_{\mathrm{sm}}=X$, which is nonempty, open, and dense.
Assume now that $c\ge 1$. The ideal $I(X)$ is the full vanishing ideal of $X$ and is generated by $f_1,\dots,f_r$. Since $X$ is irreducible of dimension $d$, the only irreducible component of $X$ is $X$ itself, with dimension $d$, so every point $p\in X$ lies on an irreducible component of dimension $d$ and no component through $p$ has larger dimension. Also, the codimension of $X$ in $\mathbb A_k^n$ is $n-d=c$. Therefore the hypotheses of [citetheorem:9444] apply to the generators $f_1,\dots,f_r$ of $I(X)$. Hence, for every $p\in X$,
\begin{align*}p\in X_{\mathrm{sm}} \iff \operatorname{rank}J_p=n-d=c.\end{align*}
[/step]