Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is $\operatorname{Tr}(X^TAX)-\operatorname{Tr}(X^TBX)$ equal to $\operatorname{Tr}(X^TCX)$, where $C=A-B$ and $A$, $B$, $X$ have real entries and also $A$ and $B$ are p.s.d.

share|cite|improve this question
up vote 1 down vote accepted

Yes, as $$X^t(A-B)X=X^t(AX-BX)=X^tAX-X^tBX,$$ using associativity and distributivity of product with respect to the addition. The fact that the matrices $A$ and $B$ are p.s.d. is not needed here.

share|cite|improve this answer

Well, we know that for square matrices $A$ and $B$, $\mathrm{tr}(A)+\mathrm{tr}(B)=\mathrm{tr}(A+B)$. Thus, in your case, what is left to check is whether $X^{T}CX=X^{T}AX-X^{T}BX$. We have:


share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.