# Dom::SymmetricGroup

Symmetric groups

### Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

## Syntax

```Dom::SymmetricGroup(`n`)
Dom::SymmetricGroup(n)(`l`)
```

## Description

`Dom::SymmetricGroup(n)` creates the symmetric group of order n, that is, the domain of all the permutations of {1, …, n} elements.

A permutation of n elements is a bijective mapping of the set {1, …, n} onto itself.

The domain element `Dom::SymmetricGroup(n)(l)` represents the bijective mapping of the first n positive integers that maps the integer i to `l[i]`, for 1 ≤ in.

## Superdomain

`Dom::BaseDomain`

## Axioms

`Ax::canonicalRep`

## Categories

`Cat::Group`

## Examples

### Example 1

Consider the group of permutations of the first seven positive integers:

`G := Dom::SymmetricGroup(7)`

We create an element of `G` by providing the image of 1, 2, etc.:

`a:=G([2,4,6,1,3,5,7])`

`a(3)`

## Parameters

 `n` Positive integer `l` List or array consisting of the first n integers in some order.

## Entries

 "one" the identical mapping of the set {1, …, n} to itself.

expand all

## Mathematical Methods

### `_mult` — Product of permutations

`_mult(a1, …)`

This method overloads the function `_mult`.

### `_invert` — Inverse of a permutation

`_invert(a)`

This method overloads the function `_invert`.

### `func_call` — Function value of a permutation at a point

`func_call(a, i)`

It computes the function value of `a` at `i`, i.e., the integer that `i` is mapped to by the permutation `a`; `i` must be an integer between 1 and n.

### `cycles` — Cycle representation of a permutation

`cycles(a)`

### `order` — Order of a permutation

`order(a)`

### `inversions` — Number of inversions

`inversions(a)`

### `sign` — Sign of a permutation

`sign(a)`

### `random` — Random permutation

`random()`

## Access Methods

### `allElements` — Return all elements of the group

`allElements()`

`size()`

## Conversion Methods

### `convert` — Conversion of an object into a permutation

`convert(x)`

### `convert_to` — Conversion of a permutation into another type

`convert_to(a, T)`

### `expr` — Convert a permutation into a list

`expr(a)`