Finite-evaluation inner product on polynomials (source code)

= Finite-evaluation inner product on polynomials
{title2=$\langle p,q\rangle=\sum_{j=0}^nw_jp(x_j)q(x_j)$}

At distinct real nodes $x_0,\ldots,x_n$ with positive weights $w_j$, the displayed expression is an <inner product> on the real <vector space> of <polynomials> of degree at most $n$. Symmetry and bilinearity follow from finite sums. If its squared <norm> vanishes, positivity of every weight forces $p(x_j)=0$ at every node. The root bound for a nonzero <polynomial> then forces $p=0$, proving positive definiteness.

More generally, on any <vector subspace> of real <functions>, the evaluation form is an <inner product> exactly when the evaluation map $p\mapsto(\sqrt{w_j}p(x_j))_j$ is injective. On <polynomials> of degree at most $n+1$ it fails: the nonzero node <polynomial> $\prod_j(x-x_j)$ vanishes at all nodes. This gives a positive semidefinite form with a nontrivial kernel. On the smaller polynomial space, the <Lagrange interpolation polynomial> identifies evaluation coordinates with $\mathbb R^{n+1}$, and <Cauchy-Schwarz inequality> follows either from the Euclidean inequality in those coordinates or from minimizing $\|p-tq\|^2$ over real $t$.