by Roy Vincent L. Canseco, MSEE Jan 2014
The Legendre polynomials can also be generated using Gram-Schmidt orthonormalization in the open interval with the weighting function 1 .
The inner product of orthogonal vectors is 0. The inner product for polynomials can be defined as
We verify the orthogonality of the first 6 Legendre polynomials by integrating using one of the polynomials as p(t) and another as q(t). The weighting function is taken to be 1 and we integrate from -1 to 1.
The following are the inner products of the Legendre polynomials with each other. They all evaluate to 0, which directly verifies that the first 6 Legendre polynomials are mutually orthogonal.
 Heath. Scientific Computing, an Introductory Survey