Why is det a bad way to check matrix singularity?
Show older comments
Sorry, I can't define "bad" in the question. I've heard this several times and I've never liked determinants and I just finished the book Basic Matrices by C.G. Broyden and he didn't use determinants either. So could someone please clarify? Thank you.
Accepted Answer
More Answers (2)
Steven Lord
on 11 May 2018
A non-zero scalar multiple of the identity matrix is about as far from singular as you can get, right?
A = 0.1*eye(400);
dA = det(A)
cA = cond(A)
dA is 0 because of underflow, which indicates that A is singular. Large condition numbers indicate a nearly singular matrix, and condition numbers must be greater than or equal to 1, so the fact that cA is 1 indicates that A is far from singular.
B = [1 1; 1 1+eps];
dB = det(B)
cB = cond(B)
In this case, dB is small AND cB is large, which both indicate that B is nearly singular.
C = flintmax*B;
dC = det(C)
cC = cond(C)
In this case, dC is large in absolute value (1.8e16) and cC is the same as cB. The determinant indicates that C is not singular, the condition number indicates that it is. Since it's a non-zero constant multiple of a nearly singular matrix, it too is nearly singular.
In theory, you could determine if a matrix was non-singular using the determinant. In practice, you shouldn't.
My first example is a more extreme version of the example Cleve uses on pages 17-18 of the Linear Equations chapter of his textbook Numerical Computing with MATLAB. You might find the discussion of norms and condition numbers there interesting.
1 Comment
Bence Meszaros
on 12 May 2018
dpb
on 11 May 2018
2 votes
You can start with <Limitations of det> for bare bones; I don't have link at hand but a search will probably uncover it; I'm almost positive I recall Cleve having discoursed on the subject in the past in one of his enlightening amplifications on various matrix algebra topics...
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!