Affine covariance of natural cubic spline interpolation (source code)

= Affine covariance of natural cubic spline interpolation

If $S$ is the <natural cubic spline> interpolating data $y_i$ at fixed distinct knots $x_i$, then $aS(x)+b+cx$ is the natural cubic spline interpolating $ay_i+b+cx_i$.

The transformed function is piecewise cubic, preserves continuity of the first two derivatives, and has endpoint second derivatives $aS''=0$. It takes exactly the transformed nodal values. Uniqueness of the natural spline therefore proves the claim. This permits affine changes in data or the addition of a linear trend without solving a new spline system.