In mathematics, especially in order theory, a maximal element of a subset S of some partially ordered set (poset) is an element of S that is not smaller than any other element in S. A minimal element of a subset S of some partially ordered 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 partially ordered 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. While a partially ordered set can have at most one each maximum and minimum it may have multiple maximal and minimal elements. For 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
ordered by containment, the element {d, o} is minimal, the element {g, o, a, d} is maximal, 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 and Tychonoff's theorem, the existence of a Hamel basis for every vector space, and the existence of an algebraic closure for every field.