Total Order
BasisPrerequisites
In a partial order, some pairs of elements can be incomparable — think of the subsets and sitting side by side with no inclusion between them. But the familiar ordering of numbers has no such gaps: given any two integers, you can always say which one is smaller. That stronger condition is a total order.
The totality axiom
A partial order requires to be reflexive, antisymmetric, and transitive. A total order (also called a linear order) adds one more requirement:
Every pair of elements must be comparable — there are no incomparable pairs at all.
Note. Totality implies reflexivity: setting gives . So in some formulations you will see a total order defined as a relation satisfying only antisymmetry, transitivity, and totality; the reflexivity axiom follows for free.
Definition
A pair is a totally ordered set (or linearly ordered set) when is a partial order that also satisfies (Totality).
Law of trichotomy
An equivalent way to state totality (given antisymmetry and transitivity) is the law of trichotomy: for any two elements and , exactly one of the three cases holds:
Trichotomy is often the most natural way to reason about total orders in practice: you branch your argument on these three mutually exclusive cases and handle each one separately.
Examples
Real numbers under
is the canonical total order. Given any , exactly one of , , holds. The same totality applies to , , and .
Lexicographic order on strings
Fix a totally ordered alphabet — say, the standard alphabetical order on letters. The lexicographic order on strings over that alphabet compares two strings character by character: find the first position where they differ and use the alphabet order there; if one string runs out of characters first, it comes before the other. For example:
This gives a total order on any set of strings over the same alphabet, and it is the same order a dictionary uses.
Linear extensions of partial orders
Given any finite poset, you can always extend it to a total order that is consistent with it: whenever in the original partial order, holds in the total order too. Such an extension is called a linear extension. This is useful in practice: if tasks have a dependency order (a partial order), you can always schedule them in a single linear sequence that respects all dependencies.
Non-examples
Divisibility on
As seen in Partial Order, divisibility is not total: and , so and are incomparable.
Subset inclusion on a power set
is not a total order for any set with : any two distinct singletons and (with ) are incomparable.
Properties unique to total orders
The totality axiom unlocks structural properties that partial orders do not guarantee.
Minimal and least elements coincide
In a general poset, a poset can have multiple minimal elements with no least element among them — the divisibility example on from Partial Order illustrates this. In a total order, the notions collapse: if is minimal (nothing is strictly below it), then for every , totality gives either or ; the latter would make , contradicting minimality. Therefore for all , meaning is a least element.
Consequence. In a total order, there is at most one minimal element, and if it exists it is the unique least element. The same reasoning applies to maximal and greatest elements.
Every non-empty finite totally ordered set has a unique min and max
You can find the minimum by starting with any element and repeatedly replacing it with a smaller one as you scan through the set. Totality ensures every comparison is decisive; finiteness ensures the scan terminates. The final candidate is the minimum. By symmetry, a maximum exists as well.
Hasse diagrams of total orders are chains
In the Hasse diagram of a totally ordered set, every element has a unique predecessor and a unique successor (when they exist), so all elements line up in a single vertical chain with no branching. This linear shape is why total orders are also called linear orders.
Summary
- A total order is a partial order with the extra totality axiom: every pair of elements is comparable.
- Equivalently, the law of trichotomy holds: for any and , exactly one of , , is true.
- Key examples: , , , , and lexicographic order on strings.
- Divisibility on and subset inclusion on power sets are not total orders.
- In a total order, minimal and least coincide; every non-empty finite totally ordered set has a unique minimum and maximum.