蓝色、棕色冰川与红色植被组成的假彩色遥感图
冰川纹理 · NASA Earth Observatory / Jesse Allen & Robert Simmon; ASTER Science Team

A relation turns a condition such as “is connected to” into a set of ordered pairs. First specify the sets involved, then decide which pairs satisfy the condition. To classify a relation, use the quantifiers in each definition rather than relying on its name or an informal impression.

1. Basic Concepts

Ordered Pairs, Cartesian Products, and Binary Relations

An ordered pair (a,b)(a,b) distinguishes its first and second components:

(a,b)=(u,v)  ⟺  a=u∧b=v.(a,b)=(u,v)\iff a=u\land b=v.

When a≠ba\ne b, we have (a,b)≠(b,a)(a,b)\ne(b,a). For example, (3,4)(3,4) and (4,3)(4,3) represent different points in the plane.

The Cartesian product of sets AA and BB contains every possible ordered pair with first component in AA and second component in BB:

A×B={(a,b)∣a∈A, b∈B}.A\times B=\{(a,b)\mid a\in A,\ b\in B\}.

A binary relation from AA to BB is any subset RR of A×BA\times B. Write aRbaRb for (a,b)∈R(a,b)\in R, and aR̸ba\not Rb for (a,b)∉R(a,b)\notin R. The Cartesian product supplies the possible pairs; the relation selects those satisfying its condition.

If R⊆A×AR\subseteq A\times A, it is a relation on AA. The notation A2A^2 means A×AA\times A, not the set obtained by squaring individual elements.

Example: Listing a relation from its defining condition. Let A={1,2,3,4}A=\{1,2,3,4\}. Define aRbaRb if and only if a∣ba\mid b, meaning that b=akb=ak for some integer kk. List all ordered pairs in RR.

Show solution and steps

Group the pairs by their first component. The number 1 divides every element of AA; 2 divides 2 and 4; 3 divides only 3; and 4 divides only 4. Hence

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

The direction matters: the first component divides the second. Thus (2,4)∈R(2,4)\in R, whereas (4,2)∉R(4,2)\notin R. Only positive integers occur here, so conventions about divisibility involving zero do not affect the answer.

Relations, Functions, and Inverse Relations

The graph of a function f:A→Bf:A\to B is the relation

{(a,f(a))∣a∈A}.\{(a,f(a))\mid a\in A\}.

It is a special relation in which every a∈Aa\in A is associated with exactly one b∈Bb\in B. “Every” requires a value for each input; “exactly one” requires uniqueness. A general relation may leave an input unrelated to any output or associate it with several outputs. Several inputs sharing one output are allowed in a function.

Example: Is a relation the graph of a function? Let A={a,b}A=\{a,b\}, B={1,2,3}B=\{1,2,3\}, and R={(a,1),(a,2)}R=\{(a,1),(a,2)\}. Determine whether RR is the graph of a function from AA to BB, and find R−1R^{-1}.

Show solution and steps

It is not a function graph. The input aa has two distinct outputs, and bb has no output, violating uniqueness and the requirement that every input have a value.

Swap the components of each pair:

R−1={(1,a),(2,a)}⊆B×A.R^{-1}=\{(1,a),(2,a)\}\subseteq B\times A.

This is not the graph of a function from all of BB to AA either, because 3 has no output.

In general, the inverse relation is

R−1={(b,a)∣(a,b)∈R}.R^{-1}=\{(b,a)\mid(a,b)\in R\}.

Every binary relation has an inverse relation. For the inverse relation of a function f:A→Bf:A\to B to be an inverse function defined on all of BB, ff must be a bijection.

Special Relations and the Underlying Set

For a specified set AA, the empty relation is ∅\varnothing, the identity relation is IA={(a,a)∣a∈A}I_A=\{(a,a)\mid a\in A\}, and the universal relation is UA=A×AU_A=A\times A.

Properties depend on the underlying set. For instance, {(1,1),(2,2)}\{(1,1),(2,2)\} is reflexive on {1,2}\{1,2\}, but not on {1,2,3}\{1,2,3\} because (3,3)(3,3) is missing. Always state the set on which a relation is being considered.

2. Properties and How to Test Them

Six Properties

In the following table, all variables range over AA, and R⊆A2R\subseteq A^2.

