In the previous section, we saw that the condition number measures how sensitive a problem is to input perturbations. But sensitivity of the problem is only half the story — the algorithm we choose matters just as much.
The same pattern — well-conditioned problem, unstable algorithm — appears in a computation we already know well.
Recognizing this pattern — is the problem sensitive, or is the algorithm choosing a sensitive path? — is one of the central skills in numerical analysis.
Not every source of error is an ill-conditioning issue. The three operations below can each cause trouble, but for different reasons:
Subtracting nearly equal numbers (x−y when x≈y): Subtraction of nearly equal numbers is genuinely ill-conditioned — the condition number of subtraction is κ=(∣a∣+∣b∣)/∣a−b∣→∞ as a→b. The key insight is that an algorithm may choose to subtract nearly equal numbers as an intermediate step, even when the overall problem doesn’t require it. If the subtraction can be avoided by algebraic reformulation, the algorithm becomes stable.
Dividing by a small number (x/y when ∣y∣≪1): This is not ill-conditioned — the condition number of f(y)=x/y with respect to y is κ=1. The issue is that small absolute errors in y become large absolute errors in the result. If y itself was computed with some absolute error δ, then x/(y+δ)−x/y≈−xδ/y2, which is large when y is small. Remedy: rewrite using logarithms or rescale the computation.
Adding numbers of vastly different magnitude (x+y when ∣x∣≫∣y∣): This is also not an ill-conditioning issue. Subtraction is not involved, so there is no cancellation. The problem is that floating-point numbers have finite precision: if y is smaller than the spacing between consecutive floats near x, then fl(x+y)=x and y is simply lost. Remedy: sort and sum smallest first, or use compensated summation (Kahan summation).
We will formalize these ideas using forward and backward error when we study linear systems. There, we will see that backward stability — the precise version of “solves a nearby problem exactly” — is the gold standard for numerical algorithms. For now, the key takeaway is: distinguish between the problem (conditioning) and the algorithm (stability).