Ordering in Lists

Sort[list]sort the elements of list into order
Ordering[list]the positions in list of the elements in Sort[list]
Ordering[list,n]the first n elements of Ordering[list]
Ordering[list,-n]the last n elements of Ordering[list]
Permutations[list]all possible orderings of list
Min[list]the smallest element in list
Max[list]the largest element in list

Ordering in lists.

Here is a list of numbers.
In[1]:=
Click for copyable input
Out[1]=
This gives the elements of in sorted order.
In[2]:=
Click for copyable input
Out[2]=
This gives the positions of the elements of , from the position of the smallest to that of the largest.
In[3]:=
Click for copyable input
Out[3]=
This is the same as Sort[t].
In[4]:=
Click for copyable input
Out[4]=
This gives the smallest element in the list.
In[5]:=
Click for copyable input
Out[5]=
New to Mathematica? Find your learning path »
Have a question? Ask support »