Introduction
Many collections are ordered, but not totally: subsets ordered by inclusion, tasks ordered by "must finish before", integers ordered by divisibility. In each case some pairs are comparable and others are not. A partially ordered set (poset) captures this. A lattice is a poset in which every two elements have a best common upper bound and a best common lower bound; lattices underlie Boolean algebra, data-flow analysis in compilers, and type hierarchies.
Prerequisites
- Relations: reflexive, antisymmetric and transitive relations; digraphs of relations.
Core concepts
Partial orders
A relation on a set is a partial order if it is
- reflexive: ;
- antisymmetric: and imply ;
- transitive: and imply .
is a poset. Elements are comparable if or , otherwise incomparable. A poset in which every pair is comparable is a total (linear) order, or chain. A set of pairwise incomparable elements is an antichain. We write for and (a strict order: irreflexive and transitive).
Standard examples: (total); (not total when ); where means " divides " (not total: 2 and 3 are incomparable). Divisibility on all of is not a partial order, because and with .
A well-ordered set is a total order in which every non-empty subset has a least element: is well-ordered, is not. Well-ordering is the basis of mathematical induction.
Hasse diagrams
A Hasse diagram draws a finite poset without redundant information. covers if and there is no with . Draw an upward edge from to for each covering pair only: omit loops (reflexivity), omit edges implied by transitivity, and omit arrowheads (larger elements are higher).

Special elements
Let be a poset and .
| Term | Definition |
|---|---|
| Maximal element of | no with |
| Minimal element of | no with |
| Greatest element (top, ) | for all |
| Least element (bottom, ) | for all |
| Upper bound of | with for all |
| Least upper bound (lub, supremum, join) | an upper bound below every other upper bound |
| Lower bound, greatest lower bound (glb, infimum, meet) | the mirror images |
Key distinctions:
- A greatest element is maximal, but a maximal element need not be greatest. In , 4 and 6 are both maximal and there is no greatest element.
- A finite non-empty poset always has at least one maximal and one minimal element. The greatest element, if it exists, is unique, and then it is the only maximal element.
- An infinite poset may have none: has no maximal element.
- A lub, when it exists, is unique (by antisymmetry). It may not belong to .
Topological sorting
Every finite partial order can be extended to a total order compatible with it (a linear extension, or topological sort): repeatedly remove a minimal element and append it to the output. This is how a build system or a course planner orders tasks; the graph version is in Depth-First Search. has 5 linear extensions, for example and .
Lattices
A poset is a lattice if every pair has both a least upper bound and a greatest lower bound in :
| Lattice | Join | Meet |
|---|---|---|
| and | ||
| Any chain, e.g. |
Joins and meets in any lattice satisfy, for all : commutativity, associativity, idempotence (), and the absorption laws and . Conversely, a set with two operations satisfying these laws is a lattice under . Also .
To show a poset is not a lattice, find a pair with no lub (two or more minimal upper bounds, or none) or no glb.
Bounded, complemented and distributive lattices
- Bounded: has a least element and a greatest element . Every finite lattice is bounded (take the join of all elements, and the meet).
- Complement: in a bounded lattice, is a complement of if and . A complemented lattice gives every element at least one complement. Complements need not be unique.
- Distributive: for all . (Either distributive law implies the other in a lattice.)
- In a distributive bounded lattice, every element has at most one complement.
- A Boolean algebra is a complemented distributive lattice. Every finite Boolean algebra is isomorphic to for some finite , so it has elements.
Test for distributivity (Birkhoff's theorem): a lattice is distributive if and only if it contains no sublattice isomorphic to the pentagon or the diamond .
- : elements and , with incomparable to and . Here but .
- : , three pairwise incomparable atoms , and . Here but .
Both are complemented but not distributive; in , has the two complements and .

The divisor lattice
, the positive divisors of under divisibility, is always a distributive lattice with (the number one) and top . The complement of , if it exists, must be with . Hence:
Examples: () is a Boolean algebra with 8 elements, isomorphic to . is not complemented: 2 has no complement, since needs and then .
Worked examples
Example 1: special elements
Poset . Minimal elements: 2 and 3 (no proper divisor in the set). Maximal: 12 and 18. No least or greatest element. Upper bounds of : 6, 12, 18; least upper bound 6. Upper bounds of : only 12, so the lub is 12. Upper bounds of : none in the set, so this poset is not a lattice.
Example 2: is it a lattice?
under divisibility. Upper bounds of in : 12, 18, 36. Since 12 and 18 are incomparable and both are minimal upper bounds, has no lub. Not a lattice.
Example 3: complements in and
In : complement of 6 is 5 (, ); complement of 10 is 3. Every element has exactly one complement.
In (, not square-free): elements . Only 1, 4, 9, 36 have complements (the pairs and ); 2, 3, 6, 12 and 18 have none.
Example 4: counting comparable pairs
In , how many ordered pairs satisfy ? For each , count its divisors: . This includes the 6 reflexive pairs, so the strict order has 12 pairs, of which 7 are covering edges.
Important properties and observations
- Every chain is a distributive lattice. Every sublattice of a distributive lattice is distributive.
- The dual of a poset (reverse the order) is a poset; the dual of a lattice is a lattice with and swapped. Any theorem stays true after this swap (duality principle).
- A finite lattice is bounded; an infinite lattice need not be ().
- In a Boolean algebra the complement is unique and De Morgan's laws hold: .
- Number of elements of a finite Boolean algebra is a power of 2. A lattice whose size is not a power of 2 (like with 6 elements) cannot be a Boolean algebra.
GATE examination perspective
- Hasse diagram questions. Identify covering pairs, maximal/minimal, greatest/least, and lub/glb of a subset. Remember that maximal and greatest are different.
- "Is it a lattice?" Look for two incomparable elements with two minimal upper bounds (or two maximal lower bounds).
- Complemented and distributive. Check for and ; in use the square-free test.
- Counting. Number of comparable pairs, number of complements, number of linear extensions for small posets.
- Trap: a complemented lattice need not be distributive; a distributive lattice need not be complemented (, or any chain with more than 2 elements).
- Trap. Divisibility is a partial order on positive integers and also on nonnegative integers. On all integers, antisymmetry fails because nonzero and divide each other.
Summary
Sources
- K. H. Rosen, Discrete Mathematics and Its Applications, 7th ed., McGraw-Hill, 2012: Section 9.6 (Partial Orderings) and Chapter 12 (Boolean Algebra).
- B. A. Davey and H. A. Priestley, Introduction to Lattices and Order, 2nd ed., Cambridge University Press, 2002: Chapter 4 (Modular, distributive and Boolean lattices).