TITLE: Extending vector bundles from subvarieties
QUESTION [8 upvotes]: Let $X$ be a smooth projective variety and let $Y\subset X$ be a smooth subvariety. Given a vector bundle $E$ on $Y$, when can $E$ be extended to a vector bundle $\tilde E$ on $X$? I.e., are there cohomology groups containing the obstructions to extending $E$?

REPLY [5 votes]: An obvious obstruction comes from topology: the Chern classes of your 
bundle should be obtained from restriction of Hodge classes on an ambient variety. This is (more or less) enough to extend a smooth bundle $B$ 
from $Y$ to $X$. To be precise, you need the classifying map from $Y$ to the space $BU(r)$ to be extendable to a continuous map from $X\supset Y$ to $BU(r)$, where $r$ is rank $B$. This is not the only obstruction, because a way to find a holomorphic bundle with prescribed $(p,p)$-Chern classes on $X$ amounts to a result which is much stronger than the Hodge conjecture (and false, generally speaking). The easiest obstruction to finding a bundle with prescribed $(p,p)$-Chern classes comes from the Bogomolov inequality: for any stable $B$, one has 
$$\int_M [2rc_2(B) - (r - 1)c_1(B)^2]\wedge \omega^{n-2}> 0,$$
where $n$ is dimension of your manifold $M$, and $\omega$ its Kahler form
(case of unstable bundles is considered separately using the Jordan-Holder filtration). Also, if this inequality is non-strict, $B$ admits a projectively flat connection, and therefore $c_2$ and the rest of Chern classes are powers of $c_1$.