Permutations appear in many different mathematical concepts, and so we give a general introduction to them in this section.

Definition of Permutations

Given a positive integer \(n \in \mathbb{Z}_{+}\), a permutation of an (ordered) list of \(n\) distinct objects is any reordering of this list. When describing the reorderings themselves, though, the nature of the objects involved is more or less irrelevant. E.g., we can imagine interchanging the second and third items in a list of five distinct objects --- no matter what those items are --- and this defines a particular permutation that can be applied to any list of five objects.

Since the nature of the objects being rearranged (i.e., permuted) is immaterial, it is common to use the integers \(1,2,\ldots,n\) as the standard list of \(n\) objects. Alternatively, one can also think of these integers as labels for the items in any list of \(n\) distinct elements. This gives rise to the following definition.

Definition: Permutation

A permutation \(\pi\) of \(n\) elements is a one-to-one and onto function having the set \(\{1,2,\ldots, n\}\) as both its domain and codomain.

In other words, a permutation is a function \(\pi:\{1, 2, \ldots, n\} \longrightarrow \{1, 2, \ldots, n\}\) such that, for every integer \(i \in \{1, \ldots, n\}\), there exists exactly one integer \(j \in \{1, \ldots, n\}\) for which \(\pi(j) = i\). We will usually denote permutations by Greek letters such as \(\pi\)(pi), \(\sigma\)(sigma), and \(\tau\)(tau). The set of all permutations of \(n\) elements is denoted by \(\mathcal{S}_{n}\) and is typically referred to as the symmetric group of degree \(n\). (In particular, the set \(\mathcal{S}_{n}\) forms a group under function composition as discussed in Section 8.1.2).

Given a permutation \(\pi \in \mathcal{S}_{n}\), there are several common notations used for specifying how \(\pi\) permutes the integers \(1, 2, \ldots, n\). The important thing to keep in mind when working with these different notations is that \(\pi\) is a function defined on the finite set \(\{1, 2, \ldots, n\}\), with notation being used as a convenient short-hand for keeping track of how \(\pi\) permutes the elements in this set.

Definition 8.1.2: two-line notation

Given a permutation \(\pi \in \mathcal{S}_{n}\), denote \(\pi_{i} = \pi(i)\) for each \(i \in \{1, \ldots, n\}\). Then the two-line notation for \(\pi\) is given by the \(2 \times n\) matrix

In other words, given a permutation \(\pi \in \mathcal{S}_{n}\) and an integer \(i \in \{1, \ldots, n\}\), we are denoting the image of \(i\) under \(\pi\) by \(\pi_{i}\) instead of using the more conventional function notation \(\pi(i)\). Then, in order to specify the image of each integer \(i \in \{1, \ldots, n\}\) under \(\pi\), we list these images in a two-line array as shown above. (One can also use so-called one-line notation for \(\pi\), which is given by simply ignoring the top row and writing \(\pi = \pi_{1}\pi_{2}\cdots\pi_{n}\).)

It is important to note that, although we represent permutations as \(2 \times n\) matrices, you should not think of permutations as linear transformations from an \(n\)-dimensional vector space into a two-dimensional vector space. Moreover, the composition operation on permutation that we describe in Section 8.1.2 below does not correspond to matrix multiplication. The use of matrix notation in denoting permutations is merely a matter of convenience.

Example \(\PageIndex{3}\):

Suppose that we have a set of five distinct objects and that we wish to describe the permutation that places the first item into the second position, the second item into the fifth position, the third item into the first position, the fourth item into the third position, and the fifth item into the fourth position. Then, using the notation developed above, we have the permutation \(\pi \in \mathcal{S}_{5}\) such that

It is relatively straightforward to find the number of permutations of \(n\) elements, i.e., to determine cardinality of the set \(\mathcal{S}_{n}\). To construct an arbitrary permutation of \(n\) elements, we can proceed as follows: First, choose an integer \(i \in \{1, \ldots, n\}\) to put into the first position. Clearly, we have exactly \(n\) possible choices. Next, choose the element to go in the second position. Since we have already chosen one element from the set \(\{1, \ldots, n\}\), there are now exactly \(n - 1\) remaining choices. Proceeding in this way, we have \(n - 2\) choices when choosing the third element from the set \(\{1, \ldots, n\}\), then \(n - 3\) choices when choosing the fourth element, and so on until we are left with exactly one choice for the \(n^{\rm th}\) element. This proves the following theorem.

