This is Vakil 18.1.C. Suppose $\pi : X \to Y$ is a projective morphism where $Y$ is locally Noetherian (or more generally $\mathcal{O}_Y$ is coherent over itself). Show that $\{y \in Y : \dim \pi^{-1}(y) > k\}$ is a Zariski-closed subset of $Y$.
He says this exercise is important to know how projective morphisms work so I ideally I should work it out for myself. But I am reading the chapter without having read a lot of the preceding chapters so I am finding it rather difficult. I would like some copious hints and directions. His suggestion seemed to me to be to find a hypersurface upstairs that could somehow collect the fibres into a closed subset. Then perhaps to push down this closed subset while claiming $\pi$ is a closed map. But I don't see how to this. Thanks.
I have attempted the question and I can give some hints. I may not be correct though, but I will be happy to discuss. Basically Irfan Kadikoylu has given a huge hint but I can write a bit more.
We will show that $\{y\in Y:\dim\pi^{-1}(y)\leq k\}$ is open.
First we assume that $Y$ is affine.
We may assume that $q\in Y$ is a closed point. This is because every point $y\in Y$ has a closed point $q$ in its specialisation. Then every open set containing $q$ must contain $y$ as a consequence. Otherwise there exists $V$ open neighbourhood of $q$ such that $y\notin V$, and hence $y\in Y-V$ is closed and so $q$ does not lie in the closure of $y$.
Why do we need $q$ a closed point? So that $\pi^{-1}(q)$ is a closed subscheme of $X$ by the following cartesian diagram
$\require{AMScd} \begin{CD} \pi^{-1}(q) @>>> X;\\ @VVV @V{\pi}VV \\ \{q\} @>{\text{closed}}>> Y \end{CD}$
Since $\pi:X\rightarrow Y$ is projective, hence $\pi^{-1}(q)$ is a closed subscheme in a projective space, say $\mathbb{P}^{n}_{A}$ (where $Y=\text{Spec}A$).
Now:
Thoughts
By exercise 11.3.C(c), we may find $k+1$ hypersurfaces $H_{1}$,...,$H_{k+1}$ such that $H_{1}\cap...\cap H_{k+1}$ avoids $\pi^{-1}(q)$. Then $X\cap H_{1}\cap...\cap H_{k+1}$ is a closed subset of $X$.
Now $\pi(X\cap H_{1}\cap...\cap H_{k+1})$ is closed in $Y$ (why? Because something => proper....). Then we take $Y-W$ where $W=\pi(X\cap...\cap H_{k+1})$. It is an open neighbourhood.
Does it contain $q$?
Let $p\in Y-W$. Then is it true that $\pi^{-1}(p)\subseteq \mathbb{P}^{n}_{A}-H_{1}\cap...\cap H_{k+1}$?
Now: is it true that $\dim \pi^{-1}(p)\leq k?$ Suppose for the sake of fun that $\dim\pi^{-1}(p)\geq k+1$. If you have done Exercise 11.3.C(a) you will find that the intersection should be non-empty (I highly recommend doing this exercise at least ONCE. If you are stuck with 11.3.C(a), I think you can find inspiration from Hartshorne). One way to think of it is that in $\mathbb{A}^{n+1}$, we look at the cone $C(\pi^{-1}(p))$ which is of dimension at least $k+2$. But the codimension of the cone of $H_{1}\cap...\cap H_{k+1}$ remains the same. Now give an algebraic formulation of the statement and use K??ll's Hau??id???satz to count the dimension of the intersection.
Conclusion
Hence if $\dim \pi^{-1}(p)\geq k+1$, it intersects the $k+1$ hypersurfaces. But it must contradict something right?