- #1
nenyan
- 67
- 0
- TL;DR Summary
- different methods give different results. They are not consistent.
Summary: different methods give different results. They are not consistent.
Summary: different methods give different results. They are not consistent.
I use two different methods to detect whether a matrix is singular. The result of calculating the determinant of a 9-order square matrix is far greater than zero. The result of calculating the rank of the same square matrix is 8. Why are the results inconsistent?
the result:
(9, 9)
2.3274769078093922e+52
8
the attached is one of those matrixes. There are hundreds of them.
Summary: different methods give different results. They are not consistent.
I use two different methods to detect whether a matrix is singular. The result of calculating the determinant of a 9-order square matrix is far greater than zero. The result of calculating the rank of the same square matrix is 8. Why are the results inconsistent?
singularity:
import numpy as np
from numpy.linalg import inv
a = np.loadtxt('data/d0.txt')
print(a.shape)
print(np.linalg.det(a))
print(np.linalg.matrix_rank(a))
(9, 9)
2.3274769078093922e+52
8
the attached is one of those matrixes. There are hundreds of them.
Attachments
Last edited: