Idempotence
control panel.[src] Pressing the On button (green) is an idempotent operation, since it has the same effect whether done once or multiple times.[src] Likewise, pressing Off is idempotent.[src] Idempotence ( , ) is the property of certain operations in mathematics and computer science whereby they can be applied multiple times without changing the result beyond the initial application.[src] 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).[src] The term was introduced by American mathematician Benjamin Peirce in 1870 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 + potence (same + power).[src]
control panel.[src] Pressing the On button (green) is an idempotent operation, since it has the same effect whether done once or multiple times.[src] Likewise, pressing Off is idempotent.[src] Idempotence ( , ) is the property of certain operations in mathematics and computer science whereby they can be applied multiple times without changing the result beyond the initial application.[src] 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).[src] The term was introduced by American mathematician Benjamin Peirce in 1870 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 + potence (same + power).[src] x\cdot x=x The binary operation \cdot is said to be idempotent if x\cdot x=x \text{ for all } x\in S In a group (G, \cdot) , the identity element e is the only idempotent element.[src] Indeed, if x is an element of G such that , then and finally x=e by multiplying on the left by the inverse element of x .[src] In the monoids (\mathcal{P}(E), \cup) and (\mathcal{P}(E), \cap) of the power set \mathcal{P}(E) of the set E with set union \cup and set intersection \cap respectively, \cup and \cap are idempotent.[src] Indeed, , and .[src] In the monoids (\{0, 1\}, \vee) and (\{0, 1\}, \wedge) of the Boolean domain with logical disjunction \vee and logical conjunction \wedge respectively, \vee and \wedge are idempotent.[src] Indeed, , and .[src] In a GCD domain (for instance in \mathbb{Z} ), the operations of GCD and LCM are idempotent.[src] In a Boolean ring, multiplication is idempotent.[src] In a tropical semiring, addition is idempotent.[src] In a ring of quadratic matrices, the determinant of an idempotent matrix is either 0 or 1.[src] If the determinant is 1, the matrix necessarily is the identity matrix.[src] ===Idempotent functions=== In the monoid (E^E, \circ) of the functions from a set E to itself (see set exponentiation) with function composition \circ , idempotent elements are the functions such that , that is such that (in other words, the image f(x) of each element x\in E is a fixed point of f ).[src] For example: the absolute value is idempotent.[src] Indeed, , that is ; constant functions are idempotent; the identity function is idempotent; the floor, ceiling and fractional part functions are idempotent; the real part function \mathrm{Re}(z) of a complex number, is idempotent.[src] for most kinds of average, taking the average of a set and putting it in a singleton set is idempotent: \{\operatorname{avg}\{\operatorname{avg}\{x_1,\dots,x_n\}\}\} = \{\operatorname{avg}\{x_1,\dots,x_n\}\} the subgroup generated function from the power set of a group to itself is idempotent; the convex hull function from the power set of an affine space over the reals to itself is idempotent; the closure and interior functions of the power set of a topological space to itself are idempotent; the Kleene star and Kleene plus functions of the power set of a monoid to itself are idempotent; the idempotent endomorphisms of a vector space are its projections.[src] If the set E has n elements, we can partition it into k chosen fixed points and non-fixed points under f , and then k^{n-k} is the number of different idempotent functions.[src] Hence, taking into account all possible partitions, \sum_{k=0}^n {n \choose k} k^{n-k} is the total number of possible idempotent functions on the set.[src] The integer sequence of the number of idempotent functions as given by the sum above for n = 0, 1, 2, 3, 4, 5, 6, 7, 8, ...[src] starts with 1, 1, 3, 10, 41, 196, 1057, 6322, 41393, ...[src] .[src] Neither idempotence nor non-idempotence is preserved under function composition.[src] As an example for the former, mod 3 and g(x)=\max(x, 5) are both idempotent, but is not, although happens to be.[src] As an example for the latter, the negation function \neg on the Boolean domain is not idempotent, but is.[src] Similarly, unary negation of real numbers is not idempotent, but is.[src] In both cases, the composition is simply the identity function, which is idempotent.[src] ===Idempotent morphisms=== A morphism f : x \to x in a category is called idempotent if f \circ f = f .[src] An idempotent is said to split if it can be written as f = h \circ g for some g : x \to y, \, h : y \to x with g \circ h = \operatorname{id} .[src] A category is said to be idempotent complete if every idempotent splits.[src] For example, \mathsf{Set} is idempotent complete.[src] int x = 3; void inspect() { printf("%d\n", x); } void change() { x = 5; } void sequence() { inspect(); change(); inspect(); } int main() { sequence(); // prints "3\n5\n" sequence(); // prints "5\n5\n" return 0; } In the Hypertext Transfer Protocol (HTTP), idempotence and safety are the major attributes that separate HTTP methods.[src] Of the major HTTP methods, GET, PUT, and DELETE should be implemented in an idempotent manner according to the standard, but POST doesn't need to be.[src] GET retrieves the state of a resource; PUT updates the state of a resource; and DELETE deletes a resource.[src] As in the example above, reading data usually has no side effects, so it is idempotent (in fact nullipotent).[src] Updating and deleting a given data are each usually idempotent as long as the request uniquely identifies the resource and only that resource again in the future.[src] PUT and DELETE with unique identifiers reduce to the simple case of assignment to a variable of either a value or the null-value, respectively, and are idempotent for the same reason; the end result is always the same as the result of the initial execution, even if the response differs.[src] Violation of the unique identification requirement in storage or deletion typically causes violation of idempotence.[src] For example, storing or deleting a given set of content without specifying a unique identifier: POST requests, which do not need to be idempotent, often do not contain unique identifiers, so the creation of the identifier is delegated to the receiving system which then creates a corresponding new record.[src] Similarly, PUT and DELETE requests with nonspecific criteria may result in different outcomes depending on the state of the system – for example, a request to delete the most recent record.[src] In each case, subsequent executions will further modify the state of the system, so they are not idempotent.[src] In event stream processing, idempotence refers to the ability of a system to produce the same outcome, even if the same file, event or message is received more than once.[src] In a load–store architecture, instructions that might possibly cause a page fault are idempotent.[src] So if a page fault occurs, the operating system can load the page from disk and then simply re-execute the faulted instruction.[src] In a processor where such instructions are not idempotent, dealing with page faults is much more complex.[src] When reformatting output, pretty-printing is expected to be idempotent.[src] In other words, if the output is already "pretty", there should be nothing to do for the pretty-printer.[src] In service-oriented architecture (SOA), a multiple-step orchestration process composed entirely of idempotent steps can be replayed without side-effects if any part of that process fails.[src] Many operations that are idempotent often have ways to "resume" a process if it is interrupted ways that finish much faster than starting all over from the beginning.[src] For example, resuming a file transfer, synchronizing files, creating a software build, installing an application and all of its dependencies with a package manager, etc.[src] ==External links== "idempotent" at the Free On-line Dictionary of Computing[src]
61 sentences · 61 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Idempotence." encyclopegia.org, 2026, https://encyclopegia.org/wiki/idempotence. Accessed 03 December 2026.
Chicago
"Idempotence." encyclopegia.org. Accessed December 3, 2026. https://encyclopegia.org/wiki/idempotence.
APA
encyclopegia.org. (2026). Idempotence. Retrieved December 3, 2026, from https://encyclopegia.org/wiki/idempotence
Accessed December 3, 2026 · CC BY-SA 4.0 · citation page · JSON