I am a computer science student. But I start writing here because my problem is not code related. It is purely computational related.

I am trying to calculated inverse of a large (e.g., $2000 \times 2000$) square matrix. This matrix is band diagonal matrix.

The non zero elements are very small numbers (e.g: $1--6$). They never exceed 6.

Now when I invert this matrix the result of inversion are all same number displayed.


9.711E013  9.711E013  9.711E013  9.711E013....................
9.711E013  9.711E013  9.711E013  9.711E013......................

9.711E013  9.711E013  9.711E013  9.711E013.....................

 9.711E013  9.711E013  9.711E013  9.711E013

My question is that why this type of output I get? What is the mathematical reason behind this?

  • 1
    $\begingroup$ what are you using to invert it? Matlab, for example, should be easily inverting this. $\endgroup$ – dezdichado Aug 4 '18 at 20:28
  • $\begingroup$ I am using universal java matrix package for matrix inversion. I write down this code in java. $\endgroup$ – Encipher Aug 4 '18 at 21:36
  • $\begingroup$ You should post your code, I don't think we have enough information to see what's going wrong. $\endgroup$ – littleO Aug 5 '18 at 2:26
  • $\begingroup$ math.stackexchange.com/questions/2872771/… Please go through this link. $\endgroup$ – Encipher Aug 5 '18 at 9:23

EDITED: thanks to comment of copper.hat.

The mathematical/numerical reason is that the condition number defined as $$ \varkappa(A) = \frac{\sigma_{\max}(A)}{\sigma_{\min}(A)} $$ is too large, say of order $10^{10}$ or even more. $\sigma_{\min, \max}(A)$ is the minimal and maximal singular values of matrix $A$.

The case of small determinant is a particular case and in some cases implied from the argument above.

  • $\begingroup$ This doesn't explain why all the entries in the output are the same, though. $\endgroup$ – littleO Aug 4 '18 at 20:56
  • $\begingroup$ My guess would be that this number is the “infinity” of used software. $\endgroup$ – pointguard0 Aug 4 '18 at 21:00
  • $\begingroup$ I used intellj idea to write down java code and use universal java matrix package to invert this matrix. $\endgroup$ – Encipher Aug 4 '18 at 21:38
  • 2
    $\begingroup$ A small determinant does not necessarily translate into ill conditioned. Generally the issue is because the condition number is large, which is related to the singular values, not the eigenvalues. $\endgroup$ – copper.hat Aug 4 '18 at 22:08
  • $\begingroup$ math.stackexchange.com/questions/2872771/… Please go through this link where I explain my code. $\endgroup$ – Encipher Aug 5 '18 at 9:23

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.