On Sunday, October 6, 2013 3:42:04 PM UTC-5, Peter Percival wrote: > Arturo Magidin wrote: > > > > > > > > Technically, two functions are equal if and only if they have the > > > same domain, and they take the same value at each point on the > > > domain. > > > > I wonder why you don't require the codomains to be the same as well. > > Two functions might be equal according to that definition but one could > > be invertible and the other not.
If you view functions as "sets of ordered pairs", then they are equal when they are equal as sets; the *codomain* is just any set that contains the range, and so the same function may be viewed as having many possible codomains.
Under this view, of course, it does not really make sense to talk about a function being "surjective". Under this view, instead, we talk about whether or not a function is "surjective onto B", specifying the set in question.
Under the definition of function as a set of ordered pairs, a function is invertible if and only if the opposite relation is also a function.
There is another way of viewing function, through, which is to view them as ordered triples, (A,B,f), where A and B are sets, f is a function in the sense of a set of ordered pairs, the domain of f is A, and the range of f is contained in B. Under this definition, it now makes sense to talk about whether or not the function is surjective (when the image of f equals B); and under this definition, two functions are equal if and only if they have (i) the same domain, (ii) the same codomain; and (iii) the same value at each point of the domain.
The view of "function as nothing but a set of ordered pairs" vs. the view of "function as an ordered triple of domain, codomain, ordered pairs" is in fact important, as there are situations where it is essential to consider the codomain, and there are situations in which ignoring the codomain is likewise essential.
In the context of calculus, you'll find that functions are called "invertible" if and only if they are one-to-one ("pass the horizontal line test"), and so we are dealing, usually, with the first notion and ignoring the codomain.