In
mathematics, the lexicographic or lexicographical order, (also known as dictionary order, alphabetic order or lexicographic(al) product), is a natural
order structure of the
Cartesian product of two ordered sets. Given two
partially ordered sets A and B, the lexicographical order on the Cartesian product A × B is defined as(a,b) ≤ (a′,b′) if and only if a < a′ or (a = a′ and b ≤ b′).The result is a partial order. If A and B are
totally ordered, then the result is a total order also.
See more at Wikipedia.org...