TITLE: Rank one sheaves and ideal sheaves
QUESTION [7 upvotes]: For a coherent sheaf $\mathcal F$ on a smooth irreducible projective variety $X/k$, it makes sense to define the rank $\textrm{rk }\mathcal F$ as the rank of the vector bundle $\mathcal F|_U$, where $U$ is the open subset of $X$ where $\mathcal F$ is locally free.
Ideal sheaves $\mathscr I\subset\mathcal O_X$ are coherent of rank one.

Question. Is there a known criterion saying when a coherent subsheaf $\mathcal
F\subset \mathcal O_X$ of rank one is an ideal sheaf?

Thanks for any suggestion, or reference.

REPLY [10 votes]: Any subsheaf  of $\mathcal O_X$-modules $\mathcal F\subset \mathcal O_X$ on a scheme (or even on a ringed space) is an ideal sheaf.
All the other adjectives  (rank-one, coherent, smooth, projective, irreducible,...) are irrelevant.    
Also, you shouldn't believe that  ideal sheaves must  be of rank one or quasi- coherent :
On the spectrum $X=\text {Spec} R$ of a discrete valuation ring $R$, consider the ideal sheaf $\mathcal I$ with  global sections $\Gamma(X,\mathcal I)=R$ and  whose sections over the (open!) generic point  are given by  $\Gamma(\{\eta\},\mathcal I)=0$.
The sheaf $\mathcal I$ is an ideal sheaf which is not quasi-coherent and which is of rank zero .