# Spherical basis

In pure and applied mathematics, particularly quantum mechanics and computer graphics and their applications, a spherical basis is the basis used to express spherical tensors. The spherical basis closely relates to the description of angular momentum in quantum mechanics and spherical harmonic functions.
While spherical polar coordinates are one orthogonal coordinate system for expressing vectors and tensors using polar and azimuthal angles and radial distance, the spherical basis are constructed from the standard basis and use complex numbers.

## In three dimensions

A vector A in 3D Euclidean space R$^3$ can be expressed in the familiar Cartesian coordinate system in the standard basis e$_x$, e$_y$, e$_z$, and coordinates A$_x$, A$_y$, A$_z$:
| $\mathbf {A} =A_{x}\mathbf {e} _{x}+A_{y}\mathbf {e} _{y}+A_{z}\mathbf {e} _{z}$ | (1) |
or any other coordinate system with associated basis set of vectors. From this extend the scalars to allow multiplication by complex numbers, so that we are now working in $\mathbb {C} ^{3}$ rather than $\mathbb {R} ^{3}$.

### Basis definition

In the spherical bases denoted e+, e$_−$, e$_0$, and associated coordinates with respect to this basis, denoted A+, A$_−$, A$_0$, the vector A is:
| $\mathbf {A} =A_{+}\mathbf {e} _{+}+A_{-}\mathbf {e} _{-}+A_{0}\mathbf {e} _{0}$ | (2) |
where the spherical basis vectors can be defined in terms of the Cartesian basis using complex-valued coefficients in the xy plane:
| ${\begin{aligned}\mathbf {e} _{+}&=-{\frac {1}{\sqrt {2}}}\mathbf {e} _{x}-{\frac {i}{\sqrt {2}}}\mathbf {e} _{y}\\\mathbf {e} _{-}&=+{\frac {1}{\sqrt {2}}}\mathbf {e} _{x}-{\frac {i}{\sqrt {2}}}\mathbf {e} _{y}\\\end{aligned}}\quad \rightleftharpoons \quad \mathbf {e} _{\pm }=\mp {\frac {1}{\sqrt {2}}}\left(\mathbf {e} _{x}\pm i\mathbf {e} _{y}\right)\,$ | (3A) |
in which $i$ denotes the imaginary unit, and one normal to the plane in the z direction:
    $\mathbf {e} _{0}=\mathbf {e} _{z}$
The inverse relations are:
| ${\begin{aligned}\mathbf {e} _{x}&=-{\frac {1}{\sqrt {2}}}\mathbf {e} _{+}+{\frac {1}{\sqrt {2}}}\mathbf {e_{-}} \\\mathbf {e} _{y}&=+{\frac {i}{\sqrt {2}}}\mathbf {e} _{+}+{\frac {i}{\sqrt {2}}}\mathbf {e_{-}} \\\mathbf {e} _{z}&=\mathbf {e} _{0}\end{aligned}}$ | (3B) |

### Commutator definition

While giving a basis in a 3-dimensional space is a valid definition for a spherical tensor, it only covers the case for when the rank $k$ is 1. For higher ranks, one may use either the commutator, or rotation definition of a spherical tensor. The commutator definition is given below, any operator $T_{q}^{(k)}$ that satisfies the following relations is a spherical tensor: $[J_{\pm },T_{q}^{(k)}]=\hbar {\sqrt {(k\mp q)(k\pm q+1)}}T_{q\pm 1}^{(k)}$ $[J_{z},T_{q}^{(k)}]=\hbar qT_{q}^{(k)}$

### Rotation definition

