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


gives True if the are in canonical order, and False otherwise.
  • By default, OrderedQ uses canonical order as described in the notes for Sort.
  • OrderedQ uses the function p to determine whether each pair of elements in list is in order.
Click for copyable input
Click for copyable input
OrderedQ works with any expressions:
OrderedQ works with any head, not just List:
Use Greater to test for ordering:
Find tuples that are in order:
Find which tuples are in order:
Sort by default sorts using OrderedQ:
OrderedQ by default works structurally, not by numerical value:
New in 1