I use Mathematica to solve problems. I have a question about matrix inverse.

if I want only one element of the inverse matrix, does there exist a faster algorithm than using Inverse to calculate the whole inverse matrix and extract the element which I want?

  • $\begingroup$ This paper's abstract says they can calculate they diagonal of the inverse matrix in $\mathcal{O}(n^{\frac{3}{2}})$, but I don't know whether there's something for an arbitrary entry. $\endgroup$
    – G. Bach
    Oct 17 '13 at 11:37
  • $\begingroup$ The underlying issue here may be about Mathematics more than Computer Science. $\endgroup$ Oct 17 '13 at 11:38
  • 1
    $\begingroup$ Here is something on more than just the diagonal for sparse matrices, and here is something on a parallel algorithm for structured sparse matrices. $\endgroup$
    – G. Bach
    Oct 17 '13 at 11:42
  • $\begingroup$ @G.Bach thank you for your information $\endgroup$
    – user15964
    Oct 17 '13 at 12:42
  • 2
    $\begingroup$ @G.Bach Many of my answers are like that. Using google effectively is non-trivial. If the information is useful, then it answers the question. $\endgroup$ Oct 18 '13 at 2:29

I have not seen exactly this in Mathematica but I think being able to solve an equation set for only one unknown may be supported.

The direct way would be of course to implement the inverse matrix algorithms and have them stop when the particular element is determined. It would probably be interesting to see what optimizations you can have for each algorithm if the goal is to get one element only.

But according to the first paragraph, one idea could be to express your matrix inverse as unknowns in equation system and then try solving only for the unknown you need (since solving equation set for a single unknown should be supported). If you get better memory and CPU performance then it may be safe to say that Mathematica did not actually solve the whole equation but just did its optimizations to determine only your unknown. You may get worse performance of course since you are not using inverse algorithms directly. If you decide to try let us know if it worked!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.