# Positive semi-definiteness of block matrix when diagonal blocks are not invertible

Let
$$M=\left[\begin{array}{cc} A & B\\ B^{T} & D \end{array}\right]$$ where $$A$$ and $$D$$ are not invertible, but both are positive semi-definite, e.g., consider the case where $$A=\left[\begin{array}{cc} a & -a\\ -a & a \end{array}\right]$$, $$B=\left[\begin{array}{cc} b_{1} & b_{2}\\ b_{2} & b_{1} \end{array}\right]$$, and $$D=\left[\begin{array}{cc} 0 & 0\\ 0 & 0 \end{array}\right]$$; $$a,b_1$$ and $$b_2$$ are real numbers.

Are there conditions such that $$M$$ is positive semi-definite? I read that if $$D$$ is invertible and $$A-BD^{-1}B^T$$ is positive semi-definite then $$M$$ is positive semi-definite (using Schur complements).

I am wondering if there is a way to show positive semi-definiteness when neither $$A$$ nor $$D$$ is invertible; especially, when the matrices $$A$$, $$B$$, and $$D$$ could be written in the form given in the example.

The quadratic form represented by the block matrix is $$q\left((x,y)\right)=x^TAx+2x^TBy+y^TDy$$. In order that it is positive semidefinite, we must have $$\ker(A)\subseteq\ker(B^T)$$ and $$\ker(D)\subseteq\ker(B)$$, i.e. $$B^T(I-A^+A)=0$$ and $$B(I-D^+D)=0$$.
When these two conditions are satisfied, $$q$$ is positive semidefinite if and only if it is positive semidefinite on $$\ker(A)^\perp\times\ker(D)^\perp$$. Since the inverse of $$D$$ on $$\ker(D)^\perp$$ is $$D^+$$, $$q$$ is positive semidefinite if and only if $$A-BD^+B^T\ge0$$.
In summary, $$q\ge0$$ if and only if $$B^T(I-A^+A)=0,\,B(I-D^+D)=0$$ and $$A-BD^+B^T\ge0$$.
It seems the example given cannot be positive semi-definite unless $$a \ge 0$$ and $$b_1=b_2=0$$. Solving for the eigenvalues of $$M$$ using symbolic MATLAB we get
\begin{align*} \lambda_{1} & =b_{1}+b_{2}\\ \lambda_{2} & =a-\sqrt{a^{2}+b_{1}^{2}-2b_{1}b_{2}+b_{2}^{2}}\\ \lambda_{3} & =-b_{1}-b_{2}\\ \lambda_{3} & =a+\sqrt{a^{2}+b_{1}^{2}-2b_{1}b_{2}+b_{2}^{2}} \end{align*} and thus, the conditions $$a \ge 0$$ and $$b_1=b_2=0$$ should hold for all the eigenvalues to be non-negative. If at all possible, I will be happy to learn a way of showing this without solving for the eigenvalues.