# Positive-semidefiniteness of certain matrix

I have the following (real) matrix which I need to be positive-semidefinite,

$P = \begin{bmatrix} P_1 & -\frac{1}{2}(P_1+P_2)\\-\frac{1}{2}(P_1+P_2) & P_2\end{bmatrix} \succeq 0$,

where $P_1, P_2 \in \mathbb{R}^{n\times n}$ and $P_1, P_2 \succeq 0$.

I think this is only the case when, $P_1 = P_2$, but I couldn't find a way to prove this (only for the case where $n=1$, through the eigenvalues). I was therefore wondering if this is even the case and if so how to prove this.

(I already asked this question before but forgot to mention that $P_1$ and $P_2$ are matrices instead of scalars).

Let $\mathbf x=\pmatrix{u+v\\ v}$. Then $\mathbf x^TP\mathbf x=u^TP_1u+u^T(P_1-P_2)v$.

If $P$ is positive semidefinite, $u^T(P_1-P_2)v$ must be zero for any $u$ and $v$ (otherwise we may scale $v$ by a large signed factor to make $\mathbf x^TP\mathbf x$ negative). Hence $P_1=P_2$.

Conversely, if $P_1=P_2$, then $\mathbf x^TP\mathbf x=u^TP_1u\ge0$ and hence $P$ is positive semidefinite.

• I was trying to glean something myself from $(u; v)P(u; v)$, but didn't find the direction that you took. Well done, as always – Omnomnomnom Apr 13 '18 at 17:27

For now, let us consider the case where $P_1$ is strictly positive definite (so that it is invertible). We compute the congruent matrix $$\pmatrix{P_1^{-1/2}\\&P_1^{-1/2}} \pmatrix{P_1 & -\frac{1}{2}(P_1+P_2)\\-\frac{1}{2}(P_1+P_2) & P_2} \pmatrix{P_1^{-1/2}\\&P_1^{-1/2}} = \\ \pmatrix{I & -\frac{1}{2}(I+P_1^{-1/2}P_2P_1^{-1/2})\\-\frac{1}{2}(I+P_1^{-1/2}P_2P_1^{-1/2}) & P_1^{-1/2}P_2P_1^{-1/2}}$$ Let $M = P_1^{-1/2}P_2P_1^{-1/2}$, noting that $M$ is positive semidefinite whenever $P_2$ is positive semidefinite. That is, we are now considering the matrix $$\pmatrix{I & -\frac{1}{2}(I+M)\\-\frac{1}{2}(I+M) & M}$$ We compute the Schur complement $$M - \frac{1}{2}(I+M)\cdot I^{-1} \cdot \frac{1}{2}(I+M) =\\ M - \frac 14(M^2 + 2M + I) =\\ -\frac 14(M^2 - 2M + I) =\\ -\frac 14(M - I)^2$$ Notably, this matrix fails to be positive definite except in the case of $M = I$. However, having $M = I$ means that $P_1^{-1/2}P_2P_1^{-1/2} = I$, which means that $P_1 = P_2$. That is, we reach the conclusion you expected: $P$ fails to be positive semidefinite except in the case where $P_1 = P_2$.

I'm not quite sure how to extend this to the case where both $P_1$ and $P_2$ fail to be invertible.

• I assume, by the way, that the matrices $P_i$ are symmetric in addition to being positive semidefinite. – Omnomnomnom Apr 13 '18 at 12:22