Theorem 8.1.4

The number of elements in the symmetric group \(\mathcal{S}_{n}\) is given by

We conclude this section with several examples, including a complete description of the one permutation in \(\mathcal{S}_{1}\), the two permutations in \(\mathcal{S}_{2}\), and the six permutations in \(\mathcal{S}_{3}\). For your own practice, you should (patiently) attempt to list the \(4! = 24\) permutations in \(\mathcal{S}_{4}\).

Example \(\PageIndex{5}\):

Given any positive integer \(n \in \mathbb{Z}_{+}\), the identity function \(\mbox{id}:\{1, \ldots, n\} \longrightarrow \{1, \ldots, n\}\) given by \(\mbox{id}(i) = i\), \(\forall \ i \in \{1, \ldots, n\}\), is a permutation in \(\mathcal{S}_{n}\). This function can be thought of as the trivial reordering that does not change the order at all, and so we call it the trivial or identity permutation.

If \(n = 2\), then, by Theorem 8.1.4, \(|\mathcal{S}_{n}| = 2! = 2 \cdot 1 = 2\). Thus, there is only one non-trivial permutation \(\pi\) in \(\mathcal{S}_{2}\), namely the transformation interchanging the first and the second elements in a list. As a function, \(\pi(1) = 2\) and \(\pi(2) = 1\), and, in two-line notation,

can be read as defining the reordering that, with respect to the original list, places the second element in the first position, the third element in the second position, and the first element in the third position. This permutation could equally well have been identified by describing its action on the (ordered) list of letters \(a,b,c\). In other words,

Composition of Permutations

Let \(n \in \mathbb{Z}_{+}\) be a positive integer and \(\pi,\sigma \in \mathcal{S}_{n}\) be permutations. Then, since \(\pi\) and \(\sigma\) are both functions from the set \(\{1,\ldots, n\}\) to itself, we can compose them to obtain a new function \(\pi \circ \sigma\) (read as ``pi after sigma'') that takes on the values

In particular, note that the result of each composition above is a permutation, that composition is not a commutative operation, and that composition with \(\mbox{id}\) leaves a permutation unchanged. Moreover, since each permutation \(\pi\) is a bijection, one can always construct an inverse permutation \(\pi^{-1}\) such that \(\pi \circ \pi^{-1} = \mbox{id}\). E.g.,

In other words, the set \(\mathcal{S}_{n}\) forms a group under composition.

Note that the composition of permutations is not commutative in general. In particular, for \(n \geq 3\), it is easy to find permutations \(\pi\) and \(\sigma\) such that \(\pi\circ\sigma\neq \sigma\circ\pi\).

Inversions and the sign of a permutation

Let \(n \in \mathbb{Z}_{+}\) be a positive integer. Then, given a permutation \(\pi \in \mathcal{S}_{n}\), it is natural to ask how ``out of order'' \(\pi\) is in comparison to the identity permutation. One method for quantifying this is to count the number of so-called inversion pairs in \(\pi\) as these describe pairs of objects that are out of order relative to each other.

Definition 8.1.8.Let \(\pi \in \mathcal{S}_{n}\) be a permutation. Then an inversion pair \((i, j)\) of \(\pi\) is a pair of positive integers \(i, j \in \{1, \ldots, n\}\) for which \(i < j\) but \(\pi(i) > \pi(j)\). Note, in particular, that the components of an inversion pair are the positions where the two ``out of order'' elements occur.

Example 8.1.9. We classify all inversion pairs for elements in \(\mathcal{S}_{3}\):

In other words, \(t_{i j}\) is the permutation that interchanges \(i\) and \(j\) while leaving all other integers fixed in place. One can check that the number of inversions pairs in \(t_{i j}\) is exactly \(2(j - i) - 1\). Thus, the number of inversions in a transposition is always odd. E.g.,

The LibreTexts libraries are Powered by MindTouch®and are supported by the Department of Education Open Textbook Pilot Project, the UC Davis Office of the Provost, the UC Davis Library, the California State University Affordable Learning Solutions Program, and Merlot. We also acknowledge previous National Science Foundation support under grant numbers 1246120, 1525057, and 1413739. Unless otherwise noted, LibreTexts content is licensed by CC BY-NC-SA 3.0. Have questions or comments? For more information contact us at info@libretexts.org or check out our status page at https://status.libretexts.org.