43.01.02 · numerical-analysis / 01-floating-point-conditioning

Conditioning and condition numbers of problems

shipped3 tiersLean: none

Anchor (Master): Higham 2002 *Accuracy and Stability of Numerical Algorithms* 2e (SIAM) Ch. 1-2, Ch. 6; Trefethen-Bau 1997 *Numerical Linear Algebra* (SIAM) Lectures 12-13; Golub-Van Loan 2013 *Matrix Computations* 4e (Johns Hopkins) §2.6 (the singular value/condition number theory); Demmel 1997 *Applied Numerical Linear Algebra* (SIAM) Ch. 1-2

Intuition Beginner

Suppose you want to compute an answer from some input data, and the data is slightly off — measured imperfectly, or rounded when it was stored in the computer. A natural question comes before you pick any method at all: how much can a small error in the input swing the answer? Some problems are forgiving. A tiny wobble in the input produces a tiny wobble in the output. Other problems are touchy: a barely-visible change in the input throws the answer wildly off. The conditioning of a problem is the name for this sensitivity.

The condition number is a single number that measures it. Roughly, it is the worst factor by which a small relative error in the input gets magnified into a relative error in the output. A condition number near means the problem is well-behaved: errors pass through about the same size they came in. A condition number of a million means a relative error of one part in a million in the data can become a relative error of order one in the answer — the answer can be meaningless even though the data looked clean.

The key idea, and the one that separates this from everything later, is that conditioning belongs to the problem, not to any recipe for solving it. It is fixed the moment you state what you want to compute from what data. Even a perfect, error-free method cannot beat the conditioning: if the problem amplifies input error by a factor of a million, and your input carries rounding error, the answer inherits that amplification no matter how cleverly you compute.

So conditioning sets the speed limit. Before asking whether a particular method is good, you ask whether the problem itself is sensitive. A separate notion, the stability of an algorithm, asks whether a given recipe makes things worse than the problem already forces — that comes next door. Here we measure only the problem.

Visual Beginner

Picture the input as a point and draw a tiny circle of uncertainty around it: all the inputs you cannot tell apart from the true one. The problem maps that little circle to a blob of possible outputs. For a well-conditioned problem the output blob is small — about the same size as the input circle. For an ill-conditioned problem the output blob is stretched out: the map magnifies the uncertainty.

The table below contrasts a forgiving problem with a touchy one, using the same size of input wobble in each row.

problem input change output change rough magnification
double the input () (well-conditioned)
add two nearly-opposite numbers huge (ill-conditioned)
solve a stretched linear system about

The magnification factor in the last column is the condition number in disguise. The whole subject of conditioning is reading that factor off the problem before you compute anything. The stretched-ellipse picture also connects to the singular value story: the longest and shortest stretch directions of a linear map are exactly its largest and smallest singular values, and their ratio is the magnification.

Worked example Beginner

Let us measure the conditioning of one concrete problem: subtracting two close numbers. Take the function that sends an input to the output , and evaluate near .

The true output is . Now nudge the input by a small relative amount. Suppose is stored with a relative error of one part in ten thousand, so instead of the computer holds — the input moved by about , a relative change of roughly .

The new output is . Compare the two outputs: the answer changed from to , a relative change of about . A relative input change of produced a relative output change of .

The magnification is the ratio of these relative changes: about . So near this subtraction problem has condition number around ten thousand. The reason is plain once you see it: the output is a small number obtained by cancelling two numbers that are both close to , so the tiny surviving difference is extremely sensitive to either of them.

What this tells us: cancellation between nearly-equal quantities is ill-conditioned, and the condition number puts a number on how ill. Four digits of input accuracy can collapse to almost none in the output. The lesson is to detect this from the problem — the small denominator, the near-cancellation — before blaming any particular calculation.

Check your understanding Beginner

Formal definition Intermediate+

