# If $P$ is positive definite, are $X^T P X$ and $Y^T P Y$ also positive definite?

Let $P\in\Re^{r\times r}$ be a symmetric positive definite matrix; i.e. $P=P^T\succ 0$. Also, let $X\in\Re^{r\times m}$ and $Y\in\Re^{r\times n}$ be two matrices such that $\mathrm{rank}(X)=r$ and $\mathrm{rank}(Y)=r$ with $r\leq m\leq n$. My question is about the positive definiteness (or positive semi-definiteness) of the following two products:

• $Y^TPY$
• $X^TPX$

Can we say anything about the positive (semi-)definiteness about these products? As far as I tried with several numerical examples, we should be able say that they are indeed semidefinite.

Yes, both are positive-semidefinite (definite if $r=m,n$).
This follows straight from the definition: for any vector $v$, $$v^TY^TPYv = (Yv)^TP(Yv) \geq 0$$ since $P$ is positive-definite. $Y^TPY$ is positive-definite whenever $Y$ has full column rank, since in that case $v\neq \mathbf{0} \Rightarrow Yv\neq \mathbf{0}\Rightarrow v^T(Y^TPY)v > 0$.