# On what condition $trace(A) \ge trace(AB)$?

Considering $$A$$ and $$B$$ are positive semidefinite real symmetric matrices, on what conditions we can have $$trace(A) \ge trace(AB)$$?

• What exactly is a PSD matrix? – Matt Samuel Jan 20 at 17:49
• Positieve semi-definite – user408856 Jan 20 at 17:52
• Do you know if $A,B$ commute? If they don't the problem is much harder, as $AB$ may not be symmetric. – N. S. Jan 20 at 17:53

## 1 Answer

Under the extra assumption that $$A,B$$ commute: Then $$A,B$$ are orthogonally diagonalizable simultaneously.

Let $$P$$ be an orthogonal matrix, and $$D_1,D_2$$ be diagonal such that $$A=PD_1P^T \\ B=PD_2P^{T}$$

Then $$AB=PD_1D_2P^{T}$$

Therefore, if $$\lambda_1,.., \lambda_n$$ are the eigenvalues of $$A$$ and $$\beta_1,.., \beta_n$$ are the eigenvalues of $$B$$, in any order, there exists a permutation $$\sigma$$ such that $$\tr(AB)=\lambda_1 \beta_{\sigma(1)}+...+\lambda_n \beta_{\sigma(n)}$$

The question you are asking in this case is basically the following

Question Given some non-negative numbers $$\lambda_1,.., \lambda_n$$ and $$\beta_1,.., \beta_n$$, (and a permutation $$\sigma$$ which can actually be ignored by reordering $$\beta$$) under which condition do we have $$\lambda_1 \beta_{\sigma(1)}+...+\lambda_n \beta_{\sigma(n)}\leq \lambda_1+..+\lambda_n ?$$

Note that for any such $$\lambda, \beta$$'s you can take $$A,B$$ to be the diagonal matrix with those numbers on the diagonal for an example/counterexample.

If $$A$$ is not the zero matrix, then the most obvious answer is : all eigenvalues of $$B$$ are $$\leq 1$$.

If $$A,B$$ don't commute, the question seems to be way to complicated.

• Thank you for the nice answer! Unfortunately, A and B don't commute, and I'm going to make more assumptions about their structure, but I think it's better to put it as a new question. – Babak Jan 20 at 18:58
• I changed the problem assumptions as in math.stackexchange.com/questions/3081016/… – Babak Jan 20 at 19:10