Suppose we are given two-dimensional coordinates , whereas all values are distinct but values are not necessarily distinct. Lagrange’s polynomial interpolation is a technique to find a unique -degree polynomial that passes through such coordinates. The domain of and values is complex numbers (which include the real domain), or can be modulo prime.
Theorem A-15 Lagrange’s Polynomial Interpolation
Suppose we are given two-dimensional coordinates , whereas all values are distinct but the values don’t need to be distinct. The domain of can be either: (which includes the real domain) or (where is a prime). Then, there exists a unique -degree (or lesser degree) polynomial that passes through these coordinates. Such a polynomial is computed as follows:
Proof.
Given this design of , notice that for each of , , specifically the -th term of sigma summation being and all other terms being 0.
Such a satisfactory can be computed in the case where the domain of ) is: (which includes the real domain) or (where is a prime). Especially, a valid can be computed also in the domain, because as we learned from Fermat’s Little Theorem in Theorem A-4.2.4 (§A-4.2), if and only if and are co-prime, and this means that if is a prime, then for all (i.e., without ). Since every value in has an inverse, we can compute the denominator’s division operation in by converting them into multiplication of their counter-part inverses, and thereby compute a validly defined .