maths.freeDiscrete Math & Logic › Relations: equivalence relations and partial orders

Relations: equivalence relations and partial orders

Reflexive, symmetric, antisymmetric and transitive relations; equivalence classes and partitions; partial orders and Hasse diagrams.

A relation on a set \( A \) is any subset \( R \subseteq A \times A \); we write \( a\,R\,b \) when \( (a, b) \in R \). Four properties organise almost every relation you will meet. \( R \) is reflexive if \( a\,R\,a \) for all \( a \); symmetric if \( a\,R\,b \) implies \( b\,R\,a \); antisymmetric if \( a\,R\,b \) and \( b\,R\,a \) together imply \( a = b \); and transitive if \( a\,R\,b \) and \( b\,R\,c \) imply \( a\,R\,c \). On a set of \( n \) elements there are \( 2^{n^2} \) relations in all, since each of the \( n^2 \) ordered pairs is either in or out.

An equivalence relation is reflexive, symmetric and transitive: a precise version of "the same in some respect". The central example is congruence: \( a \equiv b \pmod m \) when \( m \) divides \( a - b \). The equivalence class of \( a \) is the set of everything related to it, and the classes of an equivalence relation partition the set: every element lies in exactly one class. Modulo 3 the integers split into three classes, by remainder; the example finds that \( -7 \) lies in the class of 2, since \( -7 = 3 \cdot (-3) + 2 \). Conversely, every partition defines an equivalence relation (same block), so equivalence relations on an \( n \)-element set are counted by the Bell numbers.

A partial order is reflexive, antisymmetric and transitive: a precise version of "comes before or equals". Examples are \( \le \) on numbers, \( \subseteq \) on sets, and divisibility on positive integers. It is partial because two elements may be incomparable: neither of 4 and 6 divides the other. A total order is one in which every pair is comparable. A finite partial order is drawn as a Hasse diagram: a dot per element, a line from \( a \) up to \( b \) when \( a \) is below \( b \) with nothing strictly between, and every relation implied by reflexivity and transitivity left out. A minimal element has nothing below it, a least element is below everything, and a finite partial order may have many minimal elements but at most one least element.

Picture it: an equivalence relation cuts a set into separate islands, and two elements are related exactly when they stand on the same island. A partial order stacks the elements into a layered diagram, like a family tree drawn upside down, with comparability meaning "joined by a path that only goes upwards".

Think it: equivalence relations are how mathematics builds new objects by gluing: the integers modulo \( m \), the rationals as classes of fractions, the real numbers as classes of Cauchy sequences. Partial orders are how it schedules things: a topological sort lists the elements of a finite partial order in a line compatible with every relation, which is how build systems decide what to compile first.

Worked example · -7 mod 3

-7 mod 3

-7,\ 3

Step by step

  1. -7 = -3 \times 3 + 2

    Divide -7 by 3: the quotient is -3 and what is left over is the remainder.

  2. -7 \bmod 3 = 2

    The remainder is the answer (always between 0 and m − 1).

Reveal the answer
-7 \bmod 3 = 2

Now you Pick a problem, or type or draw your own. Every step, a picture, the answer hidden until you ask.

Keep your own working

A free account adds notes on every lesson, a record of what you have finished, your solved problems in one place, and a tutor you can ask about this page. The maths itself is open to everyone, signed in or not.

Sign Up Login

Symbols used here

Tap any symbol for the full definition, a picture, and what every letter in it means.

How to: Relations: equivalence relations and partial orders

  1. Write the relation as a rule or a set of ordered pairs.
  2. Test each property on a general pair (or triple), or find a specific counterexample.
  3. Reflexive, symmetric and transitive: an equivalence relation; list its classes.
  4. Reflexive, antisymmetric and transitive: a partial order; draw its Hasse diagram.
  5. Read minimal, maximal, least and greatest elements off the diagram.

Questions people ask

Can a relation be both symmetric and antisymmetric?

Yes. Equality is both, and so is any relation that only relates elements to themselves. Antisymmetric is not the opposite of symmetric; it only forbids two different elements related both ways.

Why do equivalence classes never overlap?

If c is in the class of a and in the class of b, then a R c and c R b (symmetry), so a R b by transitivity, and then every element related to a is related to b and vice versa: the two classes are the same.

What makes mathematics "discrete"?

It deals with separate, countable objects (integers, graphs, statements) rather than continuous quantities. No limits, no infinitesimals; instead induction, counting and logic.

How does a proof by induction work?

Show the statement for the first case, then show that whenever it holds for n it holds for n + 1. Like dominoes: the first falls, and each knocks over the next.

What order should I take these lessons in?

Logic and proof first, because every later lesson proves things. Then induction, sets, relations and functions, counting, recurrences, graphs, Boolean algebra and automata, and finally algorithms and complexity, which use nearly everything before them.

Is discrete mathematics the same as the maths of computer science?

Largely. Data structures are graphs and trees, correctness arguments are induction, running times are recurrences and sums, circuits are Boolean algebra, and what a computer can do efficiently is the subject of the last lessons. It is also ordinary mathematics in its own right.

Do I need calculus for this course?

No. School algebra is enough. A little familiarity with limits helps when comparing growth rates, and the lesson on asymptotic analysis explains the one limit fact it uses.

More in Discrete Math & Logic