PropertyDefinitionA counterexample must show
Reflexive∀x, xRx\forall x,\ xRxSome xx with (x,x)∉R(x,x)\notin R
Irreflexive∀x, ¬(xRx)\forall x,\ \neg(xRx)At least one (x,x)∈R(x,x)\in R
Symmetric∀x,y, xRy⇒yRx\forall x,y,\ xRy\Rightarrow yRx(x,y)∈R(x,y)\in R but (y,x)∉R(y,x)\notin R
Antisymmetric∀x,y, (xRy∧yRx)⇒x=y\forall x,y,\ (xRy\land yRx)\Rightarrow x=yTwo distinct elements related in both directions
Asymmetric∀x,y, xRy⇒¬(yRx)\forall x,y,\ xRy\Rightarrow\neg(yRx)A pair and its reverse both present, including a loop
Transitive∀x,y,z, (xRy∧yRz)⇒xRz\forall x,y,z,\ (xRy\land yRz)\Rightarrow xRz(x,y),(y,z)∈R(x,y),(y,z)\in R but (x,z)∉R(x,z)\notin R

Proving a property requires accounting for every possible choice of elements. Disproving it requires only one instance where the premise holds and the conclusion fails. Finite relations can be checked by enumeration; infinite relations usually require a general argument or an explicit counterexample.

Original diagrams illustrating reflexive, irreflexive, symmetric, and antisymmetric relations

Figure 1. Read from left to right: every vertex has a loop; no vertex has a loop; every edge between distinct vertices has its reverse; no pair of distinct vertices is joined in both directions.

Each panel illustrates the named property and may have other properties as well. In the antisymmetric panel, loops are allowed: only opposite edges between distinct vertices are forbidden. In the symmetric panel, the isolated vertex shows that symmetry alone does not require every vertex to have a loop.

Reflexivity and Irreflexivity

“Not reflexive” means at least one loop is missing. “Irreflexive” means all loops are absent. These are different conditions.

On a nonempty set, a relation cannot be both reflexive and irreflexive, but it can be neither. On the empty set, the unique empty relation satisfies both conditions: there is no element violating either universal statement.

Example: Some, all, or no loops. Let A={1,2,3}A=\{1,2,3\} and

R1={(1,1),(2,2)},R2={(1,1),(2,2),(3,3),(1,2)},R3={(1,3)}.R_1=\{(1,1),(2,2)\},\quad R_2=\{(1,1),(2,2),(3,3),(1,2)\},\quad R_3=\{(1,3)\}.

Determine whether each relation is reflexive and whether it is irreflexive.

Show solution and steps
RelationReflexive?Irreflexive?Reason
R1R_1NoNo(3,3)(3,3) is missing, but (1,1)(1,1) is present
R2R_2YesNoAll three required loops are present
R3R_3NoYesNo loop is present

Symmetry, Antisymmetry, and Asymmetry

Symmetry requires the reverse of every existing pair. Antisymmetry forbids pairs in both directions between distinct elements, but permits loops. Asymmetry also forbids loops. Therefore,

R is asymmetric  ⟺  R is antisymmetric and irreflexive.R\text{ is asymmetric}\iff R\text{ is antisymmetric and irreflexive}.

To prove this, first assume asymmetry. Setting x=yx=y rules out loops, and the definition also rules out both directions between distinct elements. Conversely, suppose RR is antisymmetric and irreflexive. If xRyxRy, irreflexivity gives x≠yx\ne y, and antisymmetry then rules out yRxyRx.

Symmetry and antisymmetry are not logical opposites. They may both hold, in which case only loops can be present, so R⊆IAR\subseteq I_A. They may also both fail.

Example: Distinguishing the three symmetry properties. On A={1,2,3}A=\{1,2,3\}, classify the following relations as symmetric, antisymmetric, or asymmetric:

Q1={(1,1),(2,2)},Q2={(1,1),(1,2),(2,1)},Q3={(1,2),(1,3)},Q4={(1,2),(2,1),(1,3)}.\begin{aligned} Q_1&=\{(1,1),(2,2)\},\\ Q_2&=\{(1,1),(1,2),(2,1)\},\\ Q_3&=\{(1,2),(1,3)\},\\ Q_4&=\{(1,2),(2,1),(1,3)\}. \end{aligned}
Show solution and steps
RelationSymmetric?Antisymmetric?Asymmetric?Key observation
Q1Q_1YesYesNoOnly loops occur; loops violate asymmetry
Q2Q_2YesNoNoBoth directions occur between 1 and 2
Q3Q_3NoYesYesNo reverse pair or loop is present
Q4Q_4NoNoNo(1,3)(1,3) has no reverse, but 1 and 2 are related in both directions