A problem is a map between normed vector spaces, evaluated at a fixed input ; the value is the desired output. Conditioning measures the sensitivity of to perturbations of . Throughout, denotes the relevant norm on each space, and on matrices and on the linear maps between and we use the induced operator norm introduced for the singular value decomposition 01.01.12.

Absolute condition number. The absolute condition number of at is $$ \hat\kappa = \hat\kappa(x) = \lim_{\delta \to 0^+} ; \sup_{0 < |\delta x| \le \delta} \frac{|f(x + \delta x) - f(x)|}{|\delta x|}. $$ When is differentiable at with Fréchet derivative (Jacobian) — the linear map best approximating near , whose multivariable form is governed by the chain rule 02.05.03 — the supremum of over directions is exactly the operator norm of the derivative, so $$ \hat\kappa(x) = |J(x)|. $$

Relative condition number. In numerical work relative errors are the natural currency, because floating-point data carries bounded relative error. The relative condition number of at (with and ) is $$ \kappa = \kappa(x) = \lim_{\delta \to 0^+}; \sup_{0 < |\delta x| \le \delta} \left( \frac{|f(x+\delta x) - f(x)|}{|f(x)|} \Big/ \frac{|\delta x|}{|x|}\right), $$ the worst-case ratio of relative output change to relative input change. For differentiable this evaluates to $$ \kappa(x) = \frac{|J(x)|,|x|}{|f(x)|}. $$ A problem is well-conditioned at if is small (order to a few) and ill-conditioned if is large. The threshold is application-dependent, but a useful rule of thumb is that with double-precision data (about significant digits) a condition number of erodes roughly of those digits.

Condition number of matrix-vector multiplication. Fix a matrix and consider the problem for , perturbing only . The map is linear, so and . The relative condition number is $$ \kappa(x) = \frac{|A|,|x|}{|Ax|}, $$ which depends on the direction of : it is largest when aligns with the direction shrinks most.

The matrix condition number. For a square invertible , the problem of solving — that is, — has, by the same computation applied to , a relative condition number bounded above by the quantity $$ \kappa(A) = |A|,|A^{-1}|, $$ called the condition number of the matrix . It is independent of and serves as the worst-case sensitivity of the linear system over all right-hand sides. By convention for singular . In the operator (-)norm, the singular value decomposition gives the closed form $$ \kappa_2(A) = \frac{\sigma_1(A)}{\sigma_n(A)}, $$ the ratio of largest to smallest singular value — the SVD-level fact stated in 01.01.12, here promoted to the organising quantity of the whole conditioning theory. Always , with exactly for scalar multiples of unitary matrices.

Counterexamples to common slips

  • The condition number of a matrix and the condition number of the problem of multiplying by that matrix at a particular vector are not the same number. For , the relative condition number varies with and can be as small as ; the matrix condition number is the maximum of that quantity over all (equivalently the condition of the solve problem), and is what people mean by "the condition number of ".

  • A large determinant or a small determinant says little about conditioning. The matrix has determinant yet condition number (it is a scalar multiple of the identity), so it is perfectly conditioned. Conditioning is the ratio , not the scale.

  • Ill-conditioning is not the same as singularity. A nonsingular matrix can have : it is invertible, the problem has a unique solution, and yet that solution is hypersensitive to data error. Conditioning measures how close the problem sits to a degenerate one, not whether it has crossed over.

Key theorem with proof Intermediate+

The central quantitative statement is that the matrix condition number governs, to first order, the sensitivity of the solution of a linear system to perturbations of the data. We prove the version perturbing the right-hand side; the coefficient-matrix version appears in the master tier.

Theorem (conditioning of the linear system ). Let be invertible, let , and let be the exact solution. If is perturbed to and is the corresponding solution, then $$ \frac{|\delta x|}{|x|} \le \kappa(A),\frac{|\delta b|}{|b|}, \qquad \kappa(A) = |A|,|A^{-1}|, $$ in any norm with its induced operator norm, and the bound is attained for suitable and [Trefethen, L. N. & Bau, D. — Numerical Linear Algebra].

