symmetric - Maple Help

The symmetric Indexing Function

Description

 • The symmetric indexing function can be used to construct tables and rtable objects of type Array or Matrix.
 • In the construction of 2-dimensional objects, the symmetric indexing function specifies that the (i, j)th element equals the (j, i)th element.
 • In general, this indexing function specifies that all entries of an object whose indices are equal under permutations are the same.
 The indices are rearranged according to a system-determined canonical ordering.

Examples

 > $M≔\mathrm{Matrix}\left(1..3,1..3,\mathrm{shape}=\mathrm{symmetric}\right)$
 ${M}{≔}\left[\begin{array}{ccc}{0}& {0}& {0}\\ {0}& {0}& {0}\\ {0}& {0}& {0}\end{array}\right]$ (1)
 > $M\left[1,2\right]≔5$
 ${{M}}_{{1}{,}{2}}{≔}{5}$ (2)
 > $M$
 $\left[\begin{array}{ccc}{0}& {5}& {0}\\ {5}& {0}& {0}\\ {0}& {0}& {0}\end{array}\right]$ (3)
 > $A≔\mathrm{Array}\left(\mathrm{symmetric},1..5,1..5\right):$
 > $A$
 $\left[\begin{array}{ccccc}{0}& {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}& {0}\end{array}\right]$ (4)
 > $A\left[3,4\right]≔x:$
 > $A\left[4,3\right]$
 ${x}$ (5)
 > $A\left[4,3\right]≔y:$
 > $A\left[3,4\right]$
 ${y}$ (6)
 > $A$
 $\left[\begin{array}{ccccc}{0}& {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {y}& {0}\\ {0}& {0}& {y}& {0}& {0}\\ {0}& {0}& {0}& {0}& {0}\end{array}\right]$ (7)
 > $T≔\mathrm{table}\left(\mathrm{symmetric}\right):$
 > $T\left[\mathrm{function},\mathrm{continuous},\mathrm{odd}\right]≔f:$
 > $T\left[\mathrm{odd},\mathrm{continuous},\mathrm{function}\right]$
 ${f}$ (8)