TITLE: Hilbert scheme of points on a surface as moduli space of semistable sheaves
QUESTION [8 upvotes]: It is well-known that $Hilb^n(X)$, the hilbert scheme of $n$ points on a smooth projective surface $X$, is isomorphic to $M_X(1,\mathcal O_X,n)$, the moduli space of rank one semistable sheaves with trivial determinant and second chern class $n$.  The canonical morphism in one direction sends a subscheme $Z\subset X$ to it's ideal sheaf $\mathcal I_Z$.  I was wondering how to go in the other direction.  Namely, given a semistable sheaf of rank 1, trivial determinant, and with second chern number $n$, how do I get an injection into $\mathcal O_X$?
A similar result holds for example for Hilbert schemes of curves on Calabi-Yau 3-folds, so an explanation which takes into account this case as well is preferable.

REPLY [11 votes]: By definition semistable sheaves are torsion-free.  Any torsion-free $F$ includes into its double dual, $F\to F^{\ast\ast}$.  The double dual is a reflexive sheaf, so any singularities occur in codimension 3.  In the surface case, we conclude $F^{\ast\ast}$ is a line bundle with trivial determinant, so must be $\mathcal O_X$.
More generally, in "Vector Bundles on Complex Projective Spaces" (Okenek-Schneider-Spindler) it is shown that any rank one reflexive sheaf on a smooth variety $X$ is necessarily a line bundle (Lemma 2.1.1.15).  So even in higher dimensional cases, it follows that $F^{\ast\ast} = \mathcal O_X$.
(In fact, OSS defines the determinant of a torsion-free sheaf $F$ of rank $r$ by $$\det F = (\Lambda^r F)^{\ast\ast},$$ and notes that the determinant is always a line bundle by the cited lemma.  In the rank one case, this is just the double dual, so we get a map $$F \to F^{\ast\ast} = \det F = \mathcal O_X.)$$