# Maximal and minimal elements

In mathematics, especially in order theory, a maximal element of a subset $S$ of some preordered set is an element of $S$ that is not smaller than any other element in $S$. A minimal element of a subset $S$ of some preordered set is defined dually as an element of $S$ that is not greater than any other element in $S$.
The notions of maximal and minimal elements are weaker than those of greatest element and least element which are also known, respectively, as maximum and minimum. The maximum of a subset $S$ of a preordered set is an element of $S$ which is greater than or equal to any other element of $S,$ and the minimum of $S$ is again defined dually. In the particular case of a partially ordered set, while there can be at most one maximum and at most one minimum there may be multiple maximal or minimal elements. Specializing further to totally ordered sets, the notions of maximal element and maximum coincide, and the notions of minimal element and minimum coincide.
As an example, in the collection $S:=\left\{\{d,o\},\{d,o,g\},\{g,o,a,d\},\{o,a,f\}\right\}$ ordered by containment, the element {d, o} is minimal as it contains no sets in the collection, the element {g, o, a, d} is maximal as there are no sets in the collection which contain it, the element {d, o, g} is neither, and the element {o, a, f} is both minimal and maximal. By contrast, neither a maximum nor a minimum exists for $S.$
Zorn's lemma states that every partially ordered set for which every totally ordered subset has an upper bound contains at least one maximal element. This lemma is equivalent to the well-ordering theorem and the axiom of choice and implies major results in other mathematical areas like the Hahn–Banach theorem, the Kirszbraun theorem, Tychonoff's theorem, the existence of a Hamel basis for every vector space, and the existence of an algebraic closure for every field.

## Definition

Let $(P,\leq )$ be a preordered set and let $S\subseteq P.$ A maximal element of $S$ with respect to $\,\leq \,$ is an element $m\in S$ such that
    if $s\in S$ satisfies $m\leq s,$ then necessarily $s\leq m.$
Similarly, a minimal element of $S$ with respect to $\,\leq \,$ is an element $m\in S$ such that
    if $s\in S$ satisfies $s\leq m,$ then necessarily $m\leq s.$
Equivalently, $m\in S$ is a minimal element of $S$ with respect to $\,\leq \,$ if and only if $m$ is a maximal element of $S$ with respect to $\,\geq ,\,$ where by definition, $q\geq p$ if and only if $p\leq q$ (for all $p,q\in P$).
If the subset $S$ is not specified then it should be assumed that $S:=P.$ Explicitly, a maximal element (respectively, minimal element) of $(P,\leq )$ is a maximal (resp. minimal) element of $S:=P$ with respect to $\,\leq .$
If the preordered set $(P,\leq )$ also happens to be a partially ordered set (or more generally, if the restriction $(S,\leq )$ is a partially ordered set) then $m\in S$ is a maximal element of $S$ if and only if $S$ contains no element strictly greater than $m;$ explicitly, this means that there does not exist any element $s\in S$ such that $m\leq s$ and $m\neq s.$ The characterization for minimal elements is obtained by using $\,\geq \,$ in place of $\,\leq .$

## Existence and uniqueness

Maximal elements need not exist.
* Example 1: Let $S=[1,\infty )\subseteq \mathbb {R}$ where $\mathbb {R}$ denotes the real numbers. For all $m\in S,$ $s=m+1\in S$ but $m<s$ (that is, $m\leq s$ but not $m=s$).
* Example 2: Let $S=\{s\in \mathbb {Q} ~:~1\leq s^{2}\leq 2\},$ where $\mathbb {Q}$ denotes the rational numbers and where ${\sqrt {2}}$ is irrational.
In general $\,\leq \,$ is only a partial order on $S.$ If $m$ is a maximal element and $s\in S,$ then it remains possible that neither $s\leq m$ nor $m\leq s.$ This leaves open the possibility that there exist more than one maximal elements.
* Example 3: In the fence $a_{1}<b_{1}>a_{2}<b_{2}>a_{3}<b_{3}>\ldots ,$ all the $a_{i}$ are minimal and all $b_{i}$ are maximal, as shown in the image.
* Example 4: Let A be a set with at least two elements and let $S=\{\{a\}~:~a\in A\}$ be the subset of the power set $\wp (A)$ consisting of singleton subsets, partially ordered by $\,\subseteq .$ This is the discrete poset where no two elements are comparable and thus every element $\{a\}\in S$ is maximal (and minimal); moreover, for any distinct $a,b\in A,$ neither $\{a\}\subseteq \{b\}$ nor $\{b\}\subseteq \{a\}.$

## Greatest and least elements

For a partially ordered set $(P,\leq ),$ the irreflexive kernel of $\,\leq \,$ is denoted as $\,<\,$ and is defined by $x<y$ if $x\leq y$ and $x\neq y.$ For arbitrary members $x,y\in P,$ exactly one of the following cases applies:
* $x<y$;
* $x=y$;
* $y<x$;
* $x$ and $y$ are incomparable.
Given a subset $S\subseteq P$ and some $x\in S,$
* if case 1 never applies for any $y\in S,$ then $x$ is a maximal element of $S,$ as defined above;
* if case 1 and 4 never applies for any $y\in S,$ then $x$ is called a greatest element of $S.$
Thus the definition of a greatest element is stronger than that of a maximal element.
Equivalently, a greatest element of a subset $S$ can be defined as an element of $S$ that is greater than every other element of $S.$ A subset may have at most one greatest element.
The greatest element of $S,$ if it exists, is also a maximal element of $S,$ and the only one. By contraposition, if $S$ has several maximal elements, it cannot have a greatest element; see example 3. If $P$ satisfies the ascending chain condition, a subset $S$ of $P$ has a greatest element if, and only if, it has one maximal element.
When the restriction of $\,\leq \,$ to $S$ is a total order ($S=\{1,2,4\}$ in the topmost picture is an example), then the notions of maximal element and greatest element coincide. This is not a necessary condition: whenever $S$ has a greatest element, the notions coincide, too, as stated above. If the notions of maximal element and greatest element coincide on every two-element subset $S$ of $P.$ then $\,\leq \,$ is a total order on $P.$
Dual to greatest is the notion of least element that relates to minimal in the same way as greatest to maximal.

