# Gyration tensor

In physics, the gyration tensor is a tensor that describes the second moments of position of a collection of particles
    $S_{mn}\ {\stackrel {\mathrm {def} }{=}}\ {\frac {1}{N}}\sum _{i=1}^{N}r_{m}^{(i)}r_{n}^{(i)}$
where $r_{m}^{(i)}$ is the $\mathrm {m^{th}}$ Cartesian coordinate of the position vector $\mathbf {r} ^{(i)}$ of the $\mathrm {i^{th}}$ particle. The origin of the coordinate system has been chosen such that
    $\sum _{i=1}^{N}\mathbf {r} ^{(i)}=0$
i.e. in the system of the center of mass $r_{CM}$. Where
    $r_{CM}={\frac {1}{N}}\sum _{i=1}^{N}\mathbf {r} ^{(i)}$
Another definition, which is mathematically identical but gives an alternative calculation method, is:
    $S_{mn}\ {\stackrel {\mathrm {def} }{=}}\ {\frac {1}{2N^{2}}}\sum _{i=1}^{N}\sum _{j=1}^{N}(r_{m}^{(i)}-r_{m}^{(j)})(r_{n}^{(i)}-r_{n}^{(j)})$
Therefore, the x-y component of the gyration tensor for particles in Cartesian coordinates would be:
    $S_{xy}={\frac {1}{2N^{2}}}\sum _{i=1}^{N}\sum _{j=1}^{N}(x_{i}-x_{j})(y_{i}-y_{j})$
In the continuum limit,
    $S_{mn}\ {\stackrel {\mathrm {def} }{=}}\ {\dfrac {\int d\mathbf {r} \ \rho (\mathbf {r} )\ r_{m}r_{n}}{\int d\mathbf {r} \ \rho (\mathbf {r} )}}$
where $\rho (\mathbf {r} )$ represents the number density of particles at position $\mathbf {r}$.
Although they have different units, the gyration tensor is related to the moment of inertia tensor. The key difference is that the particle positions are weighted by mass in the inertia tensor, whereas the gyration tensor depends only on the particle positions; mass plays no role in defining the gyration tensor.

## Diagonalization

Since the gyration tensor is a symmetric 3x3 matrix, a Cartesian coordinate system can be found in which it is diagonal
    $\mathbf {S} ={\begin{bmatrix}\lambda _{x}^{2}&0&0\\0&\lambda _{y}^{2}&0\\0&0&\lambda _{z}^{2}\end{bmatrix}}$
where the axes are chosen such that the diagonal elements are ordered $\lambda _{x}^{2}\leq \lambda _{y}^{2}\leq \lambda _{z}^{2}$.
These diagonal elements are called the principal moments of the gyration tensor.

## Shape descriptors

The principal moments can be combined to give several parameters that describe the distribution of particles. The squared radius of gyration is the sum of the principal moments:
    $R_{g}^{2}=(\lambda _{x}^{2}+\lambda _{y}^{2}+\lambda _{z}^{2})$
The asphericity $b$ is defined by
    $b\ {\stackrel {\mathrm {def} }{=}}\ \lambda _{z}^{2}-{\frac {1}{2}}\left(\lambda _{x}^{2}+\lambda _{y}^{2}\right)={\frac {3}{2}}\lambda _{z}^{2}-{\frac {R_{g}^{2}}{2}}$
which is always non-negative and zero only when the three principal moments are equal, λ$_x$ = λ$_y$ = λ$_z$. This zero condition is met when the distribution of particles is spherically symmetric (hence the name asphericity) but also whenever the particle distribution is symmetric with respect to the three coordinate axes, e.g., when the particles are distributed uniformly on a cube, tetrahedron or other Platonic solid.
Similarly, the acylindricity $c$ is defined by
    $c\ {\stackrel {\mathrm {def} }{=}}\ \lambda _{y}^{2}-\lambda _{x}^{2}$
which is always non-negative and zero only when the two principal moments are equal, λ$_x$ = λ$_y$. This zero condition is met when the distribution of particles is cylindrically symmetric (hence the name, acylindricity), but also whenever the particle distribution is symmetric with respect to the two coordinate axes, e.g., when the particles are distributed uniformly on a regular prism.
Finally, the relative shape anisotropy $\kappa ^{2}$ is defined
    $\kappa ^{2}\ {\stackrel {\mathrm {def} }{=}}\ {\frac {b^{2}+(3/4)c^{2}}{R_{g}^{4}}}={\frac {3}{2}}{\frac {\lambda _{x}^{4}+\lambda _{y}^{4}+\lambda _{z}^{4}}{(\lambda _{x}^{2}+\lambda _{y}^{2}+\lambda _{z}^{2})^{2}}}-{\frac {1}{2}}$
which is bounded between zero and one. $\kappa ^{2}$ = 0 only occurs if all points are spherically symmetric, and $\kappa ^{2}$ = 1 only occurs if all points lie on a line.