#### Graphical representations of rank-2 tensors

Let’s ﬁrst answer the question ‘What is a tensor’, from the perspective of a scientist.

The laws of physics are formulated in terms of scalars (rank-0 tensors), vectors (rank-1 tensors), and so forth. A scalar has a magnitude, and it may have a sign. A scalar does not depend on the coordinate system used to express physical laws. Examples are energy or temperature.

A vector, such as velocity $v$, has a magnitude and a direction, which tell you how fast a particle moves in the coordinate system along one of the axis directions (positive or negative). In a two- or three-dimensional Cartesian coordinate system, the vector must then be written with two or three components. The vector components depend on the coordinate system you choose. Furthermore, the vector components must change in a speciﬁc way upon transforming between coordinate systems, such that for a particle with mass $m$ the kinetic energy $T=\left(1∕2\right)mv\cdot v$, for instance, is invariant under coordinate transformations. (‘$T$’ stands for the energy of translational motion.) In the previous equation, we have the scalar product of vector $v$ with itself.

Rank-2, -3, and so forth, tensors are generalizations of this concept. As for vectors, the components of a tensor with rank 2 or higher must transform in a speciﬁc way upon transforming the underlying coordinate system, such that physical laws expressed in terms of these tensors do not change.

A rank-2 tensor, say $\overline{M}$, will often show up in physical laws in equations such as $b=\overline{M}a$, where $a$ and $b$ are vectors, and $\overline{M}$ provides the mathematical recipe for changing vector $a$ into vector $b$. Below, we use this idea to express the local magnetic ﬁeld in NMR spectroscopy (a vector) in terms of the external ﬁeld (also a vector). Another example would be the dipole moment (a vector) induced in a medium or in a molecule by an external electric ﬁeld (also a vector). The rank-2 tensor involved in the induced dipole moment-electric ﬁeld relationship is called polarizability. The energy (a scalar) associated with the polarization would be given by an expression such as $E=a\cdot \overline{M}b$, where $E$ is a scalar, and $\overline{M}$ and $a,b$ are rank-2 and rank-1 tensors, respectively.

Before we discuss the details of tensor visualization, let’s look at an example along with a brief description. The language used in the description is explained in detail further below. The ﬁgure was created with this Mathematica notebook (60 kBytes). For further details see my Downloads page. Graphical representations of selected NMR carbon shielding tensors of a ﬁnite (9,0) single-walled carbon nanotube. The blue $\left(+\right)$ and orange $\left(-\right)$ surfaces indicate the signs and relative magnitudes of the principal components of the NMR shielding tensors as well as the orientations of the principal axis systems (PASs) relative to the molecular coordinate frame. The arrows additionally show the PASs and are color coded (green for positive principal components and red for negative ones). A sphere would indicate an isotropic tensor. The nanotube shielding tensors are strongly anisotropic. Data to prepare the ﬁgure were taken from publication .

Many optical and spectroscopic properties of molecules that we study in our research, on a day-to-day basis or occasionally, are rank-2 tensors. Examples are NMR shielding, NMR spin-spin coupling, electric ﬁeld gradients at nuclei (giving rise to the quadrupolar interaction in NMR and other types of spectroscopy), polarizability, optical rotation, or the magnetic susceptibility. If you know what a rank-2 tensor is please just scroll down to the detailed description of the functions that are plotted in the ﬁgure shown above. Otherwise, here is a short explanation:

What is a tensor, and what is a rank-2 tensor? To reiterate, a rank-0 tensor is a scalar (a single number). A rank-1 tensor is a vector. For a physical quantity deﬁned in a 3D Cartesian coordinate system such a vector has three components:

 $v=\left(\begin{array}{c}\hfill {v}_{x}\hfill \\ \hfill {v}_{y}\hfill \\ \hfill {v}_{z}\hfill \end{array}\right)$

A rank-2 tensor can be written as a matrix. For example, for a quantity deﬁned in a 3D Cartesian coordinate system a rank-2 tensor can be written as (we use boldface notation for vectors and boldface with a bar for rank-2 tensors here):

 $\overline{M}=\left(\begin{array}{ccc}\hfill {M}_{xx}\hfill & \hfill {M}_{xy}\hfill & \hfill {M}_{xz}\hfill \\ \hfill {M}_{yx}\hfill & \hfill {M}_{yy}\hfill & \hfill {M}_{yz}\hfill \\ \hfill {M}_{zx}\hfill & \hfill {M}_{zy}\hfill & \hfill {M}_{zz}\hfill \end{array}\right)$

