# 3.41. Operators¶

## 3.41.1. Introduction¶

The domain of the operator is , a subspace of the Hilbert space . Linear operator is:

for all . Symmetric operator is:

for all dense in . If is dense in , then the adjoint operator is defined by

for all . The domain is given by all for which the above relation holds. It can be shown that .

Operator is self-adjoint if . Symmetric operator is self-adjoint only if . (Bounded symmetric operator is always self-adjoint.) Hermitean operator is a bounded symmetric operator.

Hermitian implies self-adjoint implies symmetric, but all converse implications are false. Below, we need the operator to be self-adjoint (we assume unbounded by default).

## 3.41.2. Spectrum¶

To obtain a spectrum of the operator , we need to solve the following problem:

Those values of for which the solution belong to the discrete part of the spectrum. are called eigenvalues and eigenvectors. Those values of for which can be normalized to a delta function:

belong to the continuous part of the spectrum (note that in this case ).

Eigenvectors belonging to the continous part of the spectrum obey the completeness relation:

Eigenvectors belonging to the discrete part obey the following completeness relation:

The sum or integral runs over the whole spectrum (if the spectrum contains both discrete and continous part, we simply combine sums and integrals).

Spectrum of a self-adjoint operator is real, because

The eigenvectors are orthogonal:

So for we get , for the is equal to 1 if belongs to the discrete spectrum and we get:

or it is normalized as a delta function if it belongs to the continous part:

As such, eigenvectors of a self-adjoint operator are complete and orthogonal in the above sense. Thus any function from the space can then be expanded into the series:

where are the eigenvectors and the coefficients are given by:

The sum over runs over the whole spectrum (i.e. it becomes an integral over the continuos parts). Also the coefficients are either discrete or continous depending on the part of the spectrum. The series converges in the norm, i.e. the following norm goes to zero as we sum over :

## 3.41.3. Derivative Operator¶

We have the eigenvalue problem

where

The operator is unbounded. is self-adjoint if:

So

The operator is self-adjoint if and only if . Few boundary conditions that satisfy this condition:

- Dirichlet boundary conditions

- Periodic boundary conditions

- Antiperiodic boundary conditions

Solving the eigenproblem:

### Fourier Series¶

We restrict our space to periodic functions. Applying the periodic boundary condition:

so

The normalized eigenvectors are:

These eigenvectors belong to our space and as such all form a discrete spectrum. Other solutions do not satisfy the periodic boundary condition and so there is no continous part in the spectrum.

The eigenvectors must be orthogonal, as we can check:

The eigenvectors must be complete:

Any function can then be expanded on the interval into the Fourier series:

Equivalently, this can be written using and directly:

By introducing the coefficients and :

we can write the series as:

we get:

Conceptually, we are taking the complex orthonormal basis and creating a real orthonormal basis composed of , , , …, , , … as follows:

We are only summing over the positive arguments in and , thus the absolute value for . The basis is orthonormal:

and complete:

This is not the only way to create the real orthonormal basis. In general:

We require the new basis to be orthonormal:

This restricts the matrices to be unitary (), because:

The unitarity condition also makes sure, that the real basis is complete:

Requiring to be real and using we get:

Because the basis is complete. So the only conditions on the matrices are:

They imply that the new basis will be real, orthonormal and complete. Our final restriction is that we want each real basis element to correspond to the same frequency (possible sign change is ok): this means that we can only mix the same frequencies, i.e.:

and also that the nonzero matrix elements can only be of the form for (i.e. or for some positive ).

Up to possible sign changes and permutations, this determines the matrix uniquely. Our choice above is:

In other words, we get (except that the matrix is infinite):

### Fourier Transform¶

Our domain is , so the solution of the eigen problem is:

The normalized eigenfunctions are:

We calculate the normalization:

So the spectrum is continous. The eigenvectors must be complete:

Any function can then be written as:

where is called the Fourier transform of :

Note that both for Fourier series and Fourier transform, the sign convention in the exponentials () follows from choosing the sign in and as such it is arbitrary. We can also choose and then the sign will be flipped.

## 3.41.4. Sturm–Liouville Operator¶

The Sturm-Liouville operator is:

Everything is real. The scalar product is weighted by . The operator is self-adjoint if:

