Let $X$ be a connected scheme, smooth and proper over $\mathbb{C}$. Let $F$ be a locally free $\mathcal{O}\_X$-module of finite rank $r>1$. Suppose on a non-empty affine open $U\subset X$ whose complement is irreducible we have an isomorphism of $\mathcal{O}\_X$-modules $f:\mathcal{O}^{\oplus r}\_X|\_{U}\rightarrow F|\_{U}$. 


Does there necessarily exist a locally free $\mathcal{O}\_X$-module $L$ of rank $1$ with an identification $\mathcal{O}\_X|\_U\rightarrow L|\_U$ such that there is a morphism of $\mathcal{O}\_X$-modules $g:L^{\oplus r}\rightarrow F$ with $g|\_{U}=f$?



Map to a given vector bundle from a split vector bundle
Yes. Slightly more precisely, we have the following result.



> 
> **Proposition:** Let $X$ be a normal, integral, finite-type scheme over a field.
>  Let $F$ be a locally free $\mathcal O\_X$-module of finite rank.
>  Let $U\subseteq X$ be a nonempty open subset.
>  Let $r$ be a nonnegative integer.
>  Let $\phi : \mathcal O\_U^{\oplus r}\to F|\_U$ be an $\mathcal O\_U$-linear map.
>  Then there exists an effective Weil divisor $D$ supported on $X\setminus U$ and an $\mathcal O\_X$-linear map $\bar \phi : \mathcal O\_X(-D)^{\oplus r} \to F$ such that $\bar\phi|\_U = \phi$.
>  Furthermore, if $X$ is $\mathbb Q$-factorial, then the divisor $D$ can be chosen to be Cartier.
> 
> 
> 


*Proof:* Given an effective Weil divisor $D$ on $X$ with support on $X\setminus U$, there exists at most one $\mathcal O\_X$-linear map $\phi(D) : \mathcal O\_X(-D)^{\oplus r} \to F$ such that $\phi(D)|\_U = \phi$.
If $\phi(D)$ exists and $E$ is an effective Weil divisor supported on $X\setminus U$, then $\phi(D+E)$ exists, since we can take $\phi(D+E)$ to be the restriction of $\phi(D)$ to $\mathcal O\_X(-D-E)^{\oplus r}\subseteq \mathcal O\_X(-D)^{\oplus r}$.
In particular, if $\phi(D)$ exists, then $\phi(nD)$ exists for all positive integers $n$. 
The last statement of the proposition follows.


To find an effective Weil divisor $D$ on $X$ supported on $X\setminus U$ such that $\phi(D)$ exists, we may work locally on $X$.
Indeed, let $X=\bigcup\_{i\in I} V\_i$ be a finite Zariski-open cover. 
Suppose that, for each $i\in I$, there exists an effective Weil divisor $D\_i$ on $V\_i$ with support on $V\_i\setminus U$ and an $\mathcal O\_{V\_i}$-linear map $\bar\phi\_i : \mathcal O\_{V\_i}(-D\_i)^{\oplus r}\to F|\_{V\_i}$ such that $\bar\phi\_i|\_{V\_i\cap U} = \phi\_{V\_i\cap U}$.
For each $i\in I$, let $\overline D\_i\subseteq X$ be the closure of $D\_i \subseteq V\_i$.
Let $D= \sum\_{i\in I} \overline D\_i$. 
Then $\mathcal O\_X(-D)|\_{V\_i} \subseteq \mathcal O\_{V\_i}(-D\_i)$ for all $i\in i$, and there exists a unique map $\bar\phi : \mathcal O\_X(-D)^{\oplus r} \to F$ such that $\bar\phi|\_{V\_i} = \bar\phi\_i|\mathcal O\_{V\_i}(-D\cap V\_i)^{\oplus r}$ for all $i\in I$.


Thus we may assume that $F=\mathcal O\_X^{\oplus f}$.
Then the $\mathcal O\_U$-linear map $\phi : \mathcal O\_U^{\oplus r}\to F|\_U$ is given by multiplication by a matrix $[\phi\_{ij}]$ of rational functions on $X$.
Let $D\_1,\dotsc,D\_m$ denote the irreducible components of $X\setminus U$ that have codimension 1 in $X$.
For each $l=1,\dotsc, m$, $i=1,\dotsc,f$ and $j=1,\dotsc,r$, let $n\_l(i,j)\ge 0$ denote the order of the pole that the rational function $\phi\_{ij}$ has at $D\_l$.
For each $l=1,\dotsc, m$, let $n\_l := \max\_{i,j} n\_l(i,j)$. 
Let $D= \sum\_{i=1}^m n\_l D\_l$. 
Then $\phi(D)$ exists.
QED


