Canonical scheme structure on the singular locus of a variety I first asked this question on Math StackExchange but no answers were given. 
Let $X$ be subvariety of affine space $\mathbb{A}_{k}^n$, where $k$ is a field, and suppose $X$ is given by equations 
$$X:(F_1=\cdots = F_m=0)\subset \mathbb{A}^n.$$
Then $X$ is singular at $p\in X$ if 
$$\text{rank}(a_{ij}(p))<d,$$
where $d=n-\text{dim}(X)$ (i.e., the codimension of $X$ in $\mathbb{A}^n$), and $(a_{ij})$ is the matrix valued function 
$$(a_{ij})=\frac{\partial F_i}{\partial x_j}.$$ Thus the ideal generated by the defining equations for $X$ along with the $d\times d$ minors of the matrix $(a_{ij})$ define a natural scheme structure on the singular locus of $X$ (as a subscheme of $\mathbb{A}^n$). Let's call this scheme $S_X$. My question then is the following:
Is $S_X$ intrinsic to $X$? 
 A: The answer is yes. Let $X$ be a scheme of finite type over the field $k$, of pure dimension $r$; then $S_X$ can be defined as the closed subscheme of $X$ defined by the $r$th Fitting ideal of the sheaf $\Omega^1_{X/k}$.
(See Chapter 20 of the commutative algebra book by Eisenbud for the definition of Fitting ideals of finite modules. It is easy to show that the construction globalises to coherent sheaves on locally Noetherian schemes.)
This construction of $S_X$ coincides with your definition when $X$ is a closed subscheme of $\mathbb{A}^n_k$. Indeed, consider the exact sequence
$$
I/I^2 \longrightarrow \Omega^1_{\mathbb{A}^n_k/k} \vert_X \longrightarrow \Omega^1_{X/k} \longrightarrow 0
$$
where $I$ is the ideal sheaf of $X$ in $\mathbb{A}^n_k$. If $I$ is generated by the polynomials $f_1, \dots, f_m$
one can obtain another exact sequence of $\mathcal{O}_X$-modules
$$
\mathcal{O}_X^{\oplus m} \overset{J}\longrightarrow \mathcal{O}_X^{\oplus n} \longrightarrow \Omega^1_{X/k} \longrightarrow 0
$$
where $J$ is the Jacobian matrix of the polynomials $f_i$. Then the $r$th Fitting ideal of $\Omega^1_{X/k}$ is the ideal in $\mathcal{O}_X$ generated by the $(n-r) \times (n-r)$ minors of the matrix $J$.
