# Linear interpolation

A method for the approximate calculation of the value of a function $f(x)$, based on the replacement of $f(x)$ by a linear function

$L(x)=a(x-x_1)+b,$

the parameters $a$ and $b$ being chosen in such a way that the values of $L(x)$ coincide with the values of $f(x)$ at given points $x_1$ and $x_2$:

$L(x_1)=f(x_1),\quad L(x_2)=f(x_2).$

These conditions are satisfied by the unique function

$L(x)=\frac{ f(x_2)-f(x_1)}{x_2-x_1}(x-x_1)+f(x_1),$

which approximates the given function $f(x)$ on the interval $[x_1,x_2]$ with error

$f(x)-L(x)=\frac{f''(\xi)}{2}(x-x_1)(x-x_2),\quad \xi\in [x_1,x_2].$

The calculations necessary for linear interpolation are easily realized by hand; for this reason this method is widely used for the interpolation of tabular data.

How to Cite This Entry:
Linear interpolation. Encyclopedia of Mathematics. URL: http://encyclopediaofmath.org/index.php?title=Linear_interpolation&oldid=27068
This article was adapted from an original article by M.K. Samarin (originator), which appeared in Encyclopedia of Mathematics - ISBN 1402006098. See original article