I Have read that for a matrix of reals $Y$ and a p.s.d matrix $B$ that the
Maximum of $ f(Y)=Tr(Y^TBY)$ subject to $Y^TY = I$ is achieved when $span(Y)$ equals the span of the first $d$ eigen-vectors of $B$.
What is the reasoning behind this eigen-solution leading to the maximum?