The Legendre polynomials form a complete system of orthogonal polynomials on the interval [−1,1][-1,1], that is an unnormalised basis of the Hilbert spaceL2[−1,1]L^2[-1,1].

The first few Legendre polynomials are P0(x)=1P_0(x) = 1, P1(x)=xP_1(x) = x, P2(x)=12(3x2−1)P_2(x)=\frac{1}{2}(3x^2-1), P3(x)=12(5x2−3)P_3(x)=\frac{1}{2}(5x^2-3), P4(x)=18(35x4−30x2+3)P_4(x)=\frac{1}{8}(35x^4-30x^2+3). Their values at 00 are

(If it is not clear from mathML rendering – both fractions are under square root – including both the numerators and denominators).

If (θ,ϕ)(\theta,\phi) and (θ′,ϕ′)(\theta',\phi') are two points of the unit sphere in spherical coordinates (polar angle, azimuth), and γ\gamma is the angle between the two corresponding rays from the origin then

where the arguments of Legendre polynomials are the inner products of the unit vectors.

Zoran: the last formula (*)(*) is in my own formula notes which I have written as a student many years ago and used hundreds of times, but it now looks to me suspicious; I have no time to check it right now.