# Avoid "Badly conditioned matrix...contain significant error" message?

Posted 5 months ago
1008 Views
|
5 Replies
|
0 Total Likes
|
 Hi,I have a matrix representing more than one physical properties and hence a vast difference b/w numerical values of the elements, say from 10^12 - 10^-9. I get the o/p when I do any matrix operation on the matrix but with a error message "Result for Inverse of badly conditioned matrix ..... may contain significant error". Perhaps, this "error identification" is also effecting the processing speed of Mathematica as well.How can I get rid of this error message, and tell Mathematica that everything is normal in these numbers. Could there be a better way to deal with such matrices with large difference in numbers to improve the accuracy, specially during calculating inverse of them. Will appreciate any help.thanksSG
5 Replies
Sort By:
Posted 5 months ago
 Try changing the matrix values to infinite precision using Rationalize
Posted 5 months ago
 I tried using Rationalize[Inverse[Matrix]], but it did not work. Perhaps I am missing something. Can you please elaborate further. Following is the simplified example of my matrix, and I am facing problem while calculating its inverse E= {{0.768576, -2.62804*10^-11}, {2.44999*10^8, 0.369943}}; thanks once again.
Posted 5 months ago
 In[5]:= m = {{0.768576, -2.62804*10^-11}, {2.44999*10^8, 0.369943}} Out[5]= {{0.768576, -2.62804*10^-11}, {2.44999*10^8, 0.369943}} In[6]:= mr = Rationalize[m, 10^-16] Out[6]= {{12009/15625, -(1/38051171215)}, {244999000, 369943/1000000}} In[7]:= mrinv = Inverse[mr] Out[7]= {{43989888852471078125/34575194689676811341, 3125000000/ 34575194689676811341}, {-(29132809051574328125000000000/ 34575194689676811341), 91391303024187000000/34575194689676811341}} In[8]:= minv = N @ mrinv Out[8]= {{1.2723, 9.03827*10^-11}, {-8.42593*10^8, 2.64326}} In[9]:= m.minv Out[9]= {{1., 9.12871*10^-23}, {0., 1.}}