This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Documentation / Mathematica / Built-in Functions / Programming / Attributes /

Orderless

FilledSmallSquare Orderless is an attribute that can be assigned to a symbol f to indicate that the elements in expressions of the form f[, , ... ] should automatically be sorted into canonical order. This property is accounted for in pattern matching.

FilledSmallSquare The Orderless attribute for a function corresponds to the mathematical property of commutativity.

FilledSmallSquare Functions with the Orderless attribute use canonical order as described in the notes for Sort.

FilledSmallSquare For an object that represents a matrix or a tensor, the Orderless attribute represents symmetry among indices.

FilledSmallSquare Functions like Plus and Times are Orderless.

FilledSmallSquare In matching patterns with Orderless functions, all possible orders of arguments are tried.

FilledSmallSquare The Orderless attribute must be assigned before defining any values for an Orderless function.

FilledSmallSquare See Section 2.3.7 and Section 2.6.3.

FilledSmallSquare See also: Sort, Flat, OneIdentity.

FilledSmallSquare New in Version 1.

Further Examples