# 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.

#### References

[Ba] | N.S. Bakhvalov, "Numerical methods: analysis, algebra, ordinary differential equations" , MIR (1977) (Translated from Russian) |

[Be] | I.S. Berezin, N.P. Zhidkov, "Computing methods" , Pergamon (1973) (Translated from Russian) |

[Da] | P.J. Davis, "Interpolation and approximation" , Dover, reprint (1975) pp. 108–126 |

[De] | B.N. Delone, "The Peterburg school of number theory", Moscow-Leningrad (1947) (In Russian) |

[St] | J.F. Steffensen, "Interpolation" , Chelsea, reprint (1950) |

**How to Cite This Entry:**

Linear interpolation.

*Encyclopedia of Mathematics.*URL: http://www.encyclopediaofmath.org/index.php?title=Linear_interpolation&oldid=27068