In mathematics and set theory, a total order, linear order, simple order, or (nonstrict) ordering is a binary relation (here denoted by infix ≤) on some set X. The relation is transitive, antisymmetric, and total. A set paired with a total order is called a totally ordered set, a linearly ordered set, a simply ordered set, or a chain.
If X is totally ordered under ≤, then the following statements hold for all a, b and c in X:
Contrast with a partial order, which has a weaker form of the third condition (it only requires reflexitivity, not totality). A relation having the property of "totality" means that any pair of elements in the set of the relation are mutually comparable under the relation.
Totality implies reflexivity, that is, a ≤ a. Thus a total order is also a partial order, that is, a binary relation which is reflexive, antisymmetric and transitive. Hence a total order is also a partial order satisfying the "totality" condition.
Contents 
For each (nonstrict) total order ≤ there is an associated asymmetric (hence irreflexive) relation <, called a strict total order, which can equivalently be defined in two ways:
Properties:
We can work the other way and start by choosing < as a transitive trichotomous binary relation; then a total order ≤ can equivalently be defined in two ways:
Two more associated orders are the complements ≥ and >, completing the quadruple {<, >, ≤, ≥}.
We can define or explain the way a set is totally ordered by any of these four relations; the notation implies whether we are talking about the nonstrict or the strict total order.
While chain is sometimes merely a synonym for totally ordered set, it can also refer to a totally ordered subset of some partially ordered set. The latter definition has a crucial role in Zorn's lemma.
For example, consider the set of all subsets of the integers partially ordered by inclusion. Then the set { I_{n} : n is a natural number}, where I_{n} is the set of natural numbers below n, is a chain in this ordering, as it is totally ordered under inclusion: If n≤k, then I_{n} is a subset of I_{k}.
One may define a totally ordered set as a particular kind of lattice, namely one in which we have
We then write a ≤ b if and only if . Hence a totally ordered set is a distributive lattice; here is the proof.
A simple counting argument will verify that any nonempty finite totallyordered set (and hence any nonempty subset thereof) has a least element. Thus every finite total order is in fact a well order. Either by direct proof or by observing that every well order is order isomorphic to an ordinal one may show that every finite total order is order isomorphic to an initial segment of the natural numbers ordered by <. In other words a total order on a set with k elements induces a bijection with the first k natural numbers. Hence it is common to index finite total orders or well orders with order type ω by natural numbers in a fashion which respects the ordering (either starting with zero or with one).
Totally ordered sets form a full subcategory of the category of partially ordered sets, with the morphisms being maps which respect the orders, i.e. maps f such that if a ≤ b then f(a) ≤ f(b).
A bijective map between two totally ordered sets that respects the two orders is an isomorphism in this category.
For any totally ordered set X we can define the open intervals (a, b) = {x : a < x and x < b}, (−∞, b) = {x : x < b}, (a, ∞) = {x : a < x} and (−∞, ∞) = X. We can use these open intervals to define a topology on any ordered set, the order topology.
When more than one order is being used on a set one talks about the order topology induced by a particular order. For instance if N is the natural numbers, < is less than and > greater than we might refer to the order topology on N induced by < and the order topology on N induced by > (in this case they happen to be identical but will not in general).
The order topology induced by a total order may be shown to be hereditarily normal.
A totally ordered set is said to be complete if every nonempty subset that has an upper bound, has a least upper bound. For example, the set of real numbers R is complete but the set of rational numbers Q is not.
There are a number of results relating properties of the order topology to the completeness of X:
A totally ordered set (with its order topology) which is a complete lattice is compact. Examples are the closed intervals of real numbers, e.g. the unit interval [0,1], and the affinely extended real number system (extended real number line). There are orderpreserving homeomorphisms between these examples.
In order of increasing strength, i.e., decreasing sets of pairs, three of the possible orders on the Cartesian product of two totally ordered sets are:
All three can similarly be defined for the Cartesian product of more than two sets.
Applied to the vector space R^{n}, each of these make it an ordered vector space.
See also examples of partially ordered sets.
A real function of n real variables defined on a subset of R^{n} defines a strict weak order and a corresponding total preorder on that subset.
