Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: finding specific elements of inverse matrix
Replies: 2   Last Post: Nov 13, 2012 3:17 PM

 Messages: [ Previous | Next ]
 James Tursa Posts: 2,326 Registered: 8/5/09
Re: finding specific elements of inverse matrix
Posted: Nov 13, 2012 3:17 PM

"Nick" wrote in message <k7ss7j\$h04\$1@newscl01ah.mathworks.com>...
> I have a large sparse (symmetric positive definite) NxN matrix A, I would like to compute a few select elements of inv(A) without computing the full inverse.
>
> Obviously we can compute the ith column of inv(A) with the backslash operator which is a much better solution than forming inv(A) explicitly:
> ei = zeros(N,1);
> e(i) = 1;
> ans = A \ e;
>
> I can extract the jth element of that to get inv(A)(j,i)
>
> My question is this: can I extract element (i,j) of the inverse without needing to compute the full column i?
>
> In matrix notation, I am trying to compute this rapidly:
> ej' * inv(A) * ei
> (where ej = zeros(N,1); ej(j) = 1;)

I don't know how rapid the calculation will be, but you can use cofactors and the matrix determinant to calculate individual inv(A) elements without computing the entire matrix inverse. E.g., see this and scroll down to the inverse discussion:

http://en.wikipedia.org/wiki/Cofactor_%28linear_algebra%29

That being said, even if this does turn out to be fast enough for you I would expect the accuracy of the result to suffer. Determinant based solutions like this (e.g., Cramer's Rule) are notorious for being inaccurate.

James Tursa

Date Subject Author
11/13/12 NIcholas
11/13/12 Torsten
11/13/12 James Tursa