Group Abstract Group Abstract

Message Boards Message Boards

0
|
1.3K Views
|
5 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Unexpected output from matrix inversion

Posted 4 months ago

Hi,
I hope you are all doing well. I am trying to find the inverse of this matrix, but as you can see, it is giving me problems, and these values are definitely not correct. I tried both PseudoInverse and Inverse but they gave me the same results, If any of you have an idea where the problem may come from it will help me a lot. Thank you all in advance.

POSTED BY: Leo Murphy
5 Replies
Posted 4 months ago
POSTED BY: Sangdon Lee
Posted 4 months ago

Thank you for your informative response Like you said, even in this case, using Least Squares and LinearSolve didn't help solve the problem. I tried Tikhonov regularization

alpha = 10^(-6);
Ainv = Inverse[matrice + alpha IdentityMatrix[Length[matrice]]];

It seems to give better results, but it's still not as precise as I wanted

POSTED BY: Leo Murphy
POSTED BY: Daniel Lichtblau
Posted 4 months ago

Yes there are no warnings or errors but the values of the inverted matrix are definitely incorrect (10^6, 10^8......)

POSTED BY: Leo Murphy

I'm with Daniel. The following check returns zero, which is hard to improve upon: Norm[Inverse[matrice].matrice-IdentityMatrix[Length@matrice]]. If matrice has an eigenvalue with a modulus as small as $10^{-8}$, the inverse will have one as large as $10^8$. And the inverse will have to have some entries of a similar order of magnitude.

The following visualizes the magnitudes of the eigenvalues:

ListLogPlot[Abs[Eigenvalues[matrice]]]

If the small eigenvalues are the result of roundoff and are supposed to be zero, then the matrix is not invertible. If you want the pseudoinverse, then increase the Tolerance to a level you find acceptable.

PseudoInverse[matrice, Tolerance -> 1/1000]

You can use SingularValueList[matrice] and SingularValueList[matrice, Tolerance -> 1/1000] to examine what is discarded.

POSTED BY: Michael Rogers
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard