TITLE: Extending vector bundles on a given open subscheme
QUESTION [24 upvotes]: Let $U$ be a dense open subscheme of an integral noetherian scheme $X$ and let $E$ be a vector bundle on $U$. Suppose that the complement $Y$ of $U$ has codimension $\textrm{codim}(Y,X) \geq 2$. Let $F$ be a vector bundle on $X$ extending $E$, i.e., $F|_{U} = E$. 
Is any   extension of $E$ to $X$   isomorphic to $F$?

REPLY [16 votes]: Let $i:U \to X$ be the embedding. Assume that $i^*F = E$. Then by the adjunction we have a map $F \to i_*E$ which is an embedding, since the kernel is zero on $U$, so it is a torsion sheaf, and a vector bundle doesn't have torsion subsheaves (if $X$ doesn't have embedded components). So, we have an exact triple $0 \to F \to i_*E \to G \to 0$ for some $G$, which is supported on $X \setminus U$. If $X$ satisfies and $codim_X (X\setminus U) \ge 2$, then (provided $S_2$ condition) we have $G^* = {\mathcal Ext}^1(G,O_X) = 0$, so dualizing the sequence we see that $F^* = (i_* E)^\ast$, hence $F = (i_* E)^{\ast\ast}$, so $F$ has to be the reflexive envelope of $i_* E$. This proves the uniquencess. This also allows to construct an example of a vector bundle on $U$ which does not extend to a vector bundle on $X$.