Extending vector bundles from subvarieties 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$? 
 A: Without hypotheses on $Y$ there is no hope to define such obstructions, already for line bundles. A natural hypothesis is to take for $Y$ a (smooth) ample divisor in $X$, of dimension $\geq 2$. In this paper, Fujita gives some cohomological conditions which imply that $E$ extends : $H^2(Y, \mathcal{E}nd(E)(-tY))=0$ for all $t\geq 1$ and $H^p(Y, E(tY))=0$ for all $t\in\mathbb{Z}$ and $0<p<\dim Y$. Be aware that these conditions are extremely strong.
A: 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$.
