Why Knot Multiplicity Matters
A spline can change its polynomial form at a knot, but it need not change abruptly. Its pieces may meet with matching values, matching slopes, or matching higher derivatives. The number of times a knot occurs in a B-spline knot sequence controls how much of this matching is guaranteed by the spline space. This matters when a model needs a smooth curve, or when the data and scientific setting make a sharp change plausible.
The key point is that a repeated knot relaxes a continuity requirement. For a cubic spline, a simple interior knot guarantees matching values, first derivatives, and second derivatives. Repeating that knot reduces the guaranteed smoothness one level at a time. The rule concerns what the basis permits; particular fitted coefficients can still produce a smoother curve than the rule requires.
Multiplicity and the Continuity Rule
A knot sequence for a B-spline is an ordered, nondecreasing list of knot values. An interior knot is a knot value strictly inside the range over which the spline is defined. Its multiplicity, denoted here by \(m\), is the number of times that value appears in the sequence. For example, the sequence \(0,1,2,2,3,4\) has an interior knot at 2 with multiplicity 2.
The degree of the B-spline basis functions is denoted by \(p\). A cubic basis has \(p=3\). At an interior knot of multiplicity \(m\), where \(1\leq m\leq p+1\), the spline space guarantees continuity through derivative order \(p-m\), when this quantity is nonnegative. The notation \(C^q\) means that the function and its derivatives through order \(q\) are continuous at the knot. If \(m=p+1\), there is no continuity requirement across that knot: the two sides can have different limiting values.
For cubic splines, substituting \(p=3\) gives the following cases. “No continuity required” does not mean a jump must occur; it means a jump is allowed by the spline space.
| Cubic-knot multiplicity \(m\) | Guaranteed continuity | Matching conditions at the knot |
|---|---|---|
| 1 | \(C^2\) | Value, first derivative, and second derivative |
| 2 | \(C^1\) | Value and first derivative |
| 3 | \(C^0\) | Value |
| 4 | No continuity required | None |
These are guarantees for the spline space, not predictions that every fitted curve will show exactly the least smoothness listed. For instance, a curve allowed to have a slope change may happen to have equal slopes on both sides because of its estimated coefficients.
Why Repetition Relaxes Matching Conditions
The continuity rule can be understood by comparing polynomial pieces on the two sides of a knot. Each piece has degree at most \(p\). Requiring the two pieces to agree in value and in their first \(q\) derivatives at the knot imposes \(q+1\) matching conditions: equality of the derivative of order 0, then order 1, and so on through order \(q\). A simple interior knot in a degree-\(p\) spline requires \(C^{p-1}\) matching. Each additional occurrence of the knot relaxes one of those conditions.
For example, when \(p=3\), a simple knot requires \(3-1+1=3\) matches: the value and the first two derivatives. At multiplicity 2, the requirement is \(3-2+1=2\) matches: value and first derivative. At multiplicity 3, only the value must match. At multiplicity 4, the count is \(3-4+1=0\), so there is no required match. This count explains the continuity guarantee. It does not say that a fitted curve will necessarily use every freedom the basis allows.
In regression, the fitted mean curve can be written as a linear combination of basis functions, for example \(f(x)=\sum_j\beta_j B_{j,3}(x)\) for a cubic B-spline basis. Here \(B_{j,3}\) is the \(j\)th basis function of degree 3 and \(\beta_j\) is its coefficient. If observations are modeled as \(Y_i=f(x_i)+\varepsilon_i\), this continuity rule concerns the shape permitted for \(f\). It follows from the chosen degree and knot sequence; it does not depend on a probability model for the errors. Statistical assumptions used for inference about coefficients are a separate matter.
Worked Checks at Cubic Knots
Worked Example: A Simple Knot Gives a \(C^2\) Cubic Spline
Suppose two cubic polynomial pieces meet at the simple interior knot \(\tau=4\). Write \(u=x-4\), so the knot corresponds to \(u=0\), and consider
At the knot, both values are \(10\). Their first derivatives with respect to \(x\) are \(2+2u+0.6u^2\) on the left and \(2+2u-0.3u^2\) on the right; both equal \(2\) at \(u=0\). Their second derivatives are \(2+1.2u\) and \(2-0.6u\); both equal \(2\) at the knot. Thus value, slope, and curvature match, so the pieces join with \(C^2\) continuity.
Their third derivatives are \(1.2\) and \(-0.6\), which do not match. This is consistent with a simple cubic knot: the spline space guarantees \(C^2\), not \(C^3\). The example also shows why matching the function and its first two derivatives is enough to verify the stated guarantee.
Worked Example: A Double Knot Allows a Change in Curvature
Now consider a cubic spline with an interior knot at \(\tau=2\) repeated twice. Let \(u=x-2\), and use the pieces
At \(u=0\), the left and right values are \(5\). The first derivatives are \(2+2u\) and \(2+6u+1.5u^2\), so each has value \(2\) at the knot. The pieces therefore agree in value and slope, as a double cubic knot requires for \(C^1\) continuity.
The second derivatives are \(2\) on the left and \(6+3u\) on the right. At the knot they are \(2\) and \(6\), so curvature does not match. The curve remains continuous with a continuous slope, but its curvature changes across the knot. This is permitted because \(3-2=1\), giving a \(C^1\) guarantee.
Worked Example: Triple and Quadruple Knots
At the knot \(\tau=1\), set \(u=x-1\). For a cubic knot of multiplicity 3, consider
Both pieces have value \(1\) at \(u=0\), so they meet continuously. Their first derivatives are \(1\) and \(4+2u\), giving slopes \(1\) and \(4\) at the knot. Thus only value matching holds; the pieces are \(C^0\) but not \(C^1\), exactly the continuity guaranteed at multiplicity 3.
For multiplicity 4, the same degree permits a jump. For example, at \(u=0\), let \(f_L(x)=2+u\) and \(f_R(x)=7-u\). The left-hand limiting value is \(2\), while the right-hand limiting value is \(7\), a difference of \(7-2=5\). A fourfold interior knot does not force those values to agree. It permits the jump, although other coefficient choices could still make the two values equal.
Applying the Rule to a Fitted Curve
When interpreting a cubic B-spline regression, first identify the interior knot and count its occurrences in the knot sequence. Then use \(3-m\) to determine the highest derivative order whose continuity is guaranteed. This describes what the fitted curve is constrained to do at that knot; it is not a test of whether the data show a change, nor evidence that a jump or bend actually occurs.
For example, \(2,2,2\) means the interior knot at 2 has multiplicity 3.
For a cubic basis, set \(p=3\).
When \(m\leq3\), the order is \(3-m\); at \(m=4\), no match is required.
A \(C^1\) guarantee means the fitted mean curve must have matching values and slopes, but its curvature may differ across the knot.
This distinction is useful when choosing a model. A simple knot is appropriate when a smooth transition is wanted; a more repeated knot allows a less smooth transition. The data alone do not determine which constraints were imposed: the basis specification does. Conversely, an allowed change in slope or a possible jump need not appear in the fitted curve if the estimated coefficients happen to make the adjacent pieces match more closely.
Common Mistake
A frequent error is to say, “A cubic spline is always \(C^2\), so its slope and curvature must match at every knot.” That statement is correct only for simple interior knots. At multiplicity 2, the spline is guaranteed to be \(C^1\), so the second derivatives need not agree. At multiplicity 3, even the slopes need not agree; at multiplicity 4, values need not agree.
The correction is to use both the degree and the knot multiplicity: for degree \(p\), the guaranteed continuity order is \(p-m\) when that is nonnegative. Also avoid the reverse mistake of assuming that a knot with weaker guaranteed continuity must visibly create a kink or jump. The rule states what the basis permits, not what every fitted coefficient vector produces.
Check Your Understanding
Use the knot multiplicity and spline degree to answer each question.
- A cubic B-spline has an interior knot listed once. Which derivatives must match across the knot?
- For a cubic knot repeated twice, what is guaranteed to match, and what may differ?
- A cubic knot occurs three times. Can the fitted curve have different left and right slopes at that knot? Explain.
- Does a cubic knot of multiplicity four force a jump in the fitted curve? Explain the difference between allowing and requiring a jump.
- For a degree-4 spline with an interior knot of multiplicity 2, what continuity order is guaranteed?