Let $X$ be a $n\times K$ full-column rank matrix, with $n>K$. Let $P$ be a symmetric and idempotent matrix of dimension $n\times n$, hence positive semi-definite with eigenvalues equal to 0 or 1 (only $K$ of them are actually equal to 1 in my setting). Define $W$ as a diagonal positive semi-definite matrix of dimension $n\times n$, with elements between 0 and 1. All matrices are real.
What are the conditions for $X'PWX$ to be positive semi-definite? More specifically, I want to be sure that the eigenvalues are non-negative.
This is a quadratic form, $PW$ is positive semi-definite (in the sense that its eigenvalues are non-negative) from the properties of $P$ and $W$, but $PW$ is not necessarily symmetric. First, I am not sure what it the definition of a positive semi-definite matrix that is not symmetric. Also, I have considered using several decompositions but non-symmetry always end up being an issue. I have run simulations to check this condition, and the eigenvalues of $X'PWX$ are always positive, so I figured this should hold more generally. I would be happy to clarify further if needed.