Curious Minds

Clear answers to science and history questions

Permutation in Mathematics: Definition & Examples

· 5 min read · Science

A permutation is an arrangement of a set of items in a specific order. In mathematics, the term refers both to the act of rearranging a collection and to the resulting ordered sequence. For example, the three letters A, B, and C can be arranged as ABC, ACB, BAC, BCA, CAB, and CBA — six distinct permutations. The key point is that order matters: ABC and CBA are different permutations even though they contain the same elements. This distinguishes permutations from combinations, where order is irrelevant. Permutations appear throughout mathematics, from elementary counting problems to abstract algebra, probability, and computer science, and the concept has a precise formal definition that underpins these applications.

Formal Definition and Notation

Formally, a permutation of a set S is a bijection from S to itself — a one-to-one and onto mapping that rearranges the elements. When S is finite with n elements, a permutation can be written in several ways. The two-line notation lists the original elements in one row and their images in the second. For instance, the permutation that sends 1→2, 2→3, 3→1 is written as:

( 1 2 3 )
( 2 3 1 )

Cycle notation is more compact: the same permutation is (1 2 3), meaning 1 goes to 2, 2 goes to 3, and 3 goes back to 1. A cycle of length k is a k-cycle; a 2-cycle is called a transposition. Every permutation can be decomposed into disjoint cycles, and every permutation is a product of transpositions. The set of all permutations of n elements forms a group under composition, called the symmetric group Sn, which has n! elements. This group structure is central to abstract algebra and has applications in Galois theory, representation theory, and combinatorics.

Counting Permutations: The Factorial Formula

The number of permutations of n distinct objects is n! (n factorial), the product of all positive integers up to n. For n = 3, 3! = 6, matching the ABC example. For n = 4, 4! = 24; for n = 5, 5! = 120. The reasoning is straightforward: there are n choices for the first position, n−1 for the second, and so on, giving n × (n−1) × … × 1 = n!.

When only k objects are selected from n distinct objects and order matters, the number of permutations is P(n, k) = n! / (n−k)!. For example, the number of ways to arrange 3 books from a shelf of 5 is 5! / 2! = 60. This formula is often written as nPk or P(n,k). If some objects are identical, the count is reduced: the number of distinct permutations of a multiset with n items where n1 are of one type, n2 of another, etc., is n! / (n1! n2! …). For instance, the letters of "BANANA" (6 letters with 3 A's, 2 N's, 1 B) have 6! / (3! 2! 1!) = 60 distinct permutations.

Permutations vs. Combinations

The distinction between permutations and combinations is fundamental. A permutation counts ordered arrangements; a combination counts unordered selections. For example, choosing 2 fruits from {apple, banana, cherry} yields 3 combinations (apple-banana, apple-cherry, banana-cherry) but 6 permutations (apple-banana, banana-apple, apple-cherry, cherry-apple, banana-cherry, cherry-banana). The formula for combinations is C(n, k) = n! / (k! (n−k)!), which is always smaller than P(n, k) when k > 1. In probability, permutations are used when the order of outcomes matters, such as drawing cards in sequence, while combinations apply when only the set of outcomes matters, such as drawing a hand of cards.

Permutations in Probability and Statistics

Permutations are essential in calculating probabilities involving ordered events. For instance, the probability of drawing the ace, king, and queen of hearts in that exact order from a standard deck is 1 / (52 × 51 × 50) = 1/132,600. If order does not matter, the probability of drawing those three cards in any order is 1 / C(52,3) = 1/22,100. Permutation tests, a class of statistical tests, use random rearrangements of data to assess significance without assuming a specific distribution. These tests are widely used in genomics and ecology, where distributional assumptions are often questionable.

Applications in Computer Science and Everyday Life

Permutations appear in algorithm design (sorting, searching, and generating permutations), cryptography (permutation ciphers and the AES standard's permutation layer), and scheduling. In everyday life, permutations explain why a 4-digit PIN has 10,000 possibilities (104), while a 4-letter password using distinct letters has 26 × 25 × 24 × 23 = 358,800 possibilities. Understanding permutations helps in assessing password strength and in combinatorial puzzles like Sudoku, where each row and column is a permutation of the digits 1–9.

Common Misconceptions and Pitfalls

A frequent error is confusing permutations with combinations, leading to overcounting. Another is forgetting that permutations of a multiset require dividing by factorials of identical items. Students also sometimes assume that n! grows slowly; in fact, 10! = 3,628,800 and 20! is about 2.43 × 1018, which is why brute-force permutation algorithms become impractical for large n. Finally, the term "permutation" is sometimes used loosely in everyday language to mean any rearrangement, but in mathematics it always implies a bijection on a set, preserving the number of elements.

Frequently Asked Questions

What is the difference between a permutation and a combination?

A permutation is an ordered arrangement; a combination is an unordered selection. For example, the permutations of two letters from {A, B, C} are AB, BA, AC, CA, BC, CB (6), while the combinations are AB, AC, BC (3).

How many permutations does a deck of cards have?

A standard 52-card deck has 52! permutations, an enormous number with 68 digits. This is why shuffling thoroughly produces a virtually unique order each time.

Can a permutation have repeated elements?

Strictly, a permutation of a set has distinct elements. For multisets with repeated items, the number of distinct arrangements is given by the multinomial formula n! / (n1! n2! …).

What is an even and odd permutation?

A permutation is even if it can be expressed as an even number of transpositions, and odd otherwise. The sign of a permutation (+1 for even, −1 for odd) is important in determinant theory and group theory.

Are permutations used in real life?

Yes — in password security, card shuffling, scheduling, cryptography, and statistical testing, among many other areas.

In this article
  1. Formal Definition and Notation
  2. Counting Permutations: The Factorial Formula
  3. Permutations vs. Combinations
  4. Permutations in Probability and Statistics
  5. Applications in Computer Science and Everyday Life
  6. Common Misconceptions and Pitfalls
  7. Frequently Asked Questions