In other words: is it a requisite that there exists at least one ordered pair of the form $(x,y)$ for every $x\in X$. where $x\in X$, $y\in Y$ and the relation is of the form $XrY$?
$\endgroup$ 72 Answers
$\begingroup$Yes. The definition of a function is a relation which has an additional property: if both $(x,y)$ and $(x,z)$ are in the relation then $y=z$.
More to the point, though, the notation $f\colon X\to Y$ means three things:
- $f$ is a function, which is a relation with this special property.
- $\operatorname{dom}(f)=X$, so every point in $x$ appears as the left coordinate of some ordered pair in $f$.
- $\operatorname{rng}(f)\subseteq Y$, so if $(x,y)\in f$ then $y\in Y$.
There are contexts where we remove the second requirement. For example in forcing we often want to talk about partial functions from a large domain, so we omit the second requirement. But this is usually mentioned explicitly in the text.
$\endgroup$ 8 $\begingroup$As Halmos says, see a relation (in particular a function) in terms of something that is, not something that does.
A relation is a subset of $X\times Y$. That is all. You choose pairs $(x,y)$ with $x\in X,y\in Y$. If $(x,y)\in R$; then $x$ stands in relation with $y$.
A function is a special kind of relation: all elements of $X$ must be related to at least one element of $Y$. Moreover, this element $x\in X$ is related to is unique, that is, $x$ cannot be related to more than one element of $Y$.
So, for example, a function $f:\{1,3,6,5\}\to\{a,b,c\}$ is $$f=\{(1,a),(3,b),(6,b),(5,c)\}$$
while a relation can be $$R=\{(1,a),(1,b),(3,b),(3,c)\}$$
$\endgroup$ 2