Infographic illustrating idempotence with mathematical and computer science examples showing that repeating an operation produces the same result as applying it once.
Figure: Visual explanation of idempotence in mathematics and computer science.

Idempotence is the property of an operation whereby applying it multiple times produces the same result as applying it once. Formally, an operation f is idempotent if:

f(f(x)) = f(x)

This concept appears throughout mathematics, logic, computer science, and distributed systems. In mathematics, idempotent functions, operators, and algebraic elements remain unchanged after repeated application. In computing, idempotence is a critical design principle for APIs, databases, configuration management, and fault-tolerant systems because it allows the same request or action to be safely retried without producing unintended side effects.

Common examples include removing duplicate values from a collection, setting a configuration value to a specific state, or issuing an HTTP PUT request that repeatedly stores the same resource representation. Once the desired state has been achieved, repeating the operation does not alter the outcome.

The term was introduced by American mathematician Benjamin Peirce in 1870 and derives from the Latin idem ("the same") and potentia ("power"), literally meaning "the same power."

See also: Related concept on Wolfram