HOME

TheInfoList



OR:

In
numerical analysis Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic computation, symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of ...
, the condition number of a function measures how much the output value of the function can change for a small change in the input argument. This is used to measure how sensitive a function is to changes or errors in the input, and how much error in the output results from an error in the input. Very frequently, one is solving the inverse problem: given f(x) = y, one is solving for ''x,'' and thus the condition number of the (local) inverse must be used. The condition number is derived from the theory of
propagation of uncertainty In statistics, propagation of uncertainty (or propagation of error) is the effect of variables' uncertainties (or errors, more specifically random errors) on the uncertainty of a function based on them. When the variables are the values of ex ...
, and is formally defined as the value of the
asymptotic In analytic geometry, an asymptote () of a curve is a line such that the distance between the curve and the line approaches zero as one or both of the ''x'' or ''y'' coordinates Limit of a function#Limits at infinity, tends to infinity. In pro ...
worst-case relative change in output for a relative change in input. The "function" is the solution of a problem and the "arguments" are the data in the problem. The condition number is frequently applied to questions in
linear algebra Linear algebra is the branch of mathematics concerning linear equations such as :a_1x_1+\cdots +a_nx_n=b, linear maps such as :(x_1, \ldots, x_n) \mapsto a_1x_1+\cdots +a_nx_n, and their representations in vector spaces and through matrix (mathemat ...
, in which case the derivative is straightforward but the error could be in many different directions, and is thus computed from the geometry of the matrix. More generally, condition numbers can be defined for non-linear functions in several variables. 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''. In non-mathematical terms, an ill-conditioned problem is one where, for a small change in the inputs (the independent variables) there is a large change in the answer or
dependent variable A variable is considered dependent if it depends on (or is hypothesized to depend on) an independent variable. Dependent variables are studied under the supposition or demand that they depend, by some law or rule (e.g., by a mathematical functio ...
. This means that the correct solution/answer to the equation becomes hard to find. The condition number is a property of the problem. Paired with the problem are any number of algorithms that can be used to solve the problem, that is, to calculate the solution. Some algorithms have a property called '' backward stability''; in general, a backward stable algorithm can be expected to accurately solve well-conditioned problems. Numerical analysis textbooks give formulas for the condition numbers of problems and identify known backward stable algorithms. As a rule of thumb, if the condition number \kappa(A) = 10^k, then you may lose up to k digits of accuracy on top of what would be lost to the numerical method due to loss of precision from arithmetic methods. However, the condition number does not give the exact value of the maximum inaccuracy that may occur in the algorithm. It generally just bounds it with an estimate (whose computed value depends on the choice of the norm to measure the inaccuracy).


Matrices

For example, the condition number associated with the
linear equation In mathematics, a linear equation is an equation that may be put in the form a_1x_1+\ldots+a_nx_n+b=0, where x_1,\ldots,x_n are the variables (or unknowns), and b,a_1,\ldots,a_n are the coefficients, which are often real numbers. The coeffici ...
''Ax'' = ''b'' gives a bound on how inaccurate the solution ''x'' will be after approximation. Note that this is before the effects of
round-off error In computing, a roundoff error, also called rounding error, is the difference between the result produced by a given algorithm using exact arithmetic and the result produced by the same algorithm using finite-precision, rounded arithmetic. Roun ...
are taken into account; conditioning is a property of the
matrix Matrix (: matrices or matrixes) or MATRIX may refer to: Science and mathematics * Matrix (mathematics), a rectangular array of numbers, symbols or expressions * Matrix (logic), part of a formula in prenex normal form * Matrix (biology), the m ...
, not the
algorithm In mathematics and computer science, an algorithm () is a finite sequence of Rigour#Mathematics, mathematically rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algo ...
or
floating-point In computing, floating-point arithmetic (FP) is arithmetic on subsets of real numbers formed by a ''significand'' (a Sign (mathematics), signed sequence of a fixed number of digits in some Radix, base) multiplied by an integer power of that ba ...
accuracy of the computer used to solve the corresponding system. In particular, one should think of the condition number as being (very roughly) the rate at which the solution ''x'' will change with respect to a change in ''b''. Thus, if the condition number is large, even a small error in ''b'' may cause a large error in ''x''. On the other hand, if the condition number is small, then the error in ''x'' will not be much bigger than the error in ''b''. The condition number is defined more precisely to be the maximum ratio of the relative error in ''x'' to the relative error in ''b''. Let ''e'' be the error in ''b''. Assuming that ''A'' is a nonsingular matrix, the error in the solution ''A''−1''b'' is ''A''−1''e''. The ratio of the relative error in the solution to the relative error in ''b'' is : / = \frac \frac. The maximum value (for nonzero ''b'' and ''e'') is then seen to be the product of the two
operator norm In mathematics, the operator norm measures the "size" of certain linear operators by assigning each a real number called its . Formally, it is a norm defined on the space of bounded linear operators between two given normed vector spaces. Inform ...
s as follows: :\begin \max_ \left\ &= \max_ \left\ \, \max_ \left\ \\ &= \max_ \left\ \, \max_ \left \ \\ &= \left\, A^ \right \, \, \, A\, . \end The same definition is used for any consistent norm, i.e. one that satisfies : \kappa(A) = \left\, A^ \right\, \, \left\, A \right\, \ge \left\, A^ A \right\, = 1. When the condition number is exactly one (which can only happen if ''A'' is a scalar multiple of a linear isometry), then a solution algorithm can find (in principle, meaning if the algorithm introduces no errors of its own) an approximation of the solution whose precision is no worse than that of the data. However, it does not mean that the algorithm will converge rapidly to this solution, just that it will not diverge arbitrarily because of inaccuracy on the source data (backward error), provided that the forward error introduced by the algorithm does not diverge as well because of accumulating intermediate rounding errors. The condition number may also be infinite, but this implies that the problem is ill-posed (does not possess a unique, well-defined solution for each choice of data; that is, the matrix is not
invertible In mathematics, the concept of an inverse element generalises the concepts of opposite () and reciprocal () of numbers. Given an operation denoted here , and an identity element denoted , if , one says that is a left inverse of , and that ...
), and no algorithm can be expected to reliably find a solution. The definition of the condition number depends on the choice of norm, as can be illustrated by two examples. If \, \cdot\, is the matrix norm induced by the (vector) Euclidean norm (sometimes known as the ''L''2 norm and typically denoted as \, \cdot\, _2), then : \kappa(A) = \frac, where \sigma_\text(A) and \sigma_\text(A) are maximal and minimal singular values of A respectively. Hence: * If A is normal, then \kappa(A) = \frac, where \lambda_\text(A) and \lambda_\text(A) are maximal and minimal (by moduli)
eigenvalue In linear algebra, an eigenvector ( ) or characteristic vector is a vector that has its direction unchanged (or reversed) by a given linear transformation. More precisely, an eigenvector \mathbf v of a linear transformation T is scaled by a ...
s of A respectively. * If A is
unitary Unitary may refer to: Mathematics * Unitary divisor * Unitary element * Unitary group * Unitary matrix * Unitary morphism * Unitary operator * Unitary transformation * Unitary representation * Unitarity (physics) * ''E''-unitary inverse semigr ...
, then \kappa(A) = 1. The condition number with respect to ''L''2 arises so often in
numerical linear algebra Numerical linear algebra, sometimes called applied linear algebra, is the study of how matrix operations can be used to create computer algorithms which efficiently and accurately provide approximate answers to questions in continuous mathemati ...
that it is given a name, the condition number of a matrix. If \, \cdot\, is the matrix norm induced by the L^\infty (vector) norm and A is lower triangular non-singular (i.e. a_ \ne 0 for all i), then : \kappa(A) \geq \frac recalling that the eigenvalues of any triangular matrix are simply the diagonal entries. The condition number computed with this norm is generally larger than the condition number computed relative to the
Euclidean norm Euclidean space is the fundamental space of geometry, intended to represent physical space. Originally, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are ''Euclidean spaces'' ...
, but it can be evaluated more easily (and this is often the only practicably computable condition number, when the problem to solve involves a ''non-linear algebra'', for example when approximating irrational and transcendental functions or numbers with numerical methods). If the condition number is not significantly larger than one, the matrix is well-conditioned, which means that its inverse can be computed with good accuracy. If the condition number is very large, then the matrix is said to be
ill-conditioned In numerical analysis, the condition number of a function measures how much the output value of the function can change for a small change in the input argument. This is used to measure how sensitive a function is to changes or errors in the inpu ...
. Practically, such a matrix is almost singular, and the computation of its inverse, or solution of a linear system of equations is prone to large numerical errors. A matrix that is not invertible is often said to have a condition number equal to infinity. Alternatively, it can be defined as \kappa(A) = \, A\, \, A^\dagger\, , where A^\dagger is the Moore-Penrose
pseudoinverse In mathematics, and in particular, algebra, a generalized inverse (or, g-inverse) of an element ''x'' is an element ''y'' that has some properties of an inverse element but not necessarily all of them. The purpose of constructing a generalized inv ...
. For square matrices, this unfortunately makes the condition number discontinuous, but it is a useful definition for rectangular matrices, which are never invertible but are still used to define systems of equations.


Nonlinear

Condition numbers can also be defined for nonlinear functions, and can be computed using
calculus Calculus is the mathematics, mathematical study of continuous change, in the same way that geometry is the study of shape, and algebra is the study of generalizations of arithmetic operations. Originally called infinitesimal calculus or "the ...
. The condition number varies with the point; in some cases one can use the maximum (or
supremum In mathematics, the infimum (abbreviated inf; : infima) of a subset S of a partially ordered set P is the greatest element in P that is less than or equal to each element of S, if such an element exists. If the infimum of S exists, it is unique, ...
) condition number over the domain of the function or domain of the question as an overall condition number, while in other cases the condition number at a particular point is of more interest.


One variable

The ''absolute'' condition number of a
differentiable function In mathematics, a differentiable function of one real variable is a function whose derivative exists at each point in its domain. In other words, the graph of a differentiable function has a non- vertical tangent line at each interior point in ...
f in one variable is the
absolute value In mathematics, the absolute value or modulus of a real number x, is the non-negative value without regard to its sign. Namely, , x, =x if x is a positive number, and , x, =-x if x is negative (in which case negating x makes -x positive), ...
of the
derivative In mathematics, the derivative is a fundamental tool that quantifies the sensitivity to change of a function's output with respect to its input. The derivative of a function of a single variable at a chosen input value, when it exists, is t ...
of the function: : \left, f'(x)\ The ''relative'' condition number of f as a function is \left, xf'/f\. Evaluated at a point x, this is : \left, \frac\=\left, \frac\. Note that this is the absolute value of the elasticity of a function in economics. Most elegantly, this can be understood as (the absolute value of) the ratio of the
logarithmic derivative In mathematics, specifically in calculus and complex analysis, the logarithmic derivative of a function is defined by the formula \frac where is the derivative of . Intuitively, this is the infinitesimal relative change in ; that is, the in ...
of f, which is (\log f)' = f'/f, and the logarithmic derivative of x, which is (\log x)' = x'/x = 1/x, yielding a ratio of xf'/f. This is because the logarithmic derivative is the
infinitesimal In mathematics, an infinitesimal number is a non-zero quantity that is closer to 0 than any non-zero real number is. The word ''infinitesimal'' comes from a 17th-century Modern Latin coinage ''infinitesimus'', which originally referred to the " ...
rate of relative change in a function: it is the derivative f' scaled by the value of f. Note that if a function has a
zero 0 (zero) is a number representing an empty quantity. Adding (or subtracting) 0 to any number leaves that number unchanged; in mathematical terminology, 0 is the additive identity of the integers, rational numbers, real numbers, and compl ...
at a point, its condition number at the point is infinite, as infinitesimal changes in the input can change the output from zero to positive or negative, yielding a ratio with zero in the denominator, hence infinite relative change. More directly, given a small change \Delta x in x, the relative change in x is x + \Delta x) - x/ x = (\Delta x) / x, while the relative change in f(x) is (x + \Delta x) - f(x)/ f(x). Taking the ratio yields : \frac = \frac \frac = \frac \frac. The last term is the
difference quotient In single-variable calculus, the difference quotient is usually the name for the expression : \frac which when taken to the Limit of a function, limit as ''h'' approaches 0 gives the derivative of the Function (mathematics), function ''f''. The ...
(the slope of the
secant line In geometry, a secant is a line (geometry), line that intersects a curve at a minimum of two distinct Point (geometry), points.. The word ''secant'' comes from the Latin word ''secare'', meaning ''to cut''. In the case of a circle, a secant inter ...
), and taking the limit yields the derivative. Condition numbers of common
elementary function In mathematics, an elementary function is a function of a single variable (typically real or complex) that is defined as taking sums, products, roots and compositions of finitely many polynomial, rational, trigonometric, hyperbolic, a ...
s are particularly important in computing
significant figures Significant figures, also referred to as significant digits, are specific digits within a number that is written in positional notation that carry both reliability and necessity in conveying a particular quantity. When presenting the outcom ...
and can be computed immediately from the derivative. A few important ones are given below:


Several variables

Condition numbers can be defined for any function f mapping its data from some domain (e.g. an m-tuple of
real number In mathematics, a real number is a number that can be used to measure a continuous one- dimensional quantity such as a duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
s x) into some
codomain In mathematics, a codomain, counter-domain, or set of destination of a function is a set into which all of the output of the function is constrained to fall. It is the set in the notation . The term '' range'' is sometimes ambiguously used to ...
(e.g. an n-tuple of real numbers f(x)), where both the domain and codomain are
Banach space In mathematics, more specifically in functional analysis, a Banach space (, ) is a complete normed vector space. Thus, a Banach space is a vector space with a metric that allows the computation of vector length and distance between vectors and ...
s. They express how sensitive that function is to small changes (or small errors) in its arguments. This is crucial in assessing the sensitivity and potential accuracy difficulties of numerous computational problems, for example, polynomial root finding or computing
eigenvalue In linear algebra, an eigenvector ( ) or characteristic vector is a vector that has its direction unchanged (or reversed) by a given linear transformation. More precisely, an eigenvector \mathbf v of a linear transformation T is scaled by a ...
s. The condition number of f at a point x (specifically, its relative condition number) is then defined to be the maximum ratio of the fractional change in f(x) to any fractional change in x, in the limit where the change \delta x in x becomes infinitesimally small: : \lim_ \sup_ \left \left. \frac \right/ \frac \right where \, \cdot\, is a norm on the domain/codomain of f. If f is differentiable, this is equivalent to: : \frac, where denotes the
Jacobian matrix In vector calculus, the Jacobian matrix (, ) of a vector-valued function of several variables is the matrix of all its first-order partial derivatives. If this matrix is square, that is, if the number of variables equals the number of component ...
of
partial derivative In mathematics, a partial derivative of a function of several variables is its derivative with respect to one of those variables, with the others held constant (as opposed to the total derivative, in which all variables are allowed to vary). P ...
s of f at x, and \, J(x)\, is the induced norm on the matrix.


See also

* Numerical methods for linear least squares *
Numerical stability In the mathematical subfield of numerical analysis, numerical stability is a generally desirable property of numerical algorithms. The precise definition of stability depends on the context: one important context is numerical linear algebra, and ...
* Hilbert matrix * Ill-posed problem * Singular value * Wilson matrix


References


Further reading

* {{cite book , first=James , last=Demmel , author-link=James Demmel , chapter=Nearest Defective Matrices and the Geometry of Ill-conditioning , pages=35–55 , title=Reliable Numerical Computation , editor-first=M. G. , editor-last=Cox , editor2-first=S. , editor2-last=Hammarling , location=Oxford , publisher=Clarendon Press , year=1990 , isbn=0-19-853564-3


External links


Condition Number of a Matrix
at ''Holistic Numerical Methods Institute''


Condition number – Encyclopedia of Mathematics

Who Invented the Matrix Condition Number? by Nick Higham
Numerical analysis Matrices (mathematics)