I'm solving problems about eigenvalues and Rayleigh quotients. I tried to prove this fact for 3 hours, but I am stuck and cannot go through after just change the variable X $\in R^{n\times k}$ to Z$ \in R^{n\times k} $ $Z :=U^TX$ where A has spectral decomposition of $A=U\Lambda U^T$
Here is the problem.
Let $ \lambda_1\geq\lambda_2\geq\cdots\geq\lambda_n$ be eigenvalues of a symmetric matrix $A\in R^{n\times n} $ in descenting order. For $k\leq n$, show that $$\sum_{i=1}^{k} \lambda_i = \max_{x_1, x_2, ..., x_k \in R^n: ||x_i||=1 \forall i, x_i^Tx_j=0 \forall i\neq j} \sum_{i=1}^k x_i^TAx_i = \max_{X\in R^{n\times k}:X^TX=I_k} trace (X^TAX)$$
Hint: Use the fact that $0\leq [XX^T]_{ii} \leq 1$ for any $X\in R^{n\times k}$ such that $X^TX=I_k$