A topic in the Open Knowledge Graph — a free, open map of 15,495 topics and the order to learn them in.

Numerical Stability and Conditioning

Graduate Depth 120 in the knowledge graph ☐ I know this ☆ Set as goal
7topics build on this
755prerequisites beneath it
See this on the map →
Catastrophic CancellationRounding Errors and Error Propagation+1 more→→Condition Number of a ProblemGaussian Elimination with Pivoting
stability conditioning error-analysis

Core Idea

A numerical algorithm is stable if small perturbations in inputs produce only small changes in outputs. Stability depends on both the problem (conditioning) and the algorithm (implementation). A well-conditioned problem solved with a stable algorithm yields accurate results; poor conditioning or instability can make even theoretically simple problems numerically unreliable.

How It's Best Learned

Compute e⁻²⁰ two ways in double precision. Summing the Taylor series 1 − 20 + 20²/2! − … directly gives garbage, because terms reach about 4 × 10⁷ while the answer is about 2.06 × 10⁻⁹. Computing 1/e²⁰ with the same series gives nearly full accuracy. The problem is well conditioned (κ = |x| = 20), so the failure belongs to the first algorithm.

Common Misconceptions

Explainer

From your study of catastrophic cancellation, you saw a concrete failure mode: subtracting two nearly-equal floating-point numbers can wipe out all significant digits, turning a tiny relative error into a massive one. Numerical stability is the broader framework that explains when and why such failures occur, and how to reason about algorithm quality systematically.

The central distinction is between conditioning and stability. Conditioning is a property of the mathematical *problem* — how much does the true answer change when the inputs change slightly? Stability is a property of the *algorithm* — does the sequence of floating-point operations amplify errors, or keep them bounded? A well-conditioned problem has answers that are insensitive to small input perturbations. A stable algorithm is one that doesn't introduce unnecessary amplification beyond what the problem itself requires. These are independent: an unstable algorithm can ruin a well-conditioned problem, and a stable algorithm cannot rescue an ill-conditioned one.

Consider evaluating the polynomial p(x) = (x − 2)² near x = 2. Expanded as x² − 4x + 4, the three-term version subtracts large numbers that nearly cancel, risking catastrophic cancellation — unstable for this input. The factored form (x − 2)² avoids this cancellation entirely — mathematically identical, but numerically stable. This is a clean example where algorithm choice, not the problem, determines accuracy. Both formulas compute the same function; only their numerical behavior differs.

A useful benchmark concept is backward stability: an algorithm is backward stable if it computes the exact answer to a slightly perturbed problem. This framing separates algorithm error from problem sensitivity. If the backward error is tiny (the perturbed input is close to the real input) and the problem is well-conditioned (small input changes produce small output changes), then the computed answer is close to the true answer. Most reliable numerical algorithms — Gaussian elimination with pivoting, QR decomposition, stable ODE solvers — are designed with backward stability in mind. When you encounter numerical results you distrust, the first diagnostic question is always: is this problem inherently ill-conditioned, or is the algorithm introducing avoidable error?

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Combining Small Groups Within 5 → Number Bonds Within 5 → Number Bonds to 10 → Tens and Ones Place Value → Reading and Writing Three-Digit Numbers → Comparing Three-Digit Numbers → Comparing and Ordering Three-Digit Quantities → Comparing and Ordering Whole Numbers → Comparing Numbers 1 to 20 → Ordering Numbers to 20 → Number Line 0 to 20 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Opposites and Additive Inverses → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Multiplying Binomials (FOIL) → Factoring Trinomials → Factoring Completely → Introduction to Rational Expressions → Simplifying Radical Expressions → Segments and Distance → Triangle Inequality Theorem → Similar Triangles: AA Similarity → Similar Triangles: SSS and SAS Similarity → Proportions in Similar Triangles → Similar Right Triangles and the Geometric Mean → Right Triangle Trigonometry Introduction → Sine, Cosine, and Tangent Ratios → Special Right Triangles: 30-60-90 → Trigonometric Ratios Review → Radian Measure → Converting Between Degrees and Radians → The Unit Circle → Graphing Sine and Cosine → Graphing Tangent and Reciprocal Trigonometric Functions → Derivatives of Trigonometric Functions → Antiderivatives → Indefinite Integrals → Basic Integration Rules → Riemann Sums → Definite Integral Definition → Double Integrals: Definition and Setup → Iterated Integrals and Fubini's Theorem → Double Integrals over Rectangular Regions → Double Integrals over General Regions → Applications of Double Integrals: Area, Mass, and Moments → Work Done by a Force → Kinetic Energy → Elastic Collisions → Inelastic Collisions → Coefficient of Restitution → Collision Analysis and Real-World Applications → Two-Body Collisions in the Center-of-Mass Frame → Reduced Mass and Two-Body Problems → Kinematics in Two Dimensions → Projectile Motion → Circular Motion: Kinematics → Simple Harmonic Motion → Introduction to Differential Equations → Euler's Method for Numerical Solutions → Euler's Method for ODEs (Error Analysis) → Runge-Kutta Methods → Multistep Methods: Adams-Bashforth and Adams-Moulton → Stiff Differential Equations and Stability Regions → Stability Regions and A-Stability → Numerical Stability and Conditioning

Longest path: 121 steps · 755 total prerequisite topics

Prerequisites (3)

Leads To (2)