In a nutshell, a tensor of rank greater than zero is a physical quantity that is represented by more than a single number, the tensor components. These components transform among each other under a transformation of the coordinate system such that physical laws written in terms of the tensors remain the same in diﬀerent coordinate systems.

For example, the interaction energy (a scalar = rank-0 tensor) between a magnetic ﬁeld $B$ of magnitude $B$ (i.e. $B$ is the length of the vector $B$) and a magnetic dipole moment $m$ with magnitude $m$ is given by the dot-product of the two vectors:

 $E=-m\cdot B=-\left({m}_{x}{B}_{x}+{m}_{y}{B}_{y}+{m}_{z}{B}_{z}\right)=-mB\phantom{\rule{0.17em}{0ex}}\mathrm{cos}\left[\angle \left(m,B\right)\right]$

The equations assume a Cartesian coordinate system with unit vectors $e{}_{}x,e{}_{}y,e{}_{}z$ of length 1. The point is that if we rotate the coordinate system used to describe the vectors $B$ and $m$ (passive rotation), or if the rotate the two vectors simultaneously in the exact same way (active rotation), the energy $E$ must remain the same as we have neither changed the angle $\angle \left(m,B\right)$ between the two vectors nor their lengths. This puts certain constraints on how the components of the vectors must transform under rotations of the coordinate system or when they are rotated. Likewise, the components of a rank-2 or higher tensor have certain transformation rules upon rotations.

The previous equation for $E$ is a good starting point to introduce a rank-2 tensor. If the magnetic dipole moment is that of an atomic nucleus’ spin, the energy $E$ is quantized and we can observe transitions between ‘parallel’ and ‘anti-parallel’ relative orientations of $B$ and $m$ by spectroscopy. The magnetic ﬁeld $B$ is then the ﬁeld created by the powerful magnet of an NMR spectrometer. But there is something else going on: there are electrons around a magnetic nucleus in a molecule, and there are other atoms around, and there are other molecules around those. Therefore the magnetic ﬁeld experienced by the nuclear spin magnetic moment is not the ﬁeld generated by the spectrometer magnet but a local ﬁeld. The local ﬁeld may diﬀer in magnitude and orientation from the external spectrometer ﬁeld, and it may depend on the relative orientations of the external ﬁeld and the molecule. Usually, the magnitude of the local ﬁeld is reduced relative to the external ﬁeld, and the eﬀect is therefore referred to as NMR shielding. But how to describe it theoretically?

Let’s denote the external spectrometer ﬁeld by $B{}^{}\text{(ext)}$ and the local ﬁeld by $B{}^{}\text{(loc)}$. Considering that the local ﬁeld will usually be smaller in magnitude (hence, one needs a subtraction of some sort), we can write

 $B{}^{}\text{(loc)}=\left(1-\overline{\sigma }\right)B{}^{}\text{(ext)}=B{}^{}\text{(ext)}-\overline{\sigma }B{}^{}\text{(ext)}$

Here, $\overline{\sigma }$ is the nuclear magnetic shielding tensor. If $\overline{\sigma }$ were a scalar, then $\overline{\sigma }B{}^{}\text{(ext)}$ would always be parallel to $B{}^{}\text{(ext)}$, and therefore $B{}^{}\text{(loc)}$ would also always be parallel to $B{}^{}\text{(ext)}$. This is not general enough to describe experimental observations. Instead, NMR shielding is a rank-2 tensor:

 $\overline{\sigma }=\left(\begin{array}{ccc}\hfill {\sigma }_{xx}\hfill & \hfill {\sigma }_{xy}\hfill & \hfill {\sigma }_{xz}\hfill \\ \hfill {\sigma }_{yx}\hfill & \hfill {\sigma }_{yy}\hfill & \hfill {\sigma }_{yz}\hfill \\ \hfill {\sigma }_{zx}\hfill & \hfill {\sigma }_{zy}\hfill & \hfill {\sigma }_{zz}\hfill \end{array}\right)$

