Relations

Relations
Margaret M. Fleck
15 November 2010
These notes cover relations, with a special emphasis on equivalence relations. The corresponding sections of Rosen are 8.1, 8.3, and 8.5.
1
Relations
A relation R on a set A is a subset of A × A, i.e. R is a set of ordered pairs
of elements from A. If R contains the pair (x, y), we say that x is related to
y, or xRy in shorthand.1 We’ll write x 6 Ry to mean that x is not related to
y.
For example, suppose we let A = {2, 3, 4, 5, 6, 7, 8}. We can define a
relation W on A by xW y if and only if x ≤ y ≤ x + 2. Then W contains
pairs like (3, 4) and (4, 6) and (5, 5), but not the pairs (6, 4) and (3, 6). We
can draw pictures of relations using directed graphs, with an arrow joining
each pair of elements that are related. E.g. W looks like:
2
3
4
5
6
7
8
In fact, there’s very little formal difference between a relation on a set
A and a directed graph, because graph edges can be represented as ordered
1
The textbook writes (x, y) ∈ R for the first few sections and then switches to this
shorthand. I find the shorthand much easier to read.
1
pairs of endpoints. They are two ways of describing the same situation.
We can define another relation S on A by saying that xSy is in S if x ≡ y
(mod 3). Then S would look like:
2
3
4
6
7
8
5
Or, suppose that B = {2, 3, 4, 5, 6, 12, 25}. Let’s set up a relation T on B
such that xT y if x|y and x 6= y. Then our picture would look like
25
12
6
5
4
3
2
Mathematical relations can also be used to represent real-world relationships, in which case they often have a less regular structure. For example,
suppose that we have a set of students and student x is related to student y
if x nominated y for ACM president. The graph of this relation (call it Q)
might look like:
Ginger
Fred
Steve
Julie
Alan
Henry
Bill
2
Relations can also be defined on infinite sets or multi-dimensional objects.
For example, we can define a relation Z on the real plane R2 in which (x, y)
is related to (p, q) if and only if x2 + y 2 = p2 + q 2. In other words, two points
are related if they are the same distance from the origin.
For complex relations, the full directed graph picture can get a bit messy.
So there are simplified types of diagrams for certain specific special types of
relations, e.g. the so-called Hasse diagram for partial orders.
2
Properties of relations: reflexive
Relations are classified by several key properties. The first is whether an
element of the set is related to itself or not. There are three cases
• Reflexive: every element is related to itself.
• Irreflexive: no element is related to itself.
• Neither reflexive nor irreflexive: some elements are related to themselves but some aren’t.
In our pictures above, elements related to themselves have self-loops. So it’s
easy to see that W and S are reflexive, T is irreflexive, and Q is neither.
The familiar relations ≤ and = on the real numbers are reflexive, but < is
irreflexive. Suppose we define a relation M on the integers by xMy if and
only if x + y = 0. Then 2 isn’t related to itself, but 0 is.
The formal definition states that if R is a relation on a set A then
• R is reflexive if xRx for all x ∈ A.
• R is irreflexive if x 6 Rx for all x ∈ A.
Notice that irreflexive is not the negation of reflexive. The negation of
reflexive would be:
• not reflexive: there is an x ∈ A, x 6 Ry
3
3
Symmetric and antisymmetric
Another important property of a relation is whether the order matters within
each pair. That is, if (x, y) is in R, is (y, x) always in R? A relation satisfying
this property is called symmetric. In a graph picture of a symmetric relation,
a pair of elements is either joined by a pair of arrows going in opposite
directions, or no arrows. In our examples with pictures above, only S is
symmetric.
Relations that resemble equality are normally symmetric. For example,
the relation X on the integers defined by xXy iff |x| = |y| is symmetric. So
is the relation N on the real plane defined by (x, y)N(p, q)) iff (x − p)2 + (y −
q)2 ≤ 25 (i.e. the two points are no more than 5 units apart).
Relations that put elements into an order, like ≤ or divides, have a different property called antisymmetry. A relation is antisymmetric if two distinct
elements are never related in both directions. In a graph picture, a pair of
points may be joined by a single arrow, or not joined at all. In our pictures
above, W and T are antisymmetric.
As with reflexivity, there are mixed relations that have neither property.
So the relation Q above is neither symmetric nor antisymmetric.
If R is a relation on a set A, here’s the formal definition of what it means
for R to be symmetric (which doesn’t contain anything particularly difficult):
symmetric: for all x, y ∈ A, xRy implies yRx
There’s two ways to define antisymmetric. They are logically equivalent
and you can pick whichever is more convenient for your purposes:
antisymmetric: for all x and y in A with x 6= y, xRy implies y 6 Rx
antisymmetric: for all x and y in A, xRy and yRx implies x = y
To interpret the second definition, remember that when mathematicians
pick two values x and y, they leave open the possibility that the two values are
actually the same. If we said that in normal conversational English, we would
normally mean that they had to be different. I find that the first definition
4
is better for understanding the idea of antisymmetry, but the second is more
useful for writing proofs.
4
Transitive
The final important property of relations is transitivity. A relation R on a
set A is transitive if
transitive: for all a, b, c ∈ A, aRb and bRc implies that aRc
You’ve probably seen transitivity before, because it holds for a broad
range of familiar numerical relations such as <, =, divides, and set inclusion.
For example, for real numbers, if x < y and y < z, then x < z. Similarly, if
x|y and y|z, then x|z. For sets, X ⊆ Y and Y ⊆ Z implies that X ⊆ Z.
If we look at graph pictures, transitivity means that whenever there is a
path from x to y then there must be a direct arrow from x to y. This is true
for S and B above, but not for W or Q.
We can also understand this by spelling out what it means for a relation
R on a set A not to be transitive:
not transitive: there are a, b, c ∈ A, aRb and bRc and a 6 Rc
So, to show that a relation is not transitive, we need to find one counterexample, i.e. specific elements a, b, and c such that aRb and bRc but not
aRc. In the graph of a non-transitive relation, you can find a subsection that
looks like:
b
a
c
5
It could be that a and c are actually the same element, in which case the
offending subgraph might look like:
a
b
The problem here is that if aRb and bRa, then transitivity would imply
that aRa and bRb.
One subtle point about transitive is that it’s an if/then statement. So
it’s ok if some sets of elements just aren’t connected at all. For example, this
subgraph is consistent with the relation being transitive.
a
b
c
A disgustingly counter-intuitive special case is the relation P = ∅ on
any non-empty set, i.e. the relation in which no elements are related to one
another. It’s transitive, because it’s never possible to satisfy the hypothesis
of the definition of transitive. It’s also symmetric, for the same reason. And,
oddly enough, antisymmetric.
This special-case relation is irreflexive and not reflexive. Unlike symmetry
and transitivity, reflexivity unconditionally requires that pairs of the form
(x, x) must be in the relation. In this case, they aren’t.
5
Types of relations
Now that we have these basic properties defined, we can define three important classes of relations:
• An equivalence relation is a relation that is reflexive, symmetric, and
6
transitive.
• A partial order is a relation that is reflexive, antisymmetric, and transitive.
• A strict partial order is a relation that is irreflexive, antisymmetric,
and transitive.
Equivalence relations act like equality, partial orders act like ≤ or ≥, and
strict partial orders act like < or >. In the picture examples above, S is an
equivalence relation and T is a strict partial order. If we pick some collection
of sets, then the set inclusion relation ⊆ (no picture) would be a (non-strict)
partial order on them.
6
Equivalence relations: the idea
Equivalence relations are relations that are reflexive, symmetric, and transitive (RST). They are like equality except that they treat certain groups of
elements as equivalent to one another.
For example, consider congruence mod 12. The congruence relation treats
all numbers with remainder zero (0, 12, -12, 24, . . . ) as if they were equal.
Similarly, the numbers with remainder 3 (3, -9, 15, -21, . . . ) are treated as
equal. We have divided up the integers into 12 subsets, which don’t overlap
with one another. This is called a partition of the set of integers.
Let’s name the subsets by their remainders: [0], [1], . . . [11]. So, these are
like the 12 hours on the dial of a clock. After [11], you go back to [0] again.
Or maybe you go to [12] and then to [1] after that. One hour has two names:
0 or 12. Others have multiple names if you move back and forth between
12 and 24 hour clocks, e.g. 1800h is the same as 6pm. I.e. [18] and [6] are
names for the same hour.
We can now treat each subset as if all its members were merged into a
single object and define operations on these merged objects, using modular
arithmetic. For example, if we add 2 hours to 11 o’clock, we get 1 o’clock.
In our new notation: [2] + [11] = [1]. In general:
7
[x] + [y] = [(x + y) mod 12]
We can now give a friendly name to this new set of objects. In this case,
it’s the integers mod 12, written Z12 .
This trick is widely used in mathematics to create new sets of objects such
as modular integers, the real numbers, the rationals. It’s even used to do a
mathematical version of cut-and-paste to create strange sorts of geometrical
objects such as Möbius strips.
This construction only works for equivalence relations because the three
properties of an equivalence relation are needed to guarantee that we can
neatly partition up the set. Also, we need to ensure that the definition of
the proposed operation (in this case, addition) works correctly on our new
subset-objects.
7
Equivalence classes
Let’s define some terminology. Suppose that R is an equivalence relation on
a set A. For each element x ∈ A, we define the equivalence class of x to be
the set of all elements related to x. That is
[x]R = {y ∈ A | xRy}
(The R subscript on the square brackets is only written when we want to
be especially clear about which relation is being used.)
So, for example, if the relation is congruence mod 12, here are some
equivalence classes
[2] = {. . . , −22, −10, 2, 14, 26, . . .}
[6] = {. . . , −18, −6, 6, 18, . . .}
[18] = {. . . , −18, −6, 6, 18, . . .}
Notice that [6] and [18] are equal. That is, they are two names for the
same subset of the integers. Other names for this same subset include [40],
8
and [−18]. To refer to an equivalence class, we pick any element of the class
as its representative.
Every equivalence relation has a corresponding set of equivalence classes.
For example, suppose we define a relation T on pairs of integers by (x, y)T (p, q)
if and only if x2 + y 2 = p2 + q 2 . Then [(1, 0)] is the circle with radius 1 centered at the origin. And, in general, each equivalence class is a different circle
centered at the origin, except for [(0, 0)] which is a single point.
Or, suppose we consider all functions from the reals to the reals. We can
then define f ∼ g if and only if f = Θ(g). That is, we group together all
functions with the same big-O growth rate. Then [x2 ] contains all functions
that grow quadratically, e.g.
[x2 ] = {x2 , 3x2 + 17, 2x2 + log x, x2 + x, . . .}
We could also make up an equivalence relation so that it follows some type
of real-world relationship. For example, suppose we took all the students in
this classes and divided you up into teams. Each team would then be an
equivalence class. The corresponding relation must then relate two students
exactly when they belong to the same team. If Fred and Sally are both
members of the same team, we could refer to it as “Fred’s team” or also as
“Sally’s team.” People in the class would know that these two names referred
to the same team.
8
Defining datatypes with equivalence relations
An important use of equivalence classes is in defining new datatypes. Suppose
that someone has given us the integers and we want to define the rational
numbers. Let’s define F to be the set of fractions with non-zero denominator.
A fraction is just a pair of integers, written funny. Now define an equivalence
relation ∼ on F by
x
y
∼
p
q
if and only if xq = yp.
9
This is the equivalence relation used to define rational numbers. A fraction xy represents the same rational number as pq if and only if xq = yp. Then
[ 43 ] and [ 12
] are two names for the same rational number.
16
We can now give a friendly name to our new set: the rational numbers,
written Q. And we can define how operations such as addition and multiplication are supposed to work on these new numbers (see next lecture). This
mathematical description of the rationals could then be used to implement
a new datatype “rational” for your favorite programming language.
For this class, we’ll try to be careful about writing the square brackets around equivalence classes. However, once all the basic properties of a
datatype have been established, it’s not uncommon to drop the brackets. For
example, people typically write fractions without the square brackets around
it. But the idea hasn’t changed: when we say “the rational number xy ”, we
mean xy to be a representative of the whole set of equivalent fractions.
Similarly, many computer languages have a built-in datatype for strings.
These are usually case-sensitive, so that “Uiuc”, “uiuc”, and “UIUC” would
be considered three different objects. For many language-processing applications, we’d like to consider them the same. So, mathematically, we could
define an equivalence relation that relates a pair of strings if and only if they
are the same except for case differences. Then these three things would all
be in the same equivalence class [uiuc].
9
Partitions
Equivalence relations are used to divide up a set A into equivalence classes,
each of which can then be treated as a single object. E.g. all the equivalence
fractions are treated as a single rational number. This only works properly
if the equivalence classes divide up the set neatly: they cover the whole
set A, they don’t overlap, and every equivalence class contains at least one
representative element. Cutting up A neatly is called being a partition of A.
Knowing that we have a partition means that we don’t have to worry
about how to handle annoying situations like partial overlap between two
equivalence classes. This is particularly important when defining operations
such as addition (e.g. of rationals). How would we define addition if one of
10
the input equivalence classes had nothing in it?
Formally, a partition of a set A is a collection of non-empty subsets of
A which cover all of A and don’t overlap. Specifically, if the subsets are
A1 , A2 , . . . An , then they must satisfy three conditions:
1. A1 ∪ A2 ∪ . . . ∪ An = A
2. Ai 6= ∅ for all i
3. Ai ∩ Aj = ∅ for all i 6= j.
A partition can contain an infinite set of subsets. To cover this possibility,
we need to use a more general notation. Let P be our partition. then the
three conditions are:
1.
S
X∈P
X =A
2. X 6= ∅ for all X ∈ P
3. X ∩ Y = ∅ for all X, Y ∈ P , X 6= Y
Any partition P has a corresponding equivalence relation. Specifically,
we define x ∼ y if and only if x and y are in the same element of P . This
relation is obviously reflexive, symmetric, and transitive.
Less obviously, if we start with any equivalence relation on A, its equivalence classes form a partition of A. See section 16 for a proof. This only
works for equivalence relations, not for other types of relations. For example,
suppose we started with a relation that wasn’t transitive, e.g. the relation R
on the integers defined by xRy if and only if |x − y| ≤ 2. Applying the definition of equivalence class, we get [3] = {1, 2, 3, 4, 5} and [5] = {3, 4, 5, 6, 7}.
This isn’t so good, because [3] and [5] overlap partly, but aren’t equal.
10
Proving that a relation is an equivalence
relation
So far, I’ve assumed that we can just look at a relation and decide if it’s an
equivalence relation. Suppose someone asks you (e.g. on an exam) to prove
11
that something is an equivalence relation. These proofs just use techniques
you’ve seen before. Let’s do a couple examples.
First, remember that we had defined the set of fractions F to contain all
fractions xy where x, y ∈ Z and y 6= 0. We constructed the rational numbers
from the fractions by defining certain pairs of fractions to be equivalent.
Specifically, our equivalence relation ∼ was defined by: xy ∼ pq if and only if
xq = yp.
Let’s show that ∼ is an equivalence relation.
Proof: Reflexive: For any x and y, xy = xy. So the definition of
∼ implies that xy ∼ xy .
Symmetric: if xy ∼ pq then xq = yp, so yp = xq, so py = qx, which
implies that pq ∼ xy .
Transitive: Suppose that xy ∼ pq and pq ∼ st . By the definition of
∼, xq = yp and pt = qs. So xqt = ypt and pty = qsy. Since
ypt = pty, this means that xqt = qsy. Cancelling out the q’s, we
get xt = sy. By the definition of ∼, this means that xy ∼ st .
Since ∼ is reflexive, symmetric, and transitive, it is an equivalence
relation.
Notice that the proof has three sub-parts, each showing one of the key
properties. Each part involves using the definition of the relation, plus a
small amount of basic math. The reflexive case is very short. The symmetric
case is often short as well. Most of the work is in the transitive case.
There are relations for which one or the other property is hard to prove.
Sometimes even reflexive can require some work. But it’s more typical for
these proofs to be almost mechanical.
11
Proving antisymmetry
Here’s another example of a relation, this time an order (not an equivalence)
relation. Consider the set of intervals on the real line J = {(a, b) | a, b ∈
R and a < b}. Define the containment relation C as follows:
12
(a, b) C (c, d) if and only if a ≤ c and d ≤ b
Let’s show that C is antisymmetric. For proofs, it’s typically easiest to
use this form of the definition of antisymmetry: if xRy and yRx, then x = y.
Notice that C is a relation on intervals, i.e. pairs of numbers, not single
numbers. If we substitute the definition of C into the definition of antisymmetric, what we need to show is that (a, b) C (c, d) and (c, d) C (a, b) implies
that (a, b) = (c, d).
So, suppose that we have two intervals (a, b) and (c, d) such that (a, b) C (c, d)
and (c, d) C (a, b). By the definition of C, (a, b) C (c, d) implies that a ≤ c
and d ≤ b. Similarly, (c, d) C (a, b) implies that c ≤ a and b ≤ d.
Since a ≤ c and c ≤ a, a = c. Since d ≤ b and b ≤ d, b = d. So
(a, b) = (c, d).
12
Proving that an operation is well-defined
We’ve used equivalence classes to define new types of objects, such as rational
numbers. To do anything with these new data types, we need to define
operations on them, such as addition and multiplication. Given that we
know how to do arithmetic on integers, we can define addition of fractions
by
x p
xq + py
+ =
y q
yq
We’d like to apply this definition to our new rational numbers, by simply
throwing equivalence class brackets around the inputs and outputs:
x
p
xq + py
[ ]+[ ]=[
]
y
q
yq
To work right, the output of this definition should not depend on which
] should
representative we pick for the input equivalence classes. E.g. [ 23 ]+ [ 10
2
−4
be equal to (say) [ −6
] + [ 51 ]. In math jargon, we say that we want to make
sure the operation is well-defined on the equivalence classes.
13
] . Then [ 32 ] ⊘ [ 10
]=
Suppose we defined a function ⊘ by [ xy ] ⊘ [ pq ] = [ xy
pq
2
6
[ 20 ]. Suppose we pick different representatives for the two input equivalence
−4
classes: [ −6
] ⊘ [ 15 ] = [ 24
]. This produces a different output equivalence class
5
24
6
because 20 6∼ 5 . So this function isn’t well-defined, a diplomatic way of
saying that this is a buggy definition that doesn’t work right.
Let’s prove that our definition of rational addition is well-defined. Suppose that we pick two different representatives for each input: xy ∼ wv and
p
∼ rs . Then we need to show that the two outputs we get are equivalent:
q
xq+py
∼ vs+wr
yq
ws
Since
x
y
∼
Since
p
q
∼ rs , ps = qr. So psyw = qryw.
v
,
w
xw = yv. So xwqs = yvqs.
Adding these equations together: xwqs + psyw = yvqs + qryw. So (xq +
py)ws = (vs + wr)yq. So, by the definition of ∼, xq+py
∼ vs+wr
.
yq
ws
13
Rays in space
Let’s see another, more complex, example of an equivalence relation. Specifically, let’s model the set of rays from the origin out to infinity in 3D. Constructions similar to this are often used to model physical systems such as
cameras.
Let A = R3 . That is, A is 3D space. We would like to treat two points
as equivalent if they lie on the same ray. That is:
(x, y, z) ∼ (p, q, r) if and only if there is a positive real number λ
such that (x, y, z) = λ(p, q, r) i.e. x = λp, y = λq, and z = λr.
Each equivalence class of ∼ is a ray from the origin, except that the
origin is in a separate equivalence class all by itself. For example, [(3, 2, 7)]
is the ray passing through the point (3, 2, 7) and it contains other points like
(1.5, 1, 3.5) and (3.75, 2.5, 8.75).
Let’s prove that ∼ is an equivalence relation. [In lecture, I’ll probably
only actually do transitivity.]
14
Reflexive: If λ = 1, then (x, y, z) = λ(x, y, z). So (x, y, z) ∼ (x, y, z).
Symmetric: Suppose (x, y, z) ∼ (p, q, r) Then there is a positive real λ
such that (x, y, z) = λ(p, q, r). But then (p, q, r) = λ1 (x, y, z). So (p, q, r) ∼
(x, y, z). If λ is a positive real, so is λ1 .
Transitive: Suppose that (x, y, z) ∼ (p, q, r) and (p, q, r) ∼ (a, b, c).
Then there are positive reals λ and κ such that (x, y, z) = λ(p, q, r) and
(p, q, r) = κ(a, b, c). Substituting the second equation into the first, we get
that (x, y, z) = λκ(a, b, c). Since λ and κ are positive reals, so is λκ. So by
the definition of ∼, (x, y, z) ∼ (a, b, c).
Since ∼ is reflexive, symmetric, and transitive, it is an equivalence relation.
14
Defining real numbers via equivalence classes
Now, suppose that we know about the integers (and maybe the rational
numbers) and we would like to define the real numbers. One way to do
this is using equivalence classes. To make this simple, let’s just worry about
defining the real numbers between 0 and 1. If you can do that, it’s not hard
to define the full set of real numbers.
Suppose D = {0, 1, 2, . . . , 9} is the set of decimal digits. Let’s make a set
S containing all infinite sequences of digits. Each sequence will represent the
decimal representation of a real. Formally, each sequence is a function from
the natural numbers to the digits. That is, S = {f a function | f : N → D}
So S is the set of real numbers, right? Well, sort of. The difficulty is that
many reals have two representations, one ending in an infinite sequence of
zeros and one ending in an infinite sequence of nines. So, we need to set up an
equivalence relation ∼ that relates each sequence ending in an infinite string
of nines with the sequence that contains the next larger number followed by
an infinite sequence of zeros. 0.8789999 . . . ∼ 0.879000 . . .. The real numbers
between zero and one are then the equivalence classes of this relation ∼, i.e.
we merge each pair of equivalent decimals into a single object.
15
15
Mathematical glue
We can also use equivalence classes to cut-and-paste geometrical objects. For
example, consider the interval I = [0, 1] of the real line. You can think of it
like a piece of string. If we were to glue together the two ends of the string,
we would get a little loop or circle of string.
To do this mathematically, we create an equivalence relation S in which
most points are in their own one-element equivalence class, but 0 and 1 are
in the same equivalence class. That is, that xSy if x = y, or if x = 0 and
y = 1, or x = 1 and y = 0. Then I/S is the equivalence classes of I under
the relation S and I/S is a loop.
Now, let’s see how to construct a Möbius strip. A physical Möbius strip
is made by taking a strip of paper, giving it a half twist, and taping the ends
together. This object is neat, because it has only one side (not two) and only
one edge.
To define a Möbius strip mathematically, we select a rectangular piece of
the real plane, e.g. [0, 1] × [0, 1], i.e. all the points with both coordinates
between 0 and 1 (inclusive). Let’s call this patch of 2D surface I 2 .
We can define various equivalence relations on I, thereby glueing I to
itself in different ways. First, suppose we define R by (x, y)R(p, q) if
• (x, y) = (p, q) or
• y = q, x = 0, and p = 1, or
• y = q, x = 1, and p = 0.
Then the set of equivalence classes I 2 /R is mostly like I 2 , except that we’ve
glued together the left and right edges of I 2 . So it’s a tube.
Similarly, if we also glue the top of I 2 to the bottom, we’ll get a torus.
If we merge all the edge points of I 2 into one point, we’ll get a sphere. We
could do that with the relation Q in which (x, y)Q(p, q) if and only if
• (x, y) = (p, q) or
16
• at least one coordinate of (x, y) and at least one coordinate of (p, q)
come from the set {0, 1}
Now, suppose that we set up the following equivalence relation T
• (x, y) = (p, q) or
• y = 1 − q, x = 0, and p = 1, or
• y = 1 − q, x = 1, and p = 0.
This merges points on the left and right edges, but attaches the one edge
upside down. Or, viewed another way, we put a half twist into the strip of
surface before we glue the ends. When we merge equivalence points to create
I 2 /T , we have a Möbius strip.
If you carry on like this, you can build up all sorts of interesting and
strange deformed surfaces, starting with pieces of the ordinary 2D plane.
Filling in the details of examples like these could be a bit tricky, beyond
what we plan to put on homeworks or exams. But they illustrate why the
idea of equivalence relations is useful in later mathematics and CS courses.
16
RST implies partition
[This section won’t be covered in lecture and you don’t need to know the
material in it, but some of you might find it interesting.]
Let’s prove that if R is an equivalence relation on a set A, the equivalence
classes of R form a partition of A. First, recall the precise definition of an
equivalence class.
[x]R = {y ∈ A | xRy}
We could have written this definition using yRx in place of xRy. However,
it’s important that we consistently stick to one variant of the definition for
the length of this proof.
17
First, since R is reflexive, xRx for any x ∈ A. So x ∈ [x] for any x ∈ A.
Therefore, no equivalence class is empty and the union of all equivalence
classes is the whole set A. So the only thing that remains to be shown is
that two distinct equivalence classes don’t overlap.
Let x and y be two elements of A and suppose that [x] ∩ [y] 6= ∅. We need
to show that [x] = [y].
Since [x] ∩ [y] 6= ∅, we can pick an element c that is in [x] ∩ [y]. I.e. c ∈ [x]
and c ∈ [y]. By the definition of equivalence class, this means that xRc and
yRc. Since R is symmetric, we also have that cRy. So, by transitivity, xRy.
And, thus by symmetry, yRx.
Here’s a sequence of pictures showing which relationships we know at
each step in this chain of reasoning. Notice that these pictures don’t show
all the edges in the relation, just the ones we’ve verified must be there. For
example, cRx is missing even in the final diagram, because we never need to
explicitly discuss the fact that this relationship also holds.
c
x
c
y
x
c
y
x
c
y
x
y
To show that [x] ⊆ [y], pick any element d ∈ [x]. The definition of [x]
implies that xRd. Since we know that yRx, transitivity implies that yRd.
So d ∈ [y]. A similar argument shows that [y] ⊆ [x]. So [x] = [y].
18