# Does a closed immersion of an affine scheme in a smooth scheme factor over an open affine subscheme?

Assume we have an affine scheme $A$ that comes with a closed immersion into a smooth scheme $i \colon A \hookrightarrow M$, which is not necessarily affine.

Does there exist an affine open subscheme $j \colon V \hookrightarrow M$ such that $A$ already embeds in $V$?

Expressed in Diagrams, does there exist an affine open subscheme $V$ of $M$ such that we have a factorization

     i
A (----> M
\      /
\    /
V ?

• I think that the following is a counter-example. Take a smooth plane cubic and remove a point such that it is of infinite order in the group law determined by a flex point. – damiano May 11 '11 at 10:54

Let me expand on my comment. Let $E$ be an elliptic curve and let $p$ be a point of $E$ of infinite order. Embed $E$ in $\mathbb{P}^2$ as a plane cubic using the linear system $3O$, where $O$ is the origin of the group law. Remove from $\mathbb{P}^2$ the image of the point $p$ and note that $E \setminus \{p\}$ is affine. The inclusion of $E\setminus\{p\}$ in $\mathbb{P}^2 \setminus \{p\}$ is the required counter-example. Indeed, it is a closed immersion and if there were an affine open subset of $\mathbb{P}^2 \setminus \{p\}$ containing $E\setminus\{p\}$, then there would be a plane curve intersecting $E$ in only the point $p$. This is impossible, since the point $p$ has infinite order.
There are also examples of smooth proper (nonprojective) varieties $V$ with a finite subset not contained in any affine open subset.