Hasse Diagram Calculator

Use this Hasse Diagram Calculator to enter values, adjust options, and review results in a compact responsive workspace.

Results are calculated automatically as you enter data.

Elements
Element
Relation Pairs
Lower Element Upper Element

For subset mode, enter sets like {}, {a}, {b}, {a,b}. Click a node in the diagram to inspect comparable elements.

Transitive reduction and lattice checks
Hasse Cover Rule
Properties
Reflexive:
Antisymmetric:
Transitive:
Transitive Reduction
Lattice Test
ResultEnter a finite ordered set.
Partial order
Minimal
Maximal
Least
Greatest
Lattice
Max chain
Max antichain

Click a node in the diagram to inspect comparable and incomparable elements.

Cover relations

Lower Upper

Partial-order diagnostics

Property Issue

▼ See explanations and tips below ▼

What Are Hasse Diagrams?

A Hasse diagram is a compact drawing of a finite partially ordered set, often called a poset. A poset is a set together with a relation that tells when one element is below, before, contained in, divides, or otherwise precedes another element.

The word “partial” matters. In an ordinary number line, any two numbers can be compared: one is smaller, larger, or equal. In a partial order, some pairs may be incomparable. For example, in the divisibility order on the divisors of \(12\), \(3\) divides \(6\) and \(12\), but \(3\) and \(4\) are not comparable because neither divides the other.

A Hasse diagram makes this structure easier to see by drawing only the essential order steps. Instead of showing every relation pair, it removes self-loops and relations that are already implied through transitivity. The remaining edges are cover relations.

For a finite poset, the diagram is useful because it shows:

  • which elements are immediately above or below other elements;
  • where the minimal and maximal elements are;
  • whether a least or greatest element exists;
  • how chains and antichains fit inside the order;
  • whether the poset behaves like a lattice, where every pair has a meet and a join.

Why Hasse Diagrams Matter

Hasse diagrams turn abstract relation rules into a visual structure. That makes them especially helpful in discrete mathematics, combinatorics, computer science, algebra, and set theory.

Students often meet Hasse diagrams when studying divisibility, subset inclusion, prerequisites, dependency graphs, Boolean lattices, or finite lattices. In each case, the diagram helps answer questions that are harder to see from a long list of ordered pairs.

For example, if a relation contains:

$$ a \le b,\quad b \le c,\quad a \le c $$

the pair \(a \le c\) is important, but it does not need its own Hasse diagram edge. It is already implied by the path from \(a\) to \(b\) to \(c\). Removing that extra edge makes the structure clearer.


Key Terms to Know

  • Set: The collection of elements being ordered.
  • Binary relation: A rule that relates some ordered pairs of elements.
  • Partial order: A relation that is reflexive, antisymmetric, and transitive.
  • Poset: A set together with a partial order.
  • Comparable elements: Two elements where at least one is related to the other.
  • Incomparable elements: Two elements where neither is below the other.
  • Cover relation: A direct step in the order with no intermediate element between the two endpoints.
  • Transitive reduction: The process of removing relation edges that are implied through longer paths.
  • Minimal element: An element with nothing strictly below it.
  • Maximal element: An element with nothing strictly above it.
  • Least element: An element below every element in the poset.
  • Greatest element: An element above every element in the poset.
  • Chain: A subset whose elements are pairwise comparable.
  • Antichain: A subset whose elements are pairwise incomparable.
  • Meet: The greatest lower bound of two elements, written \(a \land b\).
  • Join: The least upper bound of two elements, written \(a \lor b\).
  • Lattice: A poset in which every pair of elements has a unique meet and a unique join.

How Hasse Diagrams Work

A Hasse diagram starts with a partial order. For the weak partial orders commonly used in finite Hasse diagrams, the relation must satisfy three properties.

First, every element is related to itself:

$$ \forall a \in A,\quad a \le a $$

This is called reflexivity.

Second, two different elements cannot be related in both directions:

$$ a \le b \land b \le a \implies a = b $$

This is called antisymmetry.

Third, the relation must pass through intermediate elements:

$$ a \le b \land b \le c \implies a \le c $$

This is called transitivity.

Once a valid partial order is available, the Hasse diagram keeps only cover relations. The cover relation is usually written as \(a \prec b\), meaning that \(b\) covers \(a\):

$$ a \prec b \iff a < b \text{ and there is no } c \in A \text{ such that } a < c < b $$

