In mathematics, a **closure operator** on a set *S* is a function from the power set of *S* to itself that satisfies the following conditions for all sets

(cl is *extensive*),(cl is *increasing*),(cl is *idempotent*).

Closure operators are determined by their **closed sets**, i.e., by the sets of the form cl(*X*), since the **closure** cl(*X*) of a set *X* is the smallest closed set containing *X*. Such families of "closed sets" are sometimes called **closure systems** or "**Moore families**".^{[1]} A set together with a closure operator on it is sometimes called a **closure space**. Closure operators are also called "**hull operators**", which prevents confusion with the "closure operators" studied in topology.

E. H. Moore studied closure operators in his 1910 *Introduction to a form of general analysis*, whereas the concept of the closure of a subset originated in the work of Frigyes Riesz in connection with topological spaces.^{[2]} Though not formalized at the time, the idea of closure originated in the late 19th century with notable contributions by Ernst Schröder, Richard Dedekind and Georg Cantor.^{[3]}

The usual set closure from topology is a closure operator. Other examples include the linear span of a subset of a vector space, the convex hull or affine hull of a subset of a vector space or the lower semicontinuous hull of a function , where is e.g. a normed space, defined implicitly , where is the epigraph of a function .

The relative interior is not a closure operator: although it is idempotent, it is not increasing and if is a cube in and is one of its faces, then , but and , so it is not increasing.^{[4]}

In topology, the closure operators are *topological* closure operators, which must satisfy

for all (Note that for this gives ).

In algebra and logic, many closure operators are **finitary closure operators**, i.e. they satisfy

In the theory of partially ordered sets, which are important in theoretical computer science, closure operators have a more general definition that replaces with . (See § Closure operators on partially ordered sets.)

Main article: Kuratowski closure axioms |

The topological closure of a subset *X* of a topological space consists of all points *y* of the space, such that every neighbourhood of *y* contains a point of *X*. The function that associates to every subset *X* its closure is a topological closure operator. Conversely, every topological closure operator on a set gives rise to a topological space whose closed sets are exactly the closed sets with respect to the closure operator.

Finitary closure operators play a relatively prominent role in universal algebra, and in this context they are traditionally called *algebraic closure operators*. Every subset of an algebra *generates* a subalgebra: the smallest subalgebra containing the set. This gives rise to a finitary closure operator.

Perhaps the best known example for this is the function that associates to every subset of a given vector space its linear span. Similarly, the function that associates to every subset of a given group the subgroup generated by it, and similarly for fields and all other types of algebraic structures.

The linear span in a vector space and the similar algebraic closure in a field both satisfy the *exchange property:* If *x* is in the closure of the union of *A* and {*y*} but not in the closure of *A*, then *y* is in the closure of the union of *A* and {*x*}. A finitary closure operator with this property is called a matroid. The dimension of a vector space, or the transcendence degree of a field (over its prime field) is exactly the rank of the corresponding matroid.

The function that maps every subset of a given field to its algebraic closure is also a finitary closure operator, and in general it is different from the operator mentioned before. Finitary closure operators that generalize these two operators are studied in model theory as dcl (for *definable closure*) and acl (for *algebraic closure*).

The convex hull in *n*-dimensional Euclidean space is another example of a finitary closure operator. It satisfies the *anti-exchange property:* If *x* is in the closure of the union of {*y*} and *A*, but not in the union of {*y*} and closure of *A*, then *y* is not in the closure of the union of {*x*} and *A*. Finitary closure operators with this property give rise to antimatroids.

As another example of a closure operator used in algebra, if some algebra has universe *A* and *X* is a set of pairs of *A*, then the operator assigning to *X* the smallest congruence containing *X* is a finitary closure operator on *A x A*.^{[5]}

Suppose you have some logical formalism that contains certain rules allowing you to derive new formulas from given ones. Consider the set *F* of all possible formulas, and let *P* be the power set of *F*, ordered by ⊆. For a set *X* of formulas, let cl(*X*) be the set of all formulas that can be derived from *X*. Then cl is a closure operator on *P*. More precisely, we can obtain cl as follows. Call "continuous" an operator *J* such that, for every directed class *T*,

*J*(lim*T*)= lim*J*(*T*).

This continuity condition is on the basis of a fixed point theorem for *J*. Consider the one-step operator *J* of a monotone logic. This is the operator associating any set *X* of formulas with the set *J*(*X*) of formulas that are either logical axioms or are obtained by an inference rule from formulas in *X* or are in *X*. Then such an operator is continuous and we can define cl(*X*) as the least fixed point for *J* greater or equal to *X*. In accordance with such a point of view, Tarski, Brown, Suszko and other authors proposed a general approach to logic based on closure operator theory. Also, such an idea is proposed in programming logic (see Lloyd 1987) and in fuzzy logic (see Gerla 2000).

