Skip to main content
2 of 10
added 8 characters in body

Very late to this party, but I've recently started studying this, and I've found an answer that is quite satisfying to me (at least satisfying enough for me to continue on). Specifically, we will use the fact that $M$ is a flat $A$-module if and only if $I\otimes_AM\cong IM$ for all ideals $I$ of $A$ (as Andrew does above).

Let $\pi:X\rightarrow Y$ be a morphism of schemes, let $V\hookrightarrow Y$ be any closed subscheme, and let $\mathcal{I}_{V/Y}$ be the quasicoherent sheaf of ideals carving out $V$. Considering $V\hookrightarrow Y$ to be a closed subfunctor, we can considering the corresponding closed subfunctor $V_X\hookrightarrow X$ to be the "preimage" of $V$ in $X$. The sheaf of ideals carving out $V_X\hookrightarrow X$ is exactly the image sheaf (call it $\mathcal{I}_{V_X/X}$) given by the morphism $\pi^*\mathcal{I}_{V/X}:=\pi^{-1}\mathcal{I}_{V/X}\otimes_{\pi^{-1}\mathcal{O}_Y}\mathcal{O}_X\rightarrow \mathcal{O}_X$, $i\otimes m\mapsto im$.

Using the fact that $\pi$ is flat is a stalkwise condition and the definition of flatness in terms of ideals, it is clear that $\pi^*\mathcal{I}_{V/X}\cong \mathcal{I}_{V_X/X}$ for all $V\hookrightarrow Y$ if $\pi$ is flat. That is, a necessary condition for $\pi$ to be flat is that $\pi^*\mathcal{I}_{V/X}\cong \mathcal{I}_{V_X/X}$ for all $V\hookrightarrow Y$.

It turns out, this condition is also sufficient! Indeed, choose any affine open $\text{Spec}A\hookrightarrow Y$, and any closed subscheme of $\text{Spec}A$, $W:=\text{Spec}A/I$. Let $f:W\hookrightarrow Y$ be the corresponding locally closed subscheme of $Y$. Since $W$ is quasicompact, so $f$ is both quasicompact and quasiseparated; in particular, $f_*\mathcal{O}_W$ is quasicoherent on $X$, so $\mathcal{I}:=\text{Ker}(\mathcal{O}_Y\rightarrow f_*\mathcal{O}_W)$ is a quasicoherent sheaf of ideals on $Y$. Then since $\mathcal{I}(\text{Spec}A\hookrightarrow X)=I,$ so for any affine open subscheme $\text{Spec} A\hookrightarrow X$ and ideal $I$ of $A$, we can choose a quaiscoherent sheaf of ideals $\mathcal{I}$ where $\mathcal{I}|_{\text{Spec}(A)}\cong \tilde{I},$ and our result follows.

Thus, $\pi:X\rightarrow Y$ is a flat morphism of schemes if and only if for all closed subschemes $V\hookrightarrow Y$ (carved out by a quasicoherent sheaf of ideals $\mathcal{I}$), the functions that vanish on $V_X\hookrightarrow X$ are exactly those of the form $\pi^{-1}\mathcal{I}_{V/Y}\otimes_{\pi^{-1}\mathcal{O}_Y}\mathcal{O}_X.$ That is, the map $\pi^{-1}\mathcal{I}_{V/Y}\otimes_{\pi^{-1}\mathcal{O}_Y}\mathcal{O}_X\rightarrow \mathcal{I}_{V_X/X},$ $i\otimes m\mapsto im$, is an isomorphism. This is always surjective, so this condition is that there are no extra "surprise" relations between the $i$'s and $m$'s (some language borrowed either again Andrew, or from Vakil (24.4.2), I do not know who wrote it first).

Another way of thinking about this is that $\pi:X\rightarrow Y$ is flat if and only if for all closed subschemes $V\hookrightarrow X$ cut out by $\mathcal{I}_{V/Y},$ the corresponding $V_X\hookrightarrow X$ is cut out exactly by $\pi^*\mathcal{I}_{V/Y}.$ That is, saying that $\pi:X\rightarrow Y$ is flat is equivalent to saying that $X$ sits nicely (or maybe, "flatly"?) over $Y$.