Polynomial Interpolation

Polynomial Interpolation
Consider being given n distinct points (x1,y1), …, (xn,yn).
There is a unique interpolating polynomial which passes through all of the given points, which we can write in the form:
Plugging each given point into the form of this polynomial, we get the system of linear equations:
We have to solve this SLE to find the values of each ri in the interpolating polynomial.
We can do this by reducing the following augmented matrix (the coefficient matrix consists of the coefficients of the ri):
Polynomial Interpolation: Illustration
Given three points A(1,1), B(2,2), C(0,−2), find the interpolating polynomial going through all points.

3 points ⟹ a polynomial of degree at most 3-1 = 2.
If we were to find the solution vector for this system, we would see that r=r0r1r2=−24−1.


Example: Polynomial Interpolation
Let's revisit the example from the lesson.
Find an interpolating polynomial for the points A(1,1), B(2,2), C(0,−2).
3 points ⟹ 2nd order polynomial:
p(x)=r0+r1x+r2x2
Plugging each point into p(x) gives:
(1,1):(2,2):(0,−2):1r01r01r0+++1r12r10r1+++12r222r202r2===12−2
We can write the augmented matrix for this linear system and reduce:
⟶⟶⟶⟶⟶⟶11112014012−2R1↔R3111021041−221R2−R1R3−R1100021041−24321R2100011021−223R3−R210001002−1−221(−1)R3100010021−22−1R2−2R3100010001−24−1
Since this is in RREF, we can now read off the unique solution for the coefficients of the interpolating polynomial:
r0r1r2===−24−1⟹P(x)=−2+4x−x2
