# Linear Interpolation

It is a estimation of a function (as a logarithm) by assuming that it is a straight line between known value.Linear interpolation is a method of curve fitting using linear polynomials.

**Graphically :
**

Connect two data points with a straight line

Given two points (x_{0}, y_{0}) and (x_{1}, y_{1}), the linear polynomial passing through the two points is the equation of the line passing through the points. One way to write its formula is

**Note :
**

If f(x) = e^{x}, then f(.82) 2.270500, f(.83) 2.293319, and f(.826) 2.2841638. Note then that P_{1}(x) is an approximation of f(x) = ex for x 2 [.82, .83].

In general, if y_{0} = f(x_{0}) and y_{1} = f(x_{1}) for some function f, then P_{1}(x) is a linear approximation of f(x) for all x ε [x_{0}, x_{1}].

**Examples:** For the data points (2, 3) and (5, 7) find P1(x).

**Solution:**