# Inner Products and Matrix Multiplication

In quantum-mechanical matrix notation, the inner product and the action of operators on state vectors are implemented as matrix multiplication. The standard Dot product in *Mathematica* does not properly handle the inner product of vectors whose components are operators, because it tries to contract the last index of the first argument with the first index of the second argument.

The AtomicDensityMatrix package provides the function MatrixMultiply that takes into account the meaning of various tensor structures employed by the package when combining them. The package defines CenterDot to be equivalent to MatrixMultiply. CenterDot can be entered as ..

MatrixMultiply[a,b] or a·b | inner or outer product of spherical tensors, cartesian tensors, and operators |

TensorNorm[expr] | norm of expr |

Matrix multiplication is applied to each tensor of a tensor decomposition.

Decomposition decomposes an operator into polarization moments. |

Matrix multiplication is recursively applied to tensor structures.

The norm of a tensor is the square root of the inner product of the tensor with its dual tensor. Cartesian vectors are equal to their dual, while the dual of a covariant spherical tensor is the contravariant tensor, and vice versa.