Analogously to how the spherical harmonics transform under a rotation, a general spherical tensor transforms as follows, when the states transform under the unitary Wigner D-matrix ${\mathcal {D}}(R)$, where R is a (3×3 rotation) group element in SO(3). That is, these matrices represent the rotation group elements. With the help of its Lie algebra, one can show these two definitions are equivalent.
    ${\mathcal {D}}(R)T_{q}^{(k)}{\mathcal {D}}^{\dagger }(R)=\sum _{q'=-k}^{k}T_{q'}^{(k)}{\mathcal {D}}_{q'q}^{(k)}$

### Coordinate vectors

For the spherical basis, the coordinates are complex-valued numbers A+, A$_0$, A$_−$, and can be found by substitution of (3B) into (1), or directly calculated from the inner product ⟨, ⟩ (5):
| ${\begin{aligned}A_{+}&=\left\langle \mathbf {A} ,\mathbf {e} _{+}\right\rangle =-{\frac {A_{x}}{\sqrt {2}}}+{\frac {iA_{y}}{\sqrt {2}}}\\A_{-}&=\left\langle \mathbf {A} ,\mathbf {e} _{-}\right\rangle =+{\frac {A_{x}}{\sqrt {2}}}+{\frac {iA_{y}}{\sqrt {2}}}\\\end{aligned}}\quad \rightleftharpoons \quad A_{\pm }=\left\langle \mathbf {e} _{\pm },\mathbf {A} \right\rangle ={\frac {1}{\sqrt {2}}}\left(\mp A_{x}+iA_{y}\right)$ | (4A) |
    $A_{0}=\left\langle \mathbf {e} _{0},\mathbf {A} \right\rangle =\left\langle \mathbf {e} _{z},\mathbf {A} \right\rangle =A_{z}$
with inverse relations:
| ${\begin{aligned}A_{x}&=-{\frac {1}{\sqrt {2}}}A_{+}+{\frac {1}{\sqrt {2}}}A_{-}\\A_{y}&=-{\frac {i}{\sqrt {2}}}A_{+}-{\frac {i}{\sqrt {2}}}A_{-}\\A_{z}&=A_{0}\end{aligned}}$ | (4B) |
In general, for two vectors with complex coefficients in the same real-valued orthonormal basis e$_i$, with the property e$_i$·e$_j$ = δ$_{ij}$, the inner product is:
| $\left\langle \mathbf {a} ,\mathbf {b} \right\rangle =\mathbf {a} \cdot \mathbf {b} ^{\star }=\sum _{j}a_{j}b_{j}^{\star }$ | (5) |
where · is the usual dot product and the complex conjugate * must be used to keep the magnitude (or "norm") of the vector positive definite.

## Properties (three dimensions)
### Orthonormality

The spherical basis is an orthonormal basis, since the inner product ⟨, ⟩ (5) of every pair vanishes meaning the basis vectors are all mutually orthogonal:
    $\left\langle \mathbf {e} _{+},\mathbf {e} _{-}\right\rangle =\left\langle \mathbf {e} _{-},\mathbf {e} _{0}\right\rangle =\left\langle \mathbf {e} _{0},\mathbf {e} _{+}\right\rangle =0$
and each basis vector is a unit vector:
    $\left\langle \mathbf {e} _{+},\mathbf {e} _{+}\right\rangle =\left\langle \mathbf {e} _{-},\mathbf {e} _{-}\right\rangle =\left\langle \mathbf {e} _{0},\mathbf {e} _{0}\right\rangle =1$
hence the need for the normalizing factors of $1/\!{\sqrt {2}}$.

### Change of basis matrix

The defining relations (3A) can be summarized by a transformation matrix U:
    ${\begin{pmatrix}\mathbf {e} _{+}\\\mathbf {e} _{-}\\\mathbf {e} _{0}\end{pmatrix}}=\mathbf {U} {\begin{pmatrix}\mathbf {e} _{x}\\\mathbf {e} _{y}\\\mathbf {e} _{z}\end{pmatrix}}\,,\quad \mathbf {U} ={\begin{pmatrix}-{\frac {1}{\sqrt {2}}}&-{\frac {i}{\sqrt {2}}}&0\\+{\frac {1}{\sqrt {2}}}&-{\frac {i}{\sqrt {2}}}&0\\0&0&1\end{pmatrix}}\,,$
with inverse:
    ${\begin{pmatrix}\mathbf {e} _{x}\\\mathbf {e} _{y}\\\mathbf {e} _{z}\end{pmatrix}}=\mathbf {U} ^{-1}{\begin{pmatrix}\mathbf {e} _{+}\\\mathbf {e} _{-}\\\mathbf {e} _{0}\end{pmatrix}}\,,\quad \mathbf {U} ^{-1}={\begin{pmatrix}-{\frac {1}{\sqrt {2}}}&+{\frac {1}{\sqrt {2}}}&0\\+{\frac {i}{\sqrt {2}}}&+{\frac {i}{\sqrt {2}}}&0\\0&0&1\end{pmatrix}}\,.$
It can be seen that U is a unitary matrix, in other words its Hermitian conjugate U$^†$ (complex conjugate and matrix transpose) is also the inverse matrix U$^{−1}$.
For the coordinates:
    ${\begin{pmatrix}A_{+}\\A_{-}\\A_{0}\end{pmatrix}}=\mathbf {U} ^{\mathrm {*} }{\begin{pmatrix}A_{x}\\A_{y}\\A_{z}\end{pmatrix}}\,,\quad \mathbf {U} ^{\mathrm {*} }={\begin{pmatrix}-{\frac {1}{\sqrt {2}}}&+{\frac {i}{\sqrt {2}}}&0\\+{\frac {1}{\sqrt {2}}}&+{\frac {i}{\sqrt {2}}}&0\\0&0&1\end{pmatrix}}\,,$
and inverse:
    ${\begin{pmatrix}A_{x}\\A_{y}\\A_{z}\end{pmatrix}}=(\mathbf {U} ^{\mathrm {*} })^{-1}{\begin{pmatrix}A_{+}\\A_{-}\\A_{0}\end{pmatrix}}\,,\quad (\mathbf {U} ^{\mathrm {*} })^{-1}={\begin{pmatrix}-{\frac {1}{\sqrt {2}}}&+{\frac {1}{\sqrt {2}}}&0\\-{\frac {i}{\sqrt {2}}}&-{\frac {i}{\sqrt {2}}}&0\\0&0&1\end{pmatrix}}\,.$

### Cross products

Taking cross products of the spherical basis vectors, we find an obvious relation:
    $\mathbf {e} _{q}\times \mathbf {e} _{q}={\boldsymbol {0}}$
where q is a placeholder for +, −, 0, and two less obvious relations:
    $\mathbf {e} _{\pm }\times \mathbf {e} _{\mp }=\pm i\mathbf {e} _{0}$
    $\mathbf {e} _{\pm }\times \mathbf {e} _{0}=\pm i\mathbf {e} _{\pm }$

### Inner product in the spherical basis

The inner product between two vectors A and B in the spherical basis follows from the above definition of the inner product:
    $\left\langle \mathbf {A} ,\mathbf {B} \right\rangle =A_{+}B_{+}^{\star }+A_{-}B_{-}^{\star }+A_{0}B_{0}^{\star }$