# Orthogonality, Maximization and Eigen-Solution

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?

-

$\mathrm{tr} \, Y^T B Y = \mathrm{tr} \, B Y Y^T$, and $Y Y^T$ is a rank-$d$ orthogonal projection; any such projection is obtained in this way. So you maximize $\mathrm{tr} \, BP$ among rank-$d$ orthogonal projections $P$, so it's a consequence of the Courant minimax principle for the eigenvalues, or of the Cauchy interlacing theorem, if you want...

-