I'd like to prove the following for my research, but I don't know how. It's from the paper An Elementary Proof of the Restricted Invertibility Theorem by Daniel A. Spielman and Nikhil Srivastava.
Let's say I have a positive semi-definite matrix $\mathbf{A}\in\mathbb{R}^{n\times n}$ and a (maybe non-symmetric) matrix $\mathbf{L}\in\mathbb{R}^{n\times n}$. Basically, I want to compute some values related to $Tr(\mathbf{L}^T(\mathbf{A}-b\mathbf{I})^{-1}\mathbf{L})$. (It's guaranteed that $(\mathbf{A}-b\mathbf{I})^{-1}$ always exists and it is also positive semi-definite.)
Now, let's say $\mathbf{P}$ is the projection onto the image of $\mathbf{A}$ and $\mathbf{Z}$ is the projection onto its kernel, so that $\mathbf{P} + \mathbf{Z} = \mathbf{I}$. Then how can you prove the following?
$$Tr(\mathbf{L}^T(\mathbf{A}-b\mathbf{I})^{-1}\mathbf{L}) = Tr(\mathbf{L}^T\mathbf{P}(\mathbf{A}-b\mathbf{I})^{-1}\mathbf{P}\mathbf{L}) + Tr(\mathbf{L}^T\mathbf{Z}(\mathbf{A}-b\mathbf{I})^{-1}\mathbf{Z}\mathbf{L})$$
Step 1: note that $P+Z=I$ yields $$ X=PXP+PXZ+ZXP+ZXZ. $$ Apply this to $X:=(A-bI)^{-1}$. Left-multiply by $L^T$, right-multiply by $L$, and take the trace. By linearity of the latter, the equation is equivalent to $$ \mbox{tr} (L^TPXZL)+\mbox{tr} (L^TZXPL)=0. $$ Actually, we will see that both matrices above are zero.
Step 2: since $A$ is symmetric, $\ker A=\ker A^T=(\mbox{im } A)^\perp$. This explains why the projections (=self-adjoint idempotents) $P$ and $Z$ are complementary, i.e. $P+Z=I$. Note that in particular $$ PZ=P(I-P)=P-P^2=(I-P)P=ZP \quad\Rightarrow\quad PZ=ZP=0. $$
Step 3: since $A-bI$ commutes with $A$, so does $X$. Hence $\ker A=\mbox{im } Z$ is invariant under $X$. Thus $ZXZ=XZ$, whence $ZX=(XZ)^T=Z^TX^TZ^T=ZXZ=XZ$. So $X$ commutes with $Z$, and with $P=I-Z$ as well. Therefore $$ L^TPXZL=L^T(PZ)XL=0=L^T(ZP)XL=L^TZXPL $$ which finishes the proof.