# Symmetrized Arrays

Symmetry plays a key role in the treatment of high-rank tensors. Most high-rank tensors of importance in physics and mathematics have symmetry, from the symmetric inertia tensors to the rank-4 stiffness and curvature tensors. Many of them have transposition symmetries, in some cases rather complicated. *Mathematica* implements a complete language for permutation symmetries of tensors of any rank or dimensions, and provides a specialized type of array that stores only the independent components with respect to symmetry. This frequently results in a substantial gain in storage space, though usually at the expense of slower manipulations, because more complex algorithms are required. See "Tensor Symmetries" for a description of the language of symmetries.

## Representation of Arrays with Symmetry

SymmetrizedArray | construct an array storing only symmetry independent components |

SymmetrizedArrayRules | list of rules of independent components of a symmetrized array |

SymmetrizedReplacePart | replace independent components in a symmetrized array |

In[1]:= |

In[2]:= |

Out[2]= |

In[4]:= |

Out[4]= |

In[5]:= |

Out[5]= |

In[6]:= |

Out[6]//InputForm= | |

In[7]:= |

Out[7]= |

In[8]:= |

Out[8]= |

Symmetrized arrays offer a compact way to store some arrays with much symmetry. In particular, antisymmetry maximizes this gain. In the most extreme nonzero case, a fully antisymmetric rank- array in dimension has one independent component. Its sparse representation contains nonzero elements, and its normal form has entries. On the other hand, manipulation of symmetrized arrays is usually slower because it requires more complex algorithms.

In[8]:= |

Out[8]= |

In[9]:= |

Out[9]= |

In[10]:= |

Out[10]= |

In[11]:= |

Out[11]= |

In[9]:= |

In[10]:= |

Out[10]= |

In[11]:= |

Out[11]= |

StructuredArray objects, in particular symmetrized arrays, are treated as atomic objects. Their information can be accessed using functions.

In[12]:= |

Out[12]= |

In[13]:= |

Out[13]= |

In[14]:= |

Out[14]= |

In[15]:= |

Out[15]= |

In[16]:= |

Out[16]= |

In[17]:= |

Out[17]= |

In[18]:= |

Out[18]= |

In[19]:= |

Out[19]= |

In[20]:= |

Out[20]= |

In[21]:= |

Out[21]= |

## Construction of Symmetrized Arrays

It has been shown that SymmetrizedArray can be used to rewrite a normal array with symmetry in a more efficient form. Following SparseArray, SymmetrizedArray can also construct the same efficient representation from a list of rules and a symmetry specification.

In[22]:= |

Out[22]= |

In[23]:= |

Out[23]= |

In[24]:= |

Out[24]= |

In[25]:= |

Out[25]= |

In[26]:= |

Out[26]= |

In[27]:= |

Out[27]= |

In[28]:= |

Out[28]= |

General patterns in rules can be used in the first argument of SymmetrizedArray. These rules are meant to be rules for the independent components only, as given by SymmetrizedIndependentComponents, and not for all positions of the array, as SparseArray would do. In particular, this is useful to generate symmetrized arrays with random entries.

In[32]:= |

Out[33]= |

In[34]:= |

Out[34]= |

In[35]:= |

Out[35]= |

In[36]:= |

Out[36]= |

An alternative way to construct symmetrized arrays is by actual symmetrization of other arrays, using the function Symmetrize.

In[40]:= |

Out[40]= |

In[41]:= |

Out[41]= |

In[42]:= |

Out[42]= |

In[43]:= |

Out[43]= |

## Antisymmetric Arrays

The antisymmetric tensors play a fundamental role in exterior algebra. *Mathematica* provides the basic operations of the wedge product of antisymmetric tensors and Hodge duality.

In[44]:= |

In[57]:= |

Out[57]= |

In[58]:= |

Out[58]= |

In[60]:= |

Out[60]= |

In[66]:= |

In[69]:= |

Out[69]= |

In[70]:= |

Out[70]= |

In[71]:= |

Out[71]= |