Difference between domain and range for relations and functions? What is the difference between the definition of domain and range for a relation, and that for a function?

There is no difference. Note, that each function can be seen as a special relation. So $f:A \rightarrow B$ can be seen as a relation $R_f \subseteq A\times B$ such as
$$\forall x \in A: \exists ! y \in B: xR_fy$$
The domain and the range is so defined, such that the relation $R_f$ has the same domain and the range as $f$.
Note: Here I mean with "range" the "image of $f$".
