The orthogonality of the spherical harmonics \(Y_l^{\vert m_l\vert}(\theta,\phi)\) states that the integral of the product of two distinct spherical harmonics over a specified interval is zero.

It is defined mathematically as:
$$\int_0^{2\pi}\int_0^{\pi}Y_l^{\vert m_l\vert*}(\theta,\phi)Y_k^{\vert m_k\vert}(\theta,\phi)sin\theta d\theta d\phi=0\;\;\;\;\;l\neq k\;\;\;\;\;412$$
Substituting eq400 in eq412 gives
$$N_l^{\vert m_l\vert*}N_k^{\vert m_k\vert}\int_0^{2\pi}\int_0^{\pi}P_l^{\vert m_l\vert}(cos\theta)P_k^{\vert m_k\vert}(cos\theta)e^{i(\vert m_k\vert-\vert m_l\vert)\phi}sin\theta d\theta d\phi=0\;\;\;\;\;l\neq k$$
In general, the integral over \(\phi\) is
$$\int_0^{2\pi}e^{i(\vert m_k\vert-\vert m_l\vert)\phi} d\phi=2\pi\delta_{ik}$$
Since the associated Legendre polynomials \(P_l^{\vert m_l\vert}(cos\theta)\) are orthogonal to one another, we have
| Conditions | $$\boldsymbol{\int_0^{2\pi}\int_0^{\pi}Y_l^{\vert m_l\vert*}Y_k^{\vert m_k\vert}sin\theta d\theta d\phi=0}$$ |
| $$l\neq k\;and\;m_l\neq m_k$$ | zero |
| $$l\neq k\;and\;m_l=m_k$$ | zero |
| $$l=k\;and\;m_l\neq m_k$$ | zero |
| $$l= k\;and\;m_l= m_k$$ | non-zero |
Therefore,
$$N_l^{\vert m_l\vert*}N_k^{\vert m_k\vert}\int_0^{2\pi}\int_0^{\pi}Y_l^{\vert m_l\vert*}(\theta,\phi)Y_k^{\vert m_k\vert}(\theta,\phi)sin\theta d\theta d\phi=\delta_{ik}\delta_{m_l}\delta_{m_k}\;\;\;\;\;413$$
which is the expression showing the orthonormal property of the spherical harmonics.