Why is $Tr(AP)=\sum^p_{j=1}\lambda_j(e_je_j^TBB^T)?$

20 Views Asked by At

Let $P$ be a $p\times p$ orthogonal projection matrix, $A$ be a $p\times p$ symmetric matrix.

I've been going through a solution to an exercise in my book, and I was confused as to why would $$Tr(AP)=\sum^p_{j=1}\lambda_j(e_je_j^TBB^T)?$$

I know the spectral decomposition of $A$ is $A=E\Lambda E^T$, but I can't seem to see why is $Tr(AP)=Tr(E\Lambda E^TBB^T)=\sum^p_{j=1}\lambda_j(e_je_j^TBB^T)?$

If anyone could help me understand or show how that result is derived, I would be very happy.