Class
TMtx
In practice, most computations are performed with rounding errors. Besides, you often need to solve a system Ax = b where the data (the elements of A and b) are not known exactly. Therefore, it's important to understand how the data errors and rounding errors can affect the solution x. If x is the exact solution of Ax = b, and x + dx is the exact solution of a perturbed problem (A + dA)x = (b + db), then

In other words, relative errors in A or b may be amplified in the solution vector x by a factor k(A) = ||A|| ||A -1 || called the condition number of A. The norm used to calculate the condition number is set by the ConditionNumber property.
Rounding errors have the same effect as relative perturbations c(n)e in the original data. Here e is the machine precision, and c(n) is a modest function of the matrix order n. The corresponding solution error is ||dx||/||x|| <= c(n)k(A)e. (The value of c(n) is seldom greater than 10n), Thus, if your matrix A is ill-conditioned (that is, its condition number k(A) is very large), then the error in the solution x is also large; you may even encounter a complete loss of precision. This loss can be greatly reduced by enabling the RefineSolution property.
| See Also |
|---|
| LUSolve |
| ConditionNumber |
| RefineSolution |
var X,B: TVec; A: TMtx; begin CreateIt(X,B); CreateIt(A); try B.SetIt(False,[0,2]); A.SetIt(2,2,false,[1,2, 3,4]); // 2x2, not complex matrix A.RefineSolution := True; A.ConditionNumber := cnNormInf; A.LUSolve(B,X); finally FreeIt(B,X); FreeIt(A); end; end;
| Copyright 2008 Dew Research |