Prove inequality involving matrix trace Given a symmetric matrix $S$ and positive definite matrix $B$, with $S,B \in \mathbb{R}^{n \times n}$ can one prove that
\begin{align*}
\text{tr}((S-B)B) \le -\mu(S) \text{tr}(B)
\end{align*}
where $\mu(S) < 0$ is the largest eigenvalue of $S$? And does this hold if $\mu(S) > 0$?
 A: Using the additive and cyclic properties of the trace, we can write
$$
\operatorname{Tr}((S-B)B) = \operatorname{Tr}(SB) -\operatorname{Tr}(B^2) = \operatorname{Tr}(BS) - \operatorname{Tr}(B^2).
$$
Provided the matrix $B$ has all real eigenvalues$-$which is the case here since $B$ is positive definite$-$the trace of $B^2$ is positive. Therefore, we can drop it to get the inequality
$$
\operatorname{Tr}((S-B)B) \leq \operatorname{Tr}(BS).
$$
Now, since $S$ is real symmetric, it has a basis of eigenvectors $\{v_n\}$ with real eigenvalues $\{s_n\}$, and we can compute the trace in this basis as
$$
\operatorname{Tr}(BS) = \sum_n\langle BSv_n,v_n\rangle
=\sum_n\langle Bs_nv_n,v_n\rangle
=\sum_ns_n\langle Bv_n,v_n\rangle.
$$
Letting $\mu(S)$ be the largest eigenvalue $s_n$ of $S$. Then,
$$
\operatorname{Tr}(BS)
=\sum_ns_n\langle Bv_n,v_n\rangle
\leq  \sum_n\mu(s)\langle Bv_n,v_n\rangle
=\mu(s)\sum_n\langle Bv_n,v_n\rangle
=\mu(s)\operatorname{Tr}(B),
$$
and thus,
$$
\operatorname{Tr}((S-B)B) \leq \mu(s)\operatorname{Tr}(B).
$$
If it happens that $\mu(S)<0$, then, using the fact that $\operatorname{Tr}(B)>0$ (since $B$ is positive definite), we have
$$
\operatorname{Tr}((S-B)B) \leq \mu(s)\operatorname{Tr}(B)
=-|\mu(s)|\operatorname{Tr}(B) \leq |\mu(s)|\operatorname{Tr}(B)
=-\mu(s)\operatorname{Tr}(B),
$$
but this trick won't work for $\mu(S)>0$.
A: If $\lambda_\max(S)\le0$, then $S$ is negative semidefinite and $S-B$ is negative definite. Therefore $\operatorname{tr}((S-B)B)<0$. On the other hand, $-\lambda_\max(S)\operatorname{tr}(B)$ is nonnegative. Hence $\operatorname{tr}((S-B)B)<-\lambda_\max(S)\operatorname{tr}(B)$. (Note that strict inequality holds.)
If $\lambda_\max(S)>0$, the inequality $\operatorname{tr}((S-B)B)\le-\lambda_\max(S)\operatorname{tr}(B)$ doesn't hold, as shown in the counterexample where $S=B$.
A: If $\mu(S)>0$ it doesn't necessarily hold.
Taking $S=\begin{pmatrix}100 & 50 \\ 50 & 100\end{pmatrix}$ and $B=\begin{pmatrix}0.1 & 0 \\ 0 & 0.1\end{pmatrix}$, we have that $B$ is a positive definite matrix, $\mu(S)=150>0$, and $tr((S-B)B)\approx20>-30=-\mu(S)tr(B)$.
