All notes
Concepts

# Idempotence

It is the property of certain operations in mathematics and computer science, that can be applied multiple times without changing the result beyond the initial application.

It is from idem + potence (same + power).

There are several meanings of idempotence, depending on what the concept is applied to:

• A unary operation (or function) is idempotent if, whenever it is applied twice to any value, it gives the same result as if it were applied once; i.e., ƒ(ƒ(x)) ≡ ƒ(x). For example, the absolute value function, where abs(abs(x)) ≡ abs(x).
• Given a binary operation, an idempotent element (or simply an "idempotent") for the operation is a value for which the operation, when given that value for both of its operands, gives that value as the result. For example, the number 1 is an idempotent of multiplication: 1 × 1 = 1.
• A binary operation is called idempotent if all elements are idempotent elements with respect to the operation. In other words, whenever it is applied to two equal values, it gives that value as the result. For example, the function giving the maximum value of two equal values is idempotent: max (x, x) ≡ x.