Are ideal sheaves locally free sheaves? Let $X$ be a smooth scheme of finite type. I think ideal sheaf of codimension 1 subscheme of $X$ is locally free as it is locally defined by one equation. What about higher codimension cases? 
 A: No, ideal sheaves are not locally free in general.   
The simplest example is given by $X=\mathbb A^2_k$ ($k$ a field) with the ideal sheaf $\mathcal I\subset \mathcal O$ of functions vanishing at the origin $P=(0,0)$, a codimension two subscheme of $X$.
If $\mathcal I$ were locally free it would be locally free of rank one (look at neighbouring stalks: on $U=X\setminus \lbrace P\rbrace$ we have $\mathcal I\mid U=\mathcal O\mid U$) .
However if $\mathcal I$ were free of rank one, we would have $\mathcal I_P\cong\mathcal O_{X,P}$ [an isomorphism of $\mathcal O_{X,P}$-modules].
This would mean that the ideal $(x,y)\subset k[x,y]_{(x,y)}$ is principal, and it is easy to check by hand that this is not true.
This contradiction proves that $\mathcal I$ is not locally free.
A: Let $X=Spec\mathbb{C}[x,y]$. The ideal $(x,y)$ corresponding to the origin $X\cong \mathbb{C}^2$ is contained in the structure sheaf, so it is line bundle if it is locally free. However it needs two generators $x,y$ and cannot be a line bundle. 