Around 1930, Alfred Tarski developed an abstract theory of logical deductions that models some properties of logical calculi. Mathematically, what he described is just a finitary closure operator on a set (the set of *sentences*). In abstract algebraic logic, finitary closure operators are still studied under the name *consequence operator*, which was coined by Tarski. The set *S* represents a set of sentences, a subset *T* of *S* a theory, and cl(*T*) is the set of all sentences that follow from the theory. Nowadays the term can refer to closure operators that need not be finitary; finitary closure operators are then sometimes called **finite consequence operators**.

The closed sets with respect to a closure operator on *S* form a subset *C* of the power set * P*(

There is a simple and fast algorithm for generating all closed sets of a given closure operator.^{[6]}

A closure operator on a set is topological if and only if the set of closed sets is closed under finite unions, i.e., *C* is a meet-complete sublattice of * P*(

Given a finitary closure operator on a set, the closures of finite sets are exactly the compact elements of the set *C* of closed sets. It follows that *C* is an algebraic poset.
Since *C* is also a lattice, it is often referred to as an algebraic lattice in this context. Conversely, if *C* is an algebraic poset, then the closure operator is finitary.

Each closure operator on a finite set *S* is uniquely determined by its images of its *pseudo-closed* sets.^{[7]}
These are recursively defined: A set is **pseudo-closed** if it is not closed and contains the closure of each of its pseudo-closed proper subsets. Formally: *P* ⊆ *S* is pseudo-closed if and only if

*P*≠ cl(*P*) and- if
*Q*⊂*P*is pseudo-closed, then cl(*Q*) ⊆*P*.

A partially ordered set (poset) is a set together with a *partial order* ≤, i.e. a binary relation that is reflexive (*a* ≤ *a*), transitive (*a* ≤ *b* ≤ *c* implies *a* ≤ *c*) and antisymmetric (*a* ≤ *b* ≤ *a* implies *a* = *b*). Every power set **P**(*S*) together with inclusion ⊆ is a partially ordered set.

A function cl: *P* → *P* from a partial order *P* to itself is called a closure operator if it satisfies the following axioms for all elements *x*, *y* in *P*.

*x*≤ cl(*x*)(cl is *extensive*)*x*≤*y*implies cl(*x*) ≤ cl(*y*)(cl is increasing) cl(cl( *x*)) = cl(*x*)(cl is idempotent)

More succinct alternatives are available: the definition above is equivalent to the single axiom

*x*≤ cl(*y*) if and only if cl(*x*) ≤ cl(*y*)

for all *x*, *y* in *P*.

Using the pointwise order on functions between posets, one may alternatively write the extensiveness property as id_{P} ≤ cl, where id is the identity function. A self-map *k* that is increasing and idempotent, but satisfies the dual of the extensiveness property, i.e. *k* ≤ id_{P} is called a **kernel operator**,^{[8]} **interior operator**,^{[9]} or **dual closure**.^{[10]} As examples, if *A* is a subset of a set *B*, then the self-map on the powerset of *B* given by *μ _{A}*(

A fixpoint of the function cl, i.e. an element *c* of *P* that satisfies cl(*c*) = *c*, is called a **closed element**. A closure operator on a partially ordered set is determined by its closed elements. If *c* is a closed element, then *x* ≤ *c* and cl(*x*) ≤ *c* are equivalent conditions.

Every Galois connection (or residuated mapping) gives rise to a closure operator (as is explained in that article). In fact, *every* closure operator arises in this way from a suitable Galois connection.^{[11]} The Galois connection is not uniquely determined by the closure operator. One Galois connection that gives rise to the closure operator cl can be described as follows: if *A* is the set of closed elements with respect to cl, then cl: *P* → *A* is the lower adjoint of a Galois connection between *P* and *A*, with the upper adjoint being the embedding of *A* into *P*. Furthermore, every lower adjoint of an embedding of some subset into *P* is a closure operator. "Closure operators are lower adjoints of embeddings." Note however that not every embedding has a lower adjoint.

Any partially ordered set *P* can be viewed as a category, with a single morphism from *x* to *y* if and only if *x* ≤ *y*. The closure operators on the partially ordered set *P* are then nothing but the monads on the category *P*. Equivalently, a closure operator can be viewed as an endofunctor on the category of partially ordered sets that has the additional *idempotent* and *extensive* properties.

If *P* is a complete lattice, then a subset *A* of *P* is the set of closed elements for some closure operator on *P* if and only if *A* is a **Moore family** on *P*, i.e. the largest element of *P* is in *A*, and the infimum (meet) of any non-empty subset of *A* is again in *A*. Any such set *A* is itself a complete lattice with the order inherited from *P* (but the supremum (join) operation might differ from that of *P*). When *P* is the powerset Boolean algebra of a set *X*, then a Moore family on *P* is called a **closure system** on *X*.

The closure operators on *P* form themselves a complete lattice; the order on closure operators is defined by cl_{1} ≤ cl_{2} iff cl_{1}(*x*) ≤ cl_{2}(*x*) for all *x* in *P*.