Ma · Mathematics

How to Graph a Relation and Identify Its Properties

Published By the 9to5Science editorial team

At a glance

  1. 1. List the elements

    Use the set as the graph’s vertices, and write down every ordered pair in the relation.

  2. 2. Draw directed edges

    For each pair (a, b), draw an arrow from a to b; a pair (a, a) is a loop.

  3. 3. Check each property

    Test loops, reverse arrows, and two-edge paths against the relation’s definitions.

  4. 4. Verify missing pairs

    A property can fail because a required loop, reverse arrow, or shortcut edge is absent.

A relation on a set can be represented as a directed graph, which makes its structure easier to inspect. Each element becomes a vertex, and each ordered pair in the relation becomes an arrow. From the graph, you can check common properties such as reflexivity, symmetry, antisymmetry, and transitivity.

This method applies most directly when the set is finite. For an infinite set, the same definitions still apply, but drawing every vertex and arrow may not be possible.

Turn the relation into a directed graph

A relation RR on a set AA is a set of ordered pairs whose entries come from AA. The notation aRbaRb means (a,b)∈R(a,b)\in R.

To graph a finite relation:

  1. Draw one vertex for each element of AA.
  2. For every pair (a,b)∈R(a,b)\in R, draw an arrow from aa to bb.
  3. Draw a loop at aa if (a,a)∈R(a,a)\in R.

The direction matters: an arrow from aa to bb does not automatically mean there is an arrow from bb to aa. For instance, a relation written as “is less than or equal to” is represented by arrows from smaller elements to larger ones.

Read the standard properties from the graph

The definitions below describe relations on a set AA. They also give practical checks for a finite directed graph.

PropertyDefinitionGraph test
ReflexiveaRaaRa for every a∈Aa\in AEvery vertex has a loop.
SymmetricIf aRbaRb, then bRabRaEvery arrow between distinct vertices has a reverse arrow.
AntisymmetricIf aRbaRb and bRabRa, then a=ba=bNo two distinct vertices have arrows in both directions.
TransitiveIf aRbaRb and bRcbRc, then aRcaRcEvery two-edge path a→b→ca\to b\to c has a direct arrow a→ca\to c.

Symmetry and antisymmetry are different tests. A symmetric relation requires reverse arrows; an antisymmetric relation rules out reverse arrows between distinct vertices. A relation can be both (for example, equality), neither, or just one of the two.

When checking transitivity, consider every possible two-edge path, including paths that use loops. The required direct arrow may be a loop when the path begins and ends at the same vertex.

Worked example

Let A={1,2,3}A=\{1,2,3\} and define

R={(1,1),(2,2),(3,3),(1,2),(2,1),(2,3)}.R=\{(1,1),(2,2),(3,3),(1,2),(2,1),(2,3)\}.

The graph has vertices 1,2,31,2,3, a loop at each vertex, arrows in both directions between 11 and 22, and an arrow from 22 to 3.Thereisnoarrowfrom3. There is no arrow from 3toto2,andnoarrowfrom, and no arrow from 1toto3$.

Now test the properties:

  • Reflexive: Yes. All three loops are present: (1,1)(1,1), (2,2)(2,2), and (3,3)(3,3).
  • Symmetric: No. The arrow 2→32\to3 has no reverse arrow 3→23\to2.
  • Antisymmetric: No. There are arrows 1→21\to2 and 2→12\to1, even though 1≠21\ne2.
  • Transitive: No. The path 1→2→31\to2\to3 would require an arrow 1→31\to3, which is absent.

One failed test is enough to show that a relation does not have a property. You do not need to check every pair after finding a counterexample, although checking all pairs can help confirm the properties that do hold.

A useful comparison: the order relation

On A={1,2,3}A=\{1,2,3\}, consider the relation ≤\leq. Its pairs are

{(1,1),(1,2),(1,3),(2,2),(2,3),(3,3)}.\{(1,1),(1,2),(1,3),(2,2),(2,3),(3,3)\}.

The graph has a loop at every vertex, and arrows from each number to itself and to every larger number. This relation is reflexive, antisymmetric, and transitive, but not symmetric: 1≤21\leq2 while 2≰12\nleq1. A relation that is reflexive, antisymmetric, and transitive is called a partial order. The graph can be drawn more simply as a Hasse diagram by omitting loops and arrows implied by transitivity, but those omissions are a drawing convention; the relation itself still contains the corresponding pairs.

Common mistakes

  • Ignoring direction: For a relation, aRbaRb and bRabRa are separate facts. Draw separate arrows unless the graph is explicitly being used to represent an undirected relation.
  • Forgetting loops: Reflexivity requires a loop at every element, not merely at some of them. A loop is also a pair that can matter when testing transitivity.
  • Confusing antisymmetry with asymmetry: Antisymmetry allows loops and allows arrows in one direction between distinct elements. It only forbids arrows in both directions between distinct elements. Asymmetry is stronger: it forbids loops as well as reverse-arrow pairs.
  • Checking only adjacent pairs for transitivity: Transitivity concerns every two-edge path. If a→ba\to b and b→cb\to c, check whether a→ca\to c is present, even when the three vertices are different.
  • Treating a missing arrow as proof of a property: A missing reverse arrow can support antisymmetry, but symmetry requires every arrow to have a reverse. Always match the graph to the exact definition.

For a large finite relation, you can also record the pairs in a matrix: put a 11 in row aa, column bb exactly when aRbaRb. The same tests apply, but the directed graph is often easier to interpret visually.

References

  1. Discrete Mathematics and Its Applications, Kenneth H. Rosen

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.