$$\begin{array}{ll} \text{maximize} & \mbox{tr} (A^T B A)\\ \text{subject to} & A^T A = I\end{array}$$
where the maximization is over $A$.
I know that the solution is eigenvectors of $B$, but I don't know how to arrive at it. In particular, constructing the Lagrangian is not straightforward because the constraint is a matrix equation while the objective function is scalar.
https://www.youtube.com/watch?v=DkdrFwevais
Watch @ 43:47 I simplified the problem for you here, but it is the same.
– Alex Apr 11 '19 at 04:32