Construct example - $A$ and $B$ have strictly positive eigenvalues, but $A+B$ and $AB$ have strictly negative eigenvalues.

As a follow-up to this question I asked, I wondered what would happen if I imposed the weaker condition of having positive eigenvalues, rather than being positive definite.

How do I construct an example of two matrices $A$ and $B$ such that:

1) $A$ and $B$ have strictly positive eigenvalues.
2) $A + B$ has strictly negative eigenvalues (is this even possible?).
3) $AB$ has strictly negative eigenvalues.

Generally, I'm unsure how to begin going about constructing an example of a matrix that satisfies these properties.

• What do you know about the trace of a matrix? Mar 13 '18 at 18:21
• Sum of elements on the main diagonal?
– Thev
Mar 13 '18 at 18:22
• Yes, but it's also the sum of the eigenvalues. Mar 13 '18 at 18:22
• Okay, I see that, but I'm not sure how to use it for this purpose.
– Thev
Mar 13 '18 at 18:24
• $tr(A+B)=tr(A)+tr(B),$ so 1) and 2) can't both hold. Mar 13 '18 at 18:25

The trace of a matrix is the sum of its eigenvalues. Also, $$\mathrm{tr}(A+B) = \mathrm{tr}(A)+\mathrm{tr}(B).$$ If $A$ and $B$ have strictly positive eigenvalues, then $$\mathrm{tr}(A),\mathrm{tr}(B)>0\implies \mathrm{tr}(A+B)>0,$$ so it is not the case that $A+B$ has negative eigenvalues.

For a case where $A,B$ have only positive eigenvalues and $AB$ has only negative eigenvalues, take $$A=\pmatrix{1&0\\0&4}, B=\pmatrix{4&-3\\3&-2}$$ The eigenvalues of $A$ are obviously $1$ and $4$, both eigenvalues of $B$ are $1$, and both eigenvalues of $AB$ are $-2.$ I constructed this just by messing around with the characteristic polynomials. I don't have any insight into the problem at all.

• Sum, not product. Mar 13 '18 at 18:37
• *sum of eigenvalues, and in your first line of working, I think you meant tr(A+B).
– Thev
Mar 13 '18 at 18:37
• @RobertIsrael Yes, that's what I meant. Thanks. Mar 13 '18 at 18:41
• @TheveshTheva Thanks. I'm not sure if I'm worse at typing, or at proofreading. Mar 13 '18 at 18:42
• Well, it's no issue, since you pointed me in the right direction to begin with! Do you have any pointers on case (3), comparing A and B to AB?
– Thev
Mar 13 '18 at 18:44

if $A$ and $B$ are symmetric and strictly positive definit, you can not have neither $A+B$ nor $AB$ to be negative definite

• Yep, I agree with that. Does that still hold true if $A$ and $B$ have positive eigenvalues, but are not necessarily symmetric or positive definite?
– Thev
Mar 13 '18 at 18:21

For an example where $A$ and $B$ have all positive eigenvalues while $AB$ has all negative eigenvalues, consider $$A = \pmatrix{10 & 8\cr -9 & -7\cr},\ B = \pmatrix{1 & 0\cr 0 & 2\cr}$$ $A$ and $B$ both have eigenvalues $1$ and $2$, while $AB$ has a double eigenvalue $-2$.

• Brilliant - could I ask how you constructed this example?
– Thev
Mar 13 '18 at 19:08
• A little optimization and experimentation. Mar 13 '18 at 22:26