generates a list of all possible permutations of the elements in list.

Permutations[list, n]
gives all permutations containing at most n elements.

Permutations[list, {n}]
gives all permutations containing exactly n elements.


  • There are n! permutations of a list of n distinct elements.
  • Repeated elements are treated as identical.  »
  • The object list need not have head List.
  • Permutations[list] is effectively equivalent to Permutations[list, {Length[list]}].
  • Permutations[list, {nmin, nmax}] gives permutations of between and elements.
New in 1 | Last modified in 6
New to Mathematica? Find your learning path »
Have a question? Ask support »