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.