# 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?

-
For affine schemes, can you see what this would mean exactly about ideals in rings? – Mariano Suárez-Alvarez Oct 11 '12 at 5:53
Oh, it must be a principal ideal. So in general ideal sheaves corresponding to higher codimensional subschemes are not locally free, I guess. – M. K. Oct 11 '12 at 6:15
Do not guess. Find an actual example and add an answer to the question! :-) – Mariano Suárez-Alvarez Oct 11 '12 at 6:16
Thanks for pushing me to think about this with the hint. – M. K. Oct 11 '12 at 6:47

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.

-

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.

-