# Shrinking the target to make the domain affine

Assume that $f : X \to Y$ is a morphism of schemes. Under what situations can we find some non empty open affine subscheme ${\rm Spec} B \subseteq Y$ such that $f^{-1}({\rm Spec}B)$ is affine? Here is what I have already thought about:

• If $f$ is an affine morphism, we just take any open affine subscheme of $Y$.
• Let $X$ be the affine line with two origins. If we think about the morphism $X \to \mathbb{A}^1$, then there is no affine neighborhood of the origin in $\mathbb{A}^1$ whose preimage is affine. However, the preimage of $\mathbb{A}^1 \backslash \{ 0 \}$ is affine.
• We can't find such a ${\rm Spec} B$ for the morphism $\mathbb{P}^1_k \to {\rm Spec} k$.
-
Perhaps it is more interesting to restrict to surjective (or dominant) morphisms. Otherwise there will be lots of boring examples where the preimage is empty. –  Martin Brandenburg Sep 22 '13 at 18:10
Nothing against Cantlog's answer, but it is only a straight forward reformulation. Why accepting this as a final answer? What about nontrivial examples and characterizations? –  Martin Brandenburg Sep 22 '13 at 21:34

I don't know whether this is usefull: a necessary and sufficient condition, when $f$ is of finite presentation, is that $X\times_Y \mathrm{Spec}(O_{Y,y})$ is affine for some $y\in Y$.
Indeed, the condition is clearly necessary. Conversely, standard arguments show that $X\times_Y \mathrm{Spec}(O_{Y,y})$ extends to an affine morphism of finite presentation $U\to V$ for some affine open neighborhood $V$ of $y$. As $U\to V$ and $X\times_Y V\to V$ coincide over $\mathrm{Spec}(O_{Y,y})$ and they are finite presented over $V$, they coincide over some open neighborhood $V'=\mathrm{Spec}(B)\subset V$ of $y$. This implies that $f^{-1}(\mathrm{Spec}(B))=X\times_Y V'$ is affine.
@DanielBarter: to extend a scheme over $O_{Y,y}$, you write equations with finitely many coefficients in $O_{Y,y}$. These coefficients all live in some affine open neighborhood $V$ of $y$, this gives you an affine scheme over $V$. On the other hand, if $f : T\to S$ is a morphism of f.p. schemes over $Y$ which is an isomorphism above $O_{Y,y}$, then the inverse of $f$ (above $O_{Y,y}$) uses a finitely many coefficients in $O_{Y,y}$. These coefficients live in an affine open neighborhood $V'$ of $y$, so $f$ has an inverse above $V'$. –  Cantlog Sep 22 '13 at 17:13