Mathematics.

numerical linear algebra

Condition Number

Numerical Analysis20 minDifficulty4 out of 10

You should know: matrices, floating point error

Overview

The condition number of a matrix A measures how much the relative error in the solution of a linear system Ax = b can be amplified by small relative errors in A or b. It is defined as κ(A) = ‖A‖·‖A⁻¹‖ for an invertible matrix and any chosen matrix norm; a condition number close to 1 indicates a well-conditioned matrix, where errors do not grow much, while a very large condition number indicates an ill-conditioned matrix, where tiny perturbations (from measurement noise or floating-point rounding) can produce wildly inaccurate solutions. Condition number is a property of the matrix itself, not of any particular algorithm — even an exact, infinite-precision solver would need extreme precision on the inputs to control the output error for an ill-conditioned system.

Intuition

Think of solving Ax = b as trying to read a precise answer off a poorly calibrated instrument. If A is well-conditioned, the instrument is sturdy: a small nudge to the input (say, a slightly noisy measurement of b) produces only a correspondingly small nudge in the output x. If A is ill-conditioned, the instrument is wobbly and hypersensitive: a tiny, unavoidable measurement error or rounding error can send the computed solution far from the true one, no matter how carefully the arithmetic is carried out afterward. The condition number is the amplification factor of that wobble — it tells you, before you even solve the system, how much you should trust the answer given imperfect input data.

Formal Definition

Definition

For an invertible matrix A and induced matrix norm ‖·‖, the condition number is:

κ(A)=AA1\kappa(A) = \|A\|\,\|A^{-1}\|
Condition number (general matrix norm)
δxxκ(A)δbb\dfrac{\|\delta x\|}{\|x\|} \le \kappa(A)\,\dfrac{\|\delta b\|}{\|b\|}
Error amplification bound for Ax=b under perturbation δb
κ(A)1,κ(I)=1\kappa(A) \ge 1, \quad \kappa(I) = 1
Condition number is always at least 1; the identity is perfectly conditioned

Worked Examples

  1. For a diagonal matrix, the 2-norm equals the largest absolute diagonal entry.

    A2=max(100,0.01)=100\|A\|_2 = \max(100, 0.01) = 100
  2. The inverse is diag(1/100, 1/0.01) = diag(0.01, 100), whose 2-norm is the largest entry.

    A1=diag(0.01,100),A12=100A^{-1} = \operatorname{diag}(0.01,\,100), \quad \|A^{-1}\|_2 = 100
  3. Multiply the two norms to get the condition number.

    κ(A)=A2A12=100×100=10,000\kappa(A) = \|A\|_2\|A^{-1}\|_2 = 100 \times 100 = 10{,}000

Answer: κ(A) = 10,000 — a large condition number, since the diagonal entries span very different magnitudes (100 vs. 0.01).

Practice Problems

Difficulty 4/10

Compute κ(A) in the 2-norm for A = diag(4, 2).

Difficulty 3/10

A condition number close to 1 indicates that the matrix is:

Difficulty 6/10

A structural stiffness matrix K has condition number κ(K) ≈ 10⁸, and the applied load vector F is known only to about 4 significant digits due to measurement uncertainty (relative error ≈ 10⁻⁴). What does the condition-number bound say about the reliability of the computed displacement d = K⁻¹F?

Quiz

The condition number of a matrix A is defined as:
The smallest possible condition number for any invertible matrix is:
An ill-conditioned matrix (very large κ(A)) means that:

Summary

  • The condition number κ(A) = ‖A‖·‖A⁻¹‖ measures how much relative errors in A or b can be amplified in the solution of Ax=b.
  • κ(A) ≥ 1 always; values near 1 mean well-conditioned (stable), while very large values mean ill-conditioned (highly sensitive to input error).
  • Condition number is a property of the matrix itself, independent of the solution algorithm — it sets a fundamental limit on how accurate any solver's answer can be given imperfect data.

References