How to improve the 3 x 3 matrix before Inverse

In summary, the issue is that the rows of the matrix are almost identical, causing numerical errors when trying to invert it. The solutions suggested are to either use higher precision numbers or to adjust the problem setup to avoid the near-identical rows.
  • #1
kaizen.moto
98
0
Dear all,

After solving the inverse of 3 x 3 matrix, I got a warning which says 'badly inverse conditioned matrix, the result may contain significant numerical errors'.
My question is that how to treat or improve such matrix so that this warning can be eliminated.

For example: the inverse of 3 x 3 matrix:

Inverse[
{1.74923*10^23, 1.14055*10^21, -4.43947*10^22},
{6.89225*10^23, 4.49395*10^21, -1.74923*10^23},
{4.49395*10^21, 2.93024*10^19, -1.14055*10^21}
]

Please let me know if there is a treatment to the matrix before the inverse can be executed.

Thanks for any feedback
 
Physics news on Phys.org
  • #2
kaizen.moto said:
Dear all,

After solving the inverse of 3 x 3 matrix, I got a warning which says 'badly inverse conditioned matrix, the result may contain significant numerical errors'.
My question is that how to treat or improve such matrix so that this warning can be eliminated.

For example: the inverse of 3 x 3 matrix:

Inverse[
{1.74923*10^23, 1.14055*10^21, -4.43947*10^22},
{6.89225*10^23, 4.49395*10^21, -1.74923*10^23},
{4.49395*10^21, 2.93024*10^19, -1.14055*10^21}
]

Please let me know if there is a treatment to the matrix before the inverse can be executed.

Thanks for any feedback
The problem is that your rows (or equivalently your columns) are all very nearly mutiples of one another. This can be seen by normalizing the rows:

Code:
In[21]:= (m1={
{1.74923*10^23,1.14055*10^21,-4.43947*10^22},{6.89225*10^23,4.49395*10^21,-1.74923*10^23},{4.49395*10^21,2.93024*10^19,-1.14055*10^21}
})//MatrixForm
Out[21]//MatrixForm= (
1.74923*10^23	1.14055*10^21	-4.43947*10^22
6.89225*10^23	4.49395*10^21	-1.74923*10^23
4.49395*10^21	2.93024*10^19	-1.14055*10^21
)
In[23]:= Normalize/@m1//MatrixForm
Out[23]//MatrixForm= (
0.969251	0.00631981	-0.245992
0.969251	0.0063198	-0.245993
0.969251	0.00631992	-0.245993
)
You see they become almost identical. At this point, if all you have is finite precision numbers with the significant digits shown, there is nothing you can do about this. Most of the information needed to invert the matrix is in the last few bits of the numbers. The only way to fix it is to use higher precision.

Alternatively, and probably better, you should look at the original source of these vectors, try to figure out why they're all pointing in almost exactly the same direction, and find a different way of setting the problem up so that the differences come to the fore.
 
  • #3
Thank you so much for your response.
I got it. It works perfectly with your first suggestion.
Fantastic advice.
 

FAQ: How to improve the 3 x 3 matrix before Inverse

How can I increase the accuracy of the 3 x 3 matrix before taking the inverse?

One way to improve the accuracy of the 3 x 3 matrix before taking the inverse is to use a higher precision data type, such as double or long double, for the matrix elements. This can help minimize round-off errors and improve the overall accuracy of the matrix calculation.

Are there any specific techniques or algorithms that can help improve the 3 x 3 matrix before taking the inverse?

Yes, there are several techniques and algorithms that can be used to improve the 3 x 3 matrix before taking the inverse. Some common ones include pivoting, Gaussian elimination, and LU decomposition. These techniques help reduce the complexity of the matrix and can improve its accuracy.

Can I improve the 3 x 3 matrix before taking the inverse by adjusting the matrix dimensions?

The dimensions of the matrix itself do not directly affect its accuracy. However, choosing an appropriate matrix size can help minimize computational errors and improve the overall accuracy of the matrix calculation.

How does the condition number of a 3 x 3 matrix affect its accuracy before taking the inverse?

The condition number of a matrix measures its sensitivity to small changes in the input data. A higher condition number indicates that the matrix is more sensitive to these changes, which can lead to less accurate results. Therefore, a lower condition number is desirable for improving the accuracy of a 3 x 3 matrix before taking the inverse.

Are there any specific applications or scenarios where improving the 3 x 3 matrix before taking the inverse is particularly important?

Improving the accuracy of the 3 x 3 matrix before taking the inverse is important in many scientific fields, such as physics, engineering, and statistics. In these fields, matrices are often used to model and solve complex systems, and a small error in the matrix calculation can lead to significant inaccuracies in the final result. Therefore, improving the accuracy of the matrix is crucial for obtaining reliable and precise results.

Back
Top