In numerical analysis, a B-spline (short for basis spline) is a type of spline function designed to have minimal support (overlap) for a given degree, smoothness, and set of breakpoints (knots that partition its domain), making it a fundamental building block for all spline functions of that degree. A B-spline is defined as a piecewise polynomial of order n, meaning a degree of n−1. It is built from sections that meet at these knots, where the continuity of the function and its derivatives depends on how often each knot repeats (its multiplicity). Any spline function of a specific degree can be uniquely expressed as a linear combination of B-splines of that degree over the same knots, a property that makes them versatile in mathematical modeling. A special subtype, cardinal B-splines, uses equidistant knots. The concept of B-splines traces back to the 19th century, when Nikolai Lobachevsky explored similar ideas at Kazan University in Russia, though the term "B-spline" was coined by Isaac Jacob Schoenberg in 1967, reflecting their role as basis functions.
B-splines are widely used in fields like computer-aided design (CAD) and computer graphics, where they shape curves and surfaces through a set of control points, as well as in data analysis for tasks like curve fitting and numerical differentiation of experimental data.
Definition
A B-spline of order p+1 is a collection of piecewise polynomial functions Bi,p(t) of degree p in a variable t. The values of t where the pieces of polynomial meet are known as knots, denoted t0,t1,t2,…,tm and sorted into nondecreasing order. For a given sequence of knots, there is, up to a scaling factor, a unique spline Bi,p(t) satisfying
Bi,p(t)={non-zeroif ti≤t<ti+p+1,0if t<ti∨ti+p+1≤t. If we add the additional constraint that
∑i=0m−p−1Bi,p(t)=1 for all t between the knots tp and tm−p, then the scaling factor of Bi,p(t) becomes fixed. The knots in-between (and not including) tp and tm−p are called the internal knots. B-splines can be constructed by means of the Cox–de Boor recursion formula. We start with the B-splines of degree p=0, i.e. piecewise constant polynomials.
Bi,0(t):={1if ti≤t<ti+1,0otherwise. The higher (p+1)-degree B-splines are defined by recursion
Bi,p(t):=t−titi+p−tiBi,p−1(t)+ti+p+1−tti+p+1−ti+1Bi+1,p−1(t).
Properties A B-spline function is a combination of flexible bands that is controlled by a number of points that are called control points, creating smooth curves. These functions are used to create and manage complex shapes and surfaces using a number of points. B-spline function and Bézier functions are applied extensively in shape optimization methods. A B-spline of order n is a piecewise polynomial function of degree n−1 in a variable x. It is defined over n locations ti, called knots or breakpoints, which must be in non-descending order ti≤ti+1. The B-spline contributes only in the range between the first and last of these knots and is zero elsewhere. If each knot is separated by the same distance h (where h=ti+1−ti) from its predecessor, the knot vector and the corresponding B-splines are called "uniform" (see cardinal B-spline below). For each finite knot interval where it is non-zero, a B-spline is a polynomial of degree n−1. A B-spline is a continuous function at the knots. When all knots belonging to the B-spline are distinct, its derivatives are also continuous up to the derivative of degree n−2. If the knots are coincident at a given value of x, the continuity of derivative order is reduced by 1 for each additional coincident knot. B-splines may share a subset of their knots, but two B-splines defined over exactly the same knots are identical. In other words, a B-spline is uniquely defined by its knots. One distinguishes internal knots and end points. Internal knots cover the x-domain one is interested in. Since a single B-spline already extends over n knots, it follows that the internal knots need to be extended with n−1 endpoints on each side, to give full support to the first and last B-spline, which affect the internal knot intervals. The values of the endpoints do not matter, usually the first or last internal knot is just repeated. The usefulness of B-splines lies in the fact that any spline function of order n on a given set of knots can be expressed as a linear combination of B-splines:
Sn,𝐭(x)=∑iαiBi,n(x). B-splines play the role of basis functions for the spline function space, hence the name. This property follows from the fact that all pieces have the same continuity properties, within their individual range of support, at the knots. Expressions for the polynomial pieces can be derived by means of the Cox–de Boor recursion formula
Bi,0(x):={1if ti≤x<ti+1,0otherwise. Bi,k(x):=x−titi+k−tiBi,k−1(x)+ti+k+1−xti+k+1−ti+1Bi+1,k−1(x). That is, Bi,0(x) is piecewise constant one or zero indicating which knot span x is in (zero if knot span i is repeated). The recursion equation is in two parts:
x−titi+k−ti ramps from zero to one as x goes from ti to ti+k, and
ti+k+1−xti+k+1−ti+1 ramps from one to zero as x goes from ti+1 to ti+k+1. The corresponding Bs are zero outside those respective ranges. For example, Bi,1(x) is a triangular function that is zero below x=ti, ramps to one at x=ti+1 and back to zero at and beyond x=ti+2. However, because B-spline basis functions have local support, B-splines are typically computed by algorithms that do not need to evaluate basis functions where they are zero, such as de Boor's algorithm. This relation leads directly to the FORTRAN-coded algorithm BSPLV, which generates values of the B-splines of order n at x. The following scheme illustrates how each piece of order n is a linear combination of the pieces of B-splines of order n − 1 to its left.
000Bi−2,2Bi−1,1Bi,0Bi−1,2Bi,10Bi,200 Application of the recursion formula with the knots at (0,1,2,3) gives the piecewise components of the uniform B-spline of order 3
b0=x2/2b1=(−2x2+6x−3)/2b2=(3−x)2/2 where
B0,2(x)={b0if 0≤x<1,b1if 1≤x<2,b2if 2≤x<3,0otherwise. These pieces are shown in the diagram. The continuity property of a quadratic spline function and its first derivative at the internal knots are illustrated, as follows
At x=1: b0=b1=0.5, db0dx=db1dx=1.At x=2: b1=b2=0.5, db1dx=db2dx=−1. The second derivative of a B-spline of degree 2 is discontinuous at the knots:
d2b0dx2=1, d2b1dx2=−2, d2b2dx2=1. Faster variants of the de Boor algorithm have been proposed, but they suffer from comparatively lower stability.
… excerpt ends here. Continue reading the full article.





