# How to prove that a morphism is flat

I think the concept of flatness is very theoretical and I find hard to work with it. Hence, I would like to understand some easy examples before going deeper in its study.

For instance, I read that the projection $$(t Y-(X_0X_2-X_1^2)=0)\subset \mathbb{P}(1,1,1,2)\times \mathbb{A}^1\rightarrow \mathbb{A}^1$$ is flat. Nevertheless, I do not know how to prove it.

Notice that this morphism has fibers isomorphic to $$\mathbb{P}^2$$ for $$t\neq 0$$ and isomorphic to $$\mathbb{P}(1,1,4)$$ for $$t=0$$.

if $$f: Y \rightarrow X$$ is a morphism with $$Y$$ Cohen-Macaulay, $$X$$ regular, and every fibre of the same dimension, then $$f$$ is flat.