Vandermonde Matrices
Alexandre-Théophile Vandermonde was an 18th century French mathematician. As was common at the time, he contributed to a wide range of mathematical topics, including algebra and combinatorics. He is best known for a special kind of matrix that was named after him: the Vandermonde matrix.
The Vandermonde matrix is a matrix with the following form:
where
Vandermonde matrices are used in many areas of mathematics, including polynomial interpolation, numerical analysis, and signal processing. They are also used in cryptography and coding theory.
Interpolation
Vandermonde matrices appear in the context of polynomial interpolation.
Given a set of distinct points
Each point
The coefficients of the polynomial can be found by solving a system of linear equations, where the matrix of the system is the Vandermonde matrix defined by the abscissas of the interpolation points.
Numerical Derivatives
A simple way to approximate the derivative of a function is to use a finite
difference approximation. Given a function
for a small value of
We can use other combinations of function values at different points (with different offsets) to approximate the derivative. For example, the central difference formula is
Here, the offsets are
This leaves us with one question: Given a set of offsets,
Since
for some coefficients
We now compare the coefficients of derivatives of
for
Solving Vandermonde systems
Vandermonde matrices have a simple structure. This suggests that we might be able to exploit this structure to solve systems more efficiently. And indeed we can.
Whereas the general problem of solving a system of linear equations is
Other applications
Vandermonde matrices and Vandermonde-like matrices appear in many other applications.
- In signal processing, the matrix that defines a Discrete Fourier Transform is a Vandermonde matrix.
- In cryptography, the matrix that defines the encryption and decryption functions in the RSA cryptosystem is a Vandermonde matrix.
- In coding theory, they are used in error-correcting codes, particularly in the construction of Reed-Solomon codes.
- In control theory, Vandermonde matrices, and specifically the Vandermonde decomposition are used in system identification.
- In finance, Vandermonde matrices are used in option pricing.
The VandermondeMatrix<T> class
New in version 9.0.2 of Numerics.NET is the VandermondeMatrix<T> class. This class represents a Vandermonde-like matrix defined by the second column (the values with exponent 1), and optionally the maximum exponent.
The class provides methods to solve the system of equations for one or more right-hand sides using the Björck-Pereyra algorithms. Solving a Vandermonde system is as simple as:
var values = Vector.Create<double>(1, 2, 3, 4);
var vandermonde = new VandermondeMatrix<double>(values);
var b = Vector.Create<double>(1, 2, 3, 5);
var x = vandermonde.Solve(b);
It can also compute the determinant efficiently. These are the most common applications of Vandermonde matrices. For other operations, like arithmetic, it is more efficient to convert the matrix to a dense matrix.
Conclusion
The addition of the VandermondeMatrix<T>
class to Numerics.NET gives you access
to an easy and efficient way to solve systems of equations of a special form
that appear in countless applications.