Condition number of a matrix is 1 but determinant is almost 0

In summary, the conversation discusses the conditioning of a matrix using the cond() and det() commands in Matlab. The condition number of a matrix determines its conditioning, with a low number indicating a well-conditioned matrix and a high number indicating an ill-conditioned matrix. The determinant of a matrix can also provide information about its conditioning, with a value close to zero indicating an almost singular matrix. However, the size of the elements in the matrix must also be taken into consideration when determining its conditioning. The conversation also highlights that conditioning errors are caused by combinations of very small and normal sized numbers, rather than small numbers alone.
  • #1
hermano
41
0
Hello,

I want to calculate the conditioning of a matrix, therefore I use the cond() commando in Matlab. A problem with a low condition number is said to be well-conditioned, while a problem with a high condition number is said to be ill-conditioned.

If I calculate the condition number of the matrix:

-0.0053 -0.0031
0.0031 -0.0053

the condition number is equal to 1. This means that the matrix is well-conditioned. However if I calculate the determinant of this matrix with the command det() the result is 3.7700e-005. Thus almost zero what means that the matrix is almost singular, thus ill-conditioned. Why is the condition number 1 while the matrix is ill-conditioned?

Steven
 
Mathematics news on Phys.org
  • #2
hermano said:
However if I calculate the determinant of this matrix with the command det() the result is 3.7700e-005. Thus almost zero what means that the matrix is almost singular, thus ill-conditioned.

Well not really, not in relation to the size of the elements in the matrix. If you scale the elements in a 2x2 matrix by some factor then the determinant scales by that factor squared (that factor cubed for a 3x3 matrix and so on).

Your matrix elements are all down around 1E-3 so you have to expect the determinant to be down around 1E-6, even if the matrix is well conditioned.
 
  • #3
Further, conditioning is not just about the numbers being small. Did you know that the double precision FP used by MATLAB (and most other scientific software these days) can handle numbers bigger than 1E300 and smaller than 1E-300.

So strictly speaking it's not really small numbers that cause the problem, it's more specifically where you have certain combinations of really small numbers and more normal sized numbers together in a calculation, and particularly where you have the difference of numbers that are nearly the same, for example 2.0 and 2.0000000000001. This is the type of situation where you get conditioning errors, not from small numbers alone.

Try for example A=[1, 2; 2, 4.0000001] and see what cond(A) tells you. You'll find det(A) is not all that different to that of your original matrix, but you'll find cond(A) is quite different.
 
Last edited:

1. What is the condition number of a matrix?

The condition number of a matrix is a measure of how sensitive the solution of a system of linear equations is to changes in the values of the matrix elements. It is a dimensionless quantity and is typically denoted by the symbol κ.

2. How is the condition number of a matrix calculated?

The condition number of a matrix is calculated as the product of the norm of the matrix and the norm of its inverse. The norm of a matrix is a measure of its size and can be calculated using different methods, such as the maximum absolute row sum or the maximum absolute column sum.

3. Why is a condition number of 1 significant?

A condition number of 1 indicates that the matrix is well-conditioned, meaning that small changes in the matrix values will not greatly affect the solution of the linear system. This is desirable because it means that the solution is stable and reliable.

4. What does it mean if the condition number is 1 but the determinant is almost 0?

If the condition number is 1 but the determinant is almost 0, it means that the matrix is singular and the system of linear equations has either no solution or an infinite number of solutions. This is because a determinant of 0 indicates that the matrix is not invertible.

5. Can a matrix have a condition number of 1 and a non-zero determinant?

Yes, it is possible for a matrix to have a condition number of 1 and a non-zero determinant. This can occur when the matrix is nearly singular, meaning that it is very close to being non-invertible. In this case, the solution to the linear system may still be accurate, but small changes in the matrix values can significantly affect the solution.

Similar threads

  • General Math
Replies
9
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
615
  • General Math
Replies
12
Views
3K
  • General Math
Replies
5
Views
1K
  • General Math
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • Linear and Abstract Algebra
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
1K
Replies
4
Views
3K
Back
Top