Whereas we talk of functions’ *having a value* for a given argument (or for given argument*s*, which we’re thinking of as a single tuple), a relation is instead something we talk about as *holding* (or not holding) between certain arguments. The most familiar kinds of relations are binary relations, like the relation that holds between `x`

and `z`

when `x`

is a parent of `z`

. But there are also ternary relations, like the relation that holds between `x`

and `y`

and `z`

when `y`

is intermediate in size between `x`

and `z`

. And quaternary relations, and so on. Sometimes **properties** are called “unary relations.”

For a binary relation `R`

, we’d generally write `xRy`

or `Rxy`

to mean that the relation holds between `x`

and `y`

(in that direction; it might not hold between `y`

and `x`

). Often we use symbols (`=`

, `<`

, `⊆`

, `~`

, `≈`

, …) to express relations, rather than letters like `R`

.

Notice that unlike functions, relations *are* permitted to be one-to-many. One `x`

can stand in the `parent`

relation to many `z`

s. But some binary relations are such that whenever they hold between an `x`

and `z`

, they don’t also hold between `x`

and a distinct `z′`

. These relations are called **functional or right-unique.** This generalizes to the ternary case like this: if the relation holds between `x`

and `y`

and `z`

, it doesn’t also hold between `x`

and `y`

and a `z′`

distinct from `z`

.

There is a close affinity between (partial) functions and functional relations. If you have a `(n+1)`

-ary functional relation `R`

, you can define the `n`

-ary partial function which maps an `n`

-tuple (x₁,x₂,...,x_{n}) to a value `z`

iff `R`

holds between x₁,x₂,...,x_{n} and `z`

. (In general, you cannot rely on this being a *total* function; since `R`

may not hold between every choice of arguments in the domain you’re considering and any value `z`

.) And vice versa: given the function, you can define the corresponding functional relation.

The notion of a relation is more general though, since we can have `(n+1)`

-ary relations to which no `n`

-ary function correponds, like the `parent`

relation. In general, there is no function that returns, for any `x`

, *the* `z`

that `x`

is a parent of, since there may be several such `z`

s — `x`

may have several children. (Restricted to certain domains of `x`

s, there *may* be such a function; but in general there won’t be.)

Another way an `(n+1)`

-ary relation could be associated with a function is with the `(n+1)`

-ary (rather than `n`

-ary) function that maps a tuple (x₁,x₂,...,x_{n},x_{n+1}) to the truth-value `true`

if `R`

holds between x₁,x₂,...,x_{n} and x_{n+1}, and to the truth-value `false`

otherwise.

Earlier, we described a translation between a function and the function’s graph, which is a set. There is a similar translation between a relation and its graph. The graph of an `n`

-ary function is a set of `(n+1)`

-tuples, and that would also be the graph of an `(n+1)`

-ary relation (not an `n`

-ary relation).

So some sets, those whose members are tuples, can be “translated” into corresponding functions and/or relations. If the set contains some tuples (x₁,x₂,...,x_{n},z) and (x₁,x₂,...,x_{n},z′), where `z ≠ z′`

, then there is no corresponding `n`

-ary function, but there is still an `(n+1)`

-ary relation.

There’s a different way to translate between sets and functions, akin to our second translation between relations and functions. And this method applies to any set. We say that a set `Γ`

, whose members may be tuples or not, corresponds to a function `f: Γ → 𝟚`

, where `𝟚`

is the set of truth-values, such that `f(g) = true`

if `g ∈ Γ`

, and `f(g) = false`

otherwise. This is known as `Γ`

’s **characteristic function**.

Given all these ways of moving back and forth between sets and functions and relations, it shouldn’t be surprising that many authors will propose to reduce or define some of these notions in terms of others. As I’ve suggested a few times, even if those proposals are correct, we might still reasonably hesitate to build them into our *introductory definitions* of the notions. And thus I’ve refrained from doing that. Nothing we go on to discuss will turn on whether functions, relations, and sets are three different notions, or they should all be defined in terms of sets, or in terms of functions, or a generalization of one of these notions, or anything else.

Vocabulary like “domain,” “injective,” “surjective,” “composition,” and so on is applied to relations in a way analogous to the way it’s applied to functions.
If we talk of a relation’s domain, we’re usually assuming all its arguments come from the same set.
`x`

stands in the **composition** of relation `R₁`

and relation `R₂`

to `z`

(which I’ll write as `(R₂ ∘ R₁)xz`

, but there are other notations) iff there’s some `y`