“Not symmetric” means only that symmetry fails. It does not imply the stronger property “asymmetric.”

Transitivity and Vacuous Truth

Transitivity asks whether every two-step connection x→y→zx\to y\to z already has a direct edge x→zx\to z. The elements x,y,zx,y,z need not be distinct. In particular, x→y→xx\to y\to x requires a loop at xx.

Three fully specified digraphs: a single directed edge, a two-edge chain without a shortcut, and a pair of opposite edges without loops

Figure 2. The left graph has no two-step connection. The middle graph lacks 1→3. The right graph permits a return to the starting vertex but has no loops. All vertices and edges are shown.

Example: Testing transitivity with digraphs. The edge sets in Figure 2 are T1={(1,2)}T_1=\{(1,2)\}, T2={(1,2),(2,3)}T_2=\{(1,2),(2,3)\}, and T3={(1,2),(2,1)}T_3=\{(1,2),(2,1)\}, on {1,2}\{1,2\}, {1,2,3}\{1,2,3\}, and {1,2}\{1,2\}, respectively. Determine whether each relation is transitive and explain why.

Show solution and steps

T1T_1 is transitive because no two edges can be followed consecutively. The premise of the implication is always false, so the implication is true. This is vacuous truth, which also explains why the empty relation is transitive.

T2T_2 is not transitive: (1,2),(2,3)∈T2(1,2),(2,3)\in T_2, but (1,3)∉T2(1,3)\notin T_2.

T3T_3 is not transitive: (1,2),(2,1)∈T3(1,2),(2,1)\in T_3, but (1,1)∉T3(1,1)\notin T_3. The reverse two-step connection also requires the missing (2,2)(2,2). Adding both loops produces the universal relation on {1,2}\{1,2\}, which is transitive.

Having no two-step connection makes transitivity hold vacuously. Finding one edge that cannot be continued does not settle the property: a violating two-step connection may occur elsewhere.

Classifying Relations on an Infinite Set

Example: Six relations on the integers. Define the following relations on Z\mathbb Z:

R1={(a,b)∣a≤b},R2={(a,b)∣a>b},R3={(a,b)∣a=b or a=−b},R4={(a,b)∣a=b},R5={(a,b)∣a=b+1},R6={(a,b)∣a+b≤3}.\begin{aligned} R_1&=\{(a,b)\mid a\le b\},& R_2&=\{(a,b)\mid a>b\},\\ R_3&=\{(a,b)\mid a=b\text{ or }a=-b\},& R_4&=\{(a,b)\mid a=b\},\\ R_5&=\{(a,b)\mid a=b+1\},& R_6&=\{(a,b)\mid a+b\le3\}. \end{aligned}

Determine whether each is reflexive, irreflexive, symmetric, antisymmetric, asymmetric, and transitive.

Show solution and steps
RelationReflexive?Irreflexive?Symmetric?Antisymmetric?Asymmetric?Transitive?
R1R_1: a≤ba\le bYesNoNoYesNoYes
R2R_2: a>ba>bNoYesNoYesYesYes
R3R_3: a=±ba=\pm bYesNoYesNoNoYes
R4R_4: a=ba=bYesNoYesYesNoYes
R5R_5: a=b+1a=b+1NoYesNoYesYesNo
R6R_6: a+b≤3a+b\le3NoNoYesNoNoNo

The main arguments are:

  • For R1R_1, a≤ba\le b and b≤ab\le a imply a=ba=b, giving antisymmetry. The transitivity of ≤\le gives transitivity of R1R_1. For R2R_2, neither loops nor pairs in both directions can occur.
  • For R3R_3, exchanging a,ba,b preserves the condition, and a=±ba=\pm b, b=±cb=\pm c imply a=±ca=\pm c. However, 1 and −1-1 are distinct and related in both directions, disproving antisymmetry.
  • R4=IZR_4=I_{\mathbb Z} contains only loops. It is symmetric, antisymmetric, and transitive.
  • For R5R_5, a=b+1a=b+1 and b=c+1b=c+1 imply a=c+2a=c+2, not a=c+1a=c+1. Specifically, (2,1)(2,1) and (1,0)(1,0) belong, but (2,0)(2,0) does not.
  • For R6R_6, (1,1)(1,1) is present but (2,2)(2,2) is absent, so it is neither reflexive nor irreflexive. Commutativity of addition gives symmetry. Both (1,2)(1,2) and (2,1)(2,1) are present, disproving antisymmetry; they also require the missing (2,2)(2,2) for transitivity.

