Binary Relations

Definition. A binary relation on a set S is a subset of the Cartesian product $S \times S$ .

This definition is so abstract that you may find it difficult to see how this is connected to the ordinary idea of things being "related". Here's the idea.

A relationship between two objects is something like

"x is the father of y", or

"x is greater than y", or

"x and y have the same color", or

"$x^2 + y^2 = 4$ .

Look at "x is the father of y". Your experience in the real world tells you what this means --- how you would verify that a given person is the father of another person. But another way to define the "father" relationship would be to make a list of all father-child pairs. For example, if Bonzo has a son named Wickersham and a daughter named Gordinier, then the pairs

$$(\hbox{Bonzo},\hbox{Wickersham}) \quad\hbox{and}\quad (\hbox{Bonzo},\hbox{Gordinier})$$

would be on the "father" list.

You can see that these are ordered pairs --- elements of the Cartesian product

$$\hbox{people} \times \hbox{people}.$$

And a little thought shows that any binary (two-element) relationship can be defined in this way. That's why the formal definition I gave above makes sense.

Example. Suppose $S = \{1, 2, 3, 4\}$ . The relation $x < y$ on S is the set

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

For example, $(1,4)$ is in the set, because $1 < 4$ .

Sometimes it's convenient to draw the graph of a relation. Here's the graph of $x <
   y$ on S:

$$\hbox{\epsfysize=1.5in \epsffile{relations1.eps}}$$

As usual, I'm using the horizontal axis for the first component and the vertical axis for the second component.

Example. The relation $x y^3 - x^3 y = 6$ on $\real$ consists of all points $(x,y)$ which satisfy the equation. For example, the point $(1,2)$ is in the relation.

The graph of the relation looks something like this

$$\hbox{\epsfysize=1.5in \epsffile{relations2.eps}}\quad\halmos$$

Example. Consider the relation on the set $S = \{a, b, c, d\}$ whose graph is shown below.

$$\hbox{\epsfysize=1.5in \epsffile{relations3.eps}}$$

The relation is the set of pairs

$$\{(b,a), (b,c), (c,b), (c,c), (c,d), (d,b), (d,d)\}.$$

It's common in math to use infix notation for relations. This means that instead of writing an ordered pair $(x,y)$ , you put a relation symbol between x and y --- for example,

$$xRy, \quad\hbox{or}\quad x \oplus y, \quad\hbox{or}\quad x \bowtie y.$$

You can use any symbol you want, though it's best to avoid symbols like "$=$ " or "$>$ " which have special meanings --- unless that special meaning is what you want. The "R" isn't very fancy, but it's often used; with this notation, the relation above would be

$$bRa, bRc, cRb, cRc, cRd, dRb, dRd.\quad\halmos$$

Definition. A relation $\sim$ on a set S is an equivalence relation if:

  1. (Reflexivity) $s \sim s$ for all $s
   \in S$ .
  2. (Symmetry) For all $s, t \in S$ , if $s \sim t$ , then $t \sim s$ .
  3. (Transitivity) For all $s, t, u \in
   S$ , if $s \sim t$ and $t \sim u$ , then $s \sim u$ .

An equivalence relation is meant to capture the idea of things "being the same" for the purposes of a given discussion. Here's a real-world example. Suppose you plan to drive to the movies. With that intention alone in mind, there are many things about the car you drive that aren't important --- what color it is, how many miles it's been driven, whether the windshield is tinted, and so on. You care only about the car being suitable for transporting you to the movies. So any two cars --- whatever their color, mileage, or windshield tint, for instance --- {\it are the same for your purposes} if either will get you to the movies. The equivalence relation on the set of cars is that two cars are equivalent if both will get you to the movies or both will not get you to the movies.

Example. Equality of integers, rational numbers, real numbers, or complex numbers is an equivalence relation.

Example. The less-than relation $<$ on the set of real numbers is not an equivalence relation.

For no real number x is it true that $x < x$ , so reflexivity never holds.

If x and y are real numbers and $x <
   y$ , it is false that $y < x$ . For example, $3 <
   4$ is true, but $4 < 3$ is false.

It is true that if $x < y$ and $y < z$ , then $x < z$ . Thus, $<$ is transitive.

Suppose instead I consider less-than-or-equal-to, the relation $\le$ on $\real$ .

Reflexivity now holds, since for any $x \in \real$ it is true that $x \le x$ . Transitivity holds just as before.

However, symmetry still doesn't hold: $3 \le 4$ , but $4 \not\le 3$ . Thus, $\le$ is not an equivalence relation.

Example. (a) Is the relation whose graph is drawn below an equivalence relation?

$$\hbox{\epsfysize=1.5in \epsffile{relations4.eps}}$$

The relation is not an equivalence relation. $(b,b)$ is not in the relation, so the relation is not reflexive.

(b) Is the relation whose graph is drawn below an equivalence relation?

$$\hbox{\epsfysize=1.5in \epsffile{relations5.eps}}$$

$(c,b)$ is in the relation, but $(b,c)$ is not. Therefore, the relation is not symmetric, so it's not an equivalence relation.

(c) Is the relation whose graph is drawn below an equivalence relation?

$$\hbox{\epsfysize=1.5in \epsffile{relations6.eps}}$$

This relation is reflexive and symmetric. However, $(b,c)$ and $(c,a)$ are in the relation, but $(b,a)$ is not. The relation is not transitive, and therefore it's not an equivalence relation.

Example. ( Modular arithmetic) Let n be a positive integer. Integers x and y are congruent mod n if $x - y$ is divisible by n. Notation: $x = y \mod{n}$ .

Congruence mod n is an equivalence relation on $\integer$ . Another way to express congruence mod n is: x and y are congruent mod n if x and y leave the same remainder on division by n. But the first definition is easier to use.

To make things concrete, I'll do this with $n = 3$ , but any positive n will do.

Let $x \in \integer$ . $x - x =
   0$ , which is divisible by 3. Therefore, $x = x \mod{3}$ , and congruence mod 3 is reflexive.

Let $x, y \in \integer$ . Suppose $x = y \mod{3}$ . This means 3 divides $x - y$ , so $x = y
   = 3k$ for some integer k. Then $y - x = 3(-k)$ , which means 3 divides $y - x$ . Hence, $y = x \mod{3}$ , and congruence mod 3 is symmetric.

Let $x, y, z \in \integer$ . Suppose $x = y \mod{3}$ and $y = z \mod{3}$ . This means that 3 divides $x - y$ and $y - z$ , so

$$x - y = 3j \quad\hbox{and}\quad y - z = 3k \quad\hbox{for some}\quad j, k \in \integer.$$

Add the two equations:

$$x - z = 3(j + k).$$

This means 3 divides $x - z$ , so $x = z \mod{3}$ . Thus, congruence mod 3 is transitive, and hence, it's an equivalence relation.

Contact information

Bruce Ikenaga's Home Page

Copyright 2008 by Bruce Ikenaga