Documentation

The case of linear systems:

The case of linear systems:

Solving linear systems is a very common sub-routine in any MI(QC)P-solver, as we have to solve many linear systems during the full execution of the algorithm.

So, consider that we have a linear system $Ax = b$ with an unique solution (i.e. $A$ is a square matrix with full rank), and you want to evaluate how the solution to the system might change if we perturb the right-hand side $b$. Since the system has a unique solution, we know that given $b$, the solution will be $A^{-1}b$, and if we perturb $b$ with $\varepsilon$, the solution will be $A^{-1}(b+\varepsilon)$. A measure for the relative change in the solution with respect to the relative change in the input would be the ratio

\begin{displaymath}\eta(b,\varepsilon):=\frac{\Vert A^{-1}b\Vert}{\Vert A^{-1}(b+\varepsilon)\Vert}/\frac{\Vert b\Vert}{\Vert b+\varepsilon\Vert}.\end{displaymath}

Note that the above definition is independent of the magnitudes of $b$ and $\varepsilon$. From there, the worst possible ratio would be the result of

\begin{displaymath}\kappa(A):=\max_{b,\varepsilon}\eta(b,\varepsilon).\end{displaymath}

This quantity is known as the condition number of the matrix $A$. It is not hard to prove that

\begin{displaymath}\kappa(A)=\frac{\lambda_{\max}}{\lambda_{\min}},\end{displaymath}

where $\lambda_{\max}$ and $\lambda_{\min}$ are the maximum and minimum, respectively, eigenvalues of $A$. Equivalently

\begin{displaymath}\kappa(A)=\frac{\Vert A\Vert}{\Vert A^{-1}\Vert}.\end{displaymath}

A common interpretation of $\kappa(A)=10^k$ is that, when solving the system $Ax = b$, you may lose up to $k$ digits of accuracy in $x$ from the accuracy you have in $b$.

The condition number for the optimal simplex basis in an LP is captured in the KappaExact attribute. A very large $\kappa$ value might be an indication that the result might be unstable.

When this is indeed the case, the best advice is to scale the constraint matrix coefficients so that the resulting range of coefficients is small. This transformation will typically reduce the $\kappa$ value of the final basis; please refer to the Scaling section for a discussion on how to perform this rescaling, and also for caveats on scaling in general.