3. Counting Relations on Finite Sets

If ∣A∣=m|A|=m and ∣B∣=n|B|=n, then ∣A×B∣=mn|A\times B|=mn. Each possible pair can independently be included or excluded. Thus there are 2mn2^{mn} relations from AA to BB.

On a set AA with nn elements, there are 2n22^{n^2} relations. A reflexive relation must include all nn diagonal pairs; the remaining n2−nn^2-n pairs are freely chosen. The number of reflexive relations is therefore

2n2−n=2n(n−1).2^{n^2-n}=2^{n(n-1)}.

An irreflexive relation instead excludes every diagonal pair, leaving the same number of free choices and hence the same count.

Example: Relations on three elements. For A={a,b,c}A=\{a,b,c\}, how many relations are there in total? How many are reflexive, and how many are irreflexive?

Show solution and steps

There are nine possible pairs, giving 29=5122^9=512 relations. Fixing the three diagonal positions leaves six free positions, so there are 26=642^6=64 reflexive relations and 64 irreflexive relations. The remaining 512−64−64=384512-64-64=384 are neither reflexive nor irreflexive.

Extension: Count diagonal positions and unordered pairs separately. For each pair of distinct elements {a,b}\{a,b\}, a symmetric relation may include both directions or neither. An antisymmetric relation has three choices: neither direction, only (a,b)(a,b), or only (b,a)(b,a).

PropertyNumber of relations
Symmetric2n+(n2)2^{n+\binom n2}
Antisymmetric2n3(n2)2^n3^{\binom n2}
Asymmetric3(n2)3^{\binom n2}
Reflexive and symmetric2(n2)2^{\binom n2}

Asymmetry forces every diagonal position to be zero. Transitivity links choices at different positions, so the “choose each position independently” argument does not apply to counting transitive relations.

4. Review and Self-Check

A useful checking order is: specify the underlying set, check loops, check reversed pairs between distinct elements, and finally examine all two-step connections. Use arbitrary elements to prove a property and specific elements to disprove it.

  1. Which properties does the empty relation have when A≠∅A\ne\varnothing?
  2. Does symmetry together with transitivity imply reflexivity?
  3. Is divisibility on the positive integers reflexive, symmetric, antisymmetric, and transitive?
Show self-check answers
  1. It is irreflexive, symmetric, antisymmetric, asymmetric, and transitive, but not reflexive. Premises requiring a pair in the relation cannot hold.
  2. No. The empty relation on a nonempty set is a counterexample. Even a nonempty relation may leave some elements isolated; for an arbitrary aa, one cannot simply assume the existence of bb with aRbaRb.
  3. It is reflexive, antisymmetric, and transitive, but not symmetric. If a∣ba\mid b and b∣cb\mid c, write b=akb=ak and c=bℓc=b\ell to get c=a(kℓ)c=a(k\ell). Positivity ensures that mutual divisibility implies equality. The pair (1,2)(1,2) is present while (2,1)(2,1) is absent.

Glossary and Sources

TermMeaning or notation
Ordered pair(a,b)(a,b); component order matters
Cartesian productA×BA\times B
Binary relationR⊆A×BR\subseteq A\times B
Inverse relationR−1R^{-1}; reverse the components of every pair
Identity relationIAI_A; all loops on AA
Vacuous truthAn implication is true when its premise cannot hold
  • Course slides. Figure 1 is cropped from the original digraph property illustrations.

  • Rosen, 8th edition, Section 9.1: printed pages 600–605, PDF pages 623–628. The counting extension corresponds to Exercise 49 on printed page 610; the invalid reflexivity argument in the self-check corresponds to Exercise 51.

  • Figure 2 is drawn from the definition of transitivity and the counterexamples stated in the text. Its complete edge sets are stated in the text. The irreflexive and asymmetric columns in the integer example, and the expanded reasoning, are supplementary derivations.

Assigned textbook exercises: Section 9.1, Exercises 4 and 6, on properties of real-world relations and relations on the real numbers. Both are on printed page 608, PDF page 631. The remaining operation exercises are listed in the next note.

Updated:

RelationsProperties