I'm reading through a few analysis books and I am a little confused by some of the definitions that are given for functions. Some texts define functions to be some subset of the cartesian product of two sets, given that the elements of this subset satisfy the properties of a function. This is intuitively clear to me, but others first define the idea of a relation and then define functions to be a sort of relation that satisfies the typical properties of a function.
This is confusing to me since I have always thought of relations as having truth values and functions as having no truth value. Is it appropriate to think of relations as having truth values and functions as not having truth values? Are the varying definitions compatible or is one wrong? I appreciate any help.