Looking at the following optimization problem $\min_{A \in S_{++}} \operatorname{tr}(MA)- \log(|A|)$ where $S_{++}$ denotes the space of positive definite matrices and $|\cdot|$ denotes the determimant, we assume usually that $M$ is positive definite. It is easy to show that the solution then is $A=M^{-1}$. This problem is motivated by finding the maximum likelihood estimator for the covariance matrix of the multivariate normal.
Now my question is: does it also have a solution for when $M$ is indefinite or even negative definite?? As an intuative answer I d say we could take the generalized inverse with the nonpositive Eigenvalues thresholded to zero. But might be totally wrong here.