In plain language, \(a \prec b\) means that \(a\) is below \(b\), and there is no element strictly between them.

Divisibility Mode

In a divisibility poset, one number is below another when it divides the other evenly. For example, with:

$$ A = \{1,2,3,4,6,12\} $$

the relation is:

$$ a \le b \iff a \text{ divides } b $$

Some true relation pairs are:

$$ 1 \le 2,\quad 2 \le 4,\quad 4 \le 12,\quad 1 \le 12 $$

But \(1 \le 12\) is not drawn as a direct Hasse diagram edge, because there are intermediate elements such as \(2\), \(4\), and \(6\). The cover edges are:

  • \(1 \prec 2\)
  • \(1 \prec 3\)
  • \(2 \prec 4\)
  • \(2 \prec 6\)
  • \(3 \prec 6\)
  • \(4 \prec 12\)
  • \(6 \prec 12\)

This example has a least element, \(1\), and a greatest element, \(12\).

Subset Mode

In a subset-inclusion poset, one set is below another when it is contained in the other. For example:

$$ A = \{\{\}, \{a\}, \{b\}, \{a,b\}\} $$

The empty set is below every set in this example:

$$ \{\} \subseteq \{a\},\quad \{\} \subseteq \{b\},\quad \{\} \subseteq \{a,b\} $$

The cover edges are:

  • \(\{\} \prec \{a\}\)
  • \(\{\} \prec \{b\}\)
  • \(\{a\} \prec \{a,b\}\)
  • \(\{b\} \prec \{a,b\}\)

The edge from \(\{\}\) to \(\{a,b\}\) is not drawn, because it is implied through either \(\{a\}\) or \(\{b\}\).

Custom Pair Mode

In a custom relation, the ordered pairs you provide define the relation. The key point is that a custom relation must already include the reflexive and transitive pairs needed for a partial order.

For example, the pairs:

$$ (a,a),\ (b,b),\ (c,c),\ (a,b),\ (b,c) $$

do not define a partial order yet, because transitivity requires:

$$ (a,c) $$

Without that pair, the relation says \(a \le b\) and \(b \le c\), but it does not say \(a \le c\). A Hasse diagram should be built only after the relation passes the partial-order checks.


Examples of Hasse Diagrams in Practice

Example 1: Divisors of 12

For the set:

$$ \{1,2,3,4,6,12\} $$

ordered by divisibility, \(1\) is at the bottom because it divides every element. \(12\) is at the top because every element divides it.

The relation contains many true pairs. For instance:

$$ 1 \le 4,\quad 1 \le 6,\quad 2 \le 12,\quad 3 \le 12 $$

But these are not necessarily cover relations. The diagram keeps only the immediate steps. This is why \(2\) connects directly to \(4\) and \(6\), but not directly to \(12\).

This poset is also a lattice. For any two divisors of \(12\), the meet is their greatest common divisor and the join is their least common multiple within the same divisor set. For example:

$$ 2 \land 3 = 1 $$
$$ 2 \lor 3 = 6 $$

Example 2: Subsets of a Two-Element Set

For the power set of \(\{a,b\}\), ordered by subset inclusion, the elements are:

$$ \{\},\quad \{a\},\quad \{b\},\quad \{a,b\} $$

The empty set is the least element, and the full set is the greatest element.

The meet of two subsets is their intersection:

$$ \{a\} \land \{b\} = \{\} $$

The join of two subsets is their union:

$$ \{a\} \lor \{b\} = \{a,b\} $$

This is one of the simplest examples of a finite lattice.


Example 3: A Relation That Is Not Yet a Partial Order

Suppose a custom relation on \(\{a,b,c\}\) contains:

$$ (a,a),\ (b,b),\ (c,c),\ (a,b),\ (b,c) $$

The reflexive pairs are present, but the transitive pair \((a,c)\) is missing. Since a valid partial order must satisfy:

$$ a \le b \land b \le c \implies a \le c $$

this relation fails the transitivity check. The correct next step is not to draw the Hasse diagram yet, but to fix the relation by adding the missing pair.


How to Interpret the Result

A result that says the relation is a partial order means the relation passed the reflexive, antisymmetric, and transitive checks. Once that happens, the Hasse diagram can be interpreted as the cover-relation diagram of the poset.

A cover edge from \(a\) to \(b\) means:

$$ a \prec b $$

That is stronger than merely saying \(a \le b\). It means \(a\) is immediately below \(b\) in the order, with no intermediate element between them.

Minimal and maximal elements describe local endpoints:

  • A minimal element has no distinct element below it.
  • A maximal element has no distinct element above it.

Least and greatest elements describe global endpoints:

  • A least element is below every element.
  • A greatest element is above every element.

Every least element is minimal, but a minimal element does not have to be least. A poset can have several minimal elements, and none of them may be below all the others. The same distinction applies to greatest and maximal elements.

A lattice result of “yes” means every pair of elements has exactly one meet and exactly one join. A least or greatest element alone is not enough to guarantee that a poset is a lattice.

A maximum chain is a largest detected subset in which all elements can be compared in a single ordered path. A maximum antichain is a largest detected subset in which no two distinct elements are comparable.


Common Mistakes and Misconceptions

Treating every relation pair as a diagram edge

A Hasse diagram does not draw every true relation pair. It draws only cover relations. If \(a \le c\) is already implied by \(a \le b\) and \(b \le c\), the direct edge from \(a\) to \(c\) is removed.

Forgetting reflexive pairs in custom mode

A weak partial order must include \((a,a)\) for every element \(a\). In custom pair mode, those pairs must be part of the relation. They are not automatically inferred.

Forgetting transitive pairs in custom mode

If \((a,b)\) and \((b,c)\) are included, then \((a,c)\) must also be included for transitivity. The Hasse diagram may later remove the direct visual edge, but the relation itself still needs the pair.

Confusing minimal with least

An element can be minimal without being least. Minimal means nothing is below it. Least means it is below everything.

For example, in a poset with two incomparable bottom elements, both may be minimal, but neither is least.

Confusing maximal with greatest

An element can be maximal without being greatest. Maximal means nothing is above it. Greatest means everything is below it.

A finite poset can have several maximal elements.

Assuming a least and greatest element make a lattice

A lattice requires every pair of elements to have a unique meet and a unique join. Having a bottom element and a top element can help, but it does not automatically settle every pair in the middle.

Using invalid labels for the selected relation mode

Divisibility mode needs nonzero integers. Subset mode needs set-style labels such as \(\{\}\), \(\{a\}\), or \(\{a,b\}\). Custom pair mode needs pairs that use elements from the current element list.


When to Use Hasse Diagrams

Use Hasse diagrams when you need to understand the structure of a finite partial order.

They are especially useful for:

  • checking whether a relation behaves like an order;
  • studying divisibility among integers;
  • studying subset inclusion and power sets;
  • visualizing finite lattices;
  • identifying minimal, maximal, least, and greatest elements;
  • comparing chains and antichains;
  • simplifying a dense relation by removing transitive edges;
  • teaching or learning discrete mathematics and order theory.

Limitations and Things to Keep in Mind

A Hasse diagram is only as valid as the relation behind it. If the relation is not reflexive, antisymmetric, and transitive, then it is not a weak partial order, and the diagram should not be interpreted as a poset diagram.

For finite sets, Hasse diagrams are usually manageable when the number of elements is small. As the set grows, the diagram can become crowded even when the mathematics is correct. A compact drawing may hide symmetry, and different layouts can make the same poset look easier or harder to understand.

This calculator is designed for finite input sets and limits the number of elements to 18 for readability. For every valid partial order within that limit, it computes an exact maximum chain and maximum antichain; inputs beyond that readability limit are rejected before those results are requested. It does not infer missing reflexive or transitive pairs in custom mode.

There is no decimal rounding in the mathematical results because the outputs are relation properties, element labels, counts, tables, and diagrams. The only rounding that may occur is in the pixel dimensions used when exporting the diagram image.

For coursework, proofs, or formal writing, use the output as a guide and still explain the relation, the partial-order checks, and the cover relations in your own words.


How to Use This Calculator

  1. Choose the relation mode: divisibility, subsets, or custom pairs.
  2. Enter or edit the finite ordered-set elements.
  3. If using custom pairs mode, add or import the ordered pairs that define the relation.
  4. Review the status message to see whether the relation is a partial order.
  5. Use the diagnostics table to fix missing reflexive pairs, antisymmetry failures, or missing transitive pairs.
  6. When a valid partial order is available, read the Hasse diagram and the cover-relation table.
  7. Check the summary fields for minimal elements, maximal elements, least element, greatest element, lattice status, maximum chain, and maximum antichain.
  8. Select a diagram node to inspect elements below it, above it, and incomparable with it.
  9. Use the download option when you need a PNG copy of the rendered graph.

