# 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. The Wolfram System 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[3]:= |

Out[3]= |

In[4]:= |

Out[4]= |

In[5]:= |

Out[5]//InputForm= | |

In[6]:= |

Out[6]= |

In[7]:= |

Out[7]= |

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]:= |

In[11]:= |

Out[11]= |

In[12]:= |

Out[12]= |

In[13]:= |

Out[13]= |

In[14]:= |

In[15]:= |

Out[15]= |

In[16]:= |

Out[16]= |

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

In[17]:= |

Out[17]= |

In[18]:= |

Out[18]= |

In[19]:= |

Out[19]= |

In[20]:= |

Out[20]= |

In[21]:= |

Out[21]= |

In[22]:= |

Out[22]= |

In[23]:= |

Out[23]= |

In[24]:= |

Out[24]= |

In[25]:= |

Out[25]= |

In[26]:= |

Out[26]= |

## 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[27]:= |

Out[27]= |

In[28]:= |

Out[28]= |

In[29]:= |

Out[29]= |

In[30]:= |

Out[30]= |

In[31]:= |

Out[31]= |

In[32]:= |

Out[32]= |

In[33]:= |

Out[33]= |

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[34]:= |

Out[35]= |

In[36]:= |

Out[36]= |

In[37]:= |

Out[37]= |

In[38]:= |

Out[38]= |

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

In[39]:= |

Out[39]= |

In[40]:= |

Out[40]= |

In[41]:= |

Out[41]= |

In[42]:= |

Out[42]= |

## Antisymmetric Arrays

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

In[43]:= |

In[46]:= |

Out[46]= |

In[47]:= |

Out[47]= |

In[48]:= |

Out[48]= |

In[49]:= |

In[52]:= |

Out[52]= |

In[53]:= |

Out[53]= |

In[54]:= |

Out[54]= |