Whereas we talk of functions’ having a value for a given argument (or for given arguments, 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₂,…,xn) to a value z
iff R
holds between x₁,x₂,…,xn and z
. (In general, you cannot rely on this being a total function; since R
may not hold between every x
in the domain you’re considering and another object.) 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. (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₂,…,xn,z) to the truth-value true
if R
holds between x₁,x₂,…,xn and z
, and to the truth-value false
otherwise.
Vocabulary like “domain,” “injective,” “surjective,” “composition,” and so on is applied to relations in a way analagous 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
.
In our upcoming classes, we’ll discuss special categories of relations in more detail, especially the relations that we can think of as “ordering” their arguments. For the moment, I’ll just introduce a few pieces of vocabulary describing some binary relations, which I expect you’ll already have encountered somewhere:
A binary 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
.
A binary 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 later. 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 binary 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 Α ∈ Γ
.)
We described two ways in which you could “translate” between relations and functions. Earlier, we also 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₂,…,xn,z) and (x₁,x₂,…,xn,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.