Hartshorne Ex III 9.3(a) If $f:X\to Y$ is a finite surjective morphism of non-singular varieties over an algebraically cloasd field $k$, then $f$ is flat.
I tried to prove it by stalk, that is for $O_{x,X}$ is flat over $O_{f(x),Y}$, but I did not find a criteria for injective map between regular local rings to be flat. To use Theroem 9.9, $X$ need to be projective over $Y$. 
Can anyone help me with this? 
 A: Here is a  general result implying what you want:   
Let $f:X\to Y$ be a morphism of schemes locally of finite type over a field,  with $Y$ regular and $X$ Cohen-Macaulay ($\Leftarrow$ $X$ regular).
Suppose $X , Y$ are equidimensional and that all fibers are equidimensional of dimension $\operatorname  {dim}X-\operatorname  {dim}Y$.  Then $f$ is flat.   
This grandiose result is sometimes very aptly called "miracle flatness" and is proved in GÖRTZ-WEDHORN, Corollary 14.128.
Notice that the base field is not assumed algebraically closed and that neither scheme is supposed projective.  
Warning
The regularity assumption on $Y$  cannot be replaced by normality of $Y$: a counterexample is obtained by dividing out $\mathbb A^2$ by the $2$-element group of automorphisms generated by $P\mapsto -P$, since the quotient is isomorphic to the normal quadratic cone $z^2=xy$ in $\mathbb A^3$.
A: If $R \subseteq S$ is an inclusion of local rings where $R$ is regular and $S$ is module-finite over $R$, then $S$ is flat over $R$ iff $S$ is free over $R$ iff $S$ is Cohen-Macaulay. This follows from the Auslander-Buchsbaum formula: $\text{projdim}_R S + \text{depth}_R(S) = \text{depth}(R)$ ($\text{projdim}_R S < \infty$ since $R$ is regular).