Proof. Linearity of gives , so taking operator norms, . Separately, from we get , hence , equivalently . Multiplying the two inequalities, $$ \frac{|\delta x|}{|x|} \le |A^{-1}|,|\delta b| \cdot \frac{|A|}{|b|} = |A|,|A^{-1}|,\frac{|\delta b|}{|b|} = \kappa(A),\frac{|\delta b|}{|b|}. $$

For attainment in the operator norm, choose in the direction where achieves its norm, so ; in the SVD this is , the last left singular vector, giving . Choose in the direction where achieves its norm, with , so . Then both inequalities are equalities and the bound is met with the value .

Bridge. This theorem is the foundational reason the single scalar is the right summary of a linear system's difficulty: it is exactly the tight worst-case amplification of relative data error into relative solution error, and the SVD attainment argument shows this is exactly , so the geometric stretch ratio of 01.01.12 and the numerical sensitivity factor are one quantity. The same operator-norm mechanism builds toward the full perturbation theory of in 43.03.03, where perturbing as well as produces the refined bound with the correction; and it appears again in 43.04.01, where the least-squares problem inherits a conditioning governed by together with the residual angle. Putting these together, the conditioning of a problem and the stretch geometry of its underlying linear map are dual descriptions of the same sensitivity, and the central insight is that this sensitivity is fixed before any algorithm is chosen — the bridge is that a backward-stable algorithm (treated in 43.01.03) achieves a forward error of order and no better, so is the floor that conditioning imposes on accuracy.

Exercises Intermediate+

Advanced results Master

Conditioning of the linear system under coefficient-matrix perturbation. The right-hand-side bound of the Key theorem extends to perturbations of itself. Let be invertible, , and let . To first order, , and a standard manipulation with the operator norm yields, whenever , $$ \frac{|\delta x|}{|x|} \le \frac{\kappa(A)}{1 - \kappa(A),|\delta A|/|A|}\left(\frac{|\delta A|}{|A|} + \frac{|\delta b|}{|b|}\right). $$ The leading factor is ; the denominator is a second-order correction that becomes important only when approaches , i.e. when the perturbation is large enough to threaten invertibility. The full a-posteriori treatment — residuals, backward error, iterative refinement — is the subject of 43.03.03.

Condition number as reciprocal distance to singularity. The -norm condition number has a geometric reading independent of any perturbation analysis. By the SVD, the distance in operator norm from an invertible to the nearest singular matrix is exactly , the smallest singular value: , attained by . Dividing by , $$ \frac{1}{\kappa_2(A)} = \frac{\sigma_n}{\sigma_1} = \frac{\mathrm{dist}_2(A, \text{singular matrices})}{|A|_2}. $$ The reciprocal condition number is the relative distance to singularity. This is the Eckart-Young theorem of 01.01.12 specialised to the rank-deficiency boundary, and it explains why ill-conditioning ( large) is geometrically the same as nearness to a singular (degenerate) problem.

Componentwise conditioning and the Bauer-Skeel number. The normwise condition number can overstate sensitivity when the data and perturbations have widely varying scales, because a single norm flattens that structure. The componentwise condition number measures relative perturbations entry by entry: for and (inequalities and absolute values taken entrywise), the relevant quantity is the Bauer-Skeel condition number $$ \mathrm{cond}(A, x) = \frac{\big| ,|A^{-1}|,|A|,|x| , \big|\infty}{|x|\infty}, $$ bounded above by , which is invariant under row scaling of and can be far smaller than for badly-scaled but otherwise benign systems [Higham, N. J. — Accuracy and Stability of Numerical Algorithms (2nd ed.)].

