Practice question · Multiple choice
A determinant of exactly zero means a matrix is singular, but numerical code tests whether it is "close to zero". Why is the exact test unusable in practice?
Hints
- Compute the determinant of a singular matrix in floating point. What do you get?
- Ask what happens next if that value is treated as nonzero.
Show the answer
C. Because floating-point arithmetic rarely produces an exact zero.
Why
Rounding means a genuinely singular matrix computes to something like 1e-17 rather than 0, so an exact test declares it invertible and the code divides by that. A tolerance is necessary, and the determinant is a poor basis for one, scaling a 10×10 matrix by 2 multiplies it by 1024. Libraries use the condition number, which is scale-invariant and says how many digits to trust.
Practise Determinants and Invertibility
The app has 5 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.