# Multivariate interpolation

In numerical analysis, multivariate interpolation is interpolation on functions of more than one variable; when the variates are spatial coordinates, it is also known as spatial interpolation.

The function to be interpolated is known at given points ${\displaystyle (x_{i},y_{i},z_{i},\dots )}$ and the interpolation problem consists of yielding values at arbitrary points ${\displaystyle (x,y,z,\dots )}$.

Multivariate interpolation is particularly important in geostatistics, where it is used to create a digital elevation model from a set of points on the Earth's surface (for example, spot heights in a topographic survey or depths in a hydrographic survey).

## Regular grid

Comparison of some 1- and 2-dimensional interpolations.
Black and red/yellow/green/blue dots correspond to the interpolated point and neighbouring samples, respectively.
Their heights above the ground correspond to their values.

For function values known on a regular grid (having predetermined, not necessarily uniform, spacing), the following methods are available.

### 2 dimensions

Bitmap resampling is the application of 2D multivariate interpolation in image processing.

Three of the methods applied on the same dataset, from 25 values located at the black dots. The colours represent the interpolated values.

### Tensor product splines for N dimensions

Catmull-Rom splines can be easily generalized to any number of dimensions. The cubic Hermite spline article will remind you that ${\displaystyle \mathrm {CINT} _{x}(f_{-1},f_{0},f_{1},f_{2})=\mathbf {b} (x)\cdot \left(f_{-1}f_{0}f_{1}f_{2}\right)}$  for some 4-vector ${\displaystyle \mathbf {b} (x)}$  which is a function of x alone, where ${\displaystyle f_{j}}$  is the value at ${\displaystyle j}$  of the function to be interpolated. Rewrite this approximation as

${\displaystyle \mathrm {CR} (x)=\sum _{i=-1}^{2}f_{i}b_{i}(x)}$

This formula can be directly generalized to N dimensions:[1]

${\displaystyle \mathrm {CR} (x_{1},\dots ,x_{N})=\sum _{i_{1},\dots ,i_{N}=-1}^{2}f_{i_{1}\dots i_{N}}\prod _{j=1}^{N}b_{i_{j}}(x_{j})}$

Note that similar generalizations can be made for other types of spline interpolations, including Hermite splines. In regards to efficiency, the general formula can in fact be computed as a composition of successive ${\displaystyle \mathrm {CINT} }$ -type operations for any type of tensor product splines, as explained in the tricubic interpolation article. However, the fact remains that if there are ${\displaystyle n}$  terms in the 1-dimensional ${\displaystyle \mathrm {CR} }$ -like summation, then there will be ${\displaystyle n^{N}}$  terms in the ${\displaystyle N}$ -dimensional summation.

## Irregular grid (scattered data)

Schemes defined for scattered data on an irregular grid are more general. They should all work on a regular grid, typically reducing to another known method.

Gridding is the process of converting irregularly spaced data to a regular grid (gridded data).