identity (universal algebra)
An identity is a law that holds no matter what you plug in. ‘x + y = y + x’ is not a question to solve for special values; it is a promise about every pair of elements at once. Universal algebra takes these always-true equations as the basic currency, because a remarkable amount of algebra — commutativity, associativity, distributivity, idempotence — is captured by nothing more than such universally quantified equalities.
Formally, given a signature Σ, an identity is a pair of Σ-terms, written s ≈ t (or s = t), understood as the universally quantified sentence ‘for all variables, s = t’. An algebra A satisfies the identity, written A ⊨ s ≈ t, if every assignment of carrier elements to the variables makes the two terms evaluate to the same element. Note both sides are built only from operation symbols and variables; no quantifiers, no relations, no negation appear inside an identity.
This narrow form is precisely what gives equational logic its power. Birkhoff's completeness theorem says the identities derivable from a set E by reflexivity, symmetry, transitivity, substitution and replacement are exactly those true in every model of E — a clean, complete proof calculus. The flip side is expressive weakness: ‘x ≠ y’ or ‘x has an inverse’ are not identities, and many natural conditions (being a field, being cancellative) cannot be written equationally.
The associative law x·(y·z) ≈ (x·y)·z is an identity; the cancellation law (x·z = y·z implies x = y) is not, since it contains an implication.
Only quantifier-free equations between terms count as identities.