# When is the blow up morphism flat?

The question is as in the title: given a scheme $$X$$ and a closed subscheme $$Z$$ when is it true that the blow up morphism $$Bl_ZX \rightarrow X$$ is flat?

I’m mainly concerned with $$X$$ being a smooth projective variety but a general answer would be appreciated.

My idea was to work affine locally and recover something from $$Bl_0 \mathbb{A}^n \rightarrow \mathbb{A}^n$$ which it seems to me to be flat (but I might be wrong), but I wasn’t able to get far.

If the blowup is non-trivial (when $$Z$$ has codimension $$>1$$ in $$X$$), then it is not flat. Indeed, away from the subvariety $$Z$$, the blowup is an isomorphism, so fibers over these points have Hilbert polynomial $$P=1$$. On the other hand, over a point in $$Z$$, the fiber is some projective space of positive dimension, and hence has a nontrivial Hilbert polynomial. Since a flat morphism's fibers have constant Hilbert polynomial (see Hartshorne, Chapter III, Proposition 9.9), we conclude that the blowup is not flat.