Exact at the dots, a leap of faith between them
In the previous guide you took n+1 data points and built the unique interpolating polynomial p that runs through every one of them, whether you assembled it in Lagrange form or grew it with Newton's divided differences. At each node, p agrees with the underlying function f perfectly — that was the whole point. But a curve is more than a handful of dots. The real question is what happens in the gaps: when you read p at some x that is not one of your nodes, how close is p(x) to the true f(x)? That gap, f(x) - p(x), is the interpolation error, and pretending it is zero between the dots is a leap of faith we are about to replace with an actual bound.
Here is a picture to hold onto. Imagine f is a gentle hill and you sample its height at five posts. The interpolating polynomial is a single smooth curve forced to touch all five post-tops. Between two adjacent posts the curve sags or bulges to whatever the polynomial 'wants' to do, and how badly it can sag depends on two things you can already guess at intuitively: how curvy the true hill is there (a flat stretch is easy to guess, a sharp bend is not), and how wide and how cleverly spaced the posts are. The interpolation-error formula is exactly the statement that turns those two intuitions into numbers.
The formula itself, read like a sentence
Suppose f has n+1 continuous derivatives on the interval, and p is the degree-n polynomial interpolating it at the nodes x_0, x_1, ..., x_n. Then for any point x in the interval there is some unknown point c, hidden somewhere among the nodes and x, for which the error takes a clean shape. Read the code block below as one sentence: the error equals a derivative of f, divided by a factorial, times a product that measures distance to the nodes.
f^(n+1)(c)
f(x) - p(x) = ---------- * (x - x_0)(x - x_1)...(x - x_n)
(n+1)!
for some unknown c between the nodes and x.
three ingredients:
f^(n+1)(c) : the (n+1)-th derivative of f -> how curvy/wiggly f is
(n+1)! : a big factorial in the denominator -> our friend, it shrinks error
product : (x - x_0)...(x - x_n) -> zero AT every node, grows BETWEEN themLook at what each piece is telling you. The product term (x - x_0)...(x - x_n) is exactly zero whenever x equals one of the nodes — which re-proves that p is exact at the dots, a comforting sanity check. Between the nodes the product is nonzero and that is where error lives. The factorial (n+1)! in the denominator looks like a powerful ally: add more points, raise the degree, and you divide by an ever-larger number. The derivative f^(n+1)(c) on top is the wildcard — it is the true function's own (n+1)-th derivative, evaluated at a point you do not get to know. The whole drama of interpolation is a tug-of-war between that growing factorial and that possibly-exploding derivative.
A tiny worked example you can check by hand
Let us make it concrete with the friendliest possible case: interpolate f(x) = sin(x) with a straight line (degree 1) using just the two nodes x_0 = 0 and x_1 = 1, then ask how wrong the line is at the midpoint x = 0.5. With n = 1 the formula needs the second derivative, f''(x) = -sin(x), whose size never exceeds 1 on this interval. The node product at x = 0.5 is (0.5 - 0)(0.5 - 1) = -0.25. So the error bound is |f''(c)| / 2! times |product| = (at most 1) / 2 times 0.25 = 0.125.
Now check it against reality. The line through (0, sin 0) = (0, 0) and (1, sin 1) = (1, 0.8415) has value 0.4207 at x = 0.5, while the true sin(0.5) = 0.4794. The actual error is 0.4794 - 0.4207 = 0.0587. And indeed 0.0587 is comfortably below our bound of 0.125 — the formula did not lie, it just gave a safe over-estimate because we used the worst-case |f''| = 1 rather than the true value near c. That is the normal experience: the error formula is an honest upper bound, usually a bit loose, never a promise of the exact error. Its job is to guarantee you are safe, not to predict the last digit.
Reading the formula's warning: where good and bad spacing diverge
Here is where the error formula earns its keep — not just as a calculator, but as a guide for design. Stare at the product term (x - x_0)...(x - x_n). You cannot touch f^(n+1)(c); that derivative belongs to the function you were handed. But the nodes x_0, ..., x_n are yours to place. So the one lever you fully control is making that product as small as possible across the interval. The natural reflex is to spread the nodes evenly — equispaced points feel fair and tidy. The formula quietly warns that 'fair' is not the same as 'smallest'.
With equispaced nodes, that product is small in the middle of the interval but swings to enormous values near the two ends — the polynomial whips up huge oscillations at the edges. As you add more equispaced points to chase accuracy, the end-swings of the product can grow faster than the factorial (n+1)! can tame them, especially when f^(n+1) is also large. The tug-of-war is lost, and the error actually grows with more points. This catastrophe has a name, Runge's phenomenon, and it is the entire subject of the next guide. For now, just register the shock: more data can make a high-degree equispaced interpolant worse, even diverge.
But the same formula that diagnoses the disease prescribes the cure. If the trouble is the product blowing up at the ends, then crowd more nodes toward the ends and the product flattens out. The optimal crowding — the placement that makes the worst value of the product as small as it can possibly be — is the famous set of Chebyshev nodes, denser near the edges and sparser in the middle. With Chebyshev nodes the dreaded end-swings are tamed, the error shrinks reliably as the degree rises, and high-degree interpolation becomes trustworthy. That is the payoff of guide five; here, the point is that the error formula is what told us to look there.
Interpolation is not the same as best approximation
One more honest distinction the formula forces into the open. An interpolant is required to pass exactly through your chosen points; the error is then whatever it happens to be everywhere else. That is not the same as asking for the polynomial that is closest to f everywhere — the one that minimizes the largest gap over the whole interval. That second goal is best approximation, more precisely minimax approximation, and its solution does not generally interpolate your data at all; instead its error wiggles up and down, touching its maximum size with alternating signs across the interval. Interpolation pins the error to zero at a few points; best approximation refuses to pin it anywhere, in exchange for a smaller worst case overall.
Why even mention best approximation in a guide about interpolation error? Because the two meet in a beautiful way. It turns out that interpolating at Chebyshev nodes gets remarkably close to the best possible minimax polynomial — within a small, slowly-growing factor of it. So you do not have to solve the hard minimax problem directly; the cheap, well-conditioned act of interpolating at the right points lands you almost there. The error formula started us at 'how wrong can my interpolant be?' and, by exposing the node product as the one thing we control, walked us straight to 'where should the points go to be nearly as good as the best curve there is?'.