Why isn't $\mathbb{C}[x,y,z]/(xz-y)$ a flat $\mathbb{C}[x,y]$-module 
Why isn't $M = \mathbb{C}[x,y,z]/(xz-y)$ a flat $R = \mathbb{C}[x,y]$-module?

The reason given on the book is "the surface defined by $y-xz$ doesn't lie flat on the $(x,y)$-plane". But I don't understand why this can be a reason.
Since

An $R$-module $M$ is flat if and only if for any ideal $S$ of $R$, the map $1_M \otimes i: M \otimes_RS \rightarrow M \otimes_RR$ is injective. Here, $i: S \rightarrow R$ is the inclusion map.

I tried to find an ideal $S$ in $R$ such that $M \otimes_RS \rightarrow M \otimes_RR = M$ is not injective, but I didn't succeed. Please give me some help. Thank you.
 A: How much algebraic geometry have you had?  Their explanation is based on the fact that the fibers of flat morphism have constant dimension.  In your case, the ring homomorphism $R \rightarrow M$ corresponds to the map of schemes $X := \text{Spec } M \rightarrow Y := \text{Spec } R$.  The fibers have dimension $0$ ($= \dim X - \dim Y$) if $x \neq 0$ but have dimension $1$ if $x = y = 0$.  Thus, $f$ cannot be flat.
