I have a linear system of the type

$$Ax = b$$

I want to minimise $|b - Ax|^2$. I know there are different approaches to directly solve the system (Normal equation + Cholesky, QR decomposition, SVD decomposition) that have different numerical stability.

I would like to ask how it is possible to estimate the impact of the numerical error on the estimates of each parameter $x$.

  • Can it be done solely on the base of the condition number?

  • Should it be done using Monte Carlo simulation?

  • How should such simulation be designed?

  • 1
    $\begingroup$ Is your problem a linear system (square?), or a least squares problem $\min \|Ax-b\|$? Because the algorithms you list are the classical choices to solve LS problems, not to solve linear systems (even though some of those decompositions can do both jobs). $\endgroup$ Commented Mar 21, 2019 at 8:05
  • $\begingroup$ @FedericoPoloni You are right the question was unclear, I edited it. $\endgroup$
    – pinpon
    Commented Mar 22, 2019 at 8:18

1 Answer 1


I think most solvers will give you a residual error. If you flip your equation to read:

$Ax - b = r\approx 0$

The solver will usually provide you with the residual error like: $|r|$.

Now if you want to compare different solvers you might use that as a measurement of the error. As a rule of thumb: you will not find a solver which is optimal for every System A. Usually there are also speed/stability tradeofs or such.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.