In mathematics, especially in order theory, a **maximal element** of a subset *S* of some partially ordered set is an element of *S* that is not smaller than any other element in *S*. The term **minimal element** is defined dually. Formally, given a partially ordered set (*P*, ≤), an element *m* of a subset *S* of *P* is a maximal element of *S* if - for some implies that
*m* = *s*. The definition for minimal elements is obtained by using ≥ instead of ≤. What is important to note about maximal elements is that they are in general not the greatest elements of a subset *S*, i.e. while they are not smaller than any other element of *S*, they do not have to be greater than all other elements either. Indeed, consider the set of all subsets of the natural numbers (i.e. the power set) ordered by subset inclusion. The subset *S* of all one-element sets of natural numbers consists only of maximal elements, but has no greatest element. This example also shows that maximal elements are usually not unique and that it is well possible for an element to be both maximal and minimal at the same time. If a subset has a greatest element, then this is the unique maximal element. Conversely, even if a set has only one maximal element, it is not necessarily the greatest one. Take the set of natural numbers in their usual order, which obviously has no maximal elements, and add a single new element *a* which can only be compared to itself, i.e. it is neither smaller nor greater than any natural number. Then the whole set has *a* as a single maximal element that is not the greatest element. Yet, 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 does not only apply to totally ordered subsets of any poset, but also to their order theoretic generalization via directed sets. In a directed set, every pair of elements (especially pairs of incomparable elements) has a common upper bound within the set. It is easy to see that any maximal element of such a subset must be the unique greatest element. Similar conclusions are true for minimal elements. Further introductory information is found in the article on order theory. |