so

And the operator is self-adjoint if and only if:

This condition can be satisfied by various boundary conditions. For example:

- Dirichlet boundary conditions

- Neumann boundary conditions

- Periodic boundary conditions

- Antiperiodic boundary conditions

or mixtures of these, e.g. Dirichlet at and Neumann at .

### Legendre Polynomials¶

Legendre polynomials are solutions of the Sturm–Liouville problem on the interval with , , and :

The operator is self-adjoint due to vanishing at the endpoints:

We restrict our space to bounded functions. The solutions of the eigenvalue problem for integer are Legendre polynomials , the normalized eigenvectors are:

Solutions for non integer are Legendre functions that are singular at the end points and as such are not solutions that we want. As such, the spectrum is discrete and the Legendre polynomials form a complete orthogonal basis for functions on the interval :

any function on the interval can be expanded as:

## 3.41.5. Angular Momentum Operator¶

The angular momentum operators , and are given by:

in spherical coordinates:

and

The eigenproblem is:

(3.41.5.1)¶

Using Condon & Shortley phase convention, it can be shown that:

(3.41.5.2)¶

and by repeated application:

where

The solution of (3.41.5.1) is of the form:

(3.41.5.3)¶

and we get from (3.41.5.1):

on the interval with the boundary condition . From Derivative Operator the eigenvalues are all integer and the normalized eigenvector is:

(3.41.5.4)¶

Substituting (3.41.5.4) into (3.41.5.3) we get from (3.41.5.1) an ordinary second order differential equation for :

where

This equation can be solved using the following approach. From (3.41.5.2) we get:

and by repeated application we get:

from which we obtain:

(3.41.5.5)¶

As a special case for and we get:

(3.41.5.6)¶

and for and we get (we only use the branch):

(3.41.5.7)¶

From (3.41.5.2) we get:

Using (3.41.5.4) this gives us a first order differential equation:

from which

(3.41.5.8)¶

It is normalized as:

We used the value of the integral:

Using (3.41.5.8) in (3.41.5.7) we get:

for we obtain:

where

is the Rodrigues’ formula for Legendre polynomials. We substitute into (3.41.5.6) and get:

(3.41.5.9)¶

Hence . Using associated Legendre polynomials, we can write:

(3.41.5.10)¶

where (for all ):

hence (comparing the second and fourth equation above):

(3.41.5.11)¶

This is valid for all (positive or negative). For we get from (3.41.5.9) and (3.41.5.11):

This is usually used as the definition of the associated Legendre polynomials. They include the Condon & Shortley phase factor (only for positive ). Some authors omit it (then it needs to be included in the equation (3.41.5.10)). Note that (3.41.5.10) for can be also written as:

Thanks to

we can write for all :

The normalization of associated Legendre polynomials is:

Finally, we get (for all ):

Any function on the sphere can be expanded as:

### Real Spherical Harmonics¶

The most obvious approach is to use a similar way as for Fourier series. We rearrange the sum:

Where the real spherical harmonics are:

and the coefficients are:

The factor in the definition makes the real spherical harmonics properly normalized:

From the above derivation, it is not immediately clear how to obtain other parametrizations of real spherical harmonics. And also what identities they obey. More systematic approach is to use the transformation matrices just like for the Fourier series:

We require orthonormality:

This implies unitarity of the matrices for the given . Requiring to be real and using we get:

As for Fourier series, we require not to mix frequencies and phases, so we get:

and also that the nonzero matrix elements can only be of the form for (i.e. or for some positive ). Up to signs and permutations, this determines the matrices uniquely. As for Fourier series, this implies orthonormality and completeness of the real spherical harmonics:

Also, thanks to unitarity we get:

and

Following the Fourier series, the most natural way to choose the signs in the matrices is such so as to keep and in the basis with positive frequencies (thus the absolute value for ):

This gives:

#### Other convention¶

Some people use the following convention:

It has the advantage that there are no minus signs in the final expressions using , or using , , . However, we will not use this convention.

### Tables¶

Spherical harmonics:

Real spherical harmonics:

Real spherical harmonics (using , and , assuming ):

These tables were generated using
`spherical_harmonics.py`

:

