diag(1, 0.01)
κ = 1/0.01 = 100
Ratio of extreme singular values.
The condition number measures how much errors in the data of can be magnified in the solution: the relative error in can be up to times the relative error in .
This page is easier if you are comfortable with:
For , (the inverse of a 2 × 2 matrix). In the maximum-row-sum norm, and , so : modestly conditioned. For (nearly singular, determinant , the 2 × 2 determinant): , , .
A rule of thumb: about decimal digits are lost in solving the system; for , , so with 16-digit arithmetic only about 11 digits of the answer can be trusted. A matrix with (an orthogonal matrix) is perfectly conditioned. The condition number is large when the matrix is close to singular, i.e. when its rows are nearly dependent.
It governs the accuracy of Gaussian elimination (Gaussian elimination cost, solving a linear system) and the convergence rate of iterative methods (Jacobi and Gauss–Seidel, conjugate gradients). In the 2-norm is the ratio of the largest to the smallest singular value, related to eigenvalues (eigenvalues of a 2 × 2 matrix); regularisation such as ridge regression improves it.
The condition number tells how much a linear system magnifies errors in its data.
A nearly singular matrix can have a condition number of tens of thousands.
These examples are worked by hand, step by step, so you can compare your own working.
Find for .
Find for .
How many digits are lost for ?
A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.
κ = 1/0.01 = 100
Ratio of extreme singular values.
κ₁ = 6 × 3.5 = 21
max column sums.
relative error in x ≤ κ × relative error in b
With κ = 100, 1% in b can be 100% in x.
κ(I) = 1
Perfectly conditioned.
The condition number κ(A) = ‖A‖‖A⁻¹‖ measures how much relative errors in b can be amplified in the solution of Ax = b: ‖δx‖/‖x‖ ≤ κ ‖δb‖/‖b‖.
Find κ for diag(1, 0.01).
Find κ₁ for (1 2; 3 4), given A⁻¹ = (−2 1; 1.5 −0.5).
If κ = 100 and the relative error in b is 0.01, bound the relative error in x.
Roughly how many digits are lost when κ = 10⁶?
small det means ill-conditioned ✗
κ is the right measure ✓
Scaling changes det but not κ.
κ = 0.5 ✗
κ ≥ 1 always ✓
‖A‖‖A⁻¹‖ ≥ ‖I‖ = 1.
one norm for ‖A‖, another for ‖A⁻¹‖ ✗
use the same norm ✓
Be consistent.
varies with b ✗
depends only on A ✓
It is a matrix property.
Try each one on paper, then open the answer. Use the solver above to see the full working.
4
1000
1
4
2
21
Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.
Solve: …
‖A‖‖A⁻¹‖.
Small errors in b can cause large errors in x.
1.
About log₁₀ κ.
Gaussian elimination cost.
More in Numerical methods and optimisation and the formula sheets.