Intuitive Derivation: Lagrange Interpolation

Normally, finding a curve that passes through specific points involves solving a complex system of linear equations. Lagrange Interpolation offers a smarter way: instead of solving equations, we construct the answer piece by piece using a concept similar to a "Switchboard."

The Core Idea:
We want to build a separate "sub-polynomial" for each data point that acts like a switch:

1. Simple Example: 2 Points

Suppose we have two data points: \((t_0, y_0)\) and \((t_1, y_1)\).

We need a line \(P(t)\) that passes through both.

Step A: The First Switch \(L_0(t)\)

We want a function \(L_0(t)\) that is 1 at \(t_0\) and 0 at \(t_1\).

1
Make it Zero: To force it to be zero at \(t_1\), we include the term \((t - t_1)\).
Check: If \(t = t_1\), then \((t_1 - t_1) = 0\). Success.
2
Make it One: Currently, at \(t_0\), the value is \((t_0 - t_1)\), which is just some number. To make it equal 1, we divide by that exact number.
$$L_0(t) = \frac{t - t_1}{t_0 - t_1}$$

Step B: The Second Switch \(L_1(t)\)

Now we want a function \(L_1(t)\) that is 0 at \(t_0\) and 1 at \(t_1\).

Using the same logic, we flip the terms:

$$L_1(t) = \frac{t - t_0}{t_1 - t_0}$$

Step C: Combine with Heights

Now we just scale each switch by the desired height (\(y\)) and add them up:

$$P(t) = y_0 \cdot L_0(t) + y_1 \cdot L_1(t)$$ $$P(t) = y_0 \frac{t - t_1}{t_0 - t_1} + y_1 \frac{t - t_0}{t_1 - t_0}$$

2. Generalizing to \(n\) Points

Imagine we have many points: \((t_0, y_0), (t_1, y_1), \dots, (t_n, y_n)\).

For any specific point \(j\), we want to build a switch \(L_j(t)\) that is:

Constructing the Numerator (The "Zero" Maker)

To make the polynomial zero at all other points, we just multiply linear terms for every other point:

$$(t - t_0)(t - t_1)\dots(t - t_{j-1})(t - t_{j+1})\dots(t - t_n)$$

We write this compactly using the product symbol \(\Pi\):

$$\text{Numerator} = \prod_{k \neq j} (t - t_k)$$

Constructing the Denominator (The "One" Maker)

To ensure the value is 1 when \(t = t_j\), we divide the numerator by itself, but evaluated at \(t_j\):

$$\text{Denominator} = \prod_{k \neq j} (t_j - t_k)$$

The Basis Polynomial

Putting it together, the basis polynomial for point \(j\) is:

$$L_j(t) = \prod_{k \neq j} \frac{t - t_k}{t_j - t_k}$$

3. The Final Formula

Since each switch \(L_j(t)\) handles the value for point \(j\) independently without affecting the others, the final interpolation polynomial is simply the weighted sum of all switches:

$$P(t) = \sum_{j=0}^{n} y_j L_j(t)$$