In mathematics, especially in order theory, the greatest element 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. The term least element is defined dually.
Formally, given a partially ordered set (P, ≤), then an element g of a subset S of P is the greatest element of S if
- s ≤ g, for all elements s of S.
Hence, the greatest element of S is an upper bound of S that is contained within this subset. It is necessarily unique. By using ≥ instead of ≤ in the above definition, one defines the least element of S.
Like upper bounds, greatest elements may fail to exist. Even if a set has some upper bounds, it need not have a greatest element, as the example of the real numbers strictly smaller than 1 shows. This also demonstrates that the existence of a least upper bound (the number 1 in this case) does not imply the existence of a greatest element either. Similar conclusions hold for least elements.
Greatest elements of a partially ordered subset must not be confused with maximal elements of such a set. The difference is discussed in the article on maximal elements. However, in some special cases, such as when dealing with totally ordered sets, both terms do indeed coincide.
The least and greatest elements of the whole partially ordered set play a special role and are also called bottom and top or zero (0) and unit (1), respectively. The later notation of 0 and 1 is only used when no confusion is likely, i.e. when one is not talking about partial orders of numbers that already contain elements 0 and 1. The existence of least and greatest elements is a special completeness property of a partial order.
Further introductory information is found in the article on order theory.