## Directed sets

In a totally ordered set, the terms maximal element and greatest element coincide, which is why both terms are used interchangeably in fields like analysis where only total orders are considered. This observation applies not only to totally ordered subsets of any partially ordered set, but also to their order theoretic generalization via directed sets. In a directed set, every pair of elements (particularly pairs of incomparable elements) has a common upper bound within the set. If a directed set has a maximal element, it is also its greatest element, and hence its only maximal element. For a directed set without maximal or greatest elements, see examples 1 and 2 above.
Similar conclusions are true for minimal elements.
Further introductory information is found in the article on order theory.

## Properties

* Each finite nonempty subset $S$ has both maximal and minimal elements. An infinite subset need not have any of them, for example, the integers $\mathbb {Z}$ with the usual order.
* The set of maximal elements of a subset $S$ is always an antichain, that is, no two different maximal elements of $S$ are comparable. The same applies to minimal elements.

## Examples

* In Pareto efficiency, a Pareto optimum is a maximal element with respect to the partial order of Pareto improvement, and the set of maximal elements is called the Pareto frontier.
* In decision theory, an admissible decision rule is a maximal element with respect to the partial order of dominating decision rule.
* In modern portfolio theory, the set of maximal elements with respect to the product order on risk and return is called the efficient frontier.
* In set theory, a set is finite if and only if every non-empty family of subsets has a minimal element when ordered by the inclusion relation.
* In abstract algebra, the concept of a maximal common divisor is needed to generalize greatest common divisors to number systems in which the common divisors of a set of elements may have more than one maximal element.
* In computational geometry, the maxima of a point set are maximal with respect to the partial order of coordinatewise domination.

### Consumer theory

In economics, one may relax the axiom of antisymmetry, using preorders (generally total preorders) instead of partial orders; the notion analogous to maximal element is very similar, but different terminology is used, as detailed below.
In consumer theory the consumption space is some set $X$, usually the positive orthant of some vector space so that each $x\in X$ represents a quantity of consumption specified for each existing commodity in the economy. Preferences of a consumer are usually represented by a total preorder $\preceq$ so that $x,y\in X$ and $x\preceq y$ reads: $x$ is at most as preferred as $y$. When $x\preceq y$ and $y\preceq x$ it is interpreted that the consumer is indifferent between $x$ and $y$ but is no reason to conclude that $x=y.$ preference relations are never assumed to be antisymmetric. In this context, for any $B\subseteq X,$ an element $x\in B$ is said to be a maximal element if $y\in B$ implies $y\preceq x$ where it is interpreted as a consumption bundle that is not dominated by any other bundle in the sense that $x\prec y,$ that is $x\preceq y$ and not $y\preceq x.$
It should be remarked that the formal definition looks very much like that of a greatest element for an ordered set. However, when $\preceq$ is only a preorder, an element $x$ with the property above behaves very much like a maximal element in an ordering. For instance, a maximal element $x\in B$ is not unique for $y\preceq x$ does not preclude the possibility that $x\preceq y$ (while $y\preceq x$ and $x\preceq y$ do not imply $x=y$ but simply indifference $x\sim y$). The notion of greatest element for a preference preorder would be that of most preferred choice. That is, some $x\in B$ with $y\in B$ implies $y\prec x.$
An obvious application is to the definition of demand correspondence. Let $P$ be the class of functionals on $X$. An element $p\in P$ is called a price functional or price system and maps every consumption bundle $x\in X$ into its market value $p(x)\in \mathbb {R} _{+}$. The budget correspondence is a correspondence $\Gamma \colon P\times \mathbb {R} _{+}\rightarrow X$ mapping any price system and any level of income into a subset $\Gamma (p,m)=\{x\in X~:~p(x)\leq m\}.$
The demand correspondence maps any price $p$ and any level of income $m$ into the set of $\preceq$-maximal elements of $\Gamma (p,m)$. $D(p,m)=\left\{x\in X~:~x{\text{ is a maximal element of }}\Gamma (p,m)\right\}.$
It is called demand correspondence because the theory predicts that for $p$ and $m$ given, the rational choice of a consumer $x^{*}$ will be some element $x^{*}\in D(p,m).$

## Related notions

A subset $Q$ of a partially ordered set $P$ is said to be cofinal if for every $x\in P$ there exists some $y\in Q$ such that $x\leq y.$ Every cofinal subset of a partially ordered set with maximal elements must contain all maximal elements.
A subset $L$ of a partially ordered set $P$ is said to be a lower set of $P$ if it is downward closed: if $y\in L$ and $x\leq y$ then $x\in L.$ Every lower set $L$ of a finite ordered set $P$ is equal to the smallest lower set containing all maximal elements of $L.$