Let $f:X\longrightarrow Y$ be a morphism of noetherian schemes. Under what conditions is $f\_\ast \mathcal{O}\_X$ a locally free $\mathcal{O}\_Y$-module?


**Example 1**. Suppose that $f$ is affine. Then $f\_\ast\mathcal{O}\_X$ is a quasi-coherent $\mathcal{O}\_Y$-module.


**Example 2**. Suppose that $f$ is finite. Then $f\_\ast \mathcal{O}\_X$ is even coherent.


**Example 3**. Suppose that $f:X\longrightarrow Y$ is a finite morphism of regular integral 1-dimensional schemes. Then $f\_\ast \mathcal{O}\_X$ is coherent and locally free. (The local rings $\mathcal{O}\_{Y,y}$ are discrete valuation rings.)


In view of the above examples, I'm basically looking for a higher-dimensional analogue of Example 3. But, I don't require quasi-coherence in my question. (Although this is quite unnatural.)


**Idea**. For any finite morphism $f:X\longrightarrow Y$, we have that $f\_\ast \mathcal{O}\_X$ is locally free. Only what are the precise conditions on $X$ and $Y$?



When is the push-forward of the structure sheaf locally free
It is of course not true that for any finite morphism $f:X\to Y$ we have $f\_\*\mathcal{O}\_X$ locally free : think about a closed immersion.


In fact, your question is about the important topic of "base change and cohomology of sheaves" for proper morphisms, which is treated by Grothendieck in EGA3. The simplest answer one can give, I think, is that if $f$ is proper [EDIT : and flat, as t3suji points out] and for all $y\in Y$ we have $H^1(X\_y,\mathcal{O}\_{X\_y})=0$ then $f\_\*\mathcal{O}\_X$ is locally free.


You may want to avoid going to find the exact reference in EGA3, since as Mumford says, that result is "unfortunately buried there in a mass of generalizations". In that case, go to chapter 0, section 5 of *Geometric Invariant Theory* (3rd ed.) by Mumford, Fogarty and Kirwan. This is where Mumford's comment is taken from.


