Idempotent Law

Idempotence is the property of certain operations in mathematics and computer science that they can be applied multiple times without changing the result beyond the initial application. The concept of idempotence arises in a number of places in abstract algebra (in particular, in the theory of projectors and closure operators) and functional programming (in which it is connected to the property of referential transparency).

This can be illustrated by some examples:

  • 0 is idempotent under addition, because 0 + 0 = 0
  • Both 0 and 1 are idempotent under multiplication, because 0 x 0 = 0 and 1 x 1 = 1

These are exceptional cases, because other ordinary arithmetic operations do not yield idempotent results.

Boolean logic has idempotence within both AND and OR gates. A logical AND gate with two inputs A will also have an output of A. (1 AND 1 = 1, 0 AND 0 = 0). An OR gate has idempotence because 0 OR 0 = 0, and 1 OR 1 = 1.

The term was introduced by Benjamin Peirce in the context of elements of algebras that remain invariant when raised to a positive integer power, and literally means "(the quality of having) the same power", from idem + potence (same + power).