# Inequality regarding diagonal entries and eigenvalues of a PSD matrix

I want to show the following inequality regarding schur's majorization theorem $$\overset{n}{\underset{i = 1}{\sum}}a_i\lambda_i\leq \overset{k}{\underset{i = 1}{\sum}}\lambda_i,$$ where $$\lambda_1\geq \lambda_2 \geq \dots \geq \lambda_n =0,~ 0\leq a_i\leq 1$$ and $$\overset{n}{\underset{i = 1}{\sum}}a_i =k$$.

Any help will be appreciated.

Extra information: here $$a_i (i =1\dots n)$$ are diagonal entries of some real symmetric matrix whose eigenvalues are $$1$$ (with multiplicity $$k$$) and $$0$$ (with multiplicity $$n-k$$).

$$\sum_{i=1}^na_i\lambda_i-\sum_{i=1}^k\lambda_i=\sum_{i=1}^k(a_i-1)\lambda_i+\sum_{k+1}^na_i\lambda_i\le\sum_{i=1}^k(a_i-1)\lambda_k+\sum_{k+1}^na_i\lambda_k=\lambda_k\left(\sum_{i=1}^na_i-k\right)=0\;.$$
• Thanks @joriki, it completely make sense to me. I also got a reasoning; since each $a_i \leq 1$ and their sum is $k$, so we can take maximum upper bound $1$ for any $k$ $a_i$'s. Dec 13, 2019 at 8:09