Measure sensitivity of the problem
A condition number measures potential amplification of relative input perturbations into relative output changes. For an invertible square linear system, the matrix condition number in a chosen induced norm is the norm of A times the norm of its inverse. It describes sensitivity of the mathematical problem, not program execution time. A careful algorithm cannot remove uncertainty already present in sensitive input data. Specify which input is perturbed, which output is observed, and which norm defines relative change. A bare condition number without those choices does not fully describe the accuracy question being asked.
Calculate the two-norm condition number
In the induced two-norm, an invertible square matrix has condition number equal to its largest singular value divided by its smallest. For diag(1,0.001), the value is one thousand. The second direction is strongly compressed, so solving in the reverse direction can amplify perturbations there. This does not mean every right-hand side produces an error exactly one thousand times larger. The condition number describes worst-case sensitivity, while the actual perturbation direction matters. Work through explicit inputs to distinguish an attainable or bounding sensitivity statement from a prediction that every numerical run will exhibit the same error ratio.
Small scale alone is not ill-conditioning
The matrix 0.001 times the identity has two-norm condition number one. Small entries alone do not imply poor relative conditioning. Uniform multiplication by a nonzero scalar changes the norm of A and its inverse in compensating ways. Different scaling of separate columns or variables can matter substantially, especially when physical units differ. Appropriate scaling can improve a numerical formulation, but it does not magically eliminate uncertainty in the original measurements. Preserve the intended variables, units, and error interpretation when assessing a transformed problem. A small determinant or small entry is not a substitute for the specified condition-number calculation.
A small residual can coexist with solution error
For an approximate solution x-hat, the residual is b minus A times x-hat. A small residual shows that the candidate nearly satisfies the equation, but its difference from the true solution can be A inverse times that residual. When A strongly compresses a direction, a large solution error along that direction may produce only a small residual. Report residual and solution error as distinct quantities. In a real problem where the exact solution is unknown, use scaled residuals, conditioning estimates, and input uncertainty together. None of these indicators alone justifies more accurate digits than the data and problem sensitivity can support.
Combine conditioning with algorithmic stability
Conditioning concerns the problem’s sensitivity, while numerical stability concerns how an algorithm handles rounding and other computational errors. An unstable method can damage a well-conditioned problem, and a stable method cannot remove every consequence of uncertain data in an ill-conditioned problem. Suitable factorization-based solvers are often preferable to explicitly forming an inverse. Singular matrices do not satisfy the invertibility assumption behind a finite condition number of this form. When accuracy is inadequate, distinguish changing the solver, improving data, reformulating the model, and adding regularization. These interventions alter different parts of the reasoning and should not all be described as fixing the same numerical bug.
Inspect a perturbation direction
For diag(1,0.001), perturbing only the first coordinate of the right-hand side changes that solution coordinate directly, while a perturbation in the second is amplified by a factor of one thousand in absolute terms. Relative-error interpretation additionally depends on the base input and solution. Keep a worst-case condition estimate separate from a result for one specified perturbation. This avoids both dismissing every computation as useless and treating one favorable direction as proof of general accuracy.