The interaction energy between the nuclear magnetic moment and the magnetic ﬁeld is

 $E=m\cdot B{}^{}\text{(loc)}=m\cdot \left(1-\overline{\sigma }\right)B{}^{}\text{(ext)}$

Since $-\overline{\sigma }B{}^{}\text{(ext)}$ is a matrix-vector product, the result is a vector and one can take the dot-product with the magnetic moment vector afterwards to obtain the shielding contribution to $E$. As in the simpler case discussed above, this energy must not depend on how we choose our coordinate system. Hence, like the vectors involved the expression, the shielding tensor components must obey certain transformation rules under coordinate transformations.

What are the functions plotted in the nanotube example above?

Clearly, there is a lot of information contained in a rank-2 tensor such as the NMR shielding tensor $\overline{\sigma }$. At some point during our research we felt a need for some kind of graphical representation of these tensors in relation to the molecular geometry. What we came up with was the following procedure :

• Calculate a scalar function

$\begin{array}{llll}\hfill f\left(x,y,z\right)& =\left(x,y,z\right)\left(\begin{array}{ccc}\hfill {\sigma }_{xx}\hfill & \hfill {\sigma }_{xy}\hfill & \hfill {\sigma }_{xz}\hfill \\ \hfill {\sigma }_{yx}\hfill & \hfill {\sigma }_{yy}\hfill & \hfill {\sigma }_{yz}\hfill \\ \hfill {\sigma }_{zx}\hfill & \hfill {\sigma }_{zy}\hfill & \hfill {\sigma }_{zz}\hfill \end{array}\right)\left(\begin{array}{c}\hfill x\hfill \\ \hfill y\hfill \\ \hfill z\hfill \end{array}\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & ={\sigma }_{xx}{x}^{2}+{\sigma }_{xy}yx+\cdots +{\sigma }_{zz}{z}^{2}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$
• Transform $f\left(x,y,z\right)$ to spherical polar coordinates and divide by ${r}^{2}$ to get

 $\frac{1}{{r}^{2}}f\left(r,𝜃,\varphi \right)=g\left(𝜃,\varphi \right)$

which only depends on the angles

• Prepare a spherical polar plot of $g\left(𝜃,\varphi \right)$. A polar plot is done as follows: For a large number of value pairs ${𝜃}_{i},{\varphi }_{i}$ within the allowed ranges of $𝜃$ and $\varphi$, in each case a point is created with the coordinate triples $\left({r}_{i}=g\left({𝜃}_{i},{\varphi }_{i}\right),{𝜃}_{i},{\varphi }_{i}\right)$. The points are then connected to form a surface in three dimensions.

• In fact, we crate two surfaces, one for all points for which $g\left(𝜃,\varphi \right)$ is positive, and another one for all points for which $g\left(𝜃,\varphi \right)$ is negative. The surfaces are colored diﬀerently.

These are the surfaces shown in the nanotube example above, for the NMR shielding tensors of two diﬀerent carbon atoms in the nanotube. The blue surfaces are for positive $g\left(𝜃,\varphi \right)$, the orange ones for negative $g\left(𝜃,\varphi \right)$. So what do they represent?

From the NMR nucleus in some direction $u$, the distance of the surface from the nucleus (times $±1$ depending on the color coding) is equal to the NMR shielding that would be observed if the external ﬁeld were in the direction of $u$ relative to a ﬁxed orientation of the molecule. In fact, as my collaborators and I learned later, such a function had previously been deﬁned as the ‘shielding response vector’ . The graphics shown above include scaling factors $s$ chosen to make the polar plots appear in a convenient size relative to the molecule. When the distance $r$ of the surface from the plot’s origin is multiplied with the scaling factor $s$ one gets the shielding value (i.e. for NMR shielding the scaling factor $s$ is in ppm per unit distance).

If the shielding is the same no matter what the relative orientation of the ﬁeld and the molecule is, then the shielding tensor is said to be isotropic. The corresponding polar plot is a sphere, the same distance of the surface from the origin in all directions. Clearly, the shielding tensors of the nanotube are very strongly anisotropic. The shielding is large & positive for a magnetic ﬁeld perpendicular to the sidewall, but very small or even negative for carbons for which the ﬁeld is tangential to the sidewall or the caps’ surfaces.

If one performs NMR measurements on molecules that rotate freely, and fast on the NMR time scale, then the measurement represents an average of all the diﬀerent directions of the plot. This isotropic average of the tensor is the isotropic shielding constant $\sigma =\frac{1}{3}\left({\sigma }_{xx}+{\sigma }_{yy}+{\sigma }_{zz}\right)$. This value is a scalar and independent of the chosen coordinate system representing the shielding tensor.

For a given nucleus in a given molecule, one may ask the question: Is there an orientation of the molecule such that the Cartesian representation of the shielding tensor $\overline{\sigma }$ is as simple as possible?, namely diagonal:

 $\overline{\sigma }=\left(\begin{array}{ccc}\hfill {\sigma }_{xx}\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill {\sigma }_{yy}\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill {\sigma }_{zz}\hfill \end{array}\right)$

The answer is ‘yes’, as long as an antisymmetric component, if present, is subtracted from the shielding tensor. [To my knowledge, an antisymmetric shielding tensor component is not observed in NMR experiments.] The three shielding values on the diagonal are the principal components of the shielding tensor, and the corresponding coordinate system is referred to as the principal axis system (PAS). What is nice about the polar plot of the tensor is that the orientation of the PAS is indicated by the extremum values of $g\left(𝜃,\varphi \right)$, i.e. by the directions where the surfaces are furthest away or closest to the origin of the plot. In the nanotube plot above, I have also included the PAS shown as green and red arrows (green if the principal component is positive, red otherwise), showing that indeed the polar plot surface indicates the orientation of the PAS. The principal values are given by the distances of the surface from the origin in these directions. The nice thing about the polar plots is that if we rotate the molecule and re-calculate the shielding tensor and prepare a new polar plot, it will look just the same because the plot depends on the relative orientation of the PAS and the molecule, and the two rotate together.

Electric ﬁeld gradient tensors: We later used such polar plots of tensors extensively for electric-ﬁeld gradients (EFGs) , which are underlying the quadrupolar interaction that is so important in solid-state NMR of isotopes with spin $>1∕2$.

For EFG tensors, you would never see a polar plot looking like a sphere or even a deformed sphere. The reason is that EFG tensors (components ${V}_{xx},{V}_{xy},\dots$) have no isotropic part; they are ‘traceless’ or ‘purely anisotropic’ meaning the isotropic average $\frac{1}{3}\left({V}_{xx}+{V}_{yy}+{V}_{zz}\right)$ is zero. It the PAS, there are then only two unique numbers characterizing the tensor because the fact that the tensor is traceless ﬁxes the third principal component if two others are known. Usually, for EFG tensors the principal values are ordered such that ${V}_{33}$ denotes the largest-magnitude diagonal element, and ${V}_{11}$ the smallest (the signs are not reﬂected in the ordering). Instead of giving two of the principal components, the tensor can also be characterized by the values of ${V}_{33}$ and the asymmetry parameter ${\eta }_{Q}=\frac{{V}_{11}-{V}_{22}}{{V}_{33}}$ (the subscript $Q$ indicates this has to do with the nuclear quadrupolar interaction).

In publication  we showed for the quadrupolar ${}^{27}$Al nucleus, how the line shape of a solid-state NMR spectrum changes with the asymmetry parameter of the EFG tensor. In the ﬁgure below, you can see the polar plots of various EFG tensors and next to them the resulting NMR line shape. This is from a research project in collaboration with Rob Schurko at Florida State University (formerly U. of Windsor). ### References

   Hansen, A. E.;  Bouman, T. D. J. Chem. Phys. 1989, 91, 3552-3560.

© 2017 – 2022 J. Autschbach. The material shown on this web page is in parts or wholly based on the results of research funded by grants from the National Science Foundation [NSF, grants CHE 0447321, 0952253, 1265833, 1560881, 1855470] and educational projects supported by these grants. Any opinions, ﬁndings, and conclusions or recommendations expressed in this material are those of the author and do not necessarily reﬂect the views of the National Science Foundation.