Thanks for your suggestion, Chuck. The equation arises in the substraction of two harmonic potentials V and V':<br>V' = 1/2 x^t  * A^(-1)  * x<br>V= 1/2 x^t  * B^(-1) * x<br>V'-V = 1/2 x^t * ( A^(-1) - B^(-1) ) * x = 1/2 x^t  * Z^(-1) * x<br>


<br>A is the covariance matrix of the coordinates x in a molecular dynamics simulation, A = <x * x^t >. Same goes for B.<br><br>-Jose<br><br><div class="gmail_quote">On Fri, Sep 10, 2010 at 5:02 PM, Charles R Harris <span dir="ltr"><<a href="mailto:charlesr.harris@gmail.com">charlesr.harris@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><br><div class="gmail_quote"><div><div></div><div class="h5">On Fri, Sep 10, 2010 at 2:39 PM, Jose Borreguero <span dir="ltr"><<a href="mailto:borreguero@gmail.com" target="_blank">borreguero@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear Numpy users,<br><br>I have to solve for Z in the following equation Z^(-1) = A^(-1) - B^(-1),<br>where A and B are covariance matrices with zero determinant.<br><br>I have never used pseudoinverse matrixes, could anybody please point to me any cautions I have to take when solving this equation for Z? The brute force approach linalg.pinv( linalg.pinv(A) - lingal.pinv(B) ) gives me a matrix with all entries equal to 'infinity'.<br>


<font color="#888888">

<br></font></blockquote></div></div><div><br>Similar sorts of equations turn up in Kalman filters. You can also try tricks like  Z = B * (B - A)^-1 * A . Where does this problem come from? There might be a better formulation.<br>

<br>
Chuck<br></div><br></div>
<br>_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
<br></blockquote></div><br>