In mathematics, an (anti-)involution, or an involutory function, is a function f that is its own inverse,
for all x in the domain of f.
Any involution is a bijection.
The identity map is a trivial example of an involution. Common examples in mathematics of nontrivial involutions include multiplication by −1 in arithmetic, the taking of reciprocals, complementation in set theory and complex conjugation. Other examples include circle inversion, rotation by a half-turn, and reciprocal ciphers such as the ROT13 transformation and the Beaufort polyalphabetic cipher.
The number of involutions, including the identity involution, on a set with n = 0, 1, 2, ... elements is given by a recurrence relation found by Heinrich August Rothe in 1800:
The first few terms of this sequence are 1, 1, 2, 4, 10, 26, 76, 232 (sequence in the OEIS); these numbers are called the telephone numbers, and they also count the number of Young tableaux with a given number of cells. The composition g ∘ f of two involutions f and g is an involution if and only if they commute: g ∘ f = f ∘ g.