Relation checker: reflexive, symmetric, transitive, equivalence classes and functions

Tap a table or type pairs to build a relation on {1, ..., n}, see it as an arrow diagram, and check reflexive, symmetric, transitive and antisymmetric with a counterexample for every no. Find equivalence classes, closures, and whether the relation is a one-one, onto function.

Keep it one tap away for everyday use.

Bookmark Relation checker?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Tap pairs
  2. Arrows
  3. Properties
  4. Classes
Nothing is uploadedWorks offline once open

Build a relation R on A

Tap a square to add or remove the pair (a, b): row a, column b.

Or type pairs, such as (1, 2), (2, 3). Press Enter or leave the box to use them.

Arrow diagram

An arrow a → b means a R b. A small loop means a R a.

Make it …

Each button adds the fewest pairs needed (the closure). New pairs show in orange.

Try this

  • Start from a − b is even: an equivalence relation. Its classes are the odd and the even numbers.
  • Start from a ≤ b: reflexive and transitive but not symmetric. That makes it a partial order.
  • Start from b = a + 1 and press transitive: you get a < b.
  • Make a relation that is symmetric and transitive but not reflexive. (Hint: leave one number out completely.)
  • Build a function: exactly one square in every row. Then make it one-one: no two in the same column.

Check yourself

Fresh numbers every time. Type a number or a fraction such as 3/4; nothing is saved or sent.

    What it shows

    A relation R on a set A is any collection of ordered pairs (a, b) from A × A; we write a R b when (a, b) is in R. This page lets you build one on A = {1, 2, …, n} (n from 2 to 6) by tapping a table or typing pairs, and draws it as an arrow diagram: an arrow from a to b for each pair, and a small loop when a R a.

    It then checks the four properties you meet in school, and for every “No” it shows the exact pair that breaks the rule:

    • Reflexive: every a has a R a (every number has a loop).
    • Symmetric: whenever a R b, also b R a (arrows come in both directions).
    • Transitive: whenever a R b and b R c, also a R c (every two-step path has a shortcut).
    • Antisymmetric: a R b and b R a only when a = b.

    A relation that is reflexive, symmetric and transitive is an equivalence relation, and the page lists its equivalence classes. Reflexive, antisymmetric and transitive makes a partial order. It also says whether R is a function from A to A, and whether that function is one-one and onto.

    It follows relations and functions in Class 11 maths and the types of relations and functions in Class 12. Sets come first in the venn diagram calculator calculator; the logic simplifier works with the same “and”, “or” and “if … then” that the definitions use, and the combinatorics calculator counts the arrangements behind the numbers of relations and functions.

    How to use it

    1. Choose the size of A and a starting relation, such as a ≤ b or a − b is even.
    2. Tap squares to add or remove pairs (row a, column b), or type pairs like (1, 2), (2, 3) and press Enter.
    3. Read the checks. A red “No” comes with the pair that breaks the rule.
    4. Press reflexive, symmetric, transitive or an equivalence to add the fewest pairs that give R that property (its closure). Added pairs show in orange.

    Worked example

    On A = {1, 2, 3, 4}, let a R b when a − b is even. Then R = {(1, 1), (1, 3), (2, 2), (2, 4), (3, 1), (3, 3), (4, 2), (4, 4)}.

    • Reflexive: a − a = 0 is even, so yes.
    • Symmetric: if a − b is even, so is b − a = −(a − b). Yes.
    • Transitive: (a − b) + (b − c) = a − c, and the sum of two even numbers is even. Yes.

    So R is an equivalence relation, with classes {1, 3} (the odd numbers) and {2, 4} (the even numbers). It is not antisymmetric, because both (1, 3) and (3, 1) are in R.

    Now start from b = a + 1, which gives {(1, 2), (2, 3), (3, 4)}. It fails transitivity: (1, 2) and (2, 3) are in R but (1, 3) is not. Press transitive and the page adds (1, 3), (1, 4) and (2, 4), which turns it into a < b.

    Counting relations

    A × A has n² pairs, and each is in R or not, so a set of n elements has 2^(n²) relations. Of these, 2^(n² − n) are reflexive and 2^(n(n + 1)/2) are symmetric. The number of equivalence relations is the Bell number (1, 2, 5, 15, 52, 203 for n = 1 to 6), and there are nⁿ functions from A to A.

    Check yourself

    Five questions with fresh numbers: spot a property, complete a transitive relation, count equivalence classes, count relations and count one-one functions. Nothing is saved.

    FAQ

    Can a relation be symmetric and antisymmetric? Yes: a = b (only loops) is both. The empty relation is too.

    Is the empty relation transitive? Yes. There is no a R b and b R c to break the rule.

    Is this from my textbook? It covers the standard school topic with its own examples. It is an independent study aid.

    Where the numbers come from

    • Standard definitions of relations on a set: reflexive, symmetric, antisymmetric and transitive relations, equivalence relations and classes, partial orders, closures (Warshall's method for the transitive closure) and functions. Written for fibub; no textbook text, figures or exercises are used.
    • Checked by counting every relation on 3 and 4 elements (512 and 65,536 relations) and comparing with a Python brute force: 171 and 3994 transitive, 5 and 15 equivalence, 19 and 219 partial orders.

    Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

    Last updated 2026-11-09.

    Change log for Relation checker

    1. Add #1193 Relation checker Details on GitHub

    Every change to fibub

    Related tools

    Combinatorics calculator #T385 Count exactly, with every digit: permutations and combinations with or without repetition, multinomial coefficients (arrangements of a word), Stirling numbers of both kinds, Lah numbers, Bell and Catalan numbers, integer partitions and derangements, with tables you can download. Logic simplifier #T386 Type a Boolean expression or a list of minterms (with don't-cares) and get the truth table, the minimal sum of products and product of sums by Quine-McCluskey (up to 6 variables), a Karnaugh map with the groups circled (2 to 4 variables), the prime implicant chart and a logic gate diagram. Checked against sympy. Venn diagram calculator #L89 Type any set expression with union, intersection, complement and difference for 2 or 3 sets and see the region shaded on a Venn diagram. Compare two expressions to check De Morgan's laws, put in real lists of elements, and count with n(A ∪ B) = n(A) + n(B) − n(A ∩ B). Converse checker #L162 Pick an if-then statement from geometry or numbers, swap it round into its converse, and test either one on random quadrilaterals, triangles, angles or numbers. Hunt through a thousand cases for a counterexample and see why a converse can be false. Function gallery #L229 See the standard real functions of Class 11 maths (identity, constant, polynomial, reciprocal, modulus, signum, greatest integer, square root, exponential, log) with the domain shaded on the x-axis and the range on the y-axis. Then build f + g, f − g, f × g and f ÷ g and find the domain of the result. Power set builder #L232 Type a set of up to 6 elements and see every subset, from ∅ to the whole set, sorted by size with C(n, k) in each group. Switch elements in and out to build one subset and follow its path down a yes/no tree that shows why a set with n elements has 2ⁿ subsets. Function types #L301 Pick a function, a domain and a codomain, then slide a horizontal line over the graph: it meets the graph more than once where the function is not one-one, and misses it where the function is not onto. See the range, a pair of x with the same y, a value nothing maps to, and the inverse as a mirror image in y = x.