I am trying to find the minimum
$\underset{K}{\operatorname{arg min}} [tr(KDK^TA)-tr(K^TA)]$
where $K$ is an idempotent matrix, $D$ a diagonal matrix and $A$ a positive semidefinite matrix ($K, D, A \in \mathbb{R^{n×n}}$). I know that this problem is similar to an eigenvalue problem and one could look at the Rayleigh coefficient. However, in the second term one $K$ is missing and there is additionally a positive semidefinite matrix $A$ involved. I'm guessing that $K$ has to be a selection matrix $S(d_{ii}<1)$, so that
$\underset{S}{\operatorname{arg min}} [tr(SDSA)-tr(SA)=tr(S(d_{ii}<1)DA)-tr(S(d_{ii}<1)A)=\sum_{d_{ii}<1} (d_{ii}-1)a_{ii}] . $
However, I'm not able to prove that $K$ has to be diagonal in order to be a minimum. Any help would be greatly appreciated!
Additional thoughts after two days of reflection:
Since $A$ is positive semidefinite the square root $A^{1/2}$ exists. So, the original problem can be stated as:
$\underset{K}{\operatorname{arg min}} [tr(A^{1/2}KDK^TA^{1/2})-tr(A^{1/2}K^TA^{1/2})]$
Hence, we see that the problem is completely symmetric up to $K$. So my idea: if the problem is symmetric, there is no possibility to favorize $K$ against $K^T$ and, thus, $K$ must be symmetric. Knowing that $K$ is symmetric, the problem can be modified to:
$\underset{K}{\operatorname{arg min}} [tr(KDK^TA)-tr(KIK^TA)=tr((K(D-I)K^T)A)]$
Since $A$ is positive semidefinite it may also be decomposed to $V^TV$ such that
$\underset{K}{\operatorname{arg min}} [tr(VK(D-I)K^TV^T)]$
Consequently, if $K$ is an identity matrix, $V$ denotes the inverse of the generalized eigenvectors of both matrices involved. So, the problem can be expressed through the Rayleigh coefficient:
$\underset{K}{\operatorname{arg min}} [tr(KDK^T)/tr(KIK^T)]$
Since the min-max theorem states that $V$ corresponds to the "rotation" where the eigenvalues $D$ have extremal values, $K$ would destroy this extremity if it would not be diagonal. Thus, in order to give $K=S$ the possibility to select among the extremal values, $K$ must be diagonal. Finally, since an idempotent matrix may only have singular values of 0 and 1, $K$ must be the selection matrix as posed at the beginning.
I'm no mathematician, so my question to anyone who knows more about linear algebra: does this 'proof' sound legit?