Frequently Asked Questions

What does a Hasse diagram show?

A Hasse diagram shows the cover relations of a finite partially ordered set. It leaves out self-loops and relation edges that are already implied by transitivity, so the drawing focuses on the immediate order steps.


Why are some true relation pairs missing from the diagram?

They are not missing from the relation; they are omitted from the drawing because they are implied by paths through other elements. For example, if \(a \le b\) and \(b \le c\), then \(a \le c\) is true by transitivity, but the diagram usually draws only the two shorter cover steps.


What is the difference between minimal and least?

A minimal element has nothing strictly below it. A least element is below every element in the poset. A poset may have several minimal elements, but it can have at most one least element.


What is the difference between maximal and greatest?

A maximal element has nothing strictly above it. A greatest element is above every element in the poset. A poset may have several maximal elements, but it can have at most one greatest element.


What makes a poset a lattice?

A poset is a lattice when every pair of elements has a unique meet and a unique join. The meet is the greatest lower bound, and the join is the least upper bound.


Can a relation fail even if it looks order-like?

Yes. A custom relation can look orderly but still fail if it is missing reflexive pairs, has two distinct elements related in both directions, or omits a transitive implication. The partial-order checks should be resolved before interpreting the diagram.


Why does divisibility mode reject zero?

This calculator's divisibility mode is restricted to finite nonzero integers so every relation test can use exact integer remainders. Use custom ordered pairs if your convention explicitly includes zero.


Are the maximum chain and antichain exact?

Yes. The calculator returns an exact maximum chain and an exact maximum antichain for every valid partial order within the 18-element input limit. If several answers have the same maximum size, it returns one deterministic example.


Sources and References

Books

  1. Kenneth H. Rosen. Discrete Mathematics and Its Applications. 8th edition / 2025 release, McGraw Hill. Chapter 9, “Relations,” especially the material on partial orderings and Hasse diagrams. ISBN 9781266045479. Publisher page: https://www.mheducation.com/highered/product/discrete-mathematics-and-its-applications-rosen.html
  2. B. A. Davey and H. A. Priestley. Introduction to Lattices and Order. 2nd edition, Cambridge University Press, 2002. Chapters 1–2, “Ordered sets” and “Lattices and complete lattices.” ISBN 9780521784511; online ISBN 9780511809088. Publisher page: https://www.cambridge.org/core/books/introduction-to-lattices-and-order/946458CB6638AF86D85BA00F5787F4F4
  3. Richard P. Stanley. Enumerative Combinatorics, Volume 1. 2nd edition, Cambridge University Press, 2011. Chapter 3, “Partially Ordered Sets,” pp. 241–463. Chapter page: https://www.cambridge.org/core/books/abs/enumerative-combinatorics/partially-ordered-sets/23A70E5302E6CE88C7299273F338175E

Online and Educational Sources

  1. Eric Lehman, F. Thomson Leighton, and Albert R. Meyer. “Chapter 7: Relations and Partial Orders.” Mathematics for Computer Science, MIT OpenCourseWare, Fall 2010. Accessed June 28, 2026. https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/efac321fdc8d0b27586ca35b04aab808MIT6042JF10_chap07.pdf
  2. Eric W. Weisstein. “Hasse Diagram.” MathWorld—A Wolfram Resource. Accessed June 28, 2026. https://mathworld.wolfram.com/HasseDiagram.html
  3. Matt Insall and Eric W. Weisstein. “Partially Ordered Set.” MathWorld—A Wolfram Resource. Accessed June 28, 2026. https://mathworld.wolfram.com/PartiallyOrderedSet.html
  4. Brendan Fong and David I. Spivak. “1.2: Meets and Joins.” Seven Sketches in Compositionality: An Invitation to Applied Category Theory, Mathematics LibreTexts. Accessed June 28, 2026. https://math.libretexts.org/Bookshelves/AppliedMathematics/SevenSketchesinCompositionality%3AAnInvitationtoAppliedCategoryTheory%28FongandSpivak%29/01%3AGenerativeEffects-OrdersandAdjunctions/1.02%3AMeetsandJoins