Phil 455: Relations

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 zs. 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 zs. (Restricted to certain domains of xs, 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:

More on functions, relations, and sets

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.