Matrix Norms & Perturbation

condition number

The condition number tells you how much a problem amplifies error before any algorithm even runs. For solving A x = b, it answers: if the data b wobbles by a small relative amount, how large can the relative wobble in the answer x be? A small condition number means a forgiving, well-conditioned problem; a large one means a fragile, ill-conditioned one.

Formally kappa(A) = ||A|| ||A^-1||, using a chosen norm. In the 2-norm this becomes the ratio of the largest to the smallest singular value, kappa_2(A) = sigma_max / sigma_min, which makes the geometry vivid: it is how lopsided the ellipse A produces is. By convention kappa(A) >= 1, and an orthogonal matrix achieves the perfect kappa_2 = 1.

The governing inequality is relative error in x <= kappa(A) times relative error in b. So if kappa(A) = 10^6 and your data is good to six digits, the answer may be good to none. A near-singular matrix has sigma_min close to zero, ||A^-1|| explodes, and conditioning is terrible.

Crucially, conditioning is a property of the problem, not of your code. A perfect, backward-stable algorithm still cannot rescue an ill-conditioned system — the forward error is condition number times backward error. The right response is to reformulate the problem (regularize, rescale, choose better coordinates), not to chase more decimal places.

A = [1, 1; 1, 1.0001]: kappa_2(A) ~ 4.0 x 10^4

Two nearly parallel rows make the matrix nearly singular; a tiny change in b can swing x enormously.

Rough rule of thumb in double precision: if kappa(A) is about 10^d, you can lose roughly d of your 16 significant digits when solving A x = b. At kappa = 10^16 the answer can be pure noise.

Also called
kappa(A)conditioning of a problem