Conditioning of polynomial roots: Wilkinson's polynomial. Root-finding can be catastrophically ill-conditioned even when each coefficient is benign. Wilkinson's celebrated example is the monic polynomial with roots , $$ p(x) = \prod_{k=1}^{20}(x - k) = x^{20} - 210,x^{19} + \cdots. $$ The condition number of the root with respect to a perturbation of the coefficient of is, by implicit differentiation of , $$ \frac{\partial \alpha_j}{\partial a_i} = -\frac{\alpha_j^{,i}}{p'(\alpha_j)}. $$ For () and , the value exceeds : a relative perturbation of order in the coefficient of splits well-separated real roots into complex pairs. The roots-from-coefficients map is the ill-conditioned problem; no root-finding algorithm can recover the roots accurately from coefficients perturbed at the level of double-precision rounding [Wilkinson, J. H. — Rounding Errors in Algebraic Processes].

Conditioning of eigenvalues. For a simple eigenvalue of a diagonalizable with unit right and left eigenvectors , first-order perturbation theory gives , so the absolute eigenvalue condition number is , with the eigenvalue's spectral sensitivity. Globally, the Bauer-Fike theorem bounds the migration of the entire spectrum: every eigenvalue of lies within of an eigenvalue of , where and is the condition number of the eigenvector matrix. For normal one may take unitary, , and the spectrum is perfectly conditioned; non-normality, measured by , is precisely what makes eigenvalues sensitive. The full non-normal theory, including pseudospectra, is 43.06.04.

Synthesis. Conditioning is the foundational reason numerical analysis separates the difficulty of a problem from the quality of an algorithm: the condition number is a property of the map at the point , computed from its derivative as , and it is fixed before any method is named. This is exactly the quantity that the singular value decomposition of 01.01.12 makes geometric — for the linear-solve problem is the ratio of the longest to the shortest stretch of , and the central insight is that this ratio is simultaneously the worst-case error amplification, the reciprocal relative distance to a singular matrix (Eckart-Young), and the floor on accuracy that a backward-stable algorithm achieves. The matrix condition number, the polynomial-root condition number , and the eigenvalue condition number are the same construction — operator norm of a derivative, relative-scaled — instantiated on three problems, and putting these together one sees that ill-conditioning, near-singularity, near-multiplicity, and catastrophic cancellation are one phenomenon viewed through different problems.

The conditioning theory built here is dual to the stability theory of 43.01.03: conditioning bounds how much error the problem must produce, stability bounds how much error the algorithm adds, and the fundamental theorem of backward-error analysis multiplies the two into the achievable forward error . The bridge from this unit to the rest of numerical linear algebra is that every later error guarantee — for in 43.03.03, for least squares in 43.04.01, for eigenvalues in 43.06.04 — is a conditioning factor times a backward error, and this unit supplies the first factor.

Full proof set Master

Proposition 1 (relative condition number via the Jacobian). Let be Fréchet differentiable at with derivative , and suppose . Then the relative condition number is .

Proof. Fréchet differentiability means as . Hence for any direction, $$ \frac{|f(x+\delta x) - f(x)|}{|\delta x|} = \frac{|J(x),\delta x + o(|\delta x|)|}{|\delta x|} \xrightarrow{;|\delta x|\to 0;} \frac{|J(x),\delta x|}{|\delta x|}, $$ and taking the supremum over directions as replaces the right side by , the operator norm. This is the absolute condition number . Dividing the output relative change by the input relative change inserts the factor uniformly (it does not depend on ), so the limiting supremum of the ratio is . The remainder vanishes in the limit, so the supremum is attained in the limiting sense by directions achieving .

Proposition 2 (). For an invertible with singular values , .

Proof. By the SVD with , the operator -norm equals the largest singular value, , since using unitary invariance of the Euclidean norm and the substitution . The inverse is with , whose largest diagonal entry is ; by the same argument . Therefore .

Proposition 3 (reciprocal condition number is relative distance to singularity). For invertible , , hence .

Proof. Let . The matrix , of operator norm , gives , whose last singular value is , so is singular; thus the minimum is at most . Conversely, suppose is singular, so there is a unit vector with , i.e. . Then , because (the smallest singular value lower-bounds the stretch). Hence . The two inequalities give the minimum exactly . Dividing by and using Proposition 2 gives the relative-distance identity.

Proposition 4 (perturbed-system bound). Let be invertible, , and with . Then $$ \frac{|\delta x|}{|x|} \le \frac{\kappa(A)}{1 - \kappa(A),|\delta A|/|A|}\left(\frac{|\delta A|}{|A|} + \frac{|\delta b|}{|b|}\right). $$

Proof. Subtract from to get , hence . Taking norms and using submultiplicativity, $$ |\delta x| \le |A^{-1}|\big(|\delta b| + |\delta A|,|x| + |\delta A|,|\delta x|\big). $$ Collecting the term, . Divide by and use (so ) on the term, and write throughout: $$ \Big(1 - \kappa(A)\tfrac{|\delta A|}{|A|}\Big)\frac{|\delta x|}{|x|} \le \kappa(A)\Big(\tfrac{|\delta b|}{|b|} + \tfrac{|\delta A|}{|A|}\Big). $$ The hypothesis makes the bracket on the left positive, and dividing through gives the stated bound.

Connections Master

  • Singular value decomposition 01.01.12 supplies the exact closed form that turns the abstract definition into a computable geometric quantity, and the Eckart-Young distance-to-singularity theorem that reads as the relative distance to the nearest singular matrix. The conditioning theory of this unit is the numerical-analysis promotion of the SVD's remark to the central organising scalar of the whole field; every condition-number identity here is an operator-norm statement about a derivative, and the SVD is what evaluates those operator norms.

  • Chain rule for multi-variable functions 02.05.03 is the analytic engine under the relative condition number : the Jacobian is the multivariable derivative whose composition law is the chain rule, and conditioning of a composite problem obeys the chain-rule-driven sub-bound at matched points. This is the precise sense in which conditioning of a pipeline can compound: the condition numbers of the stages multiply, exactly as the Jacobians compose.

  • Floating-point arithmetic and the IEEE model 43.01.01 is the same-wave sibling that supplies the input-error model conditioning acts on: data enters a computation with relative error bounded by the unit roundoff , and the condition number is the factor by which conditioning magnifies that floor into output error. Conditioning is meaningful precisely because floating point guarantees a relative error model, which is why the relative (not absolute) condition number is the operative quantity in numerical work.

  • Backward stability and backward-error analysis 43.01.03 is the dual same-wave sibling: conditioning measures the error the problem forces, stability measures the error the algorithm adds, and the fundamental theorem of backward-error analysis multiplies them into the achievable forward error, . This unit owns the first factor ; 43.01.03 owns the second. The two together are the conceptual core of the field, and neither alone explains the accuracy of a computation.

  • Perturbation theory for 43.03.03 takes the Key theorem's right-hand-side bound to its full form — perturbing and simultaneously, the residual estimate , the Rigal-Gaches backward error, and iterative refinement — turning the condition number into the concrete a-posteriori guarantee for a computed solution. The conditioning here is the analytic input to that solver-level error analysis.

  • Bauer-Fike and the conditioning of eigenvalues 43.06.04 instantiate the condition-number construction on the eigenvalue problem, where the relevant quantity is for a simple eigenvalue and the global bound is . Normal matrices are perfectly conditioned (, matching the Weyl bound of 01.01.14); non-normality is the eigenvalue analogue of ill-conditioning. This unit defines the conditioning framework; 43.06.04 specialises it to the spectral problem where left and right eigenvectors diverge.

Historical & philosophical context Master

The matrix condition number was introduced by Alan Turing in Rounding-off errors in matrix processes (Quarterly Journal of Mechanics and Applied Mathematics 1, 1948, 287–308), where he defined two measures of the ill-conditioning of a linear system — the "N-condition number" built from the Frobenius norm and the "M-condition number" — to explain why Gaussian elimination on certain systems lost accuracy independent of the arithmetic [Turing, A. M. — Rounding-off errors in matrix processes]. Turing's paper, written in the first years of stored-program computing, isolated the decisive conceptual point: the loss of accuracy was a property of the matrix, not of his method, and could be predicted before computing.

John von Neumann and Herman Goldstine had, in their 1947 analysis of matrix inversion, already studied the propagation of rounding error through elimination, and the operator-norm condition number in the form used today was crystallised through the work of the numerical-analysis school of the 1950s and 1960s. James Wilkinson made the conditioning-versus-stability distinction the organising principle of the subject; his Rounding Errors in Algebraic Processes (Prentice-Hall, 1963) and The Algebraic Eigenvalue Problem (Oxford, 1965) established backward error analysis and, with the degree-20 "Wilkinson polynomial", gave the canonical demonstration that a problem can be wildly ill-conditioned while every coefficient is innocuous [Wilkinson, J. H. — Rounding Errors in Algebraic Processes]. The polynomial-root example showed that the roots-from-coefficients map, not any root-finding code, was at fault, sharpening the separation of problem from algorithm.

The synthesis into the modern framework — absolute and relative condition numbers of a general problem via its derivative, the matrix condition number as , componentwise and structured conditioning — is due to the textbook tradition consolidated by Golub and Van Loan's Matrix Computations (1983, four editions), Trefethen and Bau's Numerical Linear Algebra (SIAM, 1997), and Nicholas Higham's Accuracy and Stability of Numerical Algorithms (SIAM, 1996, 2nd ed. 2002), the last of which gave the comprehensive treatment of componentwise condition numbers and the Bauer-Skeel theory [Higham, N. J. — Accuracy and Stability of Numerical Algorithms (2nd ed.)].

Bibliography Master

@article{turing1948rounding,
  author  = {Turing, Alan M.},
  title   = {Rounding-off Errors in Matrix Processes},
  journal = {The Quarterly Journal of Mechanics and Applied Mathematics},
  volume  = {1},
  number  = {1},
  year    = {1948},
  pages   = {287--308}
}

@article{vonneumann1947numerical,
  author  = {von Neumann, John and Goldstine, Herman H.},
  title   = {Numerical Inverting of Matrices of High Order},
  journal = {Bulletin of the American Mathematical Society},
  volume  = {53},
  number  = {11},
  year    = {1947},
  pages   = {1021--1099}
}

@book{wilkinson1963rounding,
  author    = {Wilkinson, James H.},
  title     = {Rounding Errors in Algebraic Processes},
  publisher = {Prentice-Hall},
  year      = {1963}
}

@book{wilkinson1965eigenvalue,
  author    = {Wilkinson, James H.},
  title     = {The Algebraic Eigenvalue Problem},
  publisher = {Oxford University Press},
  year      = {1965}
}

@book{trefethenbau1997,
  author    = {Trefethen, Lloyd N. and Bau, David},
  title     = {Numerical Linear Algebra},
  publisher = {SIAM},
  year      = {1997}
}

@book{golubvanloan2013,
  author    = {Golub, Gene H. and Van Loan, Charles F.},
  title     = {Matrix Computations},
  edition   = {4},
  publisher = {Johns Hopkins University Press},
  year      = {2013}
}

@book{higham2002accuracy,
  author    = {Higham, Nicholas J.},
  title     = {Accuracy and Stability of Numerical Algorithms},
  edition   = {2},
  publisher = {SIAM},
  year      = {2002}
}

@book{demmel1997applied,
  author    = {Demmel, James W.},
  title     = {Applied Numerical Linear Algebra},
  publisher = {SIAM},
  year      = {1997}
}