```
from sympy import (sympify, factorial, var, cos, S, sin, Dummy, sqrt, pi, exp,
I, latex, symbols)
def Plm(l, m, z):
"""
Returns the associated Legendre polynomial P_{lm}(z).
The Condon & Shortley (-1)^m factor is included.
"""
l = sympify(l)
m = sympify(m)
z = sympify(z)
if m >= 0:
r = ((z**2-1)**l).diff(z, l+m)
return (-1)**m * (1-z**2)**(m/2) * r / (2**l * factorial(l))
else:
m = -m
r = ((z**2-1)**l).diff(z, l+m)
return factorial(l-m)/factorial(l+m) * (1-z**2)**(m/2) * r / (2**l * factorial(l))
def Plm_cos(l, m, theta):
"""
Returns the associated Legendre polynomial P_{lm}(cos(theta)).
The Condon & Shortley (-1)^m factor is included.
"""
l = sympify(l)
m = sympify(m)
theta = sympify(theta)
z = Dummy("z")
r = ((z**2-1)**l).diff(z, l+m).subs(z**2-1, -sin(theta)**2).subs(z, cos(theta))
return (-1)**m * sin(theta)**m * r / (2**l * factorial(l))
def Ylm(l, m, theta, phi):
"""
Returns the spherical harmonics Y_{lm}(theta, phi) using the Condon & Shortley convention.
"""
l, m, theta, phi = sympify(l), sympify(m), sympify(theta), sympify(phi)
return sqrt((2*l+1)/(4*pi) * factorial(l-m)/factorial(l+m)) * Plm_cos(l, m, theta) * exp(I*m*phi)
def Zlm(l, m, theta, phi):
"""
Returns the real spherical harmonics Z_{lm}(theta, phi).
"""
l, m, theta, phi = sympify(l), sympify(m), sympify(theta), sympify(phi)
if m > 0:
return sqrt((2*l+1)/(2*pi) * factorial(l-m)/factorial(l+m)) * Plm_cos(l, m, theta) * cos(m*phi)
elif m < 0:
m = -m
return sqrt((2*l+1)/(2*pi) * factorial(l-m)/factorial(l+m)) * Plm_cos(l, m, theta) * sin(m*phi)
elif m == 0:
return sqrt((2*l+1)/(4*pi)) * Plm_cos(l, 0, theta)
else:
raise ValueError("Invalid m.")
def Zlm_xyz(l, m, x, y, z):
"""
Returns the real spherical harmonics Z_{lm}(x, y, z).
It is assumed x**2 + y**2 + z**2 == 1.
"""
l, m, x, y, z = sympify(l), sympify(m), sympify(x), sympify(y), sympify(z)
if m > 0:
r = (x+I*y)**m
r = r.as_real_imag()[0]
return sqrt((2*l+1)/(2*pi) * factorial(l-m)/factorial(l+m)) * Plm(l, m, z) * r / sqrt(1-z**2)**m
elif m < 0:
m = -m
r = (x+I*y)**m
r = r.as_real_imag()[1]
return sqrt((2*l+1)/(2*pi) * factorial(l-m)/factorial(l+m)) * Plm(l, m, z) * r / sqrt(1-z**2)**m
elif m == 0:
return sqrt((2*l+1)/(4*pi)) * Plm(l, 0, z)
else:
raise ValueError("Invalid m.")
var("theta phi")
x, y, z = symbols("x y z", real=True)
print "Spherical harmonics:"
print
print ".. math::"
print
for l in range(4):
for m in range(-l, l+1):
print r" Y_{%d,%d}(\theta, \phi) =" % (l, m), \
latex(Ylm(l, m, theta, phi))
print
print
print "Real spherical harmonics:"
print
print ".. math::"
print
for l in range(4):
for m in range(-l, l+1):
print r" Z_{%d,%d}(\theta, \phi) =" % (l, m), \
latex(Zlm(l, m, theta, phi))
print
print
print "Real spherical harmonics (using $x$, $y$ and $z$, assuming $x^2 + y^2 + z^2 = 1$):"
print
print ".. math::"
print
for l in range(4):
for m in range(-l, l+1):
print r" Z_{%d,%d}(x, y, z) =" % (l, m), \
latex(Zlm_xyz(l, m, x, y, z).simplify())
print
```