I always defined a function as a set of ordered pairs $(x,y)$ such that some property holds, and now that I think about it, I think it doesn't make sense to talk about surjectiveness with this definition.
When defining a function as a tuple $(f,A,B)$ where $f$ is a functional relation, $A=\text{Dom}f$ and $B\supseteq\text{Im}f$ it does make sense to talk about surjectiveness, because $B$ may be a proper superset of $\text{Im}f$, so we need some differentiation to talk about surjective or non-surjective functions with this definition.
But now, as I see it, if we define a function as set of ordered pairs, it doesn't make sense to talk about surjectiveness, but if we define it as a tuple it does make sense, so, the choice of the definition of a function tells wether this concept of surjectiveness makes sense, which should not happen, as a function is a function, and its properties should not change when changing the definition(if the definitions are equivalent, obviously).
So, what am I missing here, or, which is the "correct" definition of a function? Certainly surjectiveness has helped to tackle some problems, but the choice of definition should not change the properties, I think. Am I correct?