Algebraically, this means you should consider $I := (x,y) \subseteq R$ and the corresponding map $I \otimes_R M \rightarrow R \otimes_R M = M$.  This map is induced by the bilinear map $I \times M \rightarrow M$ given by $(f,m) \mapsto fm$.  It suffices to find a non-zero element of $I \otimes_R M$ that maps to $0$, and I leave it as an exercise for you to check that $x \otimes z - y \otimes 1$ does the trick.
EDIT: As per Georges' request, I am adding the relevant algebra to give a full proof.  It is clear that $x \otimes z - y \otimes 1$ maps to $0$ in $M$, but what needs proof is that $x \otimes z - y \otimes 1$ is not already $0$ in $I \otimes_R M$.
Note that $M$ is isomorphic to the polynomial ring $k[x,z]$.  We have $x \otimes P(x,z) =y \otimes Q(x,z)$ if and only if $x \mid Q(x,z)$ and $xz \mid P(x,z).^*$  Of course, this can happen, e.g. $y \otimes x = x \otimes xz$.  If $x \otimes z = y \otimes 1$, then we must have $x \mid 1$ and $y = xz \mid z$ in $M$, which is not the case.  (This is easy to check only because $M$ is a polynomial ring, for which we know the units are the constant functions.)
In fact, you can similarly show that a basis for $I \otimes_R M$ as a $k$-vector space is given by $x \otimes x^a z^b$, as $a,b$ ranges over pairs of non-negative integers, and $y \otimes z^b$, as $b$ ranges over non-negative integers.
${}^*$ This is the key statement.  One can see it directly by invoking the explicit construction of the tensor product in this case.  But there must be better ways to see this.  Pierre-Yves Gaillard has given one such alternative approach -- quotienting out by appropriate submodules of $I$ and $M$ so that you reduce to finite dimensional $k$-vector spaces and compute there.
A: This answer is similar to the others; perhaps it will help to see the same
points made by yet another person.
First of all, it might help to note that $\mathbb C[x,y,z]/(xz-y)$ is
isomorphic to $\mathbb C[x,z]$.  So you are looking at the map $\mathbb C[x,y] 
\to \mathbb C[x,z]$ defined by $x \mapsto z, y \mapsto x z$, and asking why it is not flat.
Geometrically, this is the map $\mathbb A^2 \to \mathbb A^2$ defined by
$(x,z) \mapsto (x,xz)$.  Note that a whole line in the first copy of $\mathbb A^2$ in the source (the line where $x = 0$) is mapped to a single point of the target
(the point $(0,0)$), whereas the map is an open immersion on the complement
of this line.  Since open immersions are flat, this says that the point $(0,0)$
in the target is where we should focus our attention when looking for non-flatness.
(Here is a translation of my remark about open immersions in algebraic terms: if $f$ is any polynomial in $\mathbb C[x,y]$ with zero constant term, then the map on localizations $\mathbb C[x,y]_f \to
\mathbb C[x,z]_f$ is flat --- check this!)
There is one ideal that is particularly "sensitive" to the point $(0,0)$,
namely its corresponding maximal ideal $(x,y) \subset \mathbb C[x,y]$.
So let's try this ideal.
We have to look at the induced map $(x,y)\otimes \mathbb C[x,z]\to \mathbb C[x,z]$.  The very equation $y = x z$ defining the map $\mathbb C[x,y]
\to \mathbb C[x,z]$ suggests an element in the kernel, namely the element
$y\otimes 1 - x\otimes z$.  I leave it as an exercise to check that this element 
is non-zero in $(x,y)\otimes\mathbb C[x,z]$.  (If you don't know how to
make this sort of computation, then you should probably ask it as a separate
question --- but try first!)
One lesson to draw from this is that the geometry of the situation informs the algebra.  A more specific remark is that the map $\mathbb A^2 \to \mathbb A^2$ from your question
is an affine patch of the blow up of $\mathbb A^2$ at the origin, and this example illustrates the general fact that non-trivial blow-ups are never flat.
Added: Looking over the other answers, it seems that one of the points of
the question is to really check that $y \otimes 1 - x \otimes z$ is non-zero
in $(x,y)\otimes \mathbb C[x,z]$.
There is a standard way to compute tensor products: by generators and relations.
While there can be other tricks in particular cases (see e.g. Michael Joyce's answer), it might be worth explaining this standard approach, since it doesn't
require any cleverness; you can always just do it.
We have to begin with a presentation of the ideal $(x,y)$ as a $\mathbb C[x,y]$-module.  This is easy:  it has two generators, $x$ and $y$, which
satisfy the relation $y x - x y = 0$.  So we have the presentation
$$ 0 \to \mathbb C[x,y] \cdot e \to \mathbb C[x,y]\cdot f_1 \oplus \mathbb C[x,y]\cdot f_2 \to (x,y) \to 0,$$
where $e$, $f_1$, and $f_2$ are just names for basis elements of free modules,
and the maps are given by $e \mapsto (y f_1, -x f_2)$, and $f_1\mapsto x, f_2 \mapsto y$.
Now we tensor with $\mathbb C[x,z]$, to obtain the presentation 
$$ \mathbb C[x,z] \cdot e \to \mathbb C[x,z] \cdot f_1 \oplus \mathbb C[x,z]
\cdot f_2 \to (x,y)\otimes \mathbb C[x,z] \to 0,$$
where again the maps are given by 
$e \mapsto (y f_1, -x f_2) = (x z f_1, - x f_2)
= x(z f_1,-f_2),$ and $f_1 \mapsto x, f_2 \mapsto y = x z$.
(Note that in this particular case this exact sequence is also 
exact on the left, but that is not a general feature of this approach
to computing tensor products, since generally tensoring is right-exact,
but not exact.)
From this presentation of $(x,y)\otimes \mathbb C[x,z]$, we see that
$x\otimes z - y$ (which is the image of $(z f_1, -f_2)$) is non-zero,
since $(z f_1, -f 2)$ is not in the image of the map from
$\mathbb C[x,z]\cdot e.$ 
On the other hand, it is a torsion element --- it is killed by multiplication by $x$ (since $x(z f_1, -f_2)$ is in the image of $\mathbb C[x,z] \cdot e$; indeed
it is the image of $e$).
This reflects the fact that if we localize away from $x = 0$ (i.e. invert
$x$), the original map becomes flat, and so the map $(x,y)\otimes\mathbb C[x,z] \to \mathbb C[x,z]$ must become injective after inverting $x$; hence its
kernel must consist of $x$-torsion elements.
A: Here is a
New version of the answer
I'll leave the old version below so that the comments remain understandable. 
Let $K$ be a commutative ring and $x,y,z$ be indeterminates. Put 
$$
M:=\frac{K[x,y,z]}{(xz-y)}\quad.
$$
In particular, $M$ is an $K[x,y]$-module. 
We claim that $M$ is not $K[x,y]$-flat.
Set 
$$
t:=1\otimes y-z\otimes x\in K[x,y,z]\underset{K}{\otimes}(x,y).
$$
In view of the flatness criterion mentioned in the question, it suffices to check that 
$(*)$ the image of $t$ in 
$$
M\underset{K[x,y]}{\otimes}(x,y)
$$
is nonzero.
The $K$-bilinear map 
$$
\phi:K[x,y,z]\times(x,y)\to K
$$
defined by 
$$
\phi(f,g)=f(0,0,0)\ \frac{\partial g}{\partial y}(0,0)
$$
induces a $K[x,y]$-bilinear map 
$$
\overline\phi:M\times(x,y)\to K=\frac{K[x,y]}{(x,y)}
$$
satisfying 
$$
\overline\phi(1,y)=1,\quad\overline\phi(z,x)=0.
$$
This proves $(*)$. 
Old version of the answer
Let $K$ be a commutative ring and $x,y,z$ be indeterminates. Put 
$$
A=K[x,y],\quad B:=K[x,y,z],\quad M:=B/(xz-y).
$$
In particular, $M$ is an $A$-module. 
We claim that $M$ is not $A$-flat.
Let denote the image in $M$ of the element $b\in B$ by $b_M$.
In view of the flatness criterion mentioned in the question, it suffices to check 
$$
t:=z_M\otimes x-1_M\otimes y\neq0\in M\otimes_A(x,y).
$$
Let $N$ be the quotient of $B$ by the sub-$A$-module generated by 
$$
xz-y,\quad x^2,\quad z^2,\quad xy,\quad yz.
$$
Put $P:=(x,y)/(x,y)^2$. 
It suffices to prove that the image of $t$ in $N\otimes_AP$ is nonzero. 
But $N$ admits the $K$-basis 
$$
1_N,\quad x_N,\quad y_N,\quad z_N
$$ 
(obvious notation), whereas $P$ admits the $K$-basis $x_P,y_P$ (obvious notation). 
The claim follows easily from these observations.
EDIT. Thanks to Michael Joyce and Georges Elencwajg for their comments. I'll try to salvage the argument. 
Let $n_1,n_2,n_3,n_4$ be the $K$-basis of $N$ mentioned above, and $p_1,p_2$ be the $K$-basis of $N$ mentioned above. 
Consider the $K$-bilinear map $f$ from $N\times P$ to $K$ mapping $(1_N,y_P)$ to $1$ and the other $(n_i,p_j)$ to $0$. 
Let $x$ and $y$ act by $0$ on $K$. 
Then it suffices to check that $f$ is $A$-bilinear, which (I think) is clear.
A: The question seems to be about gaining geometric intuition for flat morphisms of (affine) schemes. Let $A = \mathbb{C}[x, y, z]/(x z - y)$, $X = \operatorname{Spec} A$ and $\mathbb{A}^2_\mathbb{C} = \operatorname{Spec} \mathbb{C}[x, y]$. The claim is that the projection $\pi : X \to \mathbb{A}^2_\mathbb{C}$ is not a flat morphism of schemes. Let's look at a picture.
         
$X$ is quite evidently twisted. More formally, if one looks at the dimensions of the fibres over the points of $\mathbb{A}^2_\mathbb{C}$, one sees that at $(0, 0)$ there is a 1-dimensional fibre, but everywhere else the fibre is 0-dimensional. It is a fact that a finitely generated module over a noetherian domain is locally free if and only if the dimensions of the fibres over maximal ideals is constant, so this confirms our intuition that $X$ is not flat over $\mathbb{A}^2_\mathbb{C}$
Of course, we could take a more direct approach. From the above discussion we know that there should be a problem at $(0, 0)$, so let $\mathfrak{m} = (x, y) \subset \mathbb{C}[x, y]$. We have a short exact sequence
$$0 \to \mathfrak{m} \to \mathbb{C}[x, y] \to \mathbb{C} \to 0$$
and upon tensoring with $A$, we get a right exact sequence
$$A \otimes \mathfrak{m} \to A \to \mathbb{C}[z] \to 0$$
I claim that the first map is not injective. Indeed, in $A$,
$$z \cdot x = 1 \cdot y$$
but in $A \otimes \mathfrak{m}$
$$z \otimes x \ne 1 \otimes y$$
since there are no $f \in \mathbb{C}[x, y]$, $g \in A$, and $h \in \mathfrak{m}$ such that
$$\begin{align*}
g f & = z &
h & = x \\
g & = 1 &
f h & = y
\end{align*}$$
Hence $A$ is not flat over $\mathbb{C}[x, y]$.