such that `x`

stands in `R₁`

to `y`

and `y`

stands in `R₂`

to `z`

.

The **inverse** of a relation `R`

is defined to be the relation that holds between `z`

and `x`

iff `R`

holds between `x`

and `z`

. Unlike functions, every relation has an inverse.

Sometimes this is instead called the “converse” of the relation. The “inverse” terminology better parallels the use of “inverse” when we talk about functions. The “converse” terminology better parallels our talk about conditionals: `C ⊃ A`

is the converse, not the inverse, of `A ⊃ C`

.

Relations can hold between elements of different domains. For example, there’s the binary relation between students and grades that holds iff the student ever was given that grade for a class. When a binary relation holds between elements of the same domain `Α`

, the relation is called **homogeneous** (not “homogenous”), or just described as “a relation on `Α`

” or “a relation over `Α`

.”
(This is akin to the notion of a function being an operation.)

Here is vocabulary describing various categories that a given homogeneous relation might fall under:

The

**universal relation**on a domain holds between every pair of elements in the domain (including pairs where it’s the same element taken twice).A relation

`R`

is**reflexive**iff it holds between all of its arguments and themselves. This is just a rough statement of the idea. To refine it, we have to consider cases like these: say, relations that hold between every male parent and himself, and may also hold between him and his children, but don’t hold between any female parents and anything / anyone else. Should we count this relation as reflexive? We might say it’s reflexive on the domain of male parents, but not reflexive on the domain of parents in general. Or we might count a relation as reflexive iff whenever it holds between`x`

and anything, it also holds between`x`

and`x`

. But it’s permitted not to hold between some members of its domain and anything else. (This would be a “partial relation,” akin to the notion of a “partial functon”.) If we said the latter, then the relation could be “reflexive” on the domain of parents in general. Both of these notions are interesting. Standard terminology, though, uses “reflexive” only in the former way. That is, every member of the domain has to stand in the relation to itself.When a relation fails to be reflexive, say that it’s “not reflexive.” There’s also a technical notion of a relation’s being

**irreflexive**. This means that the relation*never*holds between`x`

and`x`

.The

**identity relation**on a domain holds between every element of the domain and itself, and between no other arguments. (So this relation is reflexive, though usually there will be other relations that are reflexive too.)A relation is called

**coreflexive**when it’s a restriction of the identity relation, that is`xRy ⊃ x=y`

. So it*only*holds between`x`

s and themselves — though it need not hold between every`x`

in the domain and itself.A relation

`R`

is**transitive**iff whenver it holds between`x`

and`y`

and between`y`

and`z`

, then it also holds between`x`

and`z`

.When a relation fails to be transitive, say that it’s “not transitive.” There’s also a technical notion of a relation’s being

**intransitive or anti-transitive.**Different authors use different terminology. This means that whenever there are`x`

,`y`

, and`z`

such that the relation holds between`x`

and`y`

and also between`y`

and`z`

, it*never*holds between`x`

and`z`

(that is, for no`x`

,`y`

, and`z`

does that obtain, even when some of these are identical). Partee gives the example of the`is the mother of`

relation among human beings.Observe that

`⊆`

is a transitive relation, and that`∈`

is not a transitive relation, but neither is it intransitive. (Let`Β`

be`{Α}`

and`Γ`

be`{{Α}, Α}`

. Then`Α ∈ Β`

and`Β ∈ Γ`

, but also`Α ∈ Γ`

.)A relation

`R`

is**symmetric**iff whenever it holds between`x`

and`y`

, it also holds between`y`

and`x`

.When a relation fails to be symmetric, say that it’s “not symmetric.” There are also technical notions of a relation’s being

**asymmetric**and its being**anti-symmetric**, which we’ll explain next. They are not the same as the relation’s failing to be symmetric. I don’t think all of this vocabulary is very well-chosen. But unfortunately it is very well-entrenched.A relation is

**asymmetric**iff whenever it holds between`x`

and`y`

, it won’t hold between`y`

and`x`

. (This applies even when`x = y`

, and so it entails that the relation is irreflexive.)A relation is

**anti-symmetric**iff whenever it holds between`x`

and`y`

*for distinct*`x`

and`y`

, it won’t hold between`y`

and`x`

. In other words:`xRy & yRx`

implies`x = y`

. This category doesn’t constrain whether elements do or don’t have the relation to themselves.Asymmetry implies anti-symmetry, but observe that anti-symmetry doesn’t imply asymmetry. It doesn’t even imply a lack of symmetry: for example, the identity relation on a domain can be both symmetrical and anti-symmetrical. Note that none of these symmetry properties require that the relation does hold in one direction or the other between a given

