Hello linear algebra experts. In my research I'd like to solve (or approximate) for B, in the form
$ A = GBG $
where A and B are symmetric, square matrices and G is a symmetric, square, singular projection matrix ($G^2 = G$). A is also singular. I've done a bit of research on pseudo and generalized inverses. However, since G is a projection matrix, the Moore-Penrose and Drazin inverses trivially imply $G = G^+$. In my case, $G^+AG^+ = B$ is empirically false for these generalized inverses.
Here's a reproducible example coded up in R.
require(Matrix) B <- matrix(seq(.01, .25, length.out=25), 5) B <- B + t(B) diag(B) <- 1 G <- diag(5) - matrix(rep(1,25), 5)/5 A <- G %*% B %*% G Gpi <- ginv(G) Gpi %*% A %*% Gpi # this == A, not B Gpi %*% Gpi # == Gpi, not the Identity
From what I understand, the identity matrix is the only projection matrix that is invertible. So the question: is there any pseudo-inverse that can approximate the inverse in this setting? In a least-squares setting perhaps? Or perhaps there's no way to recover the lost 'dimension' by performing the singular projection...