Given an inner product
there is a unique set of monic orthogonal polynomials
such that .
We find them by the Gram-Schmidt process,
and uniqueness of obtained by contradiction and looking at roots.

Three step recurrence

Consider an inner product s.t. .
Then we have a three-step recurrence:


where

Least squares polynomial approximation

Given a function ,
suppose we want to minimize ,
where is a polynomial of degree .
We claim this is always: