The local criterion for flatness goes this way:


Let $\phi : (A,m)\rightarrow (B,m')$ be a local morphism of local Noetherian rings, and $M$ a finitely generated $B$-module. If $x\in m$ is a non zero-divisor on $M$ then $M$ is flat over $A$ iff $M/xM$ is flat over $A/xA$. 


One usual geometric interpretation (see for instance Eisenbud, *Commutative Algebra with a View towards Algebraic Geometry*, chapter 6.4) is:


If we have a morphism of affine varieties $X\rightarrow Y$ over $\mathbb{A}^1$ such that the maps to $\mathbb{A}^1$ are flat and dominant, for any point $p$ in $\mathbb{A}^1$ choose a point $p'$ in $Y$ above $p$ and a point $p''$ in $X$ above $p'$. If the map of fibers $X\_{p}\rightarrow Y\_{p}$ is flat in a neighborhood of $p''$ in $X\_{p}$, then the map $X\rightarrow Y$ is also flat in a neighborhood of $p''$ in $X$.


I fail to see the obviousness of this interpretation: does this mean that if $R$ and $S$ are the respective affine rings defining the affine varieties $Y$ and $X$ over the field $k$, if $P'$ and $P''$ are the maximal ideals defining the points $p'$ and $p''$, if we have $S\_{P''}$ flat over $R\_{P'}$, there exist an element $f''$ of $S$ not contained in $P''$ such that $S\_{f''}$ is flat above $R$? 


I mean that using the local criterion for flatness I see how I can get the flatness of the rings localized at maximal ideals coming from the flatness on the fibers, but how to extend it to a neighborhood of each points ? 


Edit: after re-reading the clear answer from Akhil Mathew, I cannot help but wondering if there is a way to get the geometric interpretation of Eisenbud without using the result on the open locus for flat maps which is above the level of chapter 6 of Eisenbud classical book. Can somebody enlighten me here?


Edit2: an interesting thread on Math.SE which gave me all the answers I needed using generic flatness instead <https://math.stackexchange.com/a/2321347/14860>



On the Geometric Interpretation of the Local Criterion for Flatness
The flat locus is open in any event under reasonable hypotheses (EGA IV-3, Th. 11.1.1), so being flat "at a point" and "in a neighborhood of a point" are equivalent. 


Also, this particular result is true more generally: if $f: X \to Y$ is a morphism of finite type $S$-schemes ($S$ being noetherian), and if $X, Y$ are flat, then $f$ is flat if and only if each of the maps $f\_s: X\_s \to Y\_s$ are flat. This follows from the fact that one direction of the local criterion of flatness is true under more generality: that is, if $B \to C$ is a morphism of local noetherian rings both local and flat over the local noetherian ring $(A, \mathfrak{m})$, then $B \to C$ is flat if and only if the fiber $B/\mathfrak{m} B \to C/\mathfrak{m}C$ is flat. See for instance Proposition 4.10 of this [document](http://people.fas.harvard.edu/~amathew/chflat.pdf). 


