In finite elements, for example, appears huge sparce (CRS) matrices (matrices with a lot of zeros). It is possible that matlab (or some other program) calculates $det(A)=0$ even though the matrix is invertible?
Is $det(A)=0$ a good indicator to say that a matrix is not invertible?
238 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 3 best solutions below
On
Absolutely.
There’s always round off error, and the numerical stability of algorithms for calculating determinates can be highly unstable.
There are numberical techniques to find inverses for sparse matrices - I don’t know any, but Google will.
On
Computing determinant of a matrix is quite sensitive to round-off. On top of that, it is easy to obtain a zero or infinite determinant as output of computational procedures due to floating precision underflow or overflow.
Consider, e.g., $A_n=0.1\times I_n$, where $I_n$ is the $n\times n$ identity matrix. We have $\det(A_n)=10^{-n}$. If $n$ is large enough (324 for double precision), standard techniques to compute the determinant will report you zero although the matrix $A_n$ itself is perfectly conditioned and invertible.
Conditioning of the matrix is a better measure of "(non)singularity" in numerical computations. It gives you information on what is the sensitivity of the matrix "inversion". This is the usual definition of the condition number. Higher the condition number, more sensitive the solution of $Ax=b$ to the perturbations of the input and to round-off.
On top of that, you know how far is the matrix from the nearest singular matrix. If $\kappa(A)$ is the condition number of a nonsingular $A$ in some suitable norm (usually one of the three popular $p$-norms), we know that there is a $\delta A$ such that $\|\delta A\|/\|A\|=1/\kappa(A)$ is singular. Higher the condition number, closer we are to a singular matrix. Eventually, if $1/\kappa(A)\approx\epsilon$, where $\epsilon$ is the machine precision (e.g., $\approx 10^{-16}$ for the double precision floating point arithmetic), the matrix is considered numerically singular.
The determinant is takes a long time to compute for large matrices. A better way is to look for the smallest singular values of your matrix. If they are 0 or close to machine precision, then it is either not invertible or so poorly conditioned that it probably isn't worth it to invert it. If this is the case, then you can either form a low rank approximation and get an approximate answer or try to reformulate your problem.