In
numerical analysis
Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic computation, symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of ...
, a B-spline (short for basis spline) is a type of
spline function designed to have minimal
support
Support may refer to:
Arts, entertainment, and media
* Supporting character
* Support (art), a solid surface upon which a painting is executed
Business and finance
* Support (technical analysis)
* Child support
* Customer support
* Income Su ...
(overlap) for a given
degree,
smoothness
In mathematical analysis, the smoothness of a function is a property measured by the number of continuous derivatives (''differentiability class)'' it has over its domain.
A function of class C^k is a function of smoothness at least ; t ...
, and set of breakpoints (
knots
A knot is a fastening in rope or interwoven lines.
Knot or knots may also refer to:
Other common meanings
* Knot (unit), of speed
* Knot (wood), a timber imperfection
Arts, entertainment, and media Films
* ''Knots'' (film), a 2004 film
* ''Kn ...
that partition its
domain
A domain is a geographic area controlled by a single person or organization. Domain may also refer to:
Law and human geography
* Demesne, in English common law and other Medieval European contexts, lands directly managed by their holder rather ...
), making it a fundamental building block for all spline functions of that degree. A B-spline is defined as a
piecewise
In mathematics, a piecewise function (also called a piecewise-defined function, a hybrid function, or a function defined by cases) is a function whose domain is partitioned into several intervals ("subdomains") on which the function may be ...
polynomial
In mathematics, a polynomial is a Expression (mathematics), mathematical expression consisting of indeterminate (variable), indeterminates (also called variable (mathematics), variables) and coefficients, that involves only the operations of addit ...
of
order
Order, ORDER or Orders may refer to:
* A socio-political or established or existing order, e.g. World order, Ancien Regime, Pax Britannica
* Categorization, the process in which ideas and objects are recognized, differentiated, and understood
...
, meaning a degree of
. It’s 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
In mathematics, a linear combination or superposition is an Expression (mathematics), expression constructed from a Set (mathematics), set of terms by multiplying each term by a constant and adding the results (e.g. a linear combination of ''x'' a ...
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
A point is said to be equidistant from a set of objects if the distances between that point and each object in the set are equal.
In two-dimensional Euclidean geometry, the locus of points equidistant from two given (different) points is t ...
knots.
The concept of B-splines traces back to the 19th century, when
Nikolai Lobachevsky
Nikolai Ivanovich Lobachevsky (; , ; – ) was a Russian mathematician and geometer, known primarily for his work on hyperbolic geometry, otherwise known as Lobachevskian geometry, and also for his fundamental study on Dirichlet integrals, kno ...
explored similar ideas at
Kazan University
Kazan Federal University (; ) is a public research university located in Kazan, Russia.
The university was founded in 1804 as Imperial Kazan University, which makes it the second oldest continuously existing tertiary education institution in Rus ...
in Russia, though the term "B-spline" was coined by
Isaac Jacob Schoenberg
Isaac Jacob Schoenberg (April 21, 1903 – February 21, 1990) was a Romanian-American mathematician, known for his invention of splines.
Life and career
Schoenberg was born in Galați to a Jewish family, the youngest of four children. He st ...
in 1978, reflecting their role as
basis function
In mathematics, a basis function is an element of a particular basis for a function space. Every function in the function space can be represented as a linear combination of basis functions, just as every vector in a vector space can be represe ...
s.
B-splines are widely used in fields like
computer-aided design
Computer-aided design (CAD) is the use of computers (or ) to aid in the creation, modification, analysis, or optimization of a design. This software is used to increase the productivity of the designer, improve the quality of design, improve c ...
(CAD) and
computer graphics
Computer graphics deals with generating images and art with the aid of computers. Computer graphics is a core technology in digital photography, film, video games, digital art, cell phone and computer displays, and many specialized applications. ...
, where they shape curves and surfaces through a set of
control points, as well as in data analysis for tasks like
curve fitting
Curve fitting is the process of constructing a curve, or mathematical function, that has the best fit to a series of data points, possibly subject to constraints. Curve fitting can involve either interpolation, where an exact fit to the data is ...
and
numerical differentiation
In numerical analysis, numerical differentiation algorithms estimate the derivative of a mathematical function or subroutine using values of the function and perhaps other knowledge about the function.
Finite differences
The simplest method is ...
of experimental data. From designing car bodies to smoothing noisy measurements, B-splines offer a flexible way to represent complex shapes and functions with precision.
Definition

A B-spline of order
is a collection of
piecewise
In mathematics, a piecewise function (also called a piecewise-defined function, a hybrid function, or a function defined by cases) is a function whose domain is partitioned into several intervals ("subdomains") on which the function may be ...
polynomial
In mathematics, a polynomial is a Expression (mathematics), mathematical expression consisting of indeterminate (variable), indeterminates (also called variable (mathematics), variables) and coefficients, that involves only the operations of addit ...
functions
of degree
in a variable
.
The values of
where the pieces of polynomial meet are known as knots, denoted
and sorted into nondecreasing order.
For a given sequence of knots, there is, up to a scaling factor, a unique spline
satisfying
:
If we add the additional constraint that
:
for all
between the knots
and
, then the scaling factor of
becomes fixed.
The knots in-between (and not including)
and
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
, i.e. piecewise constant polynomials.
:
The higher
-degree B-splines are defined by recursion
:
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
is a piecewise polynomial function of degree
in a variable
. It is defined over
locations
, called knots or breakpoints, which must be in non-descending order
. 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
(where
) 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
. A B-spline is a
continuous function
In mathematics, a continuous function is a function such that a small variation of the argument induces a small variation of the value of the function. This implies there are no abrupt changes in value, known as '' discontinuities''. More preci ...
at the knots.
[Strictly speaking, B-splines are usually defined as being left-continuous.] When all knots belonging to the B-spline are distinct, its derivatives are also continuous up to the derivative of degree
. If the knots are coincident at a given value of
, 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
-domain one is interested in. Since a single B-spline already extends over
knots, it follows that the internal knots need to be extended with
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
on a given set of knots can be expressed as a linear combination of B-splines:
:
B-splines play the role of
basis function
In mathematics, a basis function is an element of a particular basis for a function space. Every function in the function space can be represented as a linear combination of basis functions, just as every vector in a vector space can be represe ...
s 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
:
:
That is,
is piecewise constant one or zero indicating which knot span ''x'' is in (zero if knot span ''j'' is repeated). The recursion equation is in two parts:
:
ramps from zero to one as ''x'' goes from
to
, and
:
ramps from one to zero as ''x'' goes from
to
. The corresponding ''B''s are zero outside those respective ranges. For example,
is a
triangular function
A triangular function (also known as a triangle function, hat function, or tent function) is a function whose graph takes the shape of a triangle. Often this is an isosceles triangle of height 1 and base 2 in which case it is referred to as ''th ...
that is zero below
, ramps to one at
and back to zero at and beyond
. However, because B-spline basis functions have local
support
Support may refer to:
Arts, entertainment, and media
* Supporting character
* Support (art), a solid surface upon which a painting is executed
Business and finance
* Support (technical analysis)
* Child support
* Customer support
* Income Su ...
, 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
In the mathematical subfield of numerical analysis, de Boor's algorithmC. de Boor 971 "Subroutine package for calculating with B-splines", Techn.Rep. LA-4728-MS, Los Alamos Sci.Lab, Los Alamos NM; p. 109, 121. is a polynomial-time and numericall ...
.
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.
:
Application of the recursion formula with the knots at
gives the pieces of the uniform B-spline of order 3
:
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
:
The second derivative of a B-spline of degree 2 is discontinuous at the knots:
:
Faster variants of the de Boor algorithm have been proposed, but they suffer from comparatively lower stability.
Cardinal B-spline
A cardinal B-spline has a constant separation ''h'' between knots. The cardinal B-splines for a given order ''n'' are just shifted copies of each other. They can be obtained from the simpler definition.
:
The "placeholder" notation is used to indicate that the ''n''-th
divided difference
In mathematics, divided differences is an algorithm, historically used for computing tables of logarithms and trigonometric functions. Charles Babbage's difference engine, an early mechanical calculator, was designed to use this algorithm in its ...
of the function
of the two variables ''t'' and ''x'' is to be taken by fixing ''x'' and considering
as a function of ''t'' alone.
A cardinal B-spline has uniformly spaced knots, therefore interpolation between the knots equals convolution with a smoothing kernel.
Example, if we want to interpolate three values in between B-spline nodes (
), we can write the signal as
:
Convolution of the signal
with a rectangle function