Skip to main content

Condition Number

Ill conditioning arises while solving linear equations of the type

f=Kx\mathbf{f} = \mathbf{Kx}

for given loads f\mathbf{f} and stiffness K\mathbf{K} in (say) linear static analysis, approximations are introduced in the solution because all calculations are carried out in finite precision arithmetic. This becomes important when K\mathbf{K} is ill-conditioned because there is a possibility of these approximations leading to large errors in the displacements. The extent of these errors can be quantified by the 'condition number' of the stiffness matrix.

The condition number of a matrix (with respect to inversion) measures worst-case of changes in x\mathbf{x} corresponding to small changes in K\mathbf{K} or f\mathbf{f}. It can be calculated using the product of norm of the matrix times the norm of its inverse.

κ(K)=KK1\kappa\left( \mathbf{K} \right) = \left\| \mathbf{K} \right\| \cdot \left\| \mathbf{K}^{-1} \right\|

where \left\lVert \right\rVert is a subordinate matrix norm.

If K\mathbf{K} is a symmetric matrix, the condition number κ(K)\kappa\left( \mathbf{K} \right) can be shown to the ratio of its maximum and minimum eigenvalues λmax\lambda_{\max} and λmin\lambda_{\min}.

κ(K)=λmaxλmin\kappa\left( \mathbf{K} \right) = \left| \frac{\lambda_{\max}}{\lambda_{\min}} \right|

The minimum value of κ(K)\kappa\left( \mathbf{K} \right) is 1 and the maximum value is infinity. If the condition number is small, the computed solution x\mathbf{x} is reliable (i.e. a reliable approximation to the true solution of f=Kx\mathbf{f} = \mathbf{Kx}). If the condition number is large, (i.e. if the matrix is almost singular) the results cannot be trusted.

GSA computes a lower bound approximation to the 1-norm condition number of K\mathbf{K} and this is reported as part of the solver output. This can be used to evaluate the accuracy of the solution both qualitatively and quantitatively. The (qualitative) rule of thumb for accuracy is nn – the number of digits of accuracy in x\mathbf{x} is

n=16logκn = 16 - \log\kappa

In general any stiffness matrix with condition number above 1015 can produce results with no accuracy at all. Any results produced from matrices with condition number greater than 1010 must be treated with caution.

Where a model is ill-conditioned, Model Stability analysis can help detect the causes of ill conditioning.

For a given condition number, we can also compute the maximum relative error in x\mathbf{x}. The max. relative error in x\mathbf{x} is defined as the maximum ratio of norms of error in x\mathbf{x} to x\mathbf{x}, i.e.

emax=Δxx{e_{max} = \frac{\left| \Delta\mathbf{x} \right|}{\left| \mathbf{x} \right|}}

Given a matrix K\mathbf{K} with condition number κ\kappa, the maximum relative error in x\mathbf{x} when solving f=Kx\mathbf{f} = \mathbf{Kx} is

2εκ1εκ\frac{2\varepsilon\kappa}{1 - \varepsilon\kappa}

where ε\varepsilon is the constant 'unit-roundoff' and is equal to 1.11e-16 for double precision floating point numbers. The maximum relative error is computed and reported as part of solver output. Ideally, this should be small (<<1)( < < 1), since a small relative error indicates a reliable solution but as κ1ε\kappa \rightarrow \frac{1}{\varepsilon}, the relative error grows rapidly.

GSA calculates the condition number using Higham and Tisseur's block 1-Norm condition number estimation algorithm.

These are reported in the Analysis Details output.