Petrie matrices and generalized inverses