`x`

and`y`

. We’ll discuss requirements like that later.Anti-symmetry plus irreflexivity does imply (is equivalent to) asymmetry.

Some relations are neither symmetrical, nor anti-symmetrical, nor asymmetrical: for example, the relation on

`{1,2,3}`

whose graph is`{(1,2),(2,1),(1,3)}`

.Similarly, some relations are neither reflexive nor irreflexive: for example, the relation on

`{1,2}`

whose graph is`{(1,1),(2,1)}`

.

A relation is called **an equivalence relation** iff it’s reflexive, symmetric, and transitive. The identity relation for a domain is an equivalence relation, but usually there will be other equivalence relations too. Authors often use the symbols `≡`

or `≈`

or `~`

to represent an equivalence relation.

There is a close connection between equivalence relations and partitions of a set, which were defined as: divisions of the set into one or more (non-empty) “cells,” where everything from the original set gets to be in one of the cells, and none of the cells overlap.

Given a partition `P`

of a set `Α`

, there is an equivalence relation defined as “belong to the same cell of `P`

.”

Given an equivalence relation `R`

on domain `Α`

, there is a partition of `Α`

where elements belong to the same cell iff `R`

holds between them. For a specific `a ∈ Α`

, its cell in this partition is sometimes written as [a]_{R}, other times as ⟦a⟧_{R}. When `R`

is clear from context, the subscript is sometimes omitted — though each of the notations `[a]`

and `⟦a⟧`

are also used in other ways in formal literature. (This sort of thing happens all the time. I regret it, but that’s how it is.)

When we talked about functions, we distinguished between “partial” and “total” functions on a domain. (When the qualifier is omitted, in this case it’s assumed to be “total.” We’ll see other cases where an omitted “partial” or “total” is assumed to be “partial.”) The idea here is, does the function give a value for every element of its domain?

When we think about a relation being “total” or “complete” on its domain, there’s a bunch of different properties that could claim to capture at least part of that idea. In this list, the quantifiers are all understood as ranging over `R`

’s domain.

`R`

is**serial or left-total**:`∀x ∃y (xRy)`

`∀x ∀y (x ≠ y ⊃ (xRy ∨ yRx))`

`∀x ∀y (xRy ∨ yRx)`

— this is equivalent to the combination of property (b) plus reflexivity`∀x ∀y (`

exactly one of these three hold:`x = y, xRy, yRx)`

— this is equivalent to the combination of property (b) plus asymmetry`∀x ∀y (xRy)`

— then`R`

is the universal relation on its domain

The terms **complete** and **total** for relations, and also the term **connected,** don’t have uniform usages. Various authors use them for different items from this list (or for yet other notions).
Sometimes (b) is called “weakly connected” and (c) is called “strongly connected”; I’ll use that vocabulary.

Note that property (b) doesn’t constrain whether elements of the domain have the relation to themselves. Maybe they always do; maybe they never do; maybe some do and some don’t.

When for a specific choice of `x`

, `y`

, at least one of `xRy`

or `yRx`

holds, we say that `x`

and `y`

are **comparable** by that relation. So another way to express property (b) is to say that all pairs of distinct objects from the domain are comparable.

Here are some further properties also capturing a kind of completeness for relations:

`∀u ∀x ∀y ((uRx & uRy) ⊃ x`

and`y`

have`R`

to each other`)`

`∀v ∀x ∀y ((xRv & yRv) ⊃ x`

and`y`

have`R`

to each other`)`

These are called **Euclidean** properties. This illustration may help:

Property (f) says that whenever the two relations at the bottom hold (from `u`

to `x`

and to `y`

), then `x`

and `y`

have the relation to each other (the dotted arrows in the middle). Property (g) says that whenever the two relations at the top hold (from `x`

and from `y`

to `v`

), then in that case `x`

and `y`

have the relation to each other. For symmetric relations, transitivity coincides with property (f) and with property (g); but in general being transitive and being Euclidean aren’t the same.
One last kind of completeness for relations that we’ll be referring to is called **being dense**, and is defined like this:

`∀x ∀z (xRz ⊃ ∃y (xRy & yRz))`

Note that this allows that `y`

may be identical to `x`

or `z`

.

In all cases the domain is assumed to be only humans:

