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

Cubic Spline Interpolation

Graduate Depth 101 in the knowledge graph ☐ I know this ☆ Set as goal
574prerequisites beneath it
See this on the map →
Interpolation Error AnalysisChebyshev Nodes and Optimal Interpolation→
splines cubic interpolation

Core Idea

Cubic spline interpolation uses piecewise cubic polynomials with continuous first and second derivatives at the nodes. This approach avoids Runge's phenomenon and produces smooth, stable interpolants without oscillation. Cubic splines are widely used in computer graphics, CAD, and numerical analysis because they balance smoothness with computational efficiency.

Explainer

If you've studied interpolation error analysis, you've seen one fundamental problem with high-degree polynomial interpolation: adding more data points can actually *worsen* the fit, particularly near the endpoints. This is Runge's phenomenon — oscillations that grow unboundedly for uniformly spaced nodes as the polynomial degree increases. The fix is not to use a single high-degree polynomial, but to break the domain into pieces, fit a low-degree polynomial on each piece, and stitch them together smoothly. This is the spline idea.

A cubic spline on n+1 nodes x₀ < x₁ < ... < xₙ is a piecewise cubic polynomial S(x) satisfying three conditions: (1) S(xᵢ) matches the data value at each node, (2) the pieces join continuously at interior nodes, and (3) the first and second derivatives also match at each interior junction. The C² smoothness condition — continuous up to the second derivative — is what makes the result look visually smooth: no kinks and no sudden changes in curvature. A physical analogy: a thin elastic rod forced through the data points naturally minimizes bending energy, which corresponds mathematically to minimizing ∫[S''(x)]² dx. The natural cubic spline achieves exactly this minimum, making it the shape a drafting spline would take.

Setting up the spline requires solving a tridiagonal linear system for the second derivatives at interior nodes. This system is sparse, symmetric, and diagonally dominant — properties that make it extremely fast to solve (O(n) time using the Thomas algorithm) and numerically stable. Two boundary conditions must be specified to close the system, since n−1 interior second derivatives give n−1 equations but you have n cubic pieces requiring 4n − 3 constraints. The most common choices are the natural spline (S'' = 0 at the endpoints, minimizing curvature there) or the clamped spline (specify S' at the endpoints when derivative data is available).

The payoff is that cubic splines achieve near-optimal interpolation accuracy — O(h⁴) error on n intervals with spacing h — without the endpoint blowup of global high-degree polynomials. This makes them the default choice in computer graphics (smooth Bézier-style curves through control points), CAD/CAM (smooth tool paths in numerical machining), and scientific computing (interpolating tabulated data like thermodynamic properties). The key insight is that smoothness and stability come not from higher-degree polynomials globally, but from enforcing derivative continuity locally across piecewise low-degree pieces. The tradeoff you paid — solving a linear system instead of evaluating a single formula — is minimal, and the gain in stability is enormous.

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 → Addition Within 10 → Number Bonds to 10 → 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 → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Dividing Integers → Unit Rates → Proportions → Percent Concept → Converting Between Fractions, Decimals, and Percents → Operations with Rational Numbers → Two-Step Equations → Solving Multi-Step Equations → Equations with Variables on Both Sides → Angle Pairs: Complementary, Supplementary, and Vertical → Parallel Lines and Transversals → Corresponding Angles → Alternate Interior Angles → Triangle Angle Sum Theorem → Exterior Angle Theorem → Triangle Inequality Theorem → Similar Triangles: AA Similarity → Similar Triangles: SSS and SAS Similarity → Proportions in Similar Triangles → Right Triangle Trigonometry Introduction → Sine, Cosine, and Tangent Ratios → 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 → Fundamental Theorem of Calculus Part 1 → Fundamental Theorem of Calculus Part 2 → U-Substitution → Partial Fraction Decomposition for Integration → Improper Integrals - Convergence → Integral Test → P-Series → Comparison Test → Limit Comparison Test → Series Convergence Test Strategy → Power Series → Radius and Interval of Convergence → Taylor Series → Interpolation Error Analysis → Runge's Phenomenon → Chebyshev Nodes and Optimal Interpolation → Cubic Spline Interpolation

Longest path: 102 steps · 574 total prerequisite topics

Prerequisites (2)

Leads To (0)

No topics depend on this one yet.