---
tag: 0TH61JR04G
kind: definition
name: Derangement
msc: [05A05]
defines: 0XHWTD3MPV
uses: [0BQMWCNS8S]
sources:
  - url: https://en.wikipedia.org/wiki/Derangement
    locator: lead section
---

## Definition

Let $X$ be a set.
A derangement of $X$ is a [[permutation|0BQMWCNS8S]] $\sigma$ of $X$ such that $\sigma(x) \neq x$ for all $x \in X$.
In other words, it is a permutation with no fixed point.

## Remarks

The derangements of $\{1, 2, 3\}$ are $231$ and $312$ in one-line notation.
The [[number of derangements|03WY4HHMT1]] of an $n$-element set is written $D_n$ or $!n$.

## Explanations

### L1 human

A derangement is a shuffle in which nothing stays in its place.
Suppose that $n$ people leave their hats, and each person later takes a hat at random. A derangement is an outcome in which nobody gets their own hat.
