# permutations function

All the orderings of a list.

## How to write it

### permutations(list)

**list**

The list. Takes a list.

## Examples

- $\displaystyle \operatorname{permutations}(\left[ 1, 2, 3 \right]) = \begin{pmatrix} 1 & 2 & 3 \\ 1 & 3 & 2 \\ 2 & 1 & 3 \\ 2 & 3 & 1 \\ 3 & 1 & 2 \\ 3 & 2 & 1 \end{pmatrix}$

  `permutations([1, 2, 3])`

  In the solver, `permutations([1, 2, 3])` gives `[[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]]`.

  [Open in the solver](https://hilberon.com/?q=permutations%28%5B1%2C%202%2C%203%5D%29)

## Related functions

- [quaternion_conjugate](https://hilberon.com/library/quaternion_conjugate)

  The conjugate of a quaternion.
- [permutation_sign](https://hilberon.com/library/permutation_sign)

  The sign of a permutation: 1 when it is even, -1 when odd.
- [quaternion_multiply](https://hilberon.com/library/quaternion_multiply)

  The product of two quaternions.
- [permutation_product](https://hilberon.com/library/permutation_product)

  The product of two permutations.
- [quaternion_norm](https://hilberon.com/library/quaternion_norm)

  The norm of a quaternion.
- [permutation_power](https://hilberon.com/library/permutation_power)

  A permutation to a whole power.

---
Source: https://hilberon.com/library/permutations