- “having the same birthday as”: an equivalence relation
- “is a sister of”: symmetric if the domain is only females
- “being taller than”: transitive, asymmetric, irreflexive
- “being at least as tall as”: transitive, reflexive, strongly connected
- “is the father of”: intransitive, asymmetric, irreflexive, for most domains many pairs of elements won’t be comparable

Assume `R`

is a binary relation on a domain `Δ`

. Theorists then sometimes talk about a set `Α ⊆ Δ`

**being closed** under relation `R`

. This means: `∀a ∈ Α ∀x ∈ Δ (Rax ⊃ x ∈ Α)`

.
(Extrapolating, if `R`

is an ternary relation on `Δ`

, `Α`

is closed under `R`

iff `∀a ∈ Α ∀b ∈ Α ∀x ∈ Δ (Rabx ⊃ x ∈ Α)`

. And so on.)

Theorists also sometimes talk about **the closure** of a set `Α`

under a relation like `R`

. This means the “smallest” superset of `Α`

that is closed under that relation. (Here understanding one set to be smaller than the other when it’s a proper subset. We’ll discuss other ways of comparing the sizes of sets in later classes.) Equivalently, you could define this as the intersection of all supersets of `Α`

that are closed under the relation.

Theorists also talk about closures of relations. For example, the reflexive closure of a relation `R`

is the relation whose graph is `{(x,y) | xRy ∨ x = y}`

. If `R`

is already reflexive, this will be the same relation.

The symmetric closure of a relation `R`

is the relation whose graph is `{(x,y) | xRy ∨ yRx}`

. If `R`

is already symmetric, this will be the same relation.

The transitive closure of a relation is a bit more complicated to define rigorously, but the intuitive idea is like what we’ve just done. Recall that `x`

stands in the **composition** of relation `R₁`

and relation `R₂`

to `z`

(written `(R₂ ∘ R₁)xz`

) iff there’s some `y`

such that `x`

stands in `R₁`

to `y`

and `y`

stands in `R₂`

to `z`

. Recall also we had the notation with functions that `f¹ = f`

, `f² = f ∘ f`

, `f³ = f ∘ f ∘ f`

, and so on. Similarly, we can define `R¹ = R`

, `R² = R ∘ R`

, `R³ = R ∘ R ∘ R`

. In general, R^{k+1} = R ∘ R^{k} = R^{k} ∘ R.

Then the transitive closure of `R`

(sometimes written as R^{+}) can be defined as the relation whose graph is the union of all the R^{k}s for `k > 0`

. That is, .

Here’s another way to think about the transitive closure of a relation `R`

on domain `Α`

. Define a new relation `ρ`

on pairs of As such that `(a,b)ρ(a′,c)`

iff `a = a′ & bRc`

. Above we explained the notion of a closure of a set under a relation. Consider the graph of `R`

(which will be a subset of `Α²`

) and take its closure under relation `ρ`

. Call this resulting set `Ρ`

. Then whenever `aRb & bRc`

, `(a,b)`

will be `∈ R`

’s graph (and so also `∈`

its superset `Ρ`

) and will bear `ρ`

to `(a,c)`

(by the definition of `ρ`

), thus since `Ρ`

is closed under `ρ`

, `(a,c)`

will be `∈ Ρ`

. The relation whose graph is `Ρ`

will be the transitive closure of `R`

.

Often theorists want to work with what’s both the transitive and reflexive closure of a relation. This is the relation whose graph is the union of the graphs of:

- R
^{+}, and - the identity relation on
`R`

’s domain (which can be written as`R⁰`

)

The transitive and reflexive closure of `R`

is sometimes written as R^{*}. The general idea behind these superscripts is that `*`

means “0 or more times” and `+`

means “1 or more times.” (Other times R^{*} is used to mean what I’m writing as R^{+}.)

If

`R`

is the relation “is a parent of,” then R^{+}would be the relation “is an ancestor of”. (Indeed, another way of describing the transitive closure of`R`

is as “the ancestral of`R`

.”) R^{*}would be the relation which is like R^{+}, but which people also stand in to themselves.Let

`S`

be the successor relation on`ℕ`

: that is, let`xSy`

mean that`y`

is a successor of`x`

. So`0S1`

,`1S2`

,`2S3`

, and so on. But it’s not the case that`0S2`

,`0S3`

, and so on. However`0`

will stand in S^{+}to`2`

and to`3`

. Indeed S^{+}is equivalent to the relation`<`

on`ℕ`

. And S^{*}is equivalent to the relation`≤`

.