fbpx
Wikipedia

Condition number

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 input, and how much error in the output results from an error in the input. Very frequently, one is solving the inverse problem: given one is solving for x, and thus the condition number of the (local) inverse must be used.[1][2]

The condition number is derived from the theory of propagation of uncertainty, and is formally defined as the value of the asymptotic 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, 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. 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 , then you may lose up to digits of accuracy on top of what would be lost to the numerical method due to loss of precision from arithmetic methods.[3] 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).

General definition in the context of error analysis edit

Given a problem   and an algorithm   with an input   and output   the error is   the absolute error is   and the relative error is  

In this context, the absolute condition number of a problem   is[clarification needed]

 

and the relative condition number is[clarification needed]

 

Matrices edit

For example, the condition number associated with the linear equation 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 are taken into account; conditioning is a property of the matrix, not the algorithm or floating-point 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−1b is A−1e. The ratio of the relative error in the solution to the relative error in b is

 

The maximum value (for nonzero b and e) is then seen to be the product of the two operator norms as follows:

 

The same definition is used for any consistent norm, i.e. one that satisfies

 

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.[clarification needed]

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), 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   is the matrix norm induced by the (vector) Euclidean norm (sometimes known as the L2 norm and typically denoted as  ), then

 

where   and   are maximal and minimal singular values of   respectively. Hence:

  • If   is normal, then
     
    where   and   are maximal and minimal (by moduli) eigenvalues of   respectively.
  • If   is unitary, then  

The condition number with respect to L2 arises so often in numerical linear algebra that it is given a name, the condition number of a matrix.

If   is the matrix norm induced by the   (vector) norm and   is lower triangular non-singular (i.e.   for all  ), then

 

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, 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[clarification needed], 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. 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  , where   is the Moore-Penrose pseudoinverse. 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 edit

Condition numbers can also be defined for nonlinear functions, and can be computed using calculus. The condition number varies with the point; in some cases one can use the maximum (or supremum) 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 edit

The condition number of a differentiable function   in one variable as a function is  . Evaluated at a point  , this is

 

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 of  , which is  , and the logarithmic derivative of  , which is  , yielding a ratio of  . This is because the logarithmic derivative is the infinitesimal rate of relative change in a function: it is the derivative   scaled by the value of  . Note that if a function has a zero 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   in  , the relative change in   is  , while the relative change in   is  . Taking the ratio yields

 

The last term is the difference quotient (the slope of the secant line), and taking the limit yields the derivative.

Condition numbers of common elementary functions are particularly important in computing significant figures and can be computed immediately from the derivative. A few important ones are given below:

Name Symbol Condition number
Addition / subtraction    
Scalar multiplication    
Division    
Polynomial    
Exponential function    
Natural logarithm function    
Sine function    
Cosine function    
Tangent function    
Inverse sine function    
Inverse cosine function    
Inverse tangent function    

Several variables edit

Condition numbers can be defined for any function   mapping its data from some domain (e.g. an  -tuple of real numbers  ) into some codomain (e.g. an  -tuple of real numbers  ), where both the domain and codomain are Banach spaces. 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 eigenvalues.

The condition number of   at a point   (specifically, its relative condition number[4]) is then defined to be the maximum ratio of the fractional change in   to any fractional change in  , in the limit where the change   in   becomes infinitesimally small:[4]

 

where   is a norm on the domain/codomain of  .

If   is differentiable, this is equivalent to:[4]

 

where   denotes the Jacobian matrix of partial derivatives of   at  , and   is the induced norm on the matrix.

See also edit

References edit

  1. ^ Belsley, David A.; Kuh, Edwin; Welsch, Roy E. (1980). "The Condition Number". Regression Diagnostics: Identifying Influential Data and Sources of Collinearity. New York: John Wiley & Sons. pp. 100–104. ISBN 0-471-05856-4.
  2. ^ Pesaran, M. Hashem (2015). "The Multicollinearity Problem". Time Series and Panel Data Econometrics. New York: Oxford University Press. pp. 67–72 [p. 70]. ISBN 978-0-19-875998-0.
  3. ^ Cheney; Kincaid (2008). Numerical Mathematics and Computing. p. 321. ISBN 978-0-495-11475-8.
  4. ^ a b c Trefethen, L. N.; Bau, D. (1997). Numerical Linear Algebra. SIAM. ISBN 978-0-89871-361-9.

Further reading edit

  • Demmel, James (1990). "Nearest Defective Matrices and the Geometry of Ill-conditioning". In Cox, M. G.; Hammarling, S. (eds.). Reliable Numerical Computation. Oxford: Clarendon Press. pp. 35–55. ISBN 0-19-853564-3.

External links edit

  • at Holistic Numerical Methods Institute
  • MATLAB library function to determine condition number
  • Condition number – Encyclopedia of Mathematics
  • Who Invented the Matrix Condition Number? by Nick Higham

condition, number, numerical, analysis, condition, number, function, measures, much, output, value, function, change, small, change, input, argument, this, used, measure, sensitive, function, changes, errors, input, much, error, output, results, from, error, i. 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 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 displaystyle f x y one is solving for x and thus the condition number of the local inverse must be used 1 2 The condition number is derived from the theory of propagation of uncertainty and is formally defined as the value of the asymptotic 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 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 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 k A 10 k displaystyle kappa A 10 k then you may lose up to k displaystyle k digits of accuracy on top of what would be lost to the numerical method due to loss of precision from arithmetic methods 3 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 Contents 1 General definition in the context of error analysis 2 Matrices 3 Nonlinear 3 1 One variable 3 2 Several variables 4 See also 5 References 6 Further reading 7 External linksGeneral definition in the context of error analysis editGiven a problem f displaystyle f nbsp and an algorithm f displaystyle tilde f nbsp with an input x displaystyle x nbsp and output f x displaystyle tilde f x nbsp the error is d f x f x f x displaystyle delta f x f x tilde f x nbsp the absolute error is d f x f x f x displaystyle delta f x left f x tilde f x right nbsp and the relative error is d f x f x f x f x f x displaystyle delta f x f x left f x tilde f x right f x nbsp In this context the absolute condition number of a problem f displaystyle f nbsp is clarification needed lim e 0 sup d x e d f x d x displaystyle lim varepsilon rightarrow 0 sup delta x leq varepsilon frac delta f x delta x nbsp and the relative condition number is clarification needed lim e 0 sup d x e d f x f x d x x displaystyle lim varepsilon rightarrow 0 sup delta x leq varepsilon frac delta f x f x delta x x nbsp Matrices editFor example the condition number associated with the linear equation 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 are taken into account conditioning is a property of the matrix not the algorithm or floating point 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 1b is A 1e The ratio of the relative error in the solution to the relative error in b is A 1 e A 1 b e b A 1 e e b A 1 b displaystyle frac left A 1 e right left A 1 b right frac e b frac left A 1 e right e frac b left A 1 b right nbsp The maximum value for nonzero b and e is then seen to be the product of the two operator norms as follows max e b 0 A 1 e e b A 1 b max e 0 A 1 e e max b 0 b A 1 b max e 0 A 1 e e max x 0 A x x A 1 A displaystyle begin aligned max e b neq 0 left frac left A 1 e right e frac b left A 1 b right right amp max e neq 0 left frac left A 1 e right e right max b neq 0 left frac b left A 1 b right right amp max e neq 0 left frac left A 1 e right e right max x neq 0 left frac Ax x right amp left A 1 right A end aligned nbsp The same definition is used for any consistent norm i e one that satisfies k A A 1 A A 1 A 1 displaystyle kappa A left A 1 right left A right geq left A 1 A right 1 nbsp 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 clarification needed 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 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 displaystyle cdot nbsp is the matrix norm induced by the vector Euclidean norm sometimes known as the L2 norm and typically denoted as 2 displaystyle cdot 2 nbsp then k A s max A s min A displaystyle kappa A frac sigma text max A sigma text min A nbsp where s max A displaystyle sigma text max A nbsp and s min A displaystyle sigma text min A nbsp are maximal and minimal singular values of A displaystyle A nbsp respectively Hence If A displaystyle A nbsp is normal then k A l max A l min A displaystyle kappa A frac left lambda text max A right left lambda text min A right nbsp where l max A displaystyle lambda text max A nbsp and l min A displaystyle lambda text min A nbsp are maximal and minimal by moduli eigenvalues of A displaystyle A nbsp respectively If A displaystyle A nbsp is unitary then k A 1 displaystyle kappa A 1 nbsp The condition number with respect to L2 arises so often in numerical linear algebra that it is given a name the condition number of a matrix If displaystyle cdot nbsp is the matrix norm induced by the L displaystyle L infty nbsp vector norm and A displaystyle A nbsp is lower triangular non singular i e a i i 0 displaystyle a ii neq 0 nbsp for all i displaystyle i nbsp then k A max i a i i min i a i i displaystyle kappa A geq frac max i big a ii big min i big a ii big nbsp 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 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 clarification needed 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 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 k A A A displaystyle kappa A A A dagger nbsp where A displaystyle A dagger nbsp is the Moore Penrose pseudoinverse 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 editCondition numbers can also be defined for nonlinear functions and can be computed using calculus The condition number varies with the point in some cases one can use the maximum or supremum 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 edit The condition number of a differentiable function f displaystyle f nbsp in one variable as a function is x f f displaystyle left xf f right nbsp Evaluated at a point x displaystyle x nbsp this is x f x f x log f log x displaystyle left frac xf x f x right left frac log f log x right nbsp 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 of f displaystyle f nbsp which is log f f f displaystyle log f f f nbsp and the logarithmic derivative of x displaystyle x nbsp which is log x x x 1 x displaystyle log x x x 1 x nbsp yielding a ratio of x f f displaystyle xf f nbsp This is because the logarithmic derivative is the infinitesimal rate of relative change in a function it is the derivative f displaystyle f nbsp scaled by the value of f displaystyle f nbsp Note that if a function has a zero 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 D x displaystyle Delta x nbsp in x displaystyle x nbsp the relative change in x displaystyle x nbsp is x D x x x D x x displaystyle x Delta x x x Delta x x nbsp while the relative change in f x displaystyle f x nbsp is f x D x f x f x displaystyle f x Delta x f x f x nbsp Taking the ratio yields f x D x f x f x D x x x f x f x D x f x x D x x x f x f x D x f x D x displaystyle frac f x Delta x f x f x Delta x x frac x f x frac f x Delta x f x x Delta x x frac x f x frac f x Delta x f x Delta x nbsp The last term is the difference quotient the slope of the secant line and taking the limit yields the derivative Condition numbers of common elementary functions are particularly important in computing significant figures and can be computed immediately from the derivative A few important ones are given below Name Symbol Condition number Addition subtraction x a displaystyle x a nbsp x x a displaystyle left frac x x a right nbsp Scalar multiplication a x displaystyle ax nbsp 1 displaystyle 1 nbsp Division 1 x displaystyle 1 x nbsp 1 displaystyle 1 nbsp Polynomial x n displaystyle x n nbsp n displaystyle n nbsp Exponential function e x displaystyle e x nbsp x displaystyle x nbsp Natural logarithm function ln x displaystyle ln x nbsp 1 ln x displaystyle left frac 1 ln x right nbsp Sine function sin x displaystyle sin x nbsp x cot x displaystyle x cot x nbsp Cosine function cos x displaystyle cos x nbsp x tan x displaystyle x tan x nbsp Tangent function tan x displaystyle tan x nbsp x tan x cot x displaystyle x tan x cot x nbsp Inverse sine function arcsin x displaystyle arcsin x nbsp x 1 x 2 arcsin x displaystyle frac x sqrt 1 x 2 arcsin x nbsp Inverse cosine function arccos x displaystyle arccos x nbsp x 1 x 2 arccos x displaystyle frac x sqrt 1 x 2 arccos x nbsp Inverse tangent function arctan x displaystyle arctan x nbsp x 1 x 2 arctan x displaystyle frac x 1 x 2 arctan x nbsp Several variables edit Condition numbers can be defined for any function f displaystyle f nbsp mapping its data from some domain e g an m displaystyle m nbsp tuple of real numbers x displaystyle x nbsp into some codomain e g an n displaystyle n nbsp tuple of real numbers f x displaystyle f x nbsp where both the domain and codomain are Banach spaces 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 eigenvalues The condition number of f displaystyle f nbsp at a point x displaystyle x nbsp specifically its relative condition number 4 is then defined to be the maximum ratio of the fractional change in f x displaystyle f x nbsp to any fractional change in x displaystyle x nbsp in the limit where the change d x displaystyle delta x nbsp in x displaystyle x nbsp becomes infinitesimally small 4 lim e 0 sup d x e f x d x f x f x d x x displaystyle lim varepsilon to 0 sup delta x leq varepsilon left left frac left f x delta x f x right f x right frac delta x x right nbsp where displaystyle cdot nbsp is a norm on the domain codomain of f displaystyle f nbsp If f displaystyle f nbsp is differentiable this is equivalent to 4 J x f x x displaystyle frac J x f x x nbsp where J x displaystyle J x nbsp denotes the Jacobian matrix of partial derivatives of f displaystyle f nbsp at x displaystyle x nbsp and J x displaystyle J x nbsp is the induced norm on the matrix See also editNumerical methods for linear least squares Numerical stability Hilbert matrix Ill posed problem Singular value Wilson matrixReferences edit Belsley David A Kuh Edwin Welsch Roy E 1980 The Condition Number Regression Diagnostics Identifying Influential Data and Sources of Collinearity New York John Wiley amp Sons pp 100 104 ISBN 0 471 05856 4 Pesaran M Hashem 2015 The Multicollinearity Problem Time Series and Panel Data Econometrics New York Oxford University Press pp 67 72 p 70 ISBN 978 0 19 875998 0 Cheney Kincaid 2008 Numerical Mathematics and Computing p 321 ISBN 978 0 495 11475 8 a b c Trefethen L N Bau D 1997 Numerical Linear Algebra SIAM ISBN 978 0 89871 361 9 Further reading editDemmel James 1990 Nearest Defective Matrices and the Geometry of Ill conditioning In Cox M G Hammarling S eds Reliable Numerical Computation Oxford Clarendon Press pp 35 55 ISBN 0 19 853564 3 External links editCondition Number of a Matrix at Holistic Numerical Methods Institute MATLAB library function to determine condition number Condition number Encyclopedia of Mathematics Who Invented the Matrix Condition Number by Nick Higham Retrieved from https en wikipedia org w index php title Condition number amp oldid 1219556571, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.