I have come across this question in my research:
Let $X$ and $Y$ be symmetric $2 \times 2$ matrices. Suppose that tr$(XY)>0$ for all positive-definite $X$. Then is it true that $Y$ is always positive-definite?
The question Product of positive-definite matrices has positive trace deals with the (sort of) reverse implication, but doesn't appear to help all that much.
I've tried a few things, beginning with assuming Y is not positive-definite, and trying to get a contradiction. We can simultaneously diagonalise $X$ and $Y$ (since $X$ is pos-def, and $Y$ symmetric), i.e. there is a nonsingular $B$ such that $B^TXB=I$, and $B^tYB = D$, where $D$ is diagonal. Note that $B$ is not necessarily orthogonal. Since trace is invariant under similarity transformations, we know tr$(XY) = $ tr$(B^{-1}XYB)=$ tr$(B^{-1}XBB^{-1}YB)$, but this doesn't help us since $B$ is not orthogonal.
It seems like the claim should be true, so I think I'm overlooking something obvious. Any ideas would be helpful, thanks.
The best you can get is that $Y$ is positive-semidefinite and not zero. That is, if $Y$ is positive-semidefinite, then $\operatorname{Tr}(XY)>0$ for all positive-definite $X$. Indeed, since $Y$ is symmetric, it is orthogonal-diagonalizable. That is, $Y=UDU^T$ with $U$ orthogonal. If $Y\ne0$, then there exists $k$ with $D_{kk}>0$. Then \begin{align*} \operatorname{Tr}(XY) &=\operatorname{Tr}(XUDU^T)=\operatorname{Tr}(U^TXU\,D) =\sum_j D_{jj}\,(U^TXU)_{jj}\geq D_{kk}\,(U^TXU)_{kk}>0, \end{align*} where we use that $X$ is positive-definite, so is $U^TXU$, and $(U^TXU)_{jj}=e_j^T(U^TXU)e_j>0$ for all $j$.
To prove that if $\operatorname{Tr}(XY)>0$ for all positive-definite $X$ then $Y$ is positive-semidefinite and nonzero, suppose that $Y$ is not positive-semidefinite. This means that there exists $j$ with $D_{jj}<0$. Now let $X$ be the diagonal matrix with diagonal $$ (1,\ldots,1,-\frac{\sum_{k\ne j}D_{kk}}{D_{jj}}+1,1,\ldots,1), $$ where the distinct entry is in the $j^{\rm th}$ position. Then $X$ is positive-definite and $$ \operatorname{Tr}(UXU^TY)=\operatorname{Tr}(XD)=\sum_{j\ne k}D_{kk}-\sum_{k\ne j}D_{kk}+D_{jj}=D_{jj}<0. $$