# Positive definiteness similarity and matrix product

Let X be a n x n diagonal matrix with positive diagonal entries and Y a n x n real matrix with a diagonal of 1's and nonnegative off-diagonal elements. Can we find conditions on Y such that < XYv,v > is positive for all nonzero vector v?

In Ballantine's paper, I see that a real square matrix M is similar to the product of two symmetric positive definite matrices if and only if M is similar to a symmetric positive definite matrix.

So here, X being symmetric positive definite, can we say that < XYv,v > is positive for all nonzero vector v if and only if Y is similar to a symmetric positive definite matrix?

Thank you very much.

In your case you want the matrix product $XY$ to be positive semi-definite so that $<XYv,v> \geq 0$ for all nonzero vectors $v$. Now, this is possible if and only if $Y$ positive semi-definite. This follows easily from the fact that when you multiply any matrix $Y$ by a diagonal matrix $X$, then you are essentially scaling the eigenvalues of $Y$ by the diagonal entries of $X$ respectively.In your case which are positive. So, your answer is YES.
$XY$ is positive semi-definite if and only if $Y$ is positive semi-definite, given $X$ is a square positive diagonal matrix.
You can now further analyse what it means for $Y$ to be positive semi-definite. If $Y$ has all diagonal entries equal to one and off diagonal entries non-negative then you can use the Gershgorin circle theorem to put a bound on the off-diagonal entries so that $Y$ is positive semi-definite.