In mathematics, an idempotent element is an element which, intuitively, leaves something unchanged. There are two main definitions.
- Given a binary operation, an idempotent element (or simply an idempotent) is something that when multiplied by (for a function, composed with) itself, gives itself as a result. For example, the only two real numbers which are idempotent under multiplication are 0 and 1.
- A unary operation (i.e., a function), is idempotent if, whenever it is applied twice to any element, it gives the same result as if it were applied once. For example, the greatest integer function is idempotent as a function from the set of real numbers to the set of integers.
Formally, if S is a set with a binary operation * on it, then an element s of S is said to be idempotent (with respect to *) if
- s * s = s.
In particular, any identity element is idempotent. If every element of S is idempotent, then the binary operation * is said to be idempotent. For example, the operations of set union and set intersection are both idempotent.
Formally, if f is a unary operation, say f maps X into Y, and if Y is a subset of X, then * is idempotent if, for all x in X,
- f(f(x)) = f(x).
In particular, the identity function is idempotent, and any constant function is idempotent as well.
Note that if X = Y, then we may consider S, the set of all functions from X to itself. In this case, the composition of functions (denoted "o") is a binary operation on X, and a function f : X → X is idempotent as a unary operator if and only if f o f = f, that is, if and only if f is an idempotent element of this binary operation. We say that f is idempotent on X.
As mentioned above, the identity map and the constant maps are always idempotent maps. Less trivial examples are the absolute value function of a real or complex argument, and the greatest integer function of a real argument.
The function which assigns to every subset U of some topological space X the closure of U is idempotent on the power set of X. It is an example of a closure operator; all closure operators are idempotent functions.
Idempotent ring elements
An idempotent element of a ring is by definition an element that's idempotent with respect to the ring's multiplication. One may define a partial order on the idempotents of a ring as follows: if e and f are idempotents, we write e ≤ f iff ef = fe = e. With respect to this order, 0 is the smallest and 1 the largest idempotent.
If e is idempotent in the ring R, then eRe is again a ring, with multiplicative identity e.
Two idempotents e and f are called orthogonal if ef = fe = 0. In this case, e + f is also idempotent, and we have e ≤ e + f and f ≤ e + f.
If e is idempotent in the ring R, then so is f = 1 − e; e and f are orthogonal.
An idempotent e in R is called central if ex = xe for all x in R. In this case, Re is a ring with multiplicative identity e. The central idempotents of R are closely related to the decompositions of R as a direct sum of rings. If R is the direct sum of the rings R1,...,Rn, then the identity elements of the rings Ri are central idempotents in R, pairwise orthogonal, and their sum is 1. Conversely, given central idempotents e1,...,en in R which are pairwise orthogonal and have sum 1, then R is the direct sum of the rings Re1,...,Ren. So in particular, every central idempotent e in R gives rise to a decomposition of R as a direct sum of Re and R(1 − e).
Any idempotent e which is different from 0 and 1 is a zero divisor (because e(1 − e) = 0). This shows that integral domains and division rings don't have such idempotents. Local rings also don't have such idempotents, but for a different reason. The only idempotent that's contained in the Jacobson radical of a ring is 0. There is a catenoid of idempotents in the coquaternion ring.
A ring in which all elements are idempotent is called a boolean ring. It can be shown that in every such ring, multiplication is commutative, and every element is its own additive inverse.
Idempotent operations can be found in Boolean algebra as well. Logical and and logical or are both idempotent operations over the elements of the Boolean algebra.
In linear algebra, projections are idempotent. That is, any linear transformation that projects all vectors onto a subspace V (not necessarily orthogonally) is idempotent, if V itself is pointwise fixed.
An idempotent semiring is a semiring whose addition (not multiplication) is idempotent.
In computing, idempotence is the quality of something that has the same effect if used multiple times as it does if used only once. This is the unary operation definition given above. In particular, C header files are often designed to be idempotent, that is, if the header file is included more than once (as can easily happen with nested #includes), then nothing untoward happens - the effect is the same as if it had been included only once.
Idempotent behaviour is the basis for the caching ability of the web; if the same request delivers the same response one can also work with a copy instead of requiring the original page.
In user interface design, a button can be called "idempotent" if pressing it more than once will have the same effect as pressing it once. For example, a "Pause" button is not idempotent if it toggles the paused state. On the other hand, if pressing it multiple times keeps the system paused and pressing "Play" resumes, then "Pause" is idempotent. This is useful in interfaces such as infrared remote controls and touch screens where the user may not be sure of having pressed the button successfully and may press it again. Elevator call buttons are also idempotent, though many people think they are not.