Idempotence is a property that an operation in mathematics or computer science may have. It roughly means that the operation can be carried out again and again without changing the result.

The word idempotence was made by Benjamin Pierce because he saw the concept when studying algebra.

The meaning is different if we are talking about different kinds of operations. It can also be used to describe elements than an operation can take:

  • For a unary operation (or function), that we label f, we say that f is idempotent if for any x in the domain of f it is true that: f(f(x)) = f(x). For example, the absolute value: abs(abs(x)) = abs(x).

We say that an element c in the domain of f is an idempotent element if f(f(c)) = f(c). This means that f is idempotent if every element of its domain is an idempotent element.

  • For a binary operation, that we label *, we say that * is idempotent if for any x which the binary operation can take the following is true: x * x = x.

We say that an element c which * can take is an idempotent element for * if c * c = c. For example, the number 1 is an idempotent element for multiplication because 1 times 1 is 1.