Maximizing weighted sum of eigenvalues of a matrix ($\Lambda_1 U^\top \Lambda_2 U \Lambda_1$)
Solution 1:
I find a proof. Define $a_{d+1}:=0$. Then our objective function equals $$ \begin{aligned} \sum_{i=1}^d (a_i-a_{i+1})\sum_{j=1}^i \mathrm{eigval}_j (U^\top \Lambda_2 U \Lambda_1^2) &\le \sum_{i=1}^d (a_i-a_{i+1})\sum_{j=1}^i \mathrm{eigval}_j (U^\top \Lambda_2 U)\; \mathrm{eigval}_j(\Lambda_1^2) \\ &= \sum_{i=1}^d a_i \;\mathrm{eigval}_i(U^\top \Lambda_2 U)\;\mathrm{eigval}_i(\Lambda_1^2), \end{aligned} $$ where we use the property $\mathrm{eigval}_i(AB)=\mathrm{eigval}_i(BA)$ for s.p.d. $A,B$, and the inequality is from this mathoverflow answer. (As the diagonal matrices have positive and decreasing diagonal elements,) equality is attained when $U^2=I$.
It remains to prove these are the only solutions. Another application of the aforementioned inequality yields $$ \text{Objective} \le \sum_{i=1}^{d-1} (a_i-a_d) \;\mathrm{eigval}_i(U^\top \Lambda_2 U)\;\mathrm{eigval}_i(\Lambda_1^2) + a_d \mathrm{Tr}(U^\top \Lambda_2 U \Lambda_1^2). $$ For the trace term to be maximized it must hold that $U^2=I$, and these choices of $U$ attain the equality here. Therefore, they are the only optimas.