 
Summary: Relations and functions.
A relation is a set of ordered pairs.
Let r be a relation. The domain of r, denoted by
dmnr,
is the set {x : for some y, (x, y) r}, and the the range of r, denoted by
rngr,
is the set {y : for some x, (x, y) r}. Suppose A is a set. The restriction of r to A, denoted by
rA,
is the relation {(x, y) r : x A}. r of A, denoted by
r[A],
is the set {y : for some x, x A and (x, y) r}. The inverse of r, denoted by
r1
,
is the relation {(y, x) : (x, y) r}.
If r and s are relations the composition of s with r, denoted by
s r,
is the relation {(x, z) : for some y, (x, y) r and (y, z) s}. The operation of composition of relations is
easily seen to be associative which is to say that
t (s r) = (t s) r